@cubejs-client/playground 1.8.16 → 1.8.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/build/vizard/assets/{cssMode-DtHNIdrr.js → cssMode-hgwruqj4.js} +1 -1
  2. package/{public/vizard/assets/freemarker2-D3hRPg66.js → build/vizard/assets/freemarker2-CtIurkuU.js} +1 -1
  3. package/{public/vizard/assets/handlebars-CmzyTLHM.js → build/vizard/assets/handlebars-sthQLz2Z.js} +1 -1
  4. package/{public/vizard/assets/html-BQlDvTLO.js → build/vizard/assets/html-DM9e-U-z.js} +1 -1
  5. package/build/vizard/assets/{htmlMode-B5vyN_yh.js → htmlMode-HvTeKP_c.js} +1 -1
  6. package/build/vizard/assets/icons-CXitmb5a.js +57 -0
  7. package/build/vizard/assets/index-D8PzmooP.js +7 -0
  8. package/build/vizard/assets/{javascript-Cqq1UmLD.js → javascript-C-rqiNxS.js} +1 -1
  9. package/{public/vizard/assets/jsonMode-CZ-xTnh0.js → build/vizard/assets/jsonMode-BJ3x3raR.js} +1 -1
  10. package/build/vizard/assets/{liquid-BwaniY5x.js → liquid-C7Pz5ZI3.js} +1 -1
  11. package/build/vizard/assets/{mdx-FYEkmf7B.js → mdx-B00F0-De.js} +1 -1
  12. package/build/vizard/assets/{monaco-CYdCgY0W.js → monaco-DziUc9N2.js} +3 -3
  13. package/build/vizard/assets/{python-CjR2h7KU.js → python-CBWCROMG.js} +1 -1
  14. package/build/vizard/assets/{razor-D4Y0dbDk.js → razor-BxsnWZFP.js} +1 -1
  15. package/{public/vizard/assets/tsMode-Cvjisfey.js → build/vizard/assets/tsMode-dvsmiEdm.js} +1 -1
  16. package/build/vizard/assets/{typescript-DwgdF-Pj.js → typescript-Bq9U0L_Y.js} +1 -1
  17. package/build/vizard/assets/uikit-Drm91Xd7.js +446 -0
  18. package/build/vizard/assets/{xml-xRWrYvkC.js → xml-pmw-kWy1.js} +1 -1
  19. package/build/vizard/assets/{yaml-W6T5Qjhq.js → yaml-DUYUU1_r.js} +1 -1
  20. package/build/vizard/download/react-typescript-antd-table.zip +0 -0
  21. package/build/vizard/download/react-typescript-chartjs-area+bar+doughnut+line+pie.zip +0 -0
  22. package/build/vizard/index.html +4 -4
  23. package/package.json +5 -5
  24. package/public/vizard/assets/{cssMode-DtHNIdrr.js → cssMode-hgwruqj4.js} +1 -1
  25. package/{build/vizard/assets/freemarker2-D3hRPg66.js → public/vizard/assets/freemarker2-CtIurkuU.js} +1 -1
  26. package/{build/vizard/assets/handlebars-CmzyTLHM.js → public/vizard/assets/handlebars-sthQLz2Z.js} +1 -1
  27. package/{build/vizard/assets/html-BQlDvTLO.js → public/vizard/assets/html-DM9e-U-z.js} +1 -1
  28. package/public/vizard/assets/{htmlMode-B5vyN_yh.js → htmlMode-HvTeKP_c.js} +1 -1
  29. package/public/vizard/assets/icons-CXitmb5a.js +57 -0
  30. package/public/vizard/assets/index-D8PzmooP.js +7 -0
  31. package/public/vizard/assets/{javascript-Cqq1UmLD.js → javascript-C-rqiNxS.js} +1 -1
  32. package/{build/vizard/assets/jsonMode-CZ-xTnh0.js → public/vizard/assets/jsonMode-BJ3x3raR.js} +1 -1
  33. package/public/vizard/assets/{liquid-BwaniY5x.js → liquid-C7Pz5ZI3.js} +1 -1
  34. package/public/vizard/assets/{mdx-FYEkmf7B.js → mdx-B00F0-De.js} +1 -1
  35. package/public/vizard/assets/{monaco-CYdCgY0W.js → monaco-DziUc9N2.js} +3 -3
  36. package/public/vizard/assets/{python-CjR2h7KU.js → python-CBWCROMG.js} +1 -1
  37. package/public/vizard/assets/{razor-D4Y0dbDk.js → razor-BxsnWZFP.js} +1 -1
  38. package/{build/vizard/assets/tsMode-Cvjisfey.js → public/vizard/assets/tsMode-dvsmiEdm.js} +1 -1
  39. package/public/vizard/assets/{typescript-DwgdF-Pj.js → typescript-Bq9U0L_Y.js} +1 -1
  40. package/public/vizard/assets/uikit-Drm91Xd7.js +446 -0
  41. package/public/vizard/assets/{xml-xRWrYvkC.js → xml-pmw-kWy1.js} +1 -1
  42. package/public/vizard/assets/{yaml-W6T5Qjhq.js → yaml-DUYUU1_r.js} +1 -1
  43. package/public/vizard/download/react-typescript-antd-table.zip +0 -0
  44. package/public/vizard/download/react-typescript-chartjs-area+bar+doughnut+line+pie.zip +0 -0
  45. package/public/vizard/index.html +4 -4
  46. package/build/vizard/assets/icons-CwVYGRlZ.js +0 -57
  47. package/build/vizard/assets/index-8akypj6R.js +0 -7
  48. package/build/vizard/assets/uikit-Bx93IdUi.js +0 -446
  49. package/public/vizard/assets/icons-CwVYGRlZ.js +0 -57
  50. package/public/vizard/assets/index-8akypj6R.js +0 -7
  51. package/public/vizard/assets/uikit-Bx93IdUi.js +0 -446
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/freemarker2-D3hRPg66.js","assets/uikit-Bx93IdUi.js","assets/other-DNLijWhD.js","assets/icons-CwVYGRlZ.js","assets/handlebars-CmzyTLHM.js","assets/html-BQlDvTLO.js","assets/javascript-Cqq1UmLD.js","assets/typescript-DwgdF-Pj.js","assets/liquid-BwaniY5x.js","assets/mdx-FYEkmf7B.js","assets/python-CjR2h7KU.js","assets/razor-D4Y0dbDk.js","assets/xml-xRWrYvkC.js","assets/yaml-W6T5Qjhq.js","assets/cssMode-DtHNIdrr.js","assets/htmlMode-B5vyN_yh.js","assets/jsonMode-CZ-xTnh0.js","assets/tsMode-Cvjisfey.js"])))=>i.map(i=>d[i]);
2
- import{_ as be}from"./uikit-Bx93IdUi.js";function vo(o,e=0){return o[o.length-(1+e)]}function NH(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function mi(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;i<n;i++)if(!t(o[i],e[i]))return!1;return!0}function TH(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function O_(o,e,t){return RH(o.length,i=>t(o[i],e))}function RH(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function UD(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o<n.length?UD(o,n,t):o<n.length+r.length?r[0]:UD(o-(n.length+r.length),s,t)}function LA(o,e){const t=[];let i;for(const n of o.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function*I3(o,e){let t,i;for(const n of o)i!==void 0&&e(i,n)?t.push(n):(t&&(yield t),t=[n]),i=n;t&&(yield t)}function E3(o,e){for(let t=0;t<=o.length;t++)e(t===0?void 0:o[t-1],t===o.length?void 0:o[t])}function MH(o,e){for(let t=0;t<o.length;t++)e(t===0?void 0:o[t-1],o[t],t+1===o.length?void 0:o[t+1])}function Ga(o){return o.filter(e=>!!e)}function xA(o){let e=0;for(let t=0;t<o.length;t++)o[t]&&(o[e]=o[t],e+=1);o.length=e}function N3(o){return!Array.isArray(o)||o.length===0}function Fn(o){return Array.isArray(o)&&o.length>0}function vc(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function T3(o,e){return o.length>0?o[0]:e}function Xn(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function _S(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function BL(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function cb(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function $D(o,e){for(const t of e)o.push(t)}function t2(o){return Array.isArray(o)?o:[o]}function AH(o,e,t){const i=R3(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r<s;r++)o[r+i]=t[r]}function DA(o,e,t,i){const n=R3(o,e);let s=o.splice(n,t);return s===void 0&&(s=[]),AH(o,n,i),s}function R3(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var F_;(function(o){function e(s){return s<0}o.isLessThan=e;function t(s){return s<=0}o.isLessThanOrEqual=t;function i(s){return s>0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(F_||(F_={}));function Eo(o,e){return(t,i)=>e(o(t),o(i))}function PH(...o){return(e,t)=>{for(const i of o){const n=i(e,t);if(!F_.isNeitherLessOrGreaterThan(n))return n}return F_.neitherLessOrGreaterThan}}const Zl=(o,e)=>o-e,OH=(o,e)=>Zl(o?1:0,e?1:0);function M3(o){return(e,t)=>-o(e,t)}class od{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(this.length!==0)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 Ua{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new Ua(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new Ua(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||F_.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}}Ua.empty=new Ua(o=>{});function rs(o){return typeof o=="string"}function is(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function FH(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function bc(o){return typeof o=="number"&&!isNaN(o)}function kA(o){return!!o&&typeof o[Symbol.iterator]=="function"}function A3(o){return o===!0||o===!1}function Rs(o){return typeof o>"u"}function B_(o){return!Ys(o)}function Ys(o){return Rs(o)||o===null}function xt(o,e){if(!o)throw new Error("Unexpected type")}function Wh(o){if(Ys(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function W_(o){return typeof o=="function"}function BH(o,e){const t=Math.min(o.length,e.length);for(let i=0;i<t;i++)WH(o[i],e[i])}function WH(o,e){if(rs(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(W_(e)){try{if(o instanceof e)return}catch{}if(!Ys(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Il(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Il(i):i}),e}function VH(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(P3.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!FH(n)&&e.push(n)}}return o}const P3=Object.prototype.hasOwnProperty;function O3(o,e){return jD(o,e,new Set)}function jD(o,e,t){if(Ys(o))return o;const i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){const n=[];for(const s of o)n.push(jD(s,e,t));return n}if(is(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)P3.call(o,s)&&(n[s]=jD(o[s],e,t));return t.delete(o),n}return o}function vS(o,e,t=!0){return is(o)?(is(e)&&Object.keys(e).forEach(i=>{i in o?t&&(is(o[i])&&is(e[i])?vS(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function oo(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t<o.length;t++)if(!oo(o[t],e[t]))return!1}else{const n=[];for(i in o)n.push(i);n.sort();const s=[];for(i in e)s.push(i);if(s.sort(),!oo(n,s))return!1;for(t=0;t<n.length;t++)if(!oo(o[n[t]],e[n[t]]))return!1}return!0}function HH(o){let e=[];for(;Object.prototype!==o;)e=e.concat(Object.getOwnPropertyNames(o)),o=Object.getPrototypeOf(o);return e}function i2(o){const e=[];for(const t of HH(o))typeof o[t]=="function"&&e.push(t);return e}function zH(o,e){const t=n=>function(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}let UH=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function $H(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),UH&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function g(o,e,...t){return $H(e,t)}var WL;const Wf="en";let p1=!1,m1=!1,TC=!1,F3=!1,n2=!1,s2=!1,B3=!1,hb,RC=Wf,IA=Wf,jH,Lr;const sr=typeof self=="object"?self:typeof global=="object"?global:{};let Qn;typeof sr.vscode<"u"&&typeof sr.vscode.process<"u"?Qn=sr.vscode.process:typeof process<"u"&&(Qn=process);const KH=typeof((WL=Qn?.versions)===null||WL===void 0?void 0:WL.electron)=="string",qH=KH&&Qn?.type==="renderer";if(typeof navigator=="object"&&!qH)Lr=navigator.userAgent,p1=Lr.indexOf("Windows")>=0,m1=Lr.indexOf("Macintosh")>=0,s2=(Lr.indexOf("Macintosh")>=0||Lr.indexOf("iPad")>=0||Lr.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,TC=Lr.indexOf("Linux")>=0,B3=Lr?.indexOf("Mobi")>=0,n2=!0,g({},"_"),hb=Wf,RC=hb,IA=navigator.language;else if(typeof Qn=="object"){p1=Qn.platform==="win32",m1=Qn.platform==="darwin",TC=Qn.platform==="linux",TC&&Qn.env.SNAP&&Qn.env.SNAP_REVISION,Qn.env.CI||Qn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,hb=Wf,RC=Wf;const o=Qn.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];hb=e.locale,IA=e.osLocale,RC=t||Wf,jH=e._translationsConfigFile}catch{}F3=!0}else console.error("Unable to resolve platform.");const En=p1,at=m1,Zn=TC,Za=F3,Kc=n2,GH=n2&&typeof sr.importScripts=="function",Yr=s2,ZH=B3,Ya=Lr,YH=RC,XH=typeof sr.postMessage=="function"&&!sr.importScripts,W3=(()=>{if(XH){const o=[];sr.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i<n;i++){const s=o[i];if(s.id===t.data.vscodeScheduleAsyncWork){o.splice(i,1),s.callback();return}}});let e=0;return t=>{const i=++e;o.push({id:i,callback:t}),sr.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),to=m1||s2?2:p1?1:3;let EA=!0,NA=!1;function V3(){if(!NA){NA=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,EA=new Uint16Array(o.buffer)[0]===513}return EA}const H3=!!(Ya&&Ya.indexOf("Chrome")>=0),QH=!!(Ya&&Ya.indexOf("Firefox")>=0),JH=!!(!H3&&Ya&&Ya.indexOf("Safari")>=0),ez=!!(Ya&&Ya.indexOf("Edg/")>=0);Ya&&Ya.indexOf("Android")>=0;const An={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var Xe;(function(o){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(b){yield b}o.single=n;function s(b){return e(b)?b:n(b)}o.wrap=s;function r(b){return b||t}o.from=r;function*a(b){for(let C=b.length-1;C>=0;C--)yield b[C]}o.reverse=a;function l(b){return!b||b[Symbol.iterator]().next().done===!0}o.isEmpty=l;function d(b){return b[Symbol.iterator]().next().value}o.first=d;function c(b,C){for(const w of b)if(C(w))return!0;return!1}o.some=c;function h(b,C){for(const w of b)if(C(w))return w}o.find=h;function*u(b,C){for(const w of b)C(w)&&(yield w)}o.filter=u;function*f(b,C){let w=0;for(const S of b)yield C(S,w++)}o.map=f;function*p(...b){for(const C of b)for(const w of C)yield w}o.concat=p;function m(b,C,w){let S=w;for(const D of b)S=C(S,D);return S}o.reduce=m;function*v(b,C,w=b.length){for(C<0&&(C+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);C<w;C++)yield b[C]}o.slice=v;function _(b,C=Number.POSITIVE_INFINITY){const w=[];if(C===0)return[w,b];const S=b[Symbol.iterator]();for(let D=0;D<C;D++){const x=S.next();if(x.done)return[w,o.empty()];w.push(x.value)}return[w,{[Symbol.iterator](){return S}}]}o.consume=_})(Xe||(Xe={}));let Ti=class KD{constructor(e){this.element=e,this.next=KD.Undefined,this.prev=KD.Undefined}};Ti.Undefined=new Ti(void 0);class ns{constructor(){this._first=Ti.Undefined,this._last=Ti.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ti.Undefined}clear(){let e=this._first;for(;e!==Ti.Undefined;){const t=e.next;e.prev=Ti.Undefined,e.next=Ti.Undefined,e=t}this._first=Ti.Undefined,this._last=Ti.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Ti(e);if(this._first===Ti.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Ti.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ti.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ti.Undefined&&e.next!==Ti.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ti.Undefined&&e.next===Ti.Undefined?(this._first=Ti.Undefined,this._last=Ti.Undefined):e.next===Ti.Undefined?(this._last=this._last.prev,this._last.next=Ti.Undefined):e.prev===Ti.Undefined&&(this._first=this._first.next,this._first.prev=Ti.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ti.Undefined;)yield e.element,e=e.next}}const z3="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function tz(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of z3)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const o2=tz();function U3(o){let e=o2;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const $3=new ns;$3.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function V_(o,e,t,i,n){if(n||(n=Xe.first($3)),t.length>n.maxLen){let d=o-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,o+n.maxLen/2),V_(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-s>=n.timeBudget);d++){const c=r-n.windowSize*d;e.lastIndex=Math.max(0,c);const h=iz(e,t,r,a);if(!h&&l||(l=h,c<=0))break;a=c}if(l){const d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function iz(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const xd=8;class j3{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class K3{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Qt{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return bS(e,t)}compute(e,t,i){return i}}class n_{constructor(e,t){this.newValue=e,this.didChange=t}}function bS(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new n_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&mi(o,e);return new n_(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=bS(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new n_(o,t)}class p0{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return bS(e,t)}validate(e){return this.defaultValue}}class Tp{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return bS(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function Se(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class ct extends Tp{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return Se(e,this.defaultValue)}}function bh(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class It extends Tp{static clampedInt(e,t,i,n){return bh(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return It.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function nz(o,e,t,i){if(typeof o>"u")return e;const n=Jo.float(o,e);return Jo.clamp(n,t,i)}class Jo extends Tp{static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(Jo.float(e,this.defaultValue))}}class Es extends Tp{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Es.string(e,this.defaultValue)}}function Ci(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}class si extends Tp{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return Ci(e,this.defaultValue,this._allowedValues)}}class ub extends Qt{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function sz(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class oz extends Qt{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[g("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),g("accessibilitySupport.on","Optimize for usage with a Screen Reader"),g("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:g("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 i===0?e.accessibilitySupport:i}}class rz extends Qt{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:g("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:g("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Se(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Se(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function az(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var dn;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(dn||(dn={}));function lz(o){switch(o){case"line":return dn.Line;case"block":return dn.Block;case"underline":return dn.Underline;case"line-thin":return dn.LineThin;case"block-outline":return dn.BlockOutline;case"underline-thin":return dn.UnderlineThin}}class dz extends p0{constructor(){super(140)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(73)==="default"?n.push("mouse-default"):t.get(73)==="copy"&&n.push("mouse-copy"),t.get(110)&&n.push("showUnused"),t.get(138)&&n.push("showDeprecated"),n.join(" ")}}class cz extends ct{constructor(){super(37,"emptySelectionClipboard",!0,{description:g("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class hz extends Qt{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:g("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:[g("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),g("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),g("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:g("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:[g("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),g("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),g("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:g("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:g("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:at},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:g("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:g("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||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Se(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ci(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ci(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Se(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Se(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Se(t.loop,this.defaultValue.loop)}}}class Xs extends Qt{constructor(){super(51,"fontLigatures",Xs.OFF,{anyOf:[{type:"boolean",description:g("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:g("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:g("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 typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Xs.OFF:e==="true"?Xs.ON:e:e?Xs.ON:Xs.OFF}}Xs.OFF='"liga" off, "calt" off';Xs.ON='"liga" on, "calt" on';class Wr extends Qt{constructor(){super(54,"fontVariations",Wr.OFF,{anyOf:[{type:"boolean",description:g("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:g("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:g("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 typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Wr.OFF:e==="true"?Wr.TRANSLATE:e:e?Wr.TRANSLATE:Wr.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}Wr.OFF="normal";Wr.TRANSLATE="translate";class uz extends p0{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class fz extends Tp{constructor(){super(52,"fontSize",Ps.fontSize,{type:"number",minimum:6,maximum:100,default:Ps.fontSize,description:g("fontSize","Controls the font size in pixels.")})}validate(e){const t=Jo.float(e,this.defaultValue);return t===0?Ps.fontSize:Jo.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class La extends Qt{constructor(){super(53,"fontWeight",Ps.fontWeight,{anyOf:[{type:"number",minimum:La.MINIMUM_VALUE,maximum:La.MAXIMUM_VALUE,errorMessage:g("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:La.SUGGESTION_VALUES}],default:Ps.fontWeight,description:g("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(It.clampedInt(e,Ps.fontWeight,La.MINIMUM_VALUE,La.MAXIMUM_VALUE))}}La.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];La.MINIMUM_VALUE=1;La.MAXIMUM_VALUE=1e3;class gz extends Qt{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:[g("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),g("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),g("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(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:g("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:g("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:g("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:g("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:g("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:g("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:g("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:g("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:g("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:g("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:g("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,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Ci(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Ci(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Ci(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Ci(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Ci(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Ci(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Es.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Es.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Es.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Es.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Es.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class pz extends Qt{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:g("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:g("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:g("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:g("hover.hidingDelay","Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:g("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),delay:It.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Se(t.sticky,this.defaultValue.sticky),hidingDelay:It.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Se(t.above,this.defaultValue.above)}}}class ug extends p0{constructor(){super(143)}compute(e,t,i){return ug.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 s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=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(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,v=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,w=h?2:3;let S=Math.floor(s*n);const D=S/s;let x=!1,I=!1,N=w*u,W=u/s,U=1;if(p==="fill"||p==="fit"){const{typicalViewportLineCount:xe,extraLinesBeforeFirstLine:me,extraLinesBeyondLastLine:Fe,desiredRatio:Oe,minimapLineCount:Le}=ug.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(_/Le>1)x=!0,I=!0,u=1,N=1,W=u/s;else{let xi=!1,_n=u+1;if(p==="fit"){const Oi=Math.ceil((me+_+Fe)*N);C&&a&&b<=t.stableFitRemainingWidth?(xi=!0,_n=t.stableFitMaxMinimapScale):xi=Oi>S}if(p==="fill"||xi){x=!0;const Oi=u;N=Math.min(l*s,Math.max(1,Math.floor(1/Oe))),C&&a&&b<=t.stableFitRemainingWidth&&(_n=t.stableFitMaxMinimapScale),u=Math.min(_n,Math.max(1,Math.floor(N/w))),u>Oi&&(U=Math.min(2,u/Oi)),W=u/s/U,S=Math.ceil(Math.max(xe,me+_+Fe)*N),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const F=Math.floor(f*W),O=Math.min(F,Math.max(0,Math.floor((b-v-2)*W/(d+W)))+xd);let G=Math.floor(s*O);const Q=G/s;G=Math.floor(G*U);const ge=h?1:2,_e=m==="left"?0:i-O-v;return{renderMinimap:ge,minimapLeft:_e,minimapWidth:O,minimapHeightIsEditorHeight:x,minimapIsSampling:I,minimapScale:u,minimapLineHeight:N,minimapCanvasInnerWidth:G,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:Q,minimapCanvasOuterHeight:D}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,c=t.viewLineCount,h=e.get(135),u=h==="inherit"?e.get(134):h,f=u==="inherit"?e.get(130):u,p=e.get(133),m=t.isDominatedByLongLines,v=e.get(57),_=e.get(67).renderType!==0,b=e.get(68),C=e.get(104),w=e.get(83),S=e.get(72),D=e.get(102),x=D.verticalScrollbarSize,I=D.verticalHasArrows,N=D.arrowSize,W=D.horizontalScrollbarSize,U=e.get(43),F=e.get(109)!=="never";let O=e.get(65);U&&F&&(O+=16);let G=0;if(_){const Vi=Math.max(r,b);G=Math.round(Vi*l)}let Q=0;v&&(Q=s*t.glyphMarginDecorationLaneCount);let ge=0,_e=ge+Q,xe=_e+G,me=xe+O;const Fe=i-Q-G-O;let Oe=!1,Le=!1,le=-1;u==="inherit"&&m?(Oe=!0,Le=!0):f==="on"||f==="bounded"?Le=!0:f==="wordWrapColumn"&&(le=p);const xi=ug._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:S,verticalScrollbarWidth:x,viewLineCount:c,remainingWidth:Fe,isViewportWrapping:Le},t.memory||new K3);xi.renderMinimap!==0&&xi.minimapLeft===0&&(ge+=xi.minimapWidth,_e+=xi.minimapWidth,xe+=xi.minimapWidth,me+=xi.minimapWidth);const _n=Fe-xi.minimapWidth,Oi=Math.max(1,Math.floor((_n-x-2)/a)),vt=I?N:0;return Le&&(le=Math.max(1,Oi),f==="bounded"&&(le=Math.min(le,p))),{width:i,height:n,glyphMarginLeft:ge,glyphMarginWidth:Q,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:_e,lineNumbersWidth:G,decorationsLeft:xe,decorationsWidth:O,contentLeft:me,contentWidth:_n,minimap:xi,viewportColumn:Oi,isWordWrapMinified:Oe,isViewportWrapping:Le,wrappingColumn:le,verticalScrollbarWidth:x,horizontalScrollbarHeight:W,overviewRuler:{top:vt,width:x,height:n-2*vt,right:0}}}}class mz extends Qt{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[g("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."),g("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:g("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 Ci(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}class _z extends Qt{constructor(){const e={enabled:!0};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:g("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Se(e.enabled,this.defaultValue.enabled)}}}class vz extends Qt{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:g("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:g("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:g("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:g("editor.stickyScroll.scrollWithEditor","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),maxLineCount:It.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Ci(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Se(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class bz extends Qt{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:g("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[g("editor.inlayHints.on","Inlay hints are enabled"),g("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:g("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:g("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:g("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Ci(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:It.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Es.string(t.fontFamily,this.defaultValue.fontFamily),padding:Se(t.padding,this.defaultValue.padding)}}}class Cz extends Qt{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):It.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?It.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class wz extends Jo{constructor(){super(66,"lineHeight",Ps.lineHeight,e=>Jo.clamp(e,0,150),{markdownDescription:g("lineHeight",`Controls the line height.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/freemarker2-CtIurkuU.js","assets/uikit-Drm91Xd7.js","assets/other-DNLijWhD.js","assets/icons-CXitmb5a.js","assets/handlebars-sthQLz2Z.js","assets/html-DM9e-U-z.js","assets/javascript-C-rqiNxS.js","assets/typescript-Bq9U0L_Y.js","assets/liquid-C7Pz5ZI3.js","assets/mdx-B00F0-De.js","assets/python-CBWCROMG.js","assets/razor-BxsnWZFP.js","assets/xml-pmw-kWy1.js","assets/yaml-DUYUU1_r.js","assets/cssMode-hgwruqj4.js","assets/htmlMode-HvTeKP_c.js","assets/jsonMode-BJ3x3raR.js","assets/tsMode-dvsmiEdm.js"])))=>i.map(i=>d[i]);
2
+ import{_ as be}from"./uikit-Drm91Xd7.js";function vo(o,e=0){return o[o.length-(1+e)]}function NH(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function mi(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;i<n;i++)if(!t(o[i],e[i]))return!1;return!0}function TH(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function O_(o,e,t){return RH(o.length,i=>t(o[i],e))}function RH(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function UD(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o<n.length?UD(o,n,t):o<n.length+r.length?r[0]:UD(o-(n.length+r.length),s,t)}function LA(o,e){const t=[];let i;for(const n of o.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function*I3(o,e){let t,i;for(const n of o)i!==void 0&&e(i,n)?t.push(n):(t&&(yield t),t=[n]),i=n;t&&(yield t)}function E3(o,e){for(let t=0;t<=o.length;t++)e(t===0?void 0:o[t-1],t===o.length?void 0:o[t])}function MH(o,e){for(let t=0;t<o.length;t++)e(t===0?void 0:o[t-1],o[t],t+1===o.length?void 0:o[t+1])}function Ga(o){return o.filter(e=>!!e)}function xA(o){let e=0;for(let t=0;t<o.length;t++)o[t]&&(o[e]=o[t],e+=1);o.length=e}function N3(o){return!Array.isArray(o)||o.length===0}function Fn(o){return Array.isArray(o)&&o.length>0}function vc(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function T3(o,e){return o.length>0?o[0]:e}function Xn(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function _S(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function BL(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function cb(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function $D(o,e){for(const t of e)o.push(t)}function t2(o){return Array.isArray(o)?o:[o]}function AH(o,e,t){const i=R3(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r<s;r++)o[r+i]=t[r]}function DA(o,e,t,i){const n=R3(o,e);let s=o.splice(n,t);return s===void 0&&(s=[]),AH(o,n,i),s}function R3(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var F_;(function(o){function e(s){return s<0}o.isLessThan=e;function t(s){return s<=0}o.isLessThanOrEqual=t;function i(s){return s>0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(F_||(F_={}));function Eo(o,e){return(t,i)=>e(o(t),o(i))}function PH(...o){return(e,t)=>{for(const i of o){const n=i(e,t);if(!F_.isNeitherLessOrGreaterThan(n))return n}return F_.neitherLessOrGreaterThan}}const Zl=(o,e)=>o-e,OH=(o,e)=>Zl(o?1:0,e?1:0);function M3(o){return(e,t)=>-o(e,t)}class od{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(this.length!==0)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 Ua{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new Ua(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new Ua(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||F_.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}}Ua.empty=new Ua(o=>{});function rs(o){return typeof o=="string"}function is(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function FH(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function bc(o){return typeof o=="number"&&!isNaN(o)}function kA(o){return!!o&&typeof o[Symbol.iterator]=="function"}function A3(o){return o===!0||o===!1}function Rs(o){return typeof o>"u"}function B_(o){return!Ys(o)}function Ys(o){return Rs(o)||o===null}function xt(o,e){if(!o)throw new Error("Unexpected type")}function Wh(o){if(Ys(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function W_(o){return typeof o=="function"}function BH(o,e){const t=Math.min(o.length,e.length);for(let i=0;i<t;i++)WH(o[i],e[i])}function WH(o,e){if(rs(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(W_(e)){try{if(o instanceof e)return}catch{}if(!Ys(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Il(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Il(i):i}),e}function VH(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(P3.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!FH(n)&&e.push(n)}}return o}const P3=Object.prototype.hasOwnProperty;function O3(o,e){return jD(o,e,new Set)}function jD(o,e,t){if(Ys(o))return o;const i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){const n=[];for(const s of o)n.push(jD(s,e,t));return n}if(is(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)P3.call(o,s)&&(n[s]=jD(o[s],e,t));return t.delete(o),n}return o}function vS(o,e,t=!0){return is(o)?(is(e)&&Object.keys(e).forEach(i=>{i in o?t&&(is(o[i])&&is(e[i])?vS(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function oo(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t<o.length;t++)if(!oo(o[t],e[t]))return!1}else{const n=[];for(i in o)n.push(i);n.sort();const s=[];for(i in e)s.push(i);if(s.sort(),!oo(n,s))return!1;for(t=0;t<n.length;t++)if(!oo(o[n[t]],e[n[t]]))return!1}return!0}function HH(o){let e=[];for(;Object.prototype!==o;)e=e.concat(Object.getOwnPropertyNames(o)),o=Object.getPrototypeOf(o);return e}function i2(o){const e=[];for(const t of HH(o))typeof o[t]=="function"&&e.push(t);return e}function zH(o,e){const t=n=>function(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}let UH=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function $H(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),UH&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function g(o,e,...t){return $H(e,t)}var WL;const Wf="en";let p1=!1,m1=!1,TC=!1,F3=!1,n2=!1,s2=!1,B3=!1,hb,RC=Wf,IA=Wf,jH,Lr;const sr=typeof self=="object"?self:typeof global=="object"?global:{};let Qn;typeof sr.vscode<"u"&&typeof sr.vscode.process<"u"?Qn=sr.vscode.process:typeof process<"u"&&(Qn=process);const KH=typeof((WL=Qn?.versions)===null||WL===void 0?void 0:WL.electron)=="string",qH=KH&&Qn?.type==="renderer";if(typeof navigator=="object"&&!qH)Lr=navigator.userAgent,p1=Lr.indexOf("Windows")>=0,m1=Lr.indexOf("Macintosh")>=0,s2=(Lr.indexOf("Macintosh")>=0||Lr.indexOf("iPad")>=0||Lr.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,TC=Lr.indexOf("Linux")>=0,B3=Lr?.indexOf("Mobi")>=0,n2=!0,g({},"_"),hb=Wf,RC=hb,IA=navigator.language;else if(typeof Qn=="object"){p1=Qn.platform==="win32",m1=Qn.platform==="darwin",TC=Qn.platform==="linux",TC&&Qn.env.SNAP&&Qn.env.SNAP_REVISION,Qn.env.CI||Qn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,hb=Wf,RC=Wf;const o=Qn.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];hb=e.locale,IA=e.osLocale,RC=t||Wf,jH=e._translationsConfigFile}catch{}F3=!0}else console.error("Unable to resolve platform.");const En=p1,at=m1,Zn=TC,Za=F3,Kc=n2,GH=n2&&typeof sr.importScripts=="function",Yr=s2,ZH=B3,Ya=Lr,YH=RC,XH=typeof sr.postMessage=="function"&&!sr.importScripts,W3=(()=>{if(XH){const o=[];sr.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i<n;i++){const s=o[i];if(s.id===t.data.vscodeScheduleAsyncWork){o.splice(i,1),s.callback();return}}});let e=0;return t=>{const i=++e;o.push({id:i,callback:t}),sr.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),to=m1||s2?2:p1?1:3;let EA=!0,NA=!1;function V3(){if(!NA){NA=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,EA=new Uint16Array(o.buffer)[0]===513}return EA}const H3=!!(Ya&&Ya.indexOf("Chrome")>=0),QH=!!(Ya&&Ya.indexOf("Firefox")>=0),JH=!!(!H3&&Ya&&Ya.indexOf("Safari")>=0),ez=!!(Ya&&Ya.indexOf("Edg/")>=0);Ya&&Ya.indexOf("Android")>=0;const An={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var Xe;(function(o){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(b){yield b}o.single=n;function s(b){return e(b)?b:n(b)}o.wrap=s;function r(b){return b||t}o.from=r;function*a(b){for(let C=b.length-1;C>=0;C--)yield b[C]}o.reverse=a;function l(b){return!b||b[Symbol.iterator]().next().done===!0}o.isEmpty=l;function d(b){return b[Symbol.iterator]().next().value}o.first=d;function c(b,C){for(const w of b)if(C(w))return!0;return!1}o.some=c;function h(b,C){for(const w of b)if(C(w))return w}o.find=h;function*u(b,C){for(const w of b)C(w)&&(yield w)}o.filter=u;function*f(b,C){let w=0;for(const S of b)yield C(S,w++)}o.map=f;function*p(...b){for(const C of b)for(const w of C)yield w}o.concat=p;function m(b,C,w){let S=w;for(const D of b)S=C(S,D);return S}o.reduce=m;function*v(b,C,w=b.length){for(C<0&&(C+=b.length),w<0?w+=b.length:w>b.length&&(w=b.length);C<w;C++)yield b[C]}o.slice=v;function _(b,C=Number.POSITIVE_INFINITY){const w=[];if(C===0)return[w,b];const S=b[Symbol.iterator]();for(let D=0;D<C;D++){const x=S.next();if(x.done)return[w,o.empty()];w.push(x.value)}return[w,{[Symbol.iterator](){return S}}]}o.consume=_})(Xe||(Xe={}));let Ti=class KD{constructor(e){this.element=e,this.next=KD.Undefined,this.prev=KD.Undefined}};Ti.Undefined=new Ti(void 0);class ns{constructor(){this._first=Ti.Undefined,this._last=Ti.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ti.Undefined}clear(){let e=this._first;for(;e!==Ti.Undefined;){const t=e.next;e.prev=Ti.Undefined,e.next=Ti.Undefined,e=t}this._first=Ti.Undefined,this._last=Ti.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Ti(e);if(this._first===Ti.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Ti.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Ti.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Ti.Undefined&&e.next!==Ti.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Ti.Undefined&&e.next===Ti.Undefined?(this._first=Ti.Undefined,this._last=Ti.Undefined):e.next===Ti.Undefined?(this._last=this._last.prev,this._last.next=Ti.Undefined):e.prev===Ti.Undefined&&(this._first=this._first.next,this._first.prev=Ti.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Ti.Undefined;)yield e.element,e=e.next}}const z3="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function tz(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of z3)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const o2=tz();function U3(o){let e=o2;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const $3=new ns;$3.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function V_(o,e,t,i,n){if(n||(n=Xe.first($3)),t.length>n.maxLen){let d=o-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,o+n.maxLen/2),V_(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-s>=n.timeBudget);d++){const c=r-n.windowSize*d;e.lastIndex=Math.max(0,c);const h=iz(e,t,r,a);if(!h&&l||(l=h,c<=0))break;a=c}if(l){const d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function iz(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const xd=8;class j3{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class K3{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Qt{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return bS(e,t)}compute(e,t,i){return i}}class n_{constructor(e,t){this.newValue=e,this.didChange=t}}function bS(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new n_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&mi(o,e);return new n_(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=bS(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new n_(o,t)}class p0{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return bS(e,t)}validate(e){return this.defaultValue}}class Tp{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return bS(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function Se(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class ct extends Tp{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return Se(e,this.defaultValue)}}function bh(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class It extends Tp{static clampedInt(e,t,i,n){return bh(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return It.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function nz(o,e,t,i){if(typeof o>"u")return e;const n=Jo.float(o,e);return Jo.clamp(n,t,i)}class Jo extends Tp{static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(Jo.float(e,this.defaultValue))}}class Es extends Tp{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Es.string(e,this.defaultValue)}}function Ci(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}class si extends Tp{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return Ci(e,this.defaultValue,this._allowedValues)}}class ub extends Qt{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function sz(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class oz extends Qt{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[g("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),g("accessibilitySupport.on","Optimize for usage with a Screen Reader"),g("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:g("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 i===0?e.accessibilitySupport:i}}class rz extends Qt{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:g("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:g("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Se(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Se(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function az(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var dn;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(dn||(dn={}));function lz(o){switch(o){case"line":return dn.Line;case"block":return dn.Block;case"underline":return dn.Underline;case"line-thin":return dn.LineThin;case"block-outline":return dn.BlockOutline;case"underline-thin":return dn.UnderlineThin}}class dz extends p0{constructor(){super(140)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(73)==="default"?n.push("mouse-default"):t.get(73)==="copy"&&n.push("mouse-copy"),t.get(110)&&n.push("showUnused"),t.get(138)&&n.push("showDeprecated"),n.join(" ")}}class cz extends ct{constructor(){super(37,"emptySelectionClipboard",!0,{description:g("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class hz extends Qt{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:g("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:[g("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),g("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),g("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:g("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:[g("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),g("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),g("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:g("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:g("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:at},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:g("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:g("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||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Se(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Ci(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Ci(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Se(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Se(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Se(t.loop,this.defaultValue.loop)}}}class Xs extends Qt{constructor(){super(51,"fontLigatures",Xs.OFF,{anyOf:[{type:"boolean",description:g("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:g("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:g("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 typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Xs.OFF:e==="true"?Xs.ON:e:e?Xs.ON:Xs.OFF}}Xs.OFF='"liga" off, "calt" off';Xs.ON='"liga" on, "calt" on';class Wr extends Qt{constructor(){super(54,"fontVariations",Wr.OFF,{anyOf:[{type:"boolean",description:g("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:g("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:g("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 typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Wr.OFF:e==="true"?Wr.TRANSLATE:e:e?Wr.TRANSLATE:Wr.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}Wr.OFF="normal";Wr.TRANSLATE="translate";class uz extends p0{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class fz extends Tp{constructor(){super(52,"fontSize",Ps.fontSize,{type:"number",minimum:6,maximum:100,default:Ps.fontSize,description:g("fontSize","Controls the font size in pixels.")})}validate(e){const t=Jo.float(e,this.defaultValue);return t===0?Ps.fontSize:Jo.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class La extends Qt{constructor(){super(53,"fontWeight",Ps.fontWeight,{anyOf:[{type:"number",minimum:La.MINIMUM_VALUE,maximum:La.MAXIMUM_VALUE,errorMessage:g("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:La.SUGGESTION_VALUES}],default:Ps.fontWeight,description:g("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(It.clampedInt(e,Ps.fontWeight,La.MINIMUM_VALUE,La.MAXIMUM_VALUE))}}La.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];La.MINIMUM_VALUE=1;La.MAXIMUM_VALUE=1e3;class gz extends Qt{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:[g("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),g("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),g("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(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:g("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:g("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:g("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:g("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:g("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:g("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:g("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:g("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:g("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:g("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:g("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,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Ci(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Ci(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Ci(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Ci(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Ci(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Ci(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Es.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Es.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Es.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Es.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Es.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class pz extends Qt{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:g("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:g("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:g("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:g("hover.hidingDelay","Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:g("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),delay:It.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Se(t.sticky,this.defaultValue.sticky),hidingDelay:It.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:Se(t.above,this.defaultValue.above)}}}class ug extends p0{constructor(){super(143)}compute(e,t,i){return ug.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 s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=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(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,v=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,w=h?2:3;let S=Math.floor(s*n);const D=S/s;let x=!1,I=!1,N=w*u,W=u/s,U=1;if(p==="fill"||p==="fit"){const{typicalViewportLineCount:xe,extraLinesBeforeFirstLine:me,extraLinesBeyondLastLine:Fe,desiredRatio:Oe,minimapLineCount:Le}=ug.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(_/Le>1)x=!0,I=!0,u=1,N=1,W=u/s;else{let xi=!1,_n=u+1;if(p==="fit"){const Oi=Math.ceil((me+_+Fe)*N);C&&a&&b<=t.stableFitRemainingWidth?(xi=!0,_n=t.stableFitMaxMinimapScale):xi=Oi>S}if(p==="fill"||xi){x=!0;const Oi=u;N=Math.min(l*s,Math.max(1,Math.floor(1/Oe))),C&&a&&b<=t.stableFitRemainingWidth&&(_n=t.stableFitMaxMinimapScale),u=Math.min(_n,Math.max(1,Math.floor(N/w))),u>Oi&&(U=Math.min(2,u/Oi)),W=u/s/U,S=Math.ceil(Math.max(xe,me+_+Fe)*N),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const F=Math.floor(f*W),O=Math.min(F,Math.max(0,Math.floor((b-v-2)*W/(d+W)))+xd);let G=Math.floor(s*O);const Q=G/s;G=Math.floor(G*U);const ge=h?1:2,_e=m==="left"?0:i-O-v;return{renderMinimap:ge,minimapLeft:_e,minimapWidth:O,minimapHeightIsEditorHeight:x,minimapIsSampling:I,minimapScale:u,minimapLineHeight:N,minimapCanvasInnerWidth:G,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:Q,minimapCanvasOuterHeight:D}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,c=t.viewLineCount,h=e.get(135),u=h==="inherit"?e.get(134):h,f=u==="inherit"?e.get(130):u,p=e.get(133),m=t.isDominatedByLongLines,v=e.get(57),_=e.get(67).renderType!==0,b=e.get(68),C=e.get(104),w=e.get(83),S=e.get(72),D=e.get(102),x=D.verticalScrollbarSize,I=D.verticalHasArrows,N=D.arrowSize,W=D.horizontalScrollbarSize,U=e.get(43),F=e.get(109)!=="never";let O=e.get(65);U&&F&&(O+=16);let G=0;if(_){const Vi=Math.max(r,b);G=Math.round(Vi*l)}let Q=0;v&&(Q=s*t.glyphMarginDecorationLaneCount);let ge=0,_e=ge+Q,xe=_e+G,me=xe+O;const Fe=i-Q-G-O;let Oe=!1,Le=!1,le=-1;u==="inherit"&&m?(Oe=!0,Le=!0):f==="on"||f==="bounded"?Le=!0:f==="wordWrapColumn"&&(le=p);const xi=ug._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:S,verticalScrollbarWidth:x,viewLineCount:c,remainingWidth:Fe,isViewportWrapping:Le},t.memory||new K3);xi.renderMinimap!==0&&xi.minimapLeft===0&&(ge+=xi.minimapWidth,_e+=xi.minimapWidth,xe+=xi.minimapWidth,me+=xi.minimapWidth);const _n=Fe-xi.minimapWidth,Oi=Math.max(1,Math.floor((_n-x-2)/a)),vt=I?N:0;return Le&&(le=Math.max(1,Oi),f==="bounded"&&(le=Math.min(le,p))),{width:i,height:n,glyphMarginLeft:ge,glyphMarginWidth:Q,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:_e,lineNumbersWidth:G,decorationsLeft:xe,decorationsWidth:O,contentLeft:me,contentWidth:_n,minimap:xi,viewportColumn:Oi,isWordWrapMinified:Oe,isViewportWrapping:Le,wrappingColumn:le,verticalScrollbarWidth:x,horizontalScrollbarHeight:W,overviewRuler:{top:vt,width:x,height:n-2*vt,right:0}}}}class mz extends Qt{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[g("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."),g("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:g("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 Ci(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}class _z extends Qt{constructor(){const e={enabled:!0};super(64,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:g("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Se(e.enabled,this.defaultValue.enabled)}}}class vz extends Qt{constructor(){const e={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:g("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:g("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:g("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:g("editor.stickyScroll.scrollWithEditor","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),maxLineCount:It.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:Ci(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:Se(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class bz extends Qt{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:g("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[g("editor.inlayHints.on","Inlay hints are enabled"),g("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",at?"Ctrl+Option":"Ctrl+Alt"),g("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:g("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:g("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:g("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:Ci(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:It.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Es.string(t.fontFamily,this.defaultValue.fontFamily),padding:Se(t.padding,this.defaultValue.padding)}}}class Cz extends Qt{constructor(){super(65,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):It.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?It.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class wz extends Jo{constructor(){super(66,"lineHeight",Ps.lineHeight,e=>Jo.clamp(e,0,150),{markdownDescription:g("lineHeight",`Controls the line height.
3
3
  - Use 0 to automatically compute the line height from the font size.
4
4
  - Values between 0 and 8 will be used as a multiplier with the font size.
5
5
  - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class Sz extends Qt{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:g("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:g("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[g("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),g("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),g("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:g("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:g("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:g("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:g("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:g("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:g("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),autohide:Se(t.autohide,this.defaultValue.autohide),size:Ci(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Ci(t.side,this.defaultValue.side,["right","left"]),showSlider:Ci(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Se(t.renderCharacters,this.defaultValue.renderCharacters),scale:It.clampedInt(t.scale,1,1,3),maxColumn:It.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function yz(o){return o==="ctrlCmd"?at?"metaKey":"ctrlKey":"altKey"}class Lz extends Qt{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:g("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:g("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:It.clampedInt(t.top,0,0,1e3),bottom:It.clampedInt(t.bottom,0,0,1e3)}}}class xz extends Qt{constructor(){const e={enabled:!0,cycle:!0};super(85,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:g("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:g("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),cycle:Se(t.cycle,this.defaultValue.cycle)}}}class Dz extends p0{constructor(){super(141)}compute(e,t,i){return e.pixelRatio}}class kz extends Qt{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[g("on","Quick suggestions show inside the suggest widget"),g("inline","Quick suggestions show as ghost text"),g("off","Quick suggestions are disabled")]}];super(88,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:g("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:g("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:g("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:g("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(typeof e=="boolean"){const d=e?"on":"off";return{comments:d,strings:d,other:d}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let r,a,l;return typeof t=="boolean"?r=t?"on":"off":r=Ci(t,this.defaultValue.other,s),typeof i=="boolean"?a=i?"on":"off":a=Ci(i,this.defaultValue.comments,s),typeof n=="boolean"?l=n?"on":"off":l=Ci(n,this.defaultValue.strings,s),{other:r,comments:a,strings:l}}}class Iz extends Qt{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[g("lineNumbers.off","Line numbers are not rendered."),g("lineNumbers.on","Line numbers are rendered as absolute number."),g("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),g("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:g("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function _1(o){const e=o.get(97);return e==="editable"?o.get(90):e!=="on"}class Ez extends Qt{constructor(){const e=[],t={type:"number",description:g("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(101,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:g("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:g("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(typeof i=="number")t.push({column:It.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:It.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}class Nz extends Qt{constructor(){super(91,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function TA(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}let Tz=class extends Qt{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(102,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),g("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),g("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:g("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[g("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),g("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),g("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:g("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:g("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:g("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:g("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=It.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=It.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:It.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:TA(t.vertical,this.defaultValue.vertical),horizontal:TA(t.horizontal,this.defaultValue.horizontal),useShadows:Se(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Se(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Se(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Se(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Se(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:It.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:It.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Se(t.scrollByPage,this.defaultValue.scrollByPage)}}};const Ks="inUntrustedWorkspace",_s={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"};class Rz extends Qt{constructor(){const e={nonBasicASCII:Ks,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Ks,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",e,{[_s.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ks],default:e.nonBasicASCII,description:g("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.")},[_s.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:g("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[_s.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:g("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.")},[_s.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ks],default:e.includeComments,description:g("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[_s.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ks],default:e.includeStrings,description:g("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[_s.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:g("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[_s.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:g("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(oo(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&e&&(oo(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new n_(n.newValue,!0):n}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:fg(t.nonBasicASCII,Ks,[!0,!1,Ks]),invisibleCharacters:Se(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Se(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:fg(t.includeComments,Ks,[!0,!1,Ks]),includeStrings:fg(t.includeStrings,Ks,[!0,!1,Ks]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const i={};for(const[n,s]of Object.entries(e))s===!0&&(i[n]=!0);return i}}class Mz extends Qt{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:g("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover"],enumDescriptions:[g("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),g("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:g("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:g("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||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),mode:Ci(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:Ci(t.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:Se(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:Se(t.keepOnBlur,this.defaultValue.keepOnBlur)}}}class Az extends Qt{constructor(){const e={enabled:An.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:An.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("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:g("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:Se(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class Pz extends Qt{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g("editor.guides.bracketPairs.true","Enables bracket pair guides."),g("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),g("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:g("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[g("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),g("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),g("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:g("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:g("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:g("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[g("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),g("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),g("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:g("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:fg(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:fg(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Se(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Se(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:fg(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function fg(o,e,t){const i=t.indexOf(o);return i===-1?e:t[i]}class Oz extends Qt{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(117,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[g("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),g("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:g("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:g("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:g("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:g("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:[g("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),g("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),g("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),g("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:g("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:g("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:g("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:g("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:g("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:g("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:g("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:g("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:g("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:g("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:g("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:g("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Ci(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Se(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Se(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Se(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Se(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:Ci(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:Se(t.showIcons,this.defaultValue.showIcons),showStatusBar:Se(t.showStatusBar,this.defaultValue.showStatusBar),preview:Se(t.preview,this.defaultValue.preview),previewMode:Ci(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Se(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Se(t.showMethods,this.defaultValue.showMethods),showFunctions:Se(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Se(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Se(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:Se(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:Se(t.showFields,this.defaultValue.showFields),showVariables:Se(t.showVariables,this.defaultValue.showVariables),showClasses:Se(t.showClasses,this.defaultValue.showClasses),showStructs:Se(t.showStructs,this.defaultValue.showStructs),showInterfaces:Se(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Se(t.showModules,this.defaultValue.showModules),showProperties:Se(t.showProperties,this.defaultValue.showProperties),showEvents:Se(t.showEvents,this.defaultValue.showEvents),showOperators:Se(t.showOperators,this.defaultValue.showOperators),showUnits:Se(t.showUnits,this.defaultValue.showUnits),showValues:Se(t.showValues,this.defaultValue.showValues),showConstants:Se(t.showConstants,this.defaultValue.showConstants),showEnums:Se(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Se(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Se(t.showKeywords,this.defaultValue.showKeywords),showWords:Se(t.showWords,this.defaultValue.showWords),showColors:Se(t.showColors,this.defaultValue.showColors),showFiles:Se(t.showFiles,this.defaultValue.showFiles),showReferences:Se(t.showReferences,this.defaultValue.showReferences),showFolders:Se(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Se(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Se(t.showSnippets,this.defaultValue.showSnippets),showUsers:Se(t.showUsers,this.defaultValue.showUsers),showIssues:Se(t.showIssues,this.defaultValue.showIssues)}}}class Fz extends Qt{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:g("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:g("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Se(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:Se(e.selectSubwords,this.defaultValue.selectSubwords)}}}class Bz extends Qt{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[g("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),g("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),g("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),g("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:g("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 t.get(2)===2?0:i}}class Wz extends p0{constructor(){super(144)}compute(e,t,i){const n=t.get(143);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class Vz extends Qt{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("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:g("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:[g("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),g("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),showDropSelector:Ci(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Hz extends Qt{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:g("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:g("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:[g("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),g("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Se(t.enabled,this.defaultValue.enabled),showPasteSelector:Ci(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const zz="Consolas, 'Courier New', monospace",Uz="Menlo, Monaco, 'Courier New', monospace",$z="'Droid Sans Mono', 'monospace', monospace",Ps={fontFamily:at?Uz:Zn?$z:zz,fontWeight:"normal",fontSize:at?12:14,lineHeight:0,letterSpacing:0},Vf=[];function te(o){return Vf[o.id]=o,o}const na={acceptSuggestionOnCommitCharacter:te(new ct(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:g("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:te(new si(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",g("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:g("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:te(new oz),accessibilityPageSize:te(new It(3,"accessibilityPageSize",10,1,1073741824,{description:g("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:te(new Es(4,"ariaLabel",g("editorViewAccessibleLabel","Editor content"))),ariaRequired:te(new ct(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:te(new ct(8,"screenReaderAnnounceInlineSuggestion",!0,{description:g("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:te(new si(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),g("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:g("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:te(new si(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),g("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:g("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:te(new si(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",g("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:g("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:te(new si(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",g("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:g("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:te(new si(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",g("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),g("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:g("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:te(new ub(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],sz,{enumDescriptions:[g("editor.autoIndent.none","The editor will not insert indentation automatically."),g("editor.autoIndent.keep","The editor will keep the current line's indentation."),g("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),g("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),g("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:g("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:te(new ct(13,"automaticLayout",!1)),autoSurround:te(new si(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[g("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),g("editor.autoSurround.quotes","Surround with quotes but not brackets."),g("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:g("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:te(new Az),bracketPairGuides:te(new Pz),stickyTabStops:te(new ct(115,"stickyTabStops",!1,{description:g("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:te(new ct(17,"codeLens",!0,{description:g("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:te(new Es(18,"codeLensFontFamily","",{description:g("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:te(new It(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:g("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:te(new ct(20,"colorDecorators",!0,{description:g("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:te(new si(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[g("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),g("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),g("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:g("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:te(new It(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:g("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:te(new ct(22,"columnSelection",!1,{description:g("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:te(new rz),contextmenu:te(new ct(24,"contextmenu",!0)),copyWithSyntaxHighlighting:te(new ct(25,"copyWithSyntaxHighlighting",!0,{description:g("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:te(new ub(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],az,{description:g("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:te(new si(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[g("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),g("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),g("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:g("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:te(new ub(28,"cursorStyle",dn.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],lz,{description:g("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:te(new It(29,"cursorSurroundingLines",0,0,1073741824,{description:g("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:te(new si(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[g("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),g("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:g("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:te(new It(31,"cursorWidth",0,0,1073741824,{markdownDescription:g("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:te(new ct(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:te(new ct(33,"disableMonospaceOptimizations",!1)),domReadOnly:te(new ct(34,"domReadOnly",!1)),dragAndDrop:te(new ct(35,"dragAndDrop",!0,{description:g("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:te(new cz),dropIntoEditor:te(new Vz),stickyScroll:te(new vz),experimentalWhitespaceRendering:te(new si(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[g("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),g("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),g("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:g("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:te(new Es(39,"extraEditorClassName","")),fastScrollSensitivity:te(new Jo(40,"fastScrollSensitivity",5,o=>o<=0?5:o,{markdownDescription:g("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:te(new hz),fixedOverflowWidgets:te(new ct(42,"fixedOverflowWidgets",!1)),folding:te(new ct(43,"folding",!0,{description:g("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:te(new si(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[g("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),g("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:g("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:te(new ct(45,"foldingHighlight",!0,{description:g("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:te(new ct(46,"foldingImportsByDefault",!1,{description:g("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:te(new It(47,"foldingMaximumRegions",5e3,10,65e3,{description:g("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:te(new ct(48,"unfoldOnClickAfterEndOfLine",!1,{description:g("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:te(new Es(49,"fontFamily",Ps.fontFamily,{description:g("fontFamily","Controls the font family.")})),fontInfo:te(new uz),fontLigatures2:te(new Xs),fontSize:te(new fz),fontWeight:te(new La),fontVariations:te(new Wr),formatOnPaste:te(new ct(55,"formatOnPaste",!1,{description:g("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:te(new ct(56,"formatOnType",!1,{description:g("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:te(new ct(57,"glyphMargin",!0,{description:g("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:te(new gz),hideCursorInOverviewRuler:te(new ct(59,"hideCursorInOverviewRuler",!1,{description:g("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:te(new pz),inDiffEditor:te(new ct(61,"inDiffEditor",!1)),letterSpacing:te(new Jo(63,"letterSpacing",Ps.letterSpacing,o=>Jo.clamp(o,-5,20),{description:g("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:te(new _z),lineDecorationsWidth:te(new Cz),lineHeight:te(new wz),lineNumbers:te(new Iz),lineNumbersMinChars:te(new It(68,"lineNumbersMinChars",5,1,300)),linkedEditing:te(new ct(69,"linkedEditing",!1,{description:g("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:te(new ct(70,"links",!0,{description:g("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:te(new si(71,"matchBrackets","always",["always","near","never"],{description:g("matchBrackets","Highlight matching brackets.")})),minimap:te(new Sz),mouseStyle:te(new si(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:te(new Jo(74,"mouseWheelScrollSensitivity",1,o=>o===0?1:o,{markdownDescription:g("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:te(new ct(75,"mouseWheelZoom",!1,{markdownDescription:g("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:te(new ct(76,"multiCursorMergeOverlapping",!0,{description:g("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:te(new ub(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],yz,{markdownEnumDescriptions:[g("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),g("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:g({},"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:te(new si(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[g("multiCursorPaste.spread","Each cursor pastes a single line of the text."),g("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:g("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:te(new It(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:g("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:te(new ct(80,"occurrencesHighlight",!0,{description:g("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:te(new ct(81,"overviewRulerBorder",!0,{description:g("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:te(new It(82,"overviewRulerLanes",3,0,3)),padding:te(new Lz),pasteAs:te(new Hz),parameterHints:te(new xz),peekWidgetDefaultFocus:te(new si(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[g("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),g("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:g("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:te(new ct(87,"definitionLinkOpensInPeek",!1,{description:g("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:te(new kz),quickSuggestionsDelay:te(new It(89,"quickSuggestionsDelay",10,0,1073741824,{description:g("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:te(new ct(90,"readOnly",!1)),readOnlyMessage:te(new Nz),renameOnType:te(new ct(92,"renameOnType",!1,{description:g("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:g("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:te(new ct(93,"renderControlCharacters",!0,{description:g("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:te(new si(94,"renderFinalNewline",Zn?"dimmed":"on",["off","on","dimmed"],{description:g("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:te(new si(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",g("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:g("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:te(new ct(96,"renderLineHighlightOnlyWhenFocus",!1,{description:g("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:te(new si(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:te(new si(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",g("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),g("renderWhitespace.selection","Render whitespace characters only on selected text."),g("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:g("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:te(new It(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:te(new ct(100,"roundedSelection",!0,{description:g("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:te(new Ez),scrollbar:te(new Tz),scrollBeyondLastColumn:te(new It(103,"scrollBeyondLastColumn",4,0,1073741824,{description:g("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:te(new ct(104,"scrollBeyondLastLine",!0,{description:g("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:te(new ct(105,"scrollPredominantAxis",!0,{description:g("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:te(new ct(106,"selectionClipboard",!0,{description:g("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Zn})),selectionHighlight:te(new ct(107,"selectionHighlight",!0,{description:g("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:te(new ct(108,"selectOnLineNumbers",!0)),showFoldingControls:te(new si(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[g("showFoldingControls.always","Always show the folding controls."),g("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),g("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:g("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:te(new ct(110,"showUnused",!0,{description:g("showUnused","Controls fading out of unused code.")})),showDeprecated:te(new ct(138,"showDeprecated",!0,{description:g("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:te(new bz),snippetSuggestions:te(new si(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[g("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),g("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),g("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),g("snippetSuggestions.none","Do not show snippet suggestions.")],description:g("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:te(new Fz),smoothScrolling:te(new ct(113,"smoothScrolling",!1,{description:g("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:te(new It(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:te(new Oz),inlineSuggest:te(new Mz),inlineCompletionsAccessibilityVerbose:te(new ct(147,"inlineCompletionsAccessibilityVerbose",!1,{description:g("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:te(new It(118,"suggestFontSize",0,0,1e3,{markdownDescription:g("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:te(new It(119,"suggestLineHeight",0,0,1e3,{markdownDescription:g("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:te(new ct(120,"suggestOnTriggerCharacters",!0,{description:g("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:te(new si(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[g("suggestSelection.first","Always select the first suggestion."),g("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),g("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:g("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:te(new si(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[g("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),g("tabCompletion.off","Disable tab completions."),g("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:g("tabCompletion","Enables tab completions.")})),tabIndex:te(new It(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:te(new Rz),unusualLineTerminators:te(new si(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[g("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),g("unusualLineTerminators.off","Unusual line terminators are ignored."),g("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:g("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:te(new ct(126,"useShadowDOM",!0)),useTabStops:te(new ct(127,"useTabStops",!0,{description:g("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:te(new si(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[g("wordBreak.normal","Use the default line break rule."),g("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:g("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:te(new Es(129,"wordSeparators",z3,{description:g("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:te(new si(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[g("wordWrap.off","Lines will never wrap."),g("wordWrap.on","Lines will wrap at the viewport width."),g({},"Lines will wrap at `#editor.wordWrapColumn#`."),g({},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:g({},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:te(new Es(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:te(new Es(132,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:te(new It(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:g({},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:te(new si(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:te(new si(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:te(new dz),defaultColorDecorators:te(new ct(145,"defaultColorDecorators",!1,{markdownDescription:g("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:te(new Dz),tabFocusMode:te(new ct(142,"tabFocusMode",!1,{markdownDescription:g("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:te(new ug),wrappingInfo:te(new Wz),wrappingIndent:te(new Bz),wrappingStrategy:te(new mz)};class jz{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Hg.isErrorNoTelemetry(e)?new Hg(e.message+`
@@ -634,7 +634,7 @@ ${e.toString()}`}}class Rw{constructor(e=new oy,t=!1,i,n=Ore){var s;this._servic
634
634
  `:`\r
635
635
  `),yield this._clipboardService.writeText(w)}))),i.getOption(90)||_.push(new as("diff.inline.revertChange",g("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>aD(this,void 0,void 0,function*(){this._editor.revert(this._diff)}))),_},autoSelectFirstItem:!0})};this._register(wi(this._diffActions,"mousedown",p=>{const{top:m,height:v}=Ai(this._diffActions),_=Math.floor(c/3);p.preventDefault(),f(p.posx,m+v+_)})),this._register(i.onMouseMove(p=>{(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()?(h=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,c),this.visibility=!0):this.visibility=!1})),this._register(i.onMouseDown(p=>{p.event.rightButton&&(p.target.type===8||p.target.type===5)&&p.target.detail.viewZoneId===this._getViewZoneId()&&(p.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,p.event.browserEvent.y,c),f(p.event.posx,p.event.posy+c))}))}_updateLightBulbPosition(e,t,i){const{top:n}=Ai(e),s=t-n,r=Math.floor(s/i),a=r*i;if(this._diffActions.style.top=`${a}px`,this._viewLineCounts){let l=0;for(let d=0;d<this._viewLineCounts.length;d++)if(l+=this._viewLineCounts[d],r<l)return d}return r}}const NF=dd("diffEditorWidget",{createHTML:o=>o});function jae(o,e,t,i){kn(i,e.fontInfo);const n=t.length>0,s=new Op(1e4);let r=0,a=0;const l=[];for(let u=0;u<o.lineTokens.length;u++){const f=u+1,p=o.lineTokens[u],m=o.lineBreakData[u],v=As.filter(t,f,1,Number.MAX_SAFE_INTEGER);if(m){let _=0;for(const b of m.breakOffsets){const C=p.sliceAndInflate(_,b,0);r=Math.max(r,TF(a,C,As.extractWrapped(v,_,b),n,o.mightContainNonBasicASCII,o.mightContainRTL,e,s)),a++,_=b}l.push(m.breakOffsets.length)}else l.push(1),r=Math.max(r,TF(a,p,v,n,o.mightContainNonBasicASCII,o.mightContainRTL,e,s)),a++}r+=e.scrollBeyondLastColumn;const d=s.build(),c=NF?NF.createHTML(d):d;i.innerHTML=c;const h=r*e.typicalHalfwidthCharacterWidth;return{heightInLines:a,minWidthInPx:h,viewLineCounts:l}}class Kae{constructor(e,t,i,n){this.lineTokens=e,this.lineBreakData=t,this.mightContainNonBasicASCII=i,this.mightContainRTL=n}}class pM{static fromEditor(e){var t;const i=e.getOptions(),n=i.get(50),s=i.get(143);return new pM(((t=e.getModel())===null||t===void 0?void 0:t.getOptions().tabSize)||0,n,i.get(33),n.typicalHalfwidthCharacterWidth,i.get(103),i.get(66),s.decorationsWidth,i.get(116),i.get(98),i.get(93),i.get(51))}constructor(e,t,i,n,s,r,a,l,d,c,h){this.tabSize=e,this.fontInfo=t,this.disableMonospaceOptimizations=i,this.typicalHalfwidthCharacterWidth=n,this.scrollBeyondLastColumn=s,this.lineHeight=r,this.lineDecorationsWidth=a,this.stopRenderingLineAfter=l,this.renderWhitespace=d,this.renderControlCharacters=c,this.fontLigatures=h}}function TF(o,e,t,i,n,s,r,a){a.appendString('<div class="view-line'),i||a.appendString(" char-delete"),a.appendString('" style="top:'),a.appendString(String(o*r.lineHeight)),a.appendString('px;width:1000000px;">');const l=e.getLineContent(),d=co.isBasicASCII(l,n),c=co.containsRTL(l,d,s),h=L0(new Xc(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,d,c,0,e,t,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==Xs.OFF,null),a);return a.appendString("</div>"),h.characterMapping.getHorizontalOffset(h.characterMapping.length)}var qae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RF=function(o,e){return function(t,i){e(t,i,o)}};let oN=class extends H{constructor(e,t,i,n,s,r,a){super(),this._editors=e,this._diffModel=t,this._options=i,this._diffEditorWidget=n,this._canIgnoreViewZoneUpdateEvent=s,this._clipboardService=r,this._contextMenuService=a,this._originalTopPadding=Bt(this,0),this._originalScrollOffset=Bt(this,0),this._originalScrollOffsetAnimated=bF(this._originalScrollOffset,this._store),this._modifiedTopPadding=Bt(this,0),this._modifiedScrollOffset=Bt(this,0),this._modifiedScrollOffsetAnimated=bF(this._modifiedScrollOffset,this._store);let l=!1;const d=Bt("state",0),c=this._register(new Dt(()=>{d.set(d.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(w=>{!l&&!this._canIgnoreViewZoneUpdateEvent()&&c.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(w=>{!l&&!this._canIgnoreViewZoneUpdateEvent()&&c.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(w=>{(w.hasChanged(144)||w.hasChanged(66))&&c.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(w=>{(w.hasChanged(144)||w.hasChanged(66))&&c.schedule()}));const h=this._diffModel.map(w=>w?un(w.model.original.onDidChangeTokens,()=>w.model.original.tokenization.backgroundTokenizationState===2):void 0).map((w,S)=>w?.read(S)),u=new Set,f=new Set,p=ot(w=>{const S=this._diffModel.read(w),D=S?.diff.read(w);if(!S||!D)return null;d.read(w);const I=this._options.renderSideBySide.read(w);return MF(this._editors.original,this._editors.modified,D.mappings,u,f,I)}),m=ot(w=>{var S;const D=(S=this._diffModel.read(w))===null||S===void 0?void 0:S.movedTextToCompare.read(w);if(!D)return null;d.read(w);const x=D.changes.map(I=>new _6(I));return MF(this._editors.original,this._editors.modified,x,u,f,!0)});function v(){const w=document.createElement("div");return w.className="diagonal-fill",w}const _=this._register(new X),b=ot(w=>{var S,D,x,I,N,W,U,F;_.clear();const O=p.read(w)||[],G=[],Q=[],ge=this._modifiedTopPadding.read(w);ge>0&&Q.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:ge,showInHiddenAreas:!0,suppressMouseDown:!0});const _e=this._originalTopPadding.read(w);_e>0&&G.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:_e,showInHiddenAreas:!0,suppressMouseDown:!0});const xe=this._options.renderSideBySide.read(w),me=xe||(S=this._editors.modified._getViewModel())===null||S===void 0?void 0:S.createLineBreaksComputer();if(me){for(const vt of O)if(vt.diff)for(let Vi=vt.originalRange.startLineNumber;Vi<vt.originalRange.endLineNumberExclusive;Vi++)me?.addRequest(this._editors.original.getModel().getLineContent(Vi),null,null)}const Fe=(D=me?.finalize())!==null&&D!==void 0?D:[];let Oe=0;const Le=this._editors.modified.getOption(66),le=(x=this._diffModel.read(w))===null||x===void 0?void 0:x.movedTextToCompare.read(w),xi=(N=(I=this._editors.original.getModel())===null||I===void 0?void 0:I.mightContainNonBasicASCII())!==null&&N!==void 0?N:!1,_n=(U=(W=this._editors.original.getModel())===null||W===void 0?void 0:W.mightContainRTL())!==null&&U!==void 0?U:!1,Oi=pM.fromEditor(this._editors.modified);for(const vt of O)if(vt.diff&&!xe){if(!vt.originalRange.isEmpty){h.read(w);const $o=document.createElement("div");$o.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const vn=new Kae(vt.originalRange.mapToLineArray(qi=>this._editors.original.getModel().tokenization.getLineTokens(qi)),vt.originalRange.mapToLineArray(qi=>Fe[Oe++]),xi,_n),ze=[];for(const qi of vt.diff.innerChanges||[])ze.push(new r_(qi.originalRange.delta(-(vt.diff.original.startLineNumber-1)),eN.className,0));const jo=jae(vn,Oi,ze,$o),br=document.createElement("div");if(br.className="inline-deleted-margin-view-zone",kn(br,Oi.fontInfo),this._options.renderIndicators.read(w))for(let qi=0;qi<jo.heightInLines;qi++){const _o=document.createElement("div");_o.className=`delete-sign ${Ie.asClassName(f6)}`,_o.setAttribute("style",`position:absolute;top:${qi*Le}px;width:${Oi.lineDecorationsWidth}px;height:${Le}px;right:0;`),br.appendChild(_o)}let Cr;_.add(new $ae(()=>Wh(Cr),br,this._editors.modified,vt.diff,this._diffEditorWidget,jo.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let qi=0;qi<jo.viewLineCounts.length;qi++){const _o=jo.viewLineCounts[qi];_o>1&&G.push({afterLineNumber:vt.originalRange.startLineNumber+qi,domNode:v(),heightInPx:(_o-1)*Le,showInHiddenAreas:!0,suppressMouseDown:!0})}Q.push({afterLineNumber:vt.modifiedRange.startLineNumber-1,domNode:$o,heightInPx:jo.heightInLines*Le,minWidthInPx:jo.minWidthInPx,marginDomNode:br,setZoneId(qi){Cr=qi},showInHiddenAreas:!0,suppressMouseDown:!0})}const Vi=document.createElement("div");Vi.className="gutter-delete",G.push({afterLineNumber:vt.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:vt.modifiedHeightInPx,marginDomNode:Vi,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const Vi=vt.modifiedHeightInPx-vt.originalHeightInPx;if(Vi>0){if(le?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(vt.originalRange.endLineNumberExclusive-1))continue;G.push({afterLineNumber:vt.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:Vi,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let $o=function(){const ze=document.createElement("div");return ze.className="arrow-revert-change "+Ie.asClassName(oe.arrowRight),ee("div",{},ze)};if(le?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(vt.modifiedRange.endLineNumberExclusive-1))continue;let vn;vt.diff&&vt.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(w)&&(vn=$o()),Q.push({afterLineNumber:vt.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-Vi,marginDomNode:vn,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const vt of(F=m.read(w))!==null&&F!==void 0?F:[]){if(!le?.lineRangeMapping.original.intersect(vt.originalRange)||!le?.lineRangeMapping.modified.intersect(vt.modifiedRange))continue;const Vi=vt.modifiedHeightInPx-vt.originalHeightInPx;Vi>0?G.push({afterLineNumber:vt.originalRange.endLineNumberExclusive-1,domNode:v(),heightInPx:Vi,showInHiddenAreas:!0,suppressMouseDown:!0}):Q.push({afterLineNumber:vt.modifiedRange.endLineNumberExclusive-1,domNode:v(),heightInPx:-Vi,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:G,mod:Q}});this._register(Ns(w=>{const S=ta.capture(this._editors.modified),D=b.read(w);l=!0,this._editors.original.changeViewZones(x=>{for(const I of u)x.removeZone(I);u.clear();for(const I of D.orig){const N=x.addZone(I);I.setZoneId&&I.setZoneId(N),u.add(N)}}),this._editors.modified.changeViewZones(x=>{for(const I of f)x.removeZone(I);f.clear();for(const I of D.mod){const N=x.addZone(I);I.setZoneId&&I.setZoneId(N),f.add(N)}}),l=!1,S.restore(this._editors.modified)})),this._register(Me(()=>{this._editors.original.changeViewZones(w=>{for(const S of u)w.removeZone(S);u.clear()}),this._editors.modified.changeViewZones(w=>{for(const S of f)w.removeZone(S);f.clear()})}));let C=!1;this._register(this._editors.original.onDidScrollChange(w=>{w.scrollLeftChanged&&!C&&(C=!0,this._editors.modified.setScrollLeft(w.scrollLeft),C=!1)})),this._register(this._editors.modified.onDidScrollChange(w=>{w.scrollLeftChanged&&!C&&(C=!0,this._editors.original.setScrollLeft(w.scrollLeft),C=!1)})),this._originalScrollTop=un(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=un(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register(Mt(w=>{const S=this._originalScrollTop.read(w)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(w))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(w));S!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(S,1)})),this._register(Mt(w=>{const S=this._modifiedScrollTop.read(w)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(w))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(w));S!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(S,1)})),this._register(Mt(w=>{var S;const D=(S=this._diffModel.read(w))===null||S===void 0?void 0:S.movedTextToCompare.read(w);let x=0;if(D){const I=this._editors.original.getTopForLineNumber(D.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();x=this._editors.modified.getTopForLineNumber(D.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-I}x>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(x,void 0)):x<0?(this._modifiedTopPadding.set(-x,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()-x,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+x,void 0,!0)}))}};oN=qae([RF(5,gd),RF(6,pr)],oN);function MF(o,e,t,i,n,s){const r=new od(AF(o,i)),a=new od(AF(e,n)),l=o.getOption(66),d=e.getOption(66),c=[];let h=0,u=0;function f(p,m){for(;;){let v=r.peek(),_=a.peek();if(v&&v.lineNumber>=p&&(v=void 0),_&&_.lineNumber>=m&&(_=void 0),!v&&!_)break;const b=v?v.lineNumber-h:Number.MAX_VALUE,C=_?_.lineNumber-u:Number.MAX_VALUE;b<C?(r.dequeue(),_={lineNumber:v.lineNumber-h+u,heightInPx:0}):b>C?(a.dequeue(),v={lineNumber:_.lineNumber-u+h,heightInPx:0}):(r.dequeue(),a.dequeue()),c.push({originalRange:it.ofLength(v.lineNumber,1),modifiedRange:it.ofLength(_.lineNumber,1),originalHeightInPx:l+v.heightInPx,modifiedHeightInPx:d+_.heightInPx,diff:void 0})}}for(const p of t){let C=function(w,S){var D,x,I,N;if(w<b||S<_)return;if(v)v=!1;else if(w===b||S===_)return;const W=new it(b,w),U=new it(_,S);if(W.isEmpty&&U.isEmpty)return;const F=(x=(D=r.takeWhile(G=>G.lineNumber<w))===null||D===void 0?void 0:D.reduce((G,Q)=>G+Q.heightInPx,0))!==null&&x!==void 0?x:0,O=(N=(I=a.takeWhile(G=>G.lineNumber<S))===null||I===void 0?void 0:I.reduce((G,Q)=>G+Q.heightInPx,0))!==null&&N!==void 0?N:0;c.push({originalRange:W,modifiedRange:U,originalHeightInPx:W.length*l+F,modifiedHeightInPx:U.length*d+O,diff:p.lineRangeMapping}),b=w,_=S};const m=p.lineRangeMapping;f(m.original.startLineNumber,m.modified.startLineNumber);let v=!0,_=m.modified.startLineNumber,b=m.original.startLineNumber;if(s)for(const w of m.innerChanges||[])w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&C(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber),w.originalRange.endColumn<o.getModel().getLineMaxColumn(w.originalRange.endLineNumber)&&C(w.originalRange.endLineNumber,w.modifiedRange.endLineNumber);C(m.original.endLineNumberExclusive,m.modified.endLineNumberExclusive),h=m.original.endLineNumberExclusive,u=m.modified.endLineNumberExclusive}return f(Number.MAX_VALUE,Number.MAX_VALUE),c}function AF(o,e){const t=[],i=[],n=o.getOption(144).wrappingColumn!==-1,s=o._getViewModel().coordinatesConverter,r=o.getOption(66);if(n)for(let l=1;l<=o.getModel().getLineCount();l++){const d=s.getModelLineViewLineCount(l);d>1&&i.push({lineNumber:l,heightInPx:r*(d-1)})}for(const l of o.getWhitespaces()){if(e.has(l.id))continue;const d=l.afterLineNumber===0?0:s.convertViewPositionToModelPosition(new P(l.afterLineNumber,1)).lineNumber;t.push({lineNumber:d,heightInPx:l.height})}return cae(t,i,l=>l.lineNumber,(l,d)=>({lineNumber:l.lineNumber,heightInPx:l.heightInPx+d.heightInPx}))}var Gae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zae=function(o,e){return function(t,i){e(t,i,o)}},Ir;let td=Ir=class extends H{constructor(e,t,i,n,s,r,a,l){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=r,this._options=a,this._themeService=l;const d=un(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),c=ot(f=>{const p=d.read(f),m=p.getColor(dZ)||(p.getColor(aZ)||gI).transparent(2),v=p.getColor(cZ)||(p.getColor(lZ)||pI).transparent(2);return{insertColor:m,removeColor:v}}),h=un(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),u=un(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollHeight());this._register(Ns((f,p)=>{if(!this._options.renderOverviewRuler.read(f))return;const m=bt(document.createElement("div"));m.setClassName("diffViewport"),m.setPosition("absolute");const v=rn("div.diffOverview",{style:{position:"absolute",top:"0px",width:Ir.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;p.add(tC(v,m.domNode)),p.add(wi(v,ae.POINTER_DOWN,_=>{this._editors.modified.delegateVerticalScrollbarPointerDown(_)})),p.add($(v,ae.MOUSE_WHEEL,_=>{this._editors.modified.delegateScrollFromMouseWheelEvent(_)},{passive:!1})),p.add(tC(this._rootElement,v)),p.add(Ns((_,b)=>{const C=this._diffModel.read(_),w=this._editors.original.createOverviewRuler("original diffOverviewRuler");w&&(b.add(w),b.add(tC(v,w.getDomNode())));const S=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(S&&(b.add(S),b.add(tC(v,S.getDomNode()))),!w||!S)return;const D=Js("viewZoneChanged",this._editors.original.onDidChangeViewZones),x=Js("viewZoneChanged",this._editors.modified.onDidChangeViewZones),I=Js("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),N=Js("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);b.add(Mt(W=>{var U;D.read(W),x.read(W),I.read(W),N.read(W);const F=c.read(W),O=(U=C?.diff.read(W))===null||U===void 0?void 0:U.mappings;function G(_e,xe,me){const Fe=me._getViewModel();return Fe?_e.filter(Oe=>Oe.length>0).map(Oe=>{const Le=Fe.coordinatesConverter.convertModelPositionToViewPosition(new P(Oe.startLineNumber,1)),le=Fe.coordinatesConverter.convertModelPositionToViewPosition(new P(Oe.endLineNumberExclusive,1)),xi=le.lineNumber-Le.lineNumber;return new d8(Le.lineNumber,le.lineNumber,xi,xe.toString())}):[]}const Q=G((O||[]).map(_e=>_e.lineRangeMapping.original),F.removeColor,this._editors.original),ge=G((O||[]).map(_e=>_e.lineRangeMapping.modified),F.insertColor,this._editors.modified);w?.setZones(Q),S?.setZones(ge)})),b.add(Mt(W=>{const U=this._rootHeight.read(W),F=this._rootWidth.read(W),O=this._modifiedEditorLayoutInfo.read(W);if(O){const G=Ir.ENTIRE_DIFF_OVERVIEW_WIDTH-2*Ir.ONE_OVERVIEW_WIDTH;w.setLayout({top:0,height:U,right:G+Ir.ONE_OVERVIEW_WIDTH,width:Ir.ONE_OVERVIEW_WIDTH}),S.setLayout({top:0,height:U,right:0,width:Ir.ONE_OVERVIEW_WIDTH});const Q=h.read(W),ge=u.read(W),_e=this._editors.modified.getOption(102),xe=new sp(_e.verticalHasArrows?_e.arrowSize:0,_e.verticalScrollbarSize,0,O.height,ge,Q);m.setTop(xe.getSliderPosition()),m.setHeight(xe.getSliderSize())}else m.setTop(0),m.setHeight(0);v.style.height=U+"px",v.style.left=F-Ir.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",m.setWidth(Ir.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}))}};td.ONE_OVERVIEW_WIDTH=15;td.ENTIRE_DIFF_OVERVIEW_WIDTH=Ir.ONE_OVERVIEW_WIDTH*2;td=Ir=Gae([Zae(7,Ki)],td);T("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},g("diffEditor.move.border","The border color for text that got moved in the diff editor."));T("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},g("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."));class My extends H{constructor(){super(...arguments),this._id=++My.idCounter,this._onDidDispose=this._register(new A),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)}}My.idCounter=0;var Yae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},PF=function(o,e){return function(t,i){e(t,i,o)}};let rN=class extends H{constructor(e,t,i,n,s,r,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._createInnerEditor=s,this._instantiationService=r,this._keybindingService=a,this._onDidContentSizeChange=this._register(new A),this.original=this._register(this._createLeftHandSideEditor(i.editorOptions.get(),n.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(i.editorOptions.get(),n.modifiedEditor||{})),this.modifiedModel=un(this.modified.onDidChangeModel,()=>this.modified.getModel()),this._register(Ny({createEmptyChangeSummary:()=>({}),handleChange:(l,d)=>(l.didChange(i.editorOptions)&&Object.assign(d,l.change.changedOptions),!0)},(l,d)=>{i.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,d)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,d))}))}_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 s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange(r=>{const a=this.original.getContentWidth()+this.modified.getContentWidth()+td.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:a,contentHeightChanged:r.contentHeightChanged,contentWidthChanged:r.contentWidthChanged})})),s}_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=na.revealHorizontalRightPadding.defaultValue+td.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=g("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};rN=Yae([PF(5,Re),PF(6,Et)],rN);class Xae{get editorOptions(){return this._options}constructor(e,t){this.diffEditorWidth=t,this.couldShowInlineViewBecauseOfSize=ot(this,n=>this._options.read(n).renderSideBySide&&this.diffEditorWidth.read(n)<=this._options.read(n).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=ot(this,n=>this._options.read(n).renderOverviewRuler),this.renderSideBySide=ot(this,n=>this._options.read(n).renderSideBySide&&!(this._options.read(n).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(n))),this.readOnly=ot(this,n=>this._options.read(n).readOnly),this.shouldRenderRevertArrows=ot(this,n=>!(!this._options.read(n).renderMarginRevertIcon||!this.renderSideBySide.read(n)||this.readOnly.read(n))),this.renderIndicators=ot(this,n=>this._options.read(n).renderIndicators),this.enableSplitViewResizing=ot(this,n=>this._options.read(n).enableSplitViewResizing),this.splitViewDefaultRatio=ot(this,n=>this._options.read(n).splitViewDefaultRatio),this.ignoreTrimWhitespace=ot(this,n=>this._options.read(n).ignoreTrimWhitespace),this.maxComputationTimeMs=ot(this,n=>this._options.read(n).maxComputationTime),this.showMoves=ot(this,n=>this._options.read(n).experimental.showMoves&&this.renderSideBySide.read(n)),this.isInEmbeddedEditor=ot(this,n=>this._options.read(n).isInEmbeddedEditor),this.diffWordWrap=ot(this,n=>this._options.read(n).diffWordWrap),this.originalEditable=ot(this,n=>this._options.read(n).originalEditable),this.diffCodeLens=ot(this,n=>this._options.read(n).diffCodeLens),this.accessibilityVerbose=ot(this,n=>this._options.read(n).accessibilityVerbose),this.diffAlgorithm=ot(this,n=>this._options.read(n).diffAlgorithm),this.showEmptyDecorations=ot(this,n=>this._options.read(n).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=ot(this,n=>this._options.read(n).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=ot(this,n=>this._options.read(n).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=ot(this,n=>this._options.read(n).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=ot(this,n=>this._options.read(n).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=ot(this,n=>this._options.read(n).hideUnchangedRegions.minimumLineCount);const i=Object.assign(Object.assign({},e),OF(e,Un));this._options=Bt(this,i)}updateOptions(e){const t=OF(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 OF(o,e){var t,i,n,s,r,a,l,d;return{enableSplitViewResizing:Se(o.enableSplitViewResizing,e.enableSplitViewResizing),splitViewDefaultRatio:nz(o.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:Se(o.renderSideBySide,e.renderSideBySide),renderMarginRevertIcon:Se(o.renderMarginRevertIcon,e.renderMarginRevertIcon),maxComputationTime:bh(o.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:bh(o.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Se(o.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Se(o.renderIndicators,e.renderIndicators),originalEditable:Se(o.originalEditable,e.originalEditable),diffCodeLens:Se(o.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Se(o.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Ci(o.diffWordWrap,e.diffWordWrap,["off","on","inherit"]),diffAlgorithm:Ci(o.diffAlgorithm,e.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:Se(o.accessibilityVerbose,e.accessibilityVerbose),experimental:{showMoves:Se((t=o.experimental)===null||t===void 0?void 0:t.showMoves,e.experimental.showMoves),showEmptyDecorations:Se((i=o.experimental)===null||i===void 0?void 0:i.showEmptyDecorations,e.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:Se((s=(n=o.hideUnchangedRegions)===null||n===void 0?void 0:n.enabled)!==null&&s!==void 0?s:(r=o.experimental)===null||r===void 0?void 0:r.collapseUnchangedRegions,e.hideUnchangedRegions.enabled),contextLineCount:bh((a=o.hideUnchangedRegions)===null||a===void 0?void 0:a.contextLineCount,e.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:bh((l=o.hideUnchangedRegions)===null||l===void 0?void 0:l.minimumLineCount,e.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:bh((d=o.hideUnchangedRegions)===null||d===void 0?void 0:d.revealLineCount,e.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:Se(o.isInEmbeddedEditor,e.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:Se(o.onlyShowAccessibleDiffViewer,e.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:bh(o.renderSideBySideInlineBreakpoint,e.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:Se(o.useInlineViewWhenSpaceIsLimited,e.useInlineViewWhenSpaceIsLimited)}}var Qae=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bm=function(o,e){return function(t,i){e(t,i,o)}};let yu=class extends My{constructor(e,t,i,n,s,r,a,l){var d;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._audioCueService=a,this._editorProgressService=l,this.elements=rn("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[rn("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[ee("span",{},"No Changes")]),rn("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),rn("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),rn("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register(Aw("diffModel",void 0)),this.onDidChangeModel=de.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new oy([Ae,this._contextKeyService])),this._boundarySashes=Bt(this,void 0),this._accessibleDiffViewerShouldBeVisible=Bt(this,!1),this._accessibleDiffViewerVisible=ot(this,m=>this._options.onlyShowAccessibleDiffViewer.read(m)?!0:this._accessibleDiffViewerShouldBeVisible.read(m)),this.movedBlocksLinesPart=Bt(this,void 0),this._layoutInfo=ot(this,m=>{var v,_,b;const C=this._rootSizeObserver.width.read(m),w=this._rootSizeObserver.height.read(m),S=(v=this._sash.read(m))===null||v===void 0?void 0:v.sashLeft.read(m),D=S??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),x=C-D-(this._options.renderOverviewRuler.read(m)?td.ENTIRE_DIFF_OVERVIEW_WIDTH:0),I=(b=(_=this.movedBlocksLinesPart.read(m))===null||_===void 0?void 0:_.width.read(m))!==null&&b!==void 0?b:0,N=D-I;return this.elements.original.style.width=N+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=x+"px",this.elements.modified.style.left=D+"px",this._editors.original.layout({width:N,height:w}),this._editors.modified.layout({width:x,height:w}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((m,v)=>m?.diff.read(v)),this.onDidUpdateDiff=de.fromObservableLight(this._diffValue),r.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(Me(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new hae(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout((d=t.automaticLayout)!==null&&d!==void 0?d:!1),this._options=new Xae(t,this._rootSizeObserver.width),this._contextKeyService.createKey(E.isEmbeddedDiffEditor.key,!1);const c=E.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register(Mt(m=>{c.set(this._options.isInEmbeddedEditor.read(m))}));const h=E.comparingMovedCode.bindTo(this._contextKeyService);this._register(Mt(m=>{var v;h.set(!!(!((v=this._diffModel.read(m))===null||v===void 0)&&v.movedTextToCompare.read(m)))}));const u=E.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register(Mt(m=>{u.set(this._options.couldShowInlineViewBecauseOfSize.read(m))})),this._editors=this._register(this._instantiationService.createInstance(rN,this.elements.original,this.elements.modified,this._options,i,(m,v,_,b)=>this._createInnerEditor(m,v,_,b))),this._sash=Wv(this,(m,v)=>{const _=this._options.renderSideBySide.read(m);if(this.elements.root.classList.toggle("side-by-side",_),!_)return;const b=v.add(new Rae(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((C,w)=>C-(this._options.renderOverviewRuler.read(w)?td.ENTIRE_DIFF_OVERVIEW_WIDTH:0))}));return v.add(Mt(C=>{const w=this._boundarySashes.read(C);w&&b.setBoundarySashes(w)})),b}),this._register(Hv(this._sash)),this._register(Ns((m,v)=>{this.unchangedRangesFeature=v.add(this._instantiationService.createInstance(Ad(tN,m),this._editors,this._diffModel,this._options))})),this._register(Ns((m,v)=>{v.add(new(Ad(Tae,m))(this._editors,this._diffModel,this._options))})),this._register(Ns((m,v)=>{v.add(this._instantiationService.createInstance(Ad(oN,m),this._editors,this._diffModel,this._options,this,()=>this.unchangedRangesFeature.isUpdatingViewZones))})),this._register(Ns((m,v)=>{v.add(this._instantiationService.createInstance(Ad(td,m),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(_=>_.modifiedEditor),this._options))})),this._register(Ns((m,v)=>{this._accessibleDiffViewer=v.add(this._register(this._instantiationService.createInstance(Ad(Yd,m),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(_,b)=>this._accessibleDiffViewerShouldBeVisible.set(_,b),this._options.onlyShowAccessibleDiffViewer.map(_=>!_),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((_,b)=>{var C;return(C=_?.diff.read(b))===null||C===void 0?void 0:C.mappings.map(w=>w.lineRangeMapping)}),this._editors)))}));const f=this._accessibleDiffViewerVisible.map(m=>m?"hidden":"visible");this._register(hc(this.elements.modified,{visibility:f})),this._register(hc(this.elements.original,{visibility:f})),this._createDiffEditorContributions(),r.addDiffEditor(this),this._register(Hv(this._layoutInfo)),this._register(Ns((m,v)=>{this.movedBlocksLinesPart.set(v.add(new(Ad(uc,m))(this.elements.root,this._diffModel,this._layoutInfo.map(_=>_.originalEditor),this._layoutInfo.map(_=>_.modifiedEditor),this._editors)),void 0)})),this._register(hc(this.elements.overlay,{width:this._layoutInfo.map((m,v)=>m.originalEditor.width+(this._options.renderSideBySide.read(v)?0:m.modifiedEditor.width)),visibility:ot(m=>{var v,_;return this._options.hideUnchangedRegions.read(m)&&((_=(v=this._diffModel.read(m))===null||v===void 0?void 0:v.diff.read(m))===null||_===void 0?void 0:_.mappings.length)===0?"visible":"hidden"})})),this._register(this._editors.modified.onMouseDown(m=>{var v,_;if(!m.event.rightButton&&m.target.position&&(!((v=m.target.element)===null||v===void 0)&&v.className.includes("arrow-revert-change"))){const b=m.target.position.lineNumber,C=m.target,w=this._diffModel.get();if(!w)return;const S=(_=w.diff.get())===null||_===void 0?void 0:_.mappings;if(!S)return;const D=S.find(x=>C?.detail.afterLineNumber===x.lineRangeMapping.modified.startLineNumber-1||x.lineRangeMapping.modified.startLineNumber===b);if(!D)return;this.revert(D.lineRangeMapping),m.event.stopPropagation()}})),this._register(de.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,m=>{var v,_;if(m?.reason===3){const b=(_=(v=this._diffModel.get())===null||v===void 0?void 0:v.diff.get())===null||_===void 0?void 0:_.mappings.find(C=>C.lineRangeMapping.modified.contains(m.position.lineNumber));b?.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(ut.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):b?.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(ut.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):b&&this._audioCueService.playAudioCue(ut.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const p=this._diffModel.map((m,v)=>m?.isDiffUpToDate.read(v));this._register(Ns((m,v)=>{if(p.read(m)===!1){const _=this._editorProgressService.show(!0,1e3);v.add(Me(()=>_.done()))}}))}_createInnerEditor(e,t,i,n){return e.createInstance(rp,t,i,n)}_createDiffEditorContributions(){const e=mg.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(i){He(i)}}get _targetEditor(){return this._editors.modified}getEditorType(){return y0.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;const t=this._editors.original.saveViewState(),i=this._editors.modified.saveViewState();return{original:t,modified:i,modelState:(e=this._diffModel.get())===null||e===void 0?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&&((t=this._diffModel.get())===null||t===void 0||t.restoreSerializedState(i.modelState))}}createViewModel(e){return this._instantiationService.createInstance(sN,e,this._options,this)}getModel(){var e,t;return(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.model)!==null&&t!==void 0?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),Gt(i=>{this._diffModel.set(t,i)})}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=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get();return t?tle(t):null}revert(e){var t;const i=(t=this._diffModel.get())===null||t===void 0?void 0:t.model;if(!i)return;const n=e.innerChanges?e.innerChanges.map(s=>({range:s.modifiedRange,text:i.original.getValueInRange(s.originalRange)})):[{range:e.modified.toExclusiveRange(),text:i.original.getValueInRange(e.original.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",n)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,s=i?this._editors.original:this._editors.modified;let r;const a=n.getSelection();if(a){const l=(t=(e=this._diffModel.get())===null||e===void 0?void 0:e.diff.get())===null||t===void 0?void 0:t.mappings.map(d=>i?d.lineRangeMapping.flip():d.lineRangeMapping);if(l){const d=FF(a.getStartPosition(),l),c=FF(a.getEndPosition(),l);r=L.plusRange(d,c)}}return{destination:s,destinationSelection:r}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&Gt(i=>{for(const n of t)n.collapseAll(i)})}showAllUnchangedRegions(){var e;const t=(e=this._diffModel.get())===null||e===void 0?void 0:e.unchangedRegions.get();t&&Gt(i=>{for(const n of t)n.showAll(i)})}};yu=Qae([bm(3,Ae),bm(4,Re),bm(5,_t),bm(6,U0),bm(7,Jc)],yu);function FF(o,e){const t=O1(e,n=>n.original.startLineNumber<=o.lineNumber);if(!t)return L.fromPositions(o);if(t.original.endLineNumberExclusive<=o.lineNumber){const n=o.lineNumber-t.original.endLineNumberExclusive+t.modified.endLineNumberExclusive;return L.fromPositions(new P(n,o.column))}if(!t.innerChanges)return L.fromPositions(new P(t.modified.startLineNumber,1));const i=O1(t.innerChanges,n=>n.originalRange.getStartPosition().isBeforeOrEqual(o));if(!i){const n=o.lineNumber-t.original.startLineNumber+t.modified.startLineNumber;return L.fromPositions(new P(n,o.column))}if(i.originalRange.containsPosition(o))return i.modifiedRange;{const n=Jae(i.originalRange.getEndPosition(),o);return L.fromPositions(ele(i.modifiedRange.getEndPosition(),n))}}function Jae(o,e){return o.lineNumber===e.lineNumber?new mv(0,e.column-o.column):new mv(e.lineNumber-o.lineNumber,e.column-1)}function ele(o,e){return e.lineCount===0?new P(o.lineNumber,o.column+e.columnCount):new P(o.lineNumber+e.lineCount,e.columnCount+1)}function tle(o){return o.mappings.map(e=>{const t=e.lineRangeMapping;let i,n,s,r,a=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,a=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(s=t.modified.startLineNumber-1,r=0,a=void 0):(s=t.modified.startLineNumber,r=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:s,modifiedEndLineNumber:r,charChanges:a?.map(l=>({originalStartLineNumber:l.originalRange.startLineNumber,originalStartColumn:l.originalRange.startColumn,originalEndLineNumber:l.originalRange.endLineNumber,originalEndColumn:l.originalRange.endColumn,modifiedStartLineNumber:l.modifiedRange.startLineNumber,modifiedStartColumn:l.modifiedRange.startColumn,modifiedEndLineNumber:l.modifiedRange.endLineNumber,modifiedEndColumn:l.modifiedRange.endColumn}))}})}var mM=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kt=function(o,e){return function(t,i){e(t,i,o)}};let ile=0,BF=!1;function nle(o){if(!o){if(BF)return;BF=!0}oG(o||document.body)}let Hw=class extends rp{constructor(e,t,i,n,s,r,a,l,d,c,h,u){const f=Object.assign({},t);f.ariaLabel=f.ariaLabel||uw.editorViewAccessibleLabel,f.ariaLabel=f.ariaLabel+";"+uw.accessibilityHelpMessage,super(e,f,{},i,n,s,r,l,d,c,h,u),a instanceof gp?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,nle(f.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_"+ ++ile,s=Z.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")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"),H.None;const t=e.id,i=e.label,n=Z.and(Z.equals("editorId",this.getId()),Z.deserialize(e.precondition)),s=e.keybindings,r=Z.and(n,Z.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,d=(f,...p)=>Promise.resolve(e.run(this,...p)),c=new X,h=this.getId()+":"+t;if(c.add(lt.registerCommand(h,d)),a){const f={command:{id:h,title:i},when:n,group:a,order:l};c.add(hn.appendMenuItem(k.EditorContext,f))}if(Array.isArray(s))for(const f of s)c.add(this._standaloneKeybindingService.addDynamicKeybinding(h,f,d,r));const u=new c8(h,i,i,n,(...f)=>Promise.resolve(e.run(this,...f)),this._contextKeyService);return this._actions.set(t,u),c.add(Me(()=>{this._actions.delete(t)})),c}_triggerCommand(e,t){if(this._codeEditorService instanceof sw)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Hw=mM([Kt(2,Re),Kt(3,_t),Kt(4,li),Kt(5,Ae),Kt(6,Et),Kt(7,Ki),Kt(8,Li),Kt(9,cd),Kt(10,At),Kt(11,pe)],Hw);let aN=class extends Hw{constructor(e,t,i,n,s,r,a,l,d,c,h,u,f,p,m){const v=Object.assign({},t);Mw(c,v,!1);const _=l.registerEditorContainer(e);typeof v.theme=="string"&&l.setTheme(v.theme),typeof v.autoDetectHighContrast<"u"&&l.setAutoDetectHighContrast(!!v.autoDetectHighContrast);const b=v.model;delete v.model,super(e,v,i,n,s,r,a,l,d,h,p,m),this._configurationService=c,this._standaloneThemeService=l,this._register(_);let C;if(typeof b>"u"){const w=f.getLanguageIdByMimeType(v.language)||v.language||ro;C=v6(u,f,v.value||"",w,void 0),this._ownsModel=!0}else C=b,this._ownsModel=!1;if(this._attachModel(C),C){const w={oldModelUrl:null,newModelUrl:C.uri};this._onDidChangeModel.fire(w)}}dispose(){super.dispose()}updateOptions(e){Mw(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};aN=mM([Kt(2,Re),Kt(3,_t),Kt(4,li),Kt(5,Ae),Kt(6,Et),Kt(7,mo),Kt(8,Li),Kt(9,st),Kt(10,cd),Kt(11,Zt),Kt(12,qt),Kt(13,At),Kt(14,pe)],aN);let lN=class extends yu{constructor(e,t,i,n,s,r,a,l,d,c,h,u){const f=Object.assign({},t);Mw(l,f,!0);const p=r.registerEditorContainer(e);typeof f.theme=="string"&&r.setTheme(f.theme),typeof f.autoDetectHighContrast<"u"&&r.setAutoDetectHighContrast(!!f.autoDetectHighContrast),super(e,f,{},n,i,s,u,c),this._configurationService=l,this._standaloneThemeService=r,this._register(p)}dispose(){super.dispose()}updateOptions(e){Mw(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!e.autoDetectHighContrast),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Hw,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)}};lN=mM([Kt(2,Re),Kt(3,Ae),Kt(4,_t),Kt(5,mo),Kt(6,Li),Kt(7,st),Kt(8,pr),Kt(9,Jc),Kt(10,gd),Kt(11,U0)],lN);function v6(o,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(`
636
636
  `);let r=t;return s!==-1&&(r=t.substring(0,s)),WF(o,t,e.createByFilepathOrFirstLine(n||null,r),n)}return WF(o,t,e.createById(i),n)}function WF(o,e,t,i){return o.createModel(e,t,i)}var b6=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function sle(o,e,t){return Te.initialize(t||{}).createInstance(aN,o,e)}function ole(o){return Te.get(_t).onCodeEditorAdd(t=>{o(t)})}function rle(o){return Te.get(_t).onDiffEditorAdd(t=>{o(t)})}function ale(){return Te.get(_t).listCodeEditors()}function lle(){return Te.get(_t).listDiffEditors()}function dle(o,e,t){return Te.initialize(t||{}).createInstance(lN,o,e)}function cle(o){if(typeof o.id!="string"||typeof o.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return lt.registerCommand(o.id,o.run)}function hle(o){if(typeof o.id!="string"||typeof o.label!="string"||typeof o.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const e=Z.deserialize(o.precondition),t=(n,...s)=>tn.runEditorCommand(n,s,e,(r,a,l)=>Promise.resolve(o.run(a,...l))),i=new X;if(i.add(lt.registerCommand(o.id,t)),o.contextMenuGroupId){const n={command:{id:o.id,title:o.label},when:e,group:o.contextMenuGroupId,order:o.contextMenuOrder||0};i.add(hn.appendMenuItem(k.EditorContext,n))}if(Array.isArray(o.keybindings)){const n=Te.get(Et);if(!(n instanceof gp))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const s=Z.and(e,Z.deserialize(o.keybindingContext));i.add(n.addDynamicKeybindings(o.keybindings.map(r=>({keybinding:r,command:o.id,when:s}))))}}return i}function ule(o){return C6([o])}function C6(o){const e=Te.get(Et);return e instanceof gp?e.addDynamicKeybindings(o.map(t=>({keybinding:t.keybinding,command:t.command,commandArgs:t.commandArgs,when:Z.deserialize(t.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),H.None)}function fle(o,e,t){const i=Te.get(qt),n=i.getLanguageIdByMimeType(e)||e;return v6(Te.get(Zt),i,o,n,t)}function gle(o,e){const t=Te.get(qt),i=t.getLanguageIdByMimeType(e)||e||ro;o.setLanguage(t.createById(i))}function ple(o,e,t){o&&Te.get(ul).changeOne(e,o.uri,t)}function mle(o){Te.get(ul).changeAll(o,[])}function _le(o){return Te.get(ul).read(o)}function vle(o){return Te.get(ul).onMarkerChanged(o)}function ble(o){return Te.get(Zt).getModel(o)}function Cle(){return Te.get(Zt).getModels()}function wle(o){return Te.get(Zt).onModelAdded(o)}function Sle(o){return Te.get(Zt).onModelRemoved(o)}function yle(o){return Te.get(Zt).onModelLanguageChanged(t=>{o({model:t.model,oldLanguage:t.oldLanguageId})})}function Lle(o){return Rq(Te.get(Zt),Te.get(At),o)}function xle(o,e){const t=Te.get(qt),i=Te.get(mo);return V2.colorizeElement(i,t,o,e).then(()=>{i.registerEditorContainer(o)})}function Dle(o,e,t){const i=Te.get(qt);return Te.get(mo).registerEditorContainer(document.body),V2.colorize(i,o,e,t)}function kle(o,e,t=4){return Te.get(mo).registerEditorContainer(document.body),V2.colorizeModelLine(o,e,t)}function Ile(o){const e=ei.get(o);return e||{getInitialState:()=>Xg,tokenize:(t,i,n)=>F2(o,n)}}function Ele(o,e){ei.getOrCreate(e);const t=Ile(e),i=Xa(o),n=[];let s=t.getInitialState();for(let r=0,a=i.length;r<a;r++){const l=i[r],d=t.tokenize(l,!0,s);n[r]=d.tokens,s=d.endState}return n}function Nle(o,e){Te.get(mo).defineTheme(o,e)}function Tle(o){Te.get(mo).setTheme(o)}function Rle(){zk.clearAllFontInfos()}function Mle(o,e){return lt.registerCommand({id:o,handler:e})}function Ale(o){return Te.get(zs).registerOpener({open(t){return b6(this,void 0,void 0,function*(){return typeof t=="string"&&(t=ke.parse(t)),o.open(t)})}})}function Ple(o){return Te.get(_t).registerCodeEditorOpenHandler((t,i,n)=>b6(this,void 0,void 0,function*(){var s;if(!i)return null;const r=(s=t.options)===null||s===void 0?void 0:s.selection;let a;return r&&typeof r.endLineNumber=="number"&&typeof r.endColumn=="number"?a=r:r&&(a={lineNumber:r.startLineNumber,column:r.startColumn}),(yield o.openCodeEditor(i,t.resource,a))?i:null}))}function Ole(){return{create:sle,getEditors:ale,getDiffEditors:lle,onDidCreateEditor:ole,onDidCreateDiffEditor:rle,createDiffEditor:dle,addCommand:cle,addEditorAction:hle,addKeybindingRule:ule,addKeybindingRules:C6,createModel:fle,setModelLanguage:gle,setModelMarkers:ple,getModelMarkers:_le,removeAllMarkers:mle,onDidChangeMarkers:vle,getModels:Cle,getModel:ble,onDidCreateModel:wle,onWillDisposeModel:Sle,onDidChangeModelLanguage:yle,createWebWorker:Lle,colorizeElement:xle,colorize:Dle,colorizeModelLine:kle,tokenize:Ele,defineTheme:Nle,setTheme:Tle,remeasureFonts:Rle,registerCommand:Mle,registerLinkOpener:Ale,registerEditorOpener:Ple,AccessibilitySupport:ek,ContentWidgetPositionPreference:rk,CursorChangeReason:ak,DefaultEndOfLine:lk,EditorAutoIndentStrategy:ck,EditorOption:hk,EndOfLinePreference:uk,EndOfLineSequence:fk,MinimapPosition:Sk,MouseTargetType:yk,OverlayWidgetPositionPreference:Lk,OverviewRulerLane:xk,GlyphMarginLane:gk,RenderLineNumbersType:kk,RenderMinimap:Ik,ScrollbarVisibility:Nk,ScrollType:Ek,TextEditorCursorBlinkingStyle:Pk,TextEditorCursorStyle:Ok,TrackedRangeStickiness:Fk,WrappingIndent:Bk,InjectedTextCursorStops:mk,PositionAffinity:Dk,ConfigurationChangedEvent:j3,BareFontInfo:Yh,FontInfo:Hk,TextModelResolvedOptions:WC,FindMatch:X_,ApplyUpdateResult:n_,EditorZoom:yo,EditorType:y0,EditorOptions:na}}function Fle(o,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!o(t))return!1;return!0}function iC(o,e){return typeof o=="boolean"?o:e}function VF(o,e){return typeof o=="string"?o:e}function Ble(o){const e={};for(const t of o)e[t]=!0;return e}function HF(o,e=!1){e&&(o=o.map(function(i){return i.toLowerCase()}));const t=Ble(o);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function dN(o,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(s,r){i=!0;let a="";if(typeof o[r]=="string")a=o[r];else if(o[r]&&o[r]instanceof RegExp)a=o[r].source;else throw o[r]===void 0?zt(o,"language definition does not contain attribute '"+r+"', used at: "+e):zt(o,"attribute reference '"+r+"' must be a string, used at: "+e);return Rf(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");const n=(o.ignoreCase?"i":"")+(o.unicode?"u":"");return new RegExp(e,n)}function Wle(o,e,t,i){if(i<0)return o;if(i<e.length)return e[i];if(i>=100){i=i-100;const n=t.split(".");if(n.unshift(t),i<n.length)return n[i]}return null}function Vle(o,e,t,i){let n=-1,s=t,r=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(n=parseInt(r[3]),r[2]&&(n=n+100)),s=r[4]);let a="~",l=s;!s||s.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(r=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(a=r[1],l=r[2]));let d;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){const c=HF(l.split("|"),o.ignoreCase);d=function(h){return a==="~"?c(h):!c(h)}}else if(a==="@"||a==="!@"){const c=o[l];if(!c)throw zt(o,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!Fle(function(u){return typeof u=="string"},c))throw zt(o,"the @ match target '"+l+"' must be an array of strings, in rule: "+e);const h=HF(c,o.ignoreCase);d=function(u){return a==="@"?h(u):!h(u)}}else if(a==="~"||a==="!~")if(l.indexOf("$")<0){const c=dN(o,"^"+l+"$");d=function(h){return a==="~"?c.test(h):!c.test(h)}}else d=function(c,h,u,f){return dN(o,"^"+Od(o,l,h,u,f)+"$").test(c)};else if(l.indexOf("$")<0){const c=oc(o,l);d=function(h){return a==="=="?h===c:h!==c}}else{const c=oc(o,l);d=function(h,u,f,p,m){const v=Od(o,c,u,f,p);return a==="=="?h===v:h!==v}}return n===-1?{name:t,value:i,test:function(c,h,u,f){return d(c,c,h,u,f)}}:{name:t,value:i,test:function(c,h,u,f){const p=Wle(c,h,u,n);return d(p||"",c,h,u,f)}}}function cN(o,e,t){if(t){if(typeof t=="string")return t;if(t.token||t.token===""){if(typeof t.token!="string")throw zt(o,"a 'token' attribute must be of type string, in rule: "+e);{const i={token:t.token};if(t.token.indexOf("$")>=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw zt(o,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw zt(o,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!Xq(o,Od(o,n,"",[],""))))throw zt(o,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,o.usesEmbedded=!0),i}}else if(Array.isArray(t)){const i=[];for(let n=0,s=t.length;n<s;n++)i[n]=cN(o,e,t[n]);return{group:i}}else if(t.cases){const i=[];for(const s in t.cases)if(t.cases.hasOwnProperty(s)){const r=cN(o,e,t.cases[s]);s==="@default"||s==="@"||s===""?i.push({test:void 0,value:r,name:s}):s==="@eos"?i.push({test:function(a,l,d,c){return c},value:r,name:s}):i.push(Vle(o,e,s,r))}const n=o.defaultToken;return{test:function(s,r,a,l){for(const d of i)if(!d.test||d.test(s,r,a,l))return d.value;return n}}}else throw zt(o,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}class Hle{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if(typeof t=="string")i=t;else if(t instanceof RegExp)i=t.source;else throw zt(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=dN(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=cN(e,this.name,t)}}function w6(o,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");const t={};t.languageId=o,t.includeLF=iC(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=iC(e.ignoreCase,!1),t.unicode=iC(e.unicode,!1),t.tokenPostfix=VF(e.tokenPostfix,"."+t.languageId),t.defaultToken=VF(e.defaultToken,"source"),t.usesEmbedded=!1;const i=e;i.languageId=o,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const d of l){let c=d.include;if(c){if(typeof c!="string")throw zt(t,"an 'include' attribute must be a string at: "+r);if(c[0]==="@"&&(c=c.substr(1)),!e.tokenizer[c])throw zt(t,"include target '"+c+"' is not defined at: "+r);n(r+"."+c,a,e.tokenizer[c])}else{const h=new Hle(r);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(h.setRegex(i,d[0]),d.length>=3)if(typeof d[1]=="string")h.setAction(i,{token:d[1],next:d[2]});else if(typeof d[1]=="object"){const u=d[1];u.next=d[2],h.setAction(i,u)}else throw zt(t,"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: "+r);else h.setAction(i,d[1]);else{if(!d.regex)throw zt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);d.name&&typeof d.name=="string"&&(h.name=d.name),d.matchOnlyAtStart&&(h.matchOnlyAtLineStart=iC(d.matchOnlyAtLineStart,!1)),h.setRegex(i,d.regex),h.setAction(i,d.action)}a.push(h)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw zt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(const r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw zt(t,"the 'brackets' attribute must be defined as an array")}else e.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 r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw zt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+`
637
- hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:oc(t,a.open),close:oc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var zle=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function Ule(o){Zg.registerLanguage(o)}function $le(){let o=[];return o=o.concat(Zg.getLanguages()),o}function jle(o){return Te.get(qt).languageIdCodec.encodeLanguageId(o)}function Kle(o,e){return Te.withServices(()=>{const i=Te.get(qt).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function qle(o,e){return Te.withServices(()=>{const i=Te.get(qt).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function Gle(o,e){if(!Te.get(qt).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Te.get(At).register(o,e,100)}class Zle{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return zv.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 CS(n.tokens,n.endState)}}class zv{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 s=0,r=e.length;s<r;s++){const a=e[s];let l=a.startIndex;s===0?l=0:l<n&&(l=n),i[s]=new H_(l,a.scopes,t),n=l}return i}static adaptTokenize(e,t,i,n){const s=t.tokenize(i,n),r=zv._toClassicTokens(s.tokens,e);let a;return s.endState.equals(n)?a=n:a=s.endState,new f2(r,a)}tokenize(e,t,i){return zv.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,s=[];let r=0,a=0;for(let d=0,c=t.length;d<c;d++){const h=t[d],u=n.match(i,h.scopes)|1024;if(r>0&&s[r-1]===u)continue;let f=h.startIndex;d===0?f=0:f<a&&(f=a),s[r++]=f,s[r++]=u,a=f}const l=new Uint32Array(r);for(let d=0;d<r;d++)l[d]=s[d];return l}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),s=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return n.endState.equals(i)?r=i:r=n.endState,new CS(s,r)}}function Yle(o){return typeof o.getInitialState=="function"}function Xle(o){return"tokenizeEncoded"in o}function S6(o){return o&&typeof o.then=="function"}function Qle(o){const e=Te.get(mo);if(o){const t=[null];for(let i=1,n=o.length;i<n;i++)t[i]=V.fromHex(o[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function y6(o,e){return Xle(e)?new Zle(o,e):new zv(o,e,Te.get(qt),Te.get(mo))}function _M(o,e){const t=new EU(()=>zle(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?Yle(i)?y6(o,i):new sv(Te.get(qt),Te.get(mo),o,w6(o,i),Te.get(st)):null}));return ei.registerFactory(o,t)}function Jle(o,e){if(!Te.get(qt).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return S6(e)?_M(o,{create:()=>e}):ei.register(o,y6(o,e))}function ede(o,e){const t=i=>new sv(Te.get(qt),Te.get(mo),o,w6(o,i),Te.get(st));return S6(e)?_M(o,{create:()=>e}):ei.register(o,t(e))}function tde(o,e){return Te.get(pe).referenceProvider.register(o,e)}function ide(o,e){return Te.get(pe).renameProvider.register(o,e)}function nde(o,e){return Te.get(pe).signatureHelpProvider.register(o,e)}function sde(o,e){return Te.get(pe).hoverProvider.register(o,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(a)return!a.range&&r&&(a.range=new L(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function ode(o,e){return Te.get(pe).documentSymbolProvider.register(o,e)}function rde(o,e){return Te.get(pe).documentHighlightProvider.register(o,e)}function ade(o,e){return Te.get(pe).linkedEditingRangeProvider.register(o,e)}function lde(o,e){return Te.get(pe).definitionProvider.register(o,e)}function dde(o,e){return Te.get(pe).implementationProvider.register(o,e)}function cde(o,e){return Te.get(pe).typeDefinitionProvider.register(o,e)}function hde(o,e){return Te.get(pe).codeLensProvider.register(o,e)}function ude(o,e,t){return Te.get(pe).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const d=Te.get(ul).read({resource:n.uri}).filter(c=>L.areIntersectingOrTouching(c,s));return e.provideCodeActions(n,s,{markers:d,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function fde(o,e){return Te.get(pe).documentFormattingEditProvider.register(o,e)}function gde(o,e){return Te.get(pe).documentRangeFormattingEditProvider.register(o,e)}function pde(o,e){return Te.get(pe).onTypeFormattingEditProvider.register(o,e)}function mde(o,e){return Te.get(pe).linkProvider.register(o,e)}function _de(o,e){return Te.get(pe).completionProvider.register(o,e)}function vde(o,e){return Te.get(pe).colorProvider.register(o,e)}function bde(o,e){return Te.get(pe).foldingRangeProvider.register(o,e)}function Cde(o,e){return Te.get(pe).declarationProvider.register(o,e)}function wde(o,e){return Te.get(pe).selectionRangeProvider.register(o,e)}function Sde(o,e){return Te.get(pe).documentSemanticTokensProvider.register(o,e)}function yde(o,e){return Te.get(pe).documentRangeSemanticTokensProvider.register(o,e)}function Lde(o,e){return Te.get(pe).inlineCompletionsProvider.register(o,e)}function xde(o,e){return Te.get(pe).inlayHintsProvider.register(o,e)}function Dde(){return{register:Ule,getLanguages:$le,onLanguage:Kle,onLanguageEncountered:qle,getEncodedLanguageId:jle,setLanguageConfiguration:Gle,setColorMap:Qle,registerTokensProviderFactory:_M,setTokensProvider:Jle,setMonarchTokensProvider:ede,registerReferenceProvider:tde,registerRenameProvider:ide,registerCompletionItemProvider:_de,registerSignatureHelpProvider:nde,registerHoverProvider:sde,registerDocumentSymbolProvider:ode,registerDocumentHighlightProvider:rde,registerLinkedEditingRangeProvider:ade,registerDefinitionProvider:lde,registerImplementationProvider:dde,registerTypeDefinitionProvider:cde,registerCodeLensProvider:hde,registerCodeActionProvider:ude,registerDocumentFormattingEditProvider:fde,registerDocumentRangeFormattingEditProvider:gde,registerOnTypeFormattingEditProvider:pde,registerLinkProvider:mde,registerColorProvider:vde,registerFoldingRangeProvider:bde,registerDeclarationProvider:Cde,registerSelectionRangeProvider:wde,registerDocumentSemanticTokensProvider:Sde,registerDocumentRangeSemanticTokensProvider:yde,registerInlineCompletionsProvider:Lde,registerInlayHintsProvider:xde,DocumentHighlightKind:dk,CompletionItemKind:nk,CompletionItemTag:sk,CompletionItemInsertTextRule:ik,SymbolKind:Mk,SymbolTag:Ak,IndentAction:pk,CompletionTriggerKind:ok,SignatureHelpTriggerKind:Rk,InlayHintKind:_k,InlineCompletionTriggerKind:vk,CodeActionTriggerType:tk,FoldingRangeKind:ss,SelectedSuggestionInfo:a9}}const vM=et("IEditorCancelService"),L6=new ce("cancellableOperation",!1,g("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));dt(vM,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=L6.bindTo(n.get(Ae)),r=new ns;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class kde extends Si{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(vM).add(e,this))}dispose(){this._unregister(),super.dispose()}}re(new class extends tn{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:L6})}runEditorCommand(o,e){o.get(vM).cancel(e)}});let x6=class hN{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const i=e.getModel();this.modelVersionId=i?du("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof hN))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 hN(e,this.flags))}};class Ac extends kde{constructor(e,t,i,n){super(e,n),this._listener=new X,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!L.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!L.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class bM extends Si{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function rl(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===y0.ICodeEditor:!1}function D6(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===y0.IDiffEditor:!1}function Ide(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}function k6(o){return rl(o)?o:D6(o)?o.getModifiedEditor():Ide(o)&&rl(o.activeCodeEditor)?o.activeCodeEditor:null}class pp{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&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 n=ta.capture(e),s=pp._handleEolEdits(e,t);s.length===1&&pp._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map(r=>Xt.replace(L.lift(r.range),r.text))):e.executeEdits("formatEditsCommand",s.map(r=>Xt.replaceMove(L.lift(r.range),r.text))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class zF{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class Ede{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(zF.toKey(e))}has(e){return this._set.has(zF.toKey(e))}}var ia=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function CM(o){if(o=o.filter(n=>n.range),!o.length)return;let{range:e}=o[0];for(let n=1;n<o.length;n++)e=L.plusRange(e,o[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?o.length===1?On(g("hint11","Made 1 formatting edit on line {0}",t)):On(g("hintn1","Made {0} formatting edits on line {1}",o.length,t)):o.length===1?On(g("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):On(g("hintnn","Made {0} formatting edits between lines {1} and {2}",o.length,t,i))}function I6(o,e,t){const i=[],n=new Ede,s=o.ordered(t);for(const a of s)i.push(a),a.extensionId&&n.add(a.extensionId);const r=e.ordered(t);for(const a of r){if(a.extensionId){if(n.has(a.extensionId))continue;n.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,d,c){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),d,c)}})}return i}class Lu{static setFormatterSelector(e){return{dispose:Lu._selectors.unshift(e)}}static select(e,t,i){return ia(this,void 0,void 0,function*(){if(e.length===0)return;const n=Xe.first(Lu._selectors);if(n)return yield n(e,t,i)})}}Lu._selectors=new ns;function E6(o,e,t,i,n,s){return ia(this,void 0,void 0,function*(){const r=o.get(Re),{documentRangeFormattingEditProvider:a}=o.get(pe),l=rl(e)?e.getModel():e,d=a.ordered(l),c=yield Lu.select(d,l,i);c&&(n.report(c),yield r.invokeFunction(Nde,c,e,t,s))})}function Nde(o,e,t,i,n){var s,r;return ia(this,void 0,void 0,function*(){const a=o.get(vr),l=o.get(po);let d,c;rl(t)?(d=t.getModel(),c=new Ac(t,5,void 0,n)):(d=t,c=new bM(t,n));const h=[];let u=0;for(const _ of t2(i).sort(L.compareRangesUsingStarts))u>0&&L.areIntersectingOrTouching(h[u-1],_)?h[u-1]=L.fromPositions(h[u-1].getStartPosition(),_.getEndPosition()):u=h.push(_);const f=_=>ia(this,void 0,void 0,function*(){var b,C;l.trace("[format][provideDocumentRangeFormattingEdits] (request)",(b=e.extensionId)===null||b===void 0?void 0:b.value,_);const w=(yield e.provideDocumentRangeFormattingEdits(d,_,d.getFormattingOptions(),c.token))||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",(C=e.extensionId)===null||C===void 0?void 0:C.value,w),w}),p=(_,b)=>{if(!_.length||!b.length)return!1;const C=_.reduce((w,S)=>L.plusRange(w,S.range),_[0].range);if(!b.some(w=>L.intersectRanges(C,w.range)))return!1;for(const w of _)for(const S of b)if(L.intersectRanges(w.range,S.range))return!0;return!1},m=[],v=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",(s=e.extensionId)===null||s===void 0?void 0:s.value,h);const _=(yield e.provideDocumentRangesFormattingEdits(d,h,d.getFormattingOptions(),c.token))||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",(r=e.extensionId)===null||r===void 0?void 0:r.value,_),v.push(_)}else{for(const _ of h){if(c.token.isCancellationRequested)return!0;v.push(yield f(_))}for(let _=0;_<h.length;++_)for(let b=_+1;b<h.length;++b){if(c.token.isCancellationRequested)return!0;if(p(v[_],v[b])){const C=L.plusRange(h[_],h[b]),w=yield f(C);h.splice(b,1),h.splice(_,1),h.push(C),v.splice(b,1),v.splice(_,1),v.push(w),_=0,b=0}}}for(const _ of v){if(c.token.isCancellationRequested)return!0;const b=yield a.computeMoreMinimalEdits(d.uri,_);b&&m.push(...b)}}finally{c.dispose()}if(m.length===0)return!1;if(rl(t))pp.execute(t,m,!0),CM(m),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:_}]=m,b=new ve(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn);d.pushEditOperations([b],m.map(C=>({text:C.text,range:L.lift(C.range),forceMoveMarkers:!0})),C=>{for(const{range:w}of C)if(L.areIntersectingOrTouching(w,b))return[new ve(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn)];return null})}return!0})}function Tde(o,e,t,i,n){return ia(this,void 0,void 0,function*(){const s=o.get(Re),r=o.get(pe),a=rl(e)?e.getModel():e,l=I6(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),d=yield Lu.select(l,a,t);d&&(i.report(d),yield s.invokeFunction(Rde,d,e,t,n))})}function Rde(o,e,t,i,n){return ia(this,void 0,void 0,function*(){const s=o.get(vr);let r,a;rl(t)?(r=t.getModel(),a=new Ac(t,5,void 0,n)):(r=t,a=new bM(t,n));let l;try{const d=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,d),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(rl(t))pp.execute(t,l,i!==2),i!==2&&(CM(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:d}]=l,c=new ve(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);r.pushEditOperations([c],l.map(h=>({text:h.text,range:L.lift(h.range),forceMoveMarkers:!0})),h=>{for(const{range:u}of h)if(L.areIntersectingOrTouching(u,c))return[new ve(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function Mde(o,e,t,i,n,s){return ia(this,void 0,void 0,function*(){const r=e.documentRangeFormattingEditProvider.ordered(t);for(const a of r){const l=yield Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(Ni);if(Fn(l))return yield o.computeMoreMinimalEdits(t.uri,l)}})}function Ade(o,e,t,i,n){return ia(this,void 0,void 0,function*(){const s=I6(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const r of s){const a=yield Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(Ni);if(Fn(a))return yield o.computeMoreMinimalEdits(t.uri,a)}})}function N6(o,e,t,i,n,s,r){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(Ni).then(l=>o.computeMoreMinimalEdits(t.uri,l))}lt.registerCommand("_executeFormatRangeProvider",function(o,...e){return ia(this,void 0,void 0,function*(){const[t,i,n]=e;xt(ke.isUri(t)),xt(L.isIRange(i));const s=o.get(Ls),r=o.get(vr),a=o.get(pe),l=yield s.createModelReference(t);try{return Mde(r,a,l.object.textEditorModel,L.lift(i),n,Qe.None)}finally{l.dispose()}})});lt.registerCommand("_executeFormatDocumentProvider",function(o,...e){return ia(this,void 0,void 0,function*(){const[t,i]=e;xt(ke.isUri(t));const n=o.get(Ls),s=o.get(vr),r=o.get(pe),a=yield n.createModelReference(t);try{return Ade(s,r,a.object.textEditorModel,i,Qe.None)}finally{a.dispose()}})});lt.registerCommand("_executeFormatOnTypeProvider",function(o,...e){return ia(this,void 0,void 0,function*(){const[t,i,n,s]=e;xt(ke.isUri(t)),xt(P.isIPosition(i)),xt(typeof n=="string");const r=o.get(Ls),a=o.get(vr),l=o.get(pe),d=yield r.createModelReference(t);try{return N6(a,l,d.object.textEditorModel,P.lift(i),n,s,Qe.None)}finally{d.dispose()}})});na.wrappingIndent.defaultValue=0;na.glyphMargin.defaultValue=!1;na.autoIndent.defaultValue=3;na.overviewRulerLanes.defaultValue=2;Lu.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const hs=l9();hs.editor=Ole();hs.languages=Dde();const Pde=hs.CancellationTokenSource,Ode=hs.Emitter,Fde=hs.KeyCode,Bde=hs.KeyMod,Wde=hs.Position,Vde=hs.Range,Hde=hs.Selection,zde=hs.SelectionDirection,Ude=hs.MarkerSeverity,$de=hs.MarkerTag,jde=hs.Uri,Kde=hs.Token,qde=hs.editor,Gde=hs.languages,lD=globalThis.MonacoEnvironment;(lD?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=hs);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&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"]});const j0=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:Pde,Emitter:Ode,KeyCode:Fde,KeyMod:Bde,MarkerSeverity:Ude,MarkerTag:$de,Position:Wde,Range:Vde,Selection:Hde,SelectionDirection:zde,Token:Kde,Uri:jde,editor:qde,languages:Gde},Symbol.toStringTag,{value:"Module"}));var Zde=Object.defineProperty,Yde=Object.getOwnPropertyDescriptor,Xde=Object.getOwnPropertyNames,Qde=Object.prototype.hasOwnProperty,Jde=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xde(e))!Qde.call(o,n)&&n!==t&&Zde(o,n,{get:()=>e[n],enumerable:!(i=Yde(e,n))||i.enumerable});return o},ece=(o,e,t)=>(Jde(o,e,"default"),t),Ym={};ece(Ym,j0);var T6={},dD={},R6=class{static getOrCreate(o){return dD[o]||(dD[o]=new R6(o)),dD[o]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(o){this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,T6[this._languageId].loader().then(o=>this._lazyLoadPromiseResolve(o),o=>this._lazyLoadPromiseReject(o))),this._lazyLoadPromise}};function ye(o){const e=o.id;T6[e]=o,Ym.languages.register(o);const t=R6.getOrCreate(e);Ym.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),Ym.languages.onLanguageEncountered(e,async()=>{const i=await t.load();Ym.languages.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>be(()=>import("./abap-CRCWOmpq.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>be(()=>import("./apex-DnsZk_dE.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>be(()=>import("./azcli-1IWB1ccx.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>be(()=>import("./bat-DPkNLes8.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>be(()=>import("./bicep-Corcdgou.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>be(()=>import("./cameligo-CGrWLZr3.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>be(()=>import("./clojure-D9WOWImG.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>be(()=>import("./coffee-B7EJu28W.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>be(()=>import("./cpp-BaF-TIV3.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>be(()=>import("./cpp-BaF-TIV3.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>be(()=>import("./csharp-BoL64M5l.js"),[])});ye({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>be(()=>import("./csp-C46ZqvIl.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>be(()=>import("./css-DQU6DXDx.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>be(()=>import("./cypher-D84EuPTj.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>be(()=>import("./dart-D8lhlL1r.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>be(()=>import("./dockerfile-DLk6rpji.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>be(()=>import("./ecl-BO6FnfXk.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>be(()=>import("./elixir-BRjLKONM.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>be(()=>import("./flow9-Cac8vKd7.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>be(()=>import("./fsharp-fd1GTHhf.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>be(()=>import("./freemarker2-D3hRPg66.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>be(()=>import("./go-O9LJTZXk.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>be(()=>import("./graphql-LQdxqEYJ.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>be(()=>import("./handlebars-CmzyTLHM.js"),__vite__mapDeps([4,1,2,3]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>be(()=>import("./hcl-DxDQ3s82.js"),[])});ye({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:()=>be(()=>import("./html-BQlDvTLO.js"),__vite__mapDeps([5,1,2,3]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>be(()=>import("./ini-BvajGCUy.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>be(()=>import("./java-SYsfObOQ.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>be(()=>import("./javascript-Cqq1UmLD.js"),__vite__mapDeps([6,7,1,2,3]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>be(()=>import("./julia-DQXNmw_w.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>be(()=>import("./kotlin-qQ0MG-9I.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>be(()=>import("./less-GGFNNJHn.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>be(()=>import("./lexon-Canl7DCW.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>be(()=>import("./lua-D28Ae8-K.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>be(()=>import("./liquid-BwaniY5x.js"),__vite__mapDeps([8,1,2,3]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>be(()=>import("./m3-DPitgjJI.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>be(()=>import("./markdown-B811l8j2.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>be(()=>import("./mdx-FYEkmf7B.js"),__vite__mapDeps([9,1,2,3]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>be(()=>import("./mips-CdjsipkG.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>be(()=>import("./msdax-CYqgjx_P.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>be(()=>import("./mysql-BHd6q0vd.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>be(()=>import("./objective-c-B1aVtJYH.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>be(()=>import("./pascal-BhNW15KB.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>be(()=>import("./pascaligo-5jv8CcQD.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>be(()=>import("./perl-DlYyT36c.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>be(()=>import("./pgsql-Dy0bjov7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>be(()=>import("./php-120yhfDK.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>be(()=>import("./pla-CjnFlu4u.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>be(()=>import("./postiats-CQpG440k.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>be(()=>import("./powerquery-DdJtto1Z.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>be(()=>import("./powershell-Bu_VLpJB.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>be(()=>import("./protobuf-IBS6jZEB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>be(()=>import("./pug-kFxLfcjb.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>be(()=>import("./python-CjR2h7KU.js"),__vite__mapDeps([10,1,2,3]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>be(()=>import("./qsharp-gaqVKiJ_.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>be(()=>import("./r-BIFz-_sK.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>be(()=>import("./razor-D4Y0dbDk.js"),__vite__mapDeps([11,1,2,3]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>be(()=>import("./redis-CHOsPHWR.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>be(()=>import("./redshift-CBifECDb.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>be(()=>import("./restructuredtext-CghPJEOS.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>be(()=>import("./ruby-CYWGW-b1.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>be(()=>import("./rust-DMDD0SHb.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>be(()=>import("./sb-BYAiYHFx.js"),[])});ye({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:()=>be(()=>import("./scala-Bqvq8jcR.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>be(()=>import("./scheme-Dhb-2j9p.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>be(()=>import("./scss-CTwUZ5N7.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>be(()=>import("./shell-CsDZo4DB.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>be(()=>import("./solidity-CME5AdoB.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>be(()=>import("./sophia-RYC1BQQz.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>be(()=>import("./sparql-KEyrF7De.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>be(()=>import("./sql-BdTr02Mf.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>be(()=>import("./st-C7iG7M4S.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>be(()=>import("./swift-D7IUmUK8.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>be(()=>import("./systemverilog-DgMryOEJ.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>be(()=>import("./systemverilog-DgMryOEJ.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>be(()=>import("./tcl-PloMZuKG.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>be(()=>import("./twig-BfRIq3la.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>be(()=>import("./typescript-DwgdF-Pj.js"),__vite__mapDeps([7,1,2,3]))});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>be(()=>import("./vb-BwAE3J76.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>be(()=>import("./wgsl-B_1kOXbF.js"),[])});ye({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:()=>be(()=>import("./xml-xRWrYvkC.js"),__vite__mapDeps([12,1,2,3]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>be(()=>import("./yaml-W6T5Qjhq.js"),__vite__mapDeps([13,1,2,3]))});var tce=Object.defineProperty,ice=Object.getOwnPropertyDescriptor,nce=Object.getOwnPropertyNames,sce=Object.prototype.hasOwnProperty,oce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of nce(e))!sce.call(o,n)&&n!==t&&tce(o,n,{get:()=>e[n],enumerable:!(i=ice(e,n))||i.enumerable});return o},rce=(o,e,t)=>(oce(o,e,"default"),t),$p={};rce($p,j0);var wM=class{_onDidChange=new $p.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)}},SM={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}},yM={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},M6=new wM("css",SM,yM),A6=new wM("scss",SM,yM),P6=new wM("less",SM,yM);$p.languages.css={cssDefaults:M6,lessDefaults:P6,scssDefaults:A6};function LM(){return be(()=>import("./cssMode-DtHNIdrr.js"),__vite__mapDeps([14,1,2,3]))}$p.languages.onLanguage("less",()=>{LM().then(o=>o.setupMode(P6))});$p.languages.onLanguage("scss",()=>{LM().then(o=>o.setupMode(A6))});$p.languages.onLanguage("css",()=>{LM().then(o=>o.setupMode(M6))});var ace=Object.defineProperty,lce=Object.getOwnPropertyDescriptor,dce=Object.getOwnPropertyNames,cce=Object.prototype.hasOwnProperty,hce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of dce(e))!cce.call(o,n)&&n!==t&&ace(o,n,{get:()=>e[n],enumerable:!(i=lce(e,n))||i.enumerable});return o},uce=(o,e,t)=>(hce(o,e,"default"),t),Ay={};uce(Ay,j0);var fce=class{_onDidChange=new Ay.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)}},gce={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"},Py={format:gce,suggest:{},data:{useDefaultDataProvider:!0}};function Oy(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===L_,documentFormattingEdits:o===L_,documentRangeFormattingEdits:o===L_}}var L_="html",UF="handlebars",$F="razor",O6=Fy(L_,Py,Oy(L_)),pce=O6.defaults,F6=Fy(UF,Py,Oy(UF)),mce=F6.defaults,B6=Fy($F,Py,Oy($F)),_ce=B6.defaults;Ay.languages.html={htmlDefaults:pce,razorDefaults:_ce,handlebarDefaults:mce,htmlLanguageService:O6,handlebarLanguageService:F6,razorLanguageService:B6,registerHTMLLanguageService:Fy};function vce(){return be(()=>import("./htmlMode-B5vyN_yh.js"),__vite__mapDeps([15,1,2,3]))}function Fy(o,e=Py,t=Oy(o)){const i=new fce(o,e,t);let n;const s=Ay.languages.onLanguage(o,async()=>{n=(await vce()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}var bce=Object.defineProperty,Cce=Object.getOwnPropertyDescriptor,wce=Object.getOwnPropertyNames,Sce=Object.prototype.hasOwnProperty,yce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of wce(e))!Sce.call(o,n)&&n!==t&&bce(o,n,{get:()=>e[n],enumerable:!(i=Cce(e,n))||i.enumerable});return o},Lce=(o,e,t)=>(yce(o,e,"default"),t),K0={};Lce(K0,j0);var xce=class{_onDidChange=new K0.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)}},Dce={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},kce={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},W6=new xce("json",Dce,kce);K0.languages.json={jsonDefaults:W6};function Ice(){return be(()=>import("./jsonMode-CZ-xTnh0.js"),__vite__mapDeps([16,1,2,3]))}K0.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});K0.languages.onLanguage("json",()=>{Ice().then(o=>o.setupMode(W6))});var Ece=Object.defineProperty,Nce=Object.getOwnPropertyDescriptor,Tce=Object.getOwnPropertyNames,Rce=Object.prototype.hasOwnProperty,Mce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Tce(e))!Rce.call(o,n)&&n!==t&&Ece(o,n,{get:()=>e[n],enumerable:!(i=Nce(e,n))||i.enumerable});return o},Ace=(o,e,t)=>(Mce(o,e,"default"),t),Pce="5.0.2",mp={};Ace(mp,j0);var V6=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(V6||{}),H6=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(H6||{}),z6=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(z6||{}),U6=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(U6||{}),$6=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))($6||{}),j6=class{_onDidChange=new mp.Emitter;_onDidExtraLibsChange=new mp.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;_modeConfiguration;constructor(o,e,t,i,n){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},Oce=Pce,K6={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},q6=new j6({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},K6),G6=new j6({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},K6),Fce=()=>By().then(o=>o.getTypeScriptWorker()),Bce=()=>By().then(o=>o.getJavaScriptWorker());mp.languages.typescript={ModuleKind:V6,JsxEmit:H6,NewLineKind:z6,ScriptTarget:U6,ModuleResolutionKind:$6,typescriptVersion:Oce,typescriptDefaults:q6,javascriptDefaults:G6,getTypeScriptWorker:Fce,getJavaScriptWorker:Bce};function By(){return be(()=>import("./tsMode-Cvjisfey.js"),__vite__mapDeps([17,1,2,3]))}mp.languages.onLanguage("typescript",()=>By().then(o=>o.setupTypeScript(q6)));mp.languages.onLanguage("javascript",()=>By().then(o=>o.setupJavaScript(G6)));class Wce extends fo{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:g("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:oe.map,toggled:Z.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Z.has("isInDiffEditor"),menu:{when:Z.has("isInDiffEditor"),id:k.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(st),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}jt(Wce);class Z6 extends fo{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:g("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:Z.has("isInDiffEditor")})}run(e,...t){const i=e.get(st),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}jt(Z6);class Y6 extends fo{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:g("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:Z.has("isInDiffEditor")})}run(e,...t){const i=e.get(st),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}jt(Y6);hn.appendMenuItem(k.EditorTitle,{command:{id:new Y6().desc.id,title:g("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Z.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Z.has("isInDiffEditor")},order:11,group:"1_diff",when:Z.and(E.diffEditorRenderSideBySideInlineBreakpointReached,Z.has("isInDiffEditor"))});hn.appendMenuItem(k.EditorTitle,{command:{id:new Z6().desc.id,title:g("showMoves","Show Moved Code Blocks"),icon:oe.move,toggled:Mp.create("config.diffEditor.experimental.showMoves",!0),precondition:Z.has("isInDiffEditor")},order:10,group:"1_diff",when:Z.has("isInDiffEditor")});const Wy={value:g("diffEditor","Diff Editor"),original:"Diff Editor"};class Vce extends oa{constructor(){super({id:"diffEditor.switchSide",title:{value:g("switchSide","Switch Side"),original:"Switch Side"},icon:oe.arrowSwap,precondition:Z.has("isInDiffEditor"),f1:!0,category:Wy})}runEditorCommand(e,t,i){const n=Kp(e);if(n instanceof yu){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}jt(Vce);class Hce extends oa{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:g("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:oe.close,precondition:E.comparingMovedCode,f1:!1,category:Wy,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=Kp(e);n instanceof yu&&n.exitCompareMove()}}jt(Hce);class zce extends oa{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:g("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:oe.fold,precondition:Z.has("isInDiffEditor"),f1:!0,category:Wy})}runEditorCommand(e,t,...i){const n=Kp(e);n instanceof yu&&n.collapseAllUnchangedRegions()}}jt(zce);class Uce extends oa{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:g("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:oe.unfold,precondition:Z.has("isInDiffEditor"),f1:!0,category:Wy})}runEditorCommand(e,t,...i){const n=Kp(e);n instanceof yu&&n.showAllUnchangedRegions()}}jt(Uce);const X6={value:g("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class jp extends fo{constructor(){super({id:jp.id,title:{value:g("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:X6,precondition:Z.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Kp(e);t?.accessibleDiffViewerNext()}}jp.id="editor.action.accessibleDiffViewer.next";hn.appendMenuItem(k.EditorTitle,{command:{id:jp.id,title:g("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Z.has("isInDiffEditor")},order:10,group:"2_diff",when:Z.and(E.accessibleDiffViewerVisible.negate(),Z.has("isInDiffEditor"))});class q0 extends fo{constructor(){super({id:q0.id,title:{value:g("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:X6,precondition:Z.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Kp(e);t?.accessibleDiffViewerPrev()}}q0.id="editor.action.accessibleDiffViewer.prev";function Kp(o){var e;const t=o.get(_t),i=t.listDiffEditors(),n=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!n)return null;for(let r=0,a=i.length;r<a;r++){const l=i[r];if(l.getModifiedEditor().getId()===n.getId()||l.getOriginalEditor().getId()===n.getId())return l}const s=rr();if(s)for(const r of i){const a=r.getContainerDomNode();if($ce(a,s))return r}return null}function $ce(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}lt.registerCommandAlias("editor.action.diffReview.next",jp.id);jt(jp);lt.registerCommandAlias("editor.action.diffReview.prev",q0.id);jt(q0);var jce=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kce=function(o,e){return function(t,i){e(t,i,o)}},Vy=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},uN;const Hy=new ce("selectionAnchorSet",!1);let ad=uN=class{static get(e){return e.getContribution(uN.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Hy.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(ve.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new xn().appendText(g("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),On(g("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(ve.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()}};ad.ID="editor.contrib.selectionAnchorController";ad=uN=jce([Kce(1,Ae)],ad);class qce extends fe{constructor(){super({id:"editor.action.setSelectionAnchor",label:g("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:Pi(2089,2080),weight:100}})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class Gce extends fe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:g("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Hy})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class Zce extends fe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:g("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Hy,kbOpts:{kbExpr:E.editorTextFocus,primary:Pi(2089,2089),weight:100}})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class Yce extends fe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:g("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Hy,kbOpts:{kbExpr:E.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}ft(ad.ID,ad,4);ie(qce);ie(Gce);ie(Zce);ie(Yce);const Xce=T("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Qce extends fe{constructor(){super({id:"editor.action.jumpToBracket",label:g("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=ar.get(t))===null||i===void 0||i.jumpToBracket()}}class Jce extends fe{constructor(){super({id:"editor.action.selectToBracket",label:g("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 s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=ar.get(t))===null||n===void 0||n.selectToBracket(s)}}class ehe extends fe{constructor(){super({id:"editor.action.removeBrackets",label:g("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=ar.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class the{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class ar extends H{static get(e){return e.getContribution(ar.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Dt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),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(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new ve(r.lineNumber,r.column,r.lineNumber,r.column):new ve(n.lineNumber,n.column,n.lineNumber,n.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 s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(L.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new ve(a.lineNumber,a.column,l.lineNumber,l.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 s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")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()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h<u;h++){const f=e[h];f.isEmpty()&&(s[r++]=f.getStartPosition())}s.length>1&&s.sort(P.compare);const a=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const f=s[h];for(;d<c&&n[d].position.isBefore(f);)d++;if(d<c&&n[d].position.equals(f))a[l++]=n[d];else{let p=t.bracketPairs.matchBracket(f,20),m=ar._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(f,20),m=ar._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new the(f,p,m)}}this._lastBracketsData=a,this._lastVersionId=i}}ar.ID="editor.contrib.bracketMatchingController";ar._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Ve.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ti(Xce),position:lo.Center}});ar._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Ve.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});ft(ar.ID,ar,1);ie(Jce);ie(Qce);ie(ehe);hn.appendMenuItem(k.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:g({},"Go to &&Bracket")},order:2});class ihe{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,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new L(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,s,i,s),a)}else{const r=new L(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new ve(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ve(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Q6 extends fe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new ihe(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class nhe extends Q6{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:g("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:E.writable})}}class she extends Q6{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:g("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:E.writable})}}ie(nhe);ie(she);class ohe extends fe{constructor(){super({id:"editor.action.transposeLetters",label:g("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:E.writable,kbOpts:{kbExpr:E.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;const c=l===d?r.getPosition():Ct.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=Ct.leftPosition(i,c),u=Ct.leftPosition(i,h),f=i.getValueInRange(L.fromPositions(u,h)),p=i.getValueInRange(L.fromPositions(h,c)),m=L.fromPositions(u,c);n.push(new wn(m,p+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}ie(ohe);var rhe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const xu="9_cutcopypaste",ahe=Za||document.queryCommandSupported("cut"),J6=Za||document.queryCommandSupported("copy"),lhe=typeof navigator.clipboard>"u"||Mo?document.queryCommandSupported("paste"):!0;function xM(o){return o.register(),o}const dhe=ahe?xM(new Pp({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Za?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:g({},"Cu&&t"),order:1},{menuId:k.EditorContext,group:xu,title:g("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1},{menuId:k.CommandPalette,group:"",title:g("actions.clipboard.cutLabel","Cut"),order:1},{menuId:k.SimpleEditorContext,group:xu,title:g("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1}]})):void 0,che=J6?xM(new Pp({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Za?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:g({},"&&Copy"),order:2},{menuId:k.EditorContext,group:xu,title:g("actions.clipboard.copyLabel","Copy"),order:2},{menuId:k.CommandPalette,group:"",title:g("actions.clipboard.copyLabel","Copy"),order:1},{menuId:k.SimpleEditorContext,group:xu,title:g("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;hn.appendMenuItem(k.MenubarEditMenu,{submenu:k.MenubarCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});hn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:xu,order:3});hn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1,when:Z.and(Z.notEquals("resourceScheme","output"),E.editorTextFocus)});hn.appendMenuItem(k.EditorTitleContext,{submenu:k.EditorTitleContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});hn.appendMenuItem(k.ExplorerContext,{submenu:k.ExplorerContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});const cD=lhe?xM(new Pp({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Za?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:g({},"&&Paste"),order:4},{menuId:k.EditorContext,group:xu,title:g("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4},{menuId:k.CommandPalette,group:"",title:g("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:k.SimpleEditorContext,group:xu,title:g("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4}]})):void 0;class hhe extends fe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:g("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(_I.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),_I.forceCopyWithSyntaxHighlighting=!1)}}function eW(o,e){o&&(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(_t).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(37),r=n.getSelection();return r&&r.isEmpty()&&!s||n.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(MS().execCommand(e),!0)))}eW(dhe,"cut");eW(che,"copy");cD&&(cD.addImplementation(1e4,"code-editor",(o,e)=>{const t=o.get(_t),i=o.get(gd),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!n.getContainerDomNode().ownerDocument.execCommand("paste")&&Kc?rhe(void 0,void 0,void 0,function*(){const r=yield i.readText();if(r!==""){const a=hv.INSTANCE.get(r);let l=!1,d=null,c=null;a&&(l=n.getOption(37)&&!!a.isFromEmptySelection,d=typeof a.multicursorText<"u"?a.multicursorText:null,c=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:d,mode:c})}}):!0:!1}),cD.addImplementation(0,"generic-dom",(o,e)=>(MS().execCommand("paste"),!0)));J6&&ie(hhe);var uhe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class Ne{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+Ne.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Ne(this.value+Ne.sep+e)}}Ne.sep=".";Ne.None=new Ne("@@none@@");Ne.Empty=new Ne("");Ne.QuickFix=new Ne("quickfix");Ne.Refactor=new Ne("refactor");Ne.RefactorExtract=Ne.Refactor.append("extract");Ne.RefactorInline=Ne.Refactor.append("inline");Ne.RefactorMove=Ne.Refactor.append("move");Ne.RefactorRewrite=Ne.Refactor.append("rewrite");Ne.Notebook=new Ne("notebook");Ne.Source=new Ne("source");Ne.SourceOrganizeImports=Ne.Source.append("organizeImports");Ne.SourceFixAll=Ne.Source.append("fixAll");Ne.SurroundWith=Ne.Refactor.append("surround");var Vs;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(Vs||(Vs={}));function fhe(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>tW(e,t,o.include))||!o.includeSourceActions&&Ne.Source.contains(e))}function ghe(o,e){const t=e.kind?new Ne(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>tW(t,i,o.include))||!o.includeSourceActions&&t&&Ne.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function tW(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class Ra{static fromUser(e,t){return!e||typeof e!="object"?new Ra(t.kind,t.apply,!1):new Ra(Ra.getKindFromUser(e,t.kind),Ra.getApplyFromUser(e,t.apply),Ra.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ne(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class phe{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}resolve(e){var t;return uhe(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Ni(n)}i&&(this.action.edit=i.edit)}return this})}}var zw=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const iW="editor.action.codeAction",DM="editor.action.quickFix",nW="editor.action.autoFix",sW="editor.action.refactor",oW="editor.action.sourceAction",kM="editor.action.organizeImports",IM="editor.action.fixAll";class x_ extends H{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Fn(e.diagnostics)?Fn(t.diagnostics)?x_.codeActionsPreferredComparator(e,t):-1:Fn(t.diagnostics)?1:x_.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(x_.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ne.QuickFix.contains(new Ne(e.kind))&&!!e.isPreferred)}}const jF={actions:[],documentation:void 0};function D_(o,e,t,i,n,s){var r;return zw(this,void 0,void 0,function*(){const a=i.filter||{},l=Object.assign(Object.assign({},a),{excludes:[...a.excludes||[],Ne.Notebook]}),d={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new bM(e,s),h=i.type===2,u=mhe(o,e,h?l:a),f=new X,p=u.map(v=>zw(this,void 0,void 0,function*(){try{n.report(v);const _=yield v.provideCodeActions(e,t,d,c.token);if(_&&f.add(_),c.token.isCancellationRequested)return jF;const b=(_?.actions||[]).filter(w=>w&&ghe(a,w)),C=vhe(v,b,a.include);return{actions:b.map(w=>new phe(w,v)),documentation:C}}catch(_){if(sa(_))throw _;return Ni(_),jF}})),m=o.onDidChange(()=>{const v=o.all(e);mi(v,u)||c.cancel()});try{const v=yield Promise.all(p),_=v.map(C=>C.actions).flat(),b=[...Ga(v.map(C=>C.documentation)),..._he(o,e,i,_)];return new x_(_,b,f)}finally{m.dispose(),c.dispose()}})}function mhe(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>fhe(t,new Ne(n))):!0)}function*_he(o,e,t,i){var n,s,r;if(e&&i.length)for(const a of o.all(e))a._getAdditionalMenuItems&&(yield*(n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.call(a,{trigger:t.type,only:(r=(s=t.filter)===null||s===void 0?void 0:s.include)===null||r===void 0?void 0:r.value},i.map(l=>l.action)))}function vhe(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Ne(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n?.command}for(const n of e)if(n.kind){for(const s of i)if(s.kind.contains(new Ne(n.kind)))return s.command}}var Uw;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions"})(Uw||(Uw={}));function bhe(o,e,t,i,n=Qe.None){var s;return zw(this,void 0,void 0,function*(){const r=o.get(P0),a=o.get(li),l=o.get(go),d=o.get(Li);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(n),!n.isCancellationRequested&&!(!((s=e.action.edit)===null||s===void 0)&&s.edits.length&&!(yield r.apply(e.action.edit,{editor:i?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Uw.OnSave,showPreview:i?.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const h=Che(c);d.error(typeof h=="string"?h:g("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Che(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}lt.registerCommand("_executeCodeActionProvider",function(o,e,t,i,n){return zw(this,void 0,void 0,function*(){if(!(e instanceof ke))throw No();const{codeActionProvider:s}=o.get(pe),r=o.get(Zt).getModel(e);if(!r)throw No();const a=ve.isISelection(t)?ve.liftSelection(t):L.isIRange(t)?r.validateRange(t):void 0;if(!a)throw No();const l=typeof i=="string"?new Ne(i):void 0,d=yield D_(s,r,a,{type:1,triggerAction:Vs.Default,filter:{includeSourceActions:!0,include:l}},Jl.None,Qe.None),c=[],h=Math.min(d.validActions.length,typeof n=="number"?n:0);for(let u=0;u<h;u++)c.push(d.validActions[u].resolve(Qe.None));try{return yield Promise.all(c),d.validActions.map(u=>u.action)}finally{setTimeout(()=>d.dispose(),100)}})});var whe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},She=function(o,e){return function(t,i){e(t,i,o)}},fN;let $w=fN=class{constructor(e){this.keybindingService=e}getResolver(){const e=new Zc(()=>this.keybindingService.getKeybindings().filter(t=>fN.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===kM?i={kind:Ne.SourceOrganizeImports.value}:t.command===IM&&(i={kind:Ne.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Ra.fromUser(i,{kind:Ne.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ne(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}};$w.codeActionCommands=[sW,iW,oW,kM,IM];$w=fN=whe([She(0,Et)],$w);T("symbolIcon.arrayForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.booleanForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.colorForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.constantForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.fileForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.folderForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.keyForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.keywordForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.moduleForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.namespaceForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.nullForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.numberForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.objectForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.operatorForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.packageForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.propertyForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.referenceForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.snippetForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.stringForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.structForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.textForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.typeParameterForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.unitForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const rW=Object.freeze({kind:Ne.Empty,title:g("codeAction.widget.id.more","More Actions...")}),yhe=Object.freeze([{kind:Ne.QuickFix,title:g("codeAction.widget.id.quickfix","Quick Fix")},{kind:Ne.RefactorExtract,title:g("codeAction.widget.id.extract","Extract"),icon:oe.wrench},{kind:Ne.RefactorInline,title:g("codeAction.widget.id.inline","Inline"),icon:oe.wrench},{kind:Ne.RefactorRewrite,title:g("codeAction.widget.id.convert","Rewrite"),icon:oe.wrench},{kind:Ne.RefactorMove,title:g("codeAction.widget.id.move","Move"),icon:oe.wrench},{kind:Ne.SurroundWith,title:g("codeAction.widget.id.surround","Surround With"),icon:oe.symbolSnippet},{kind:Ne.Source,title:g("codeAction.widget.id.source","Source Action"),icon:oe.symbolFile},rW]);function Lhe(o,e,t){if(!e)return o.map(s=>{var r;return{kind:"action",item:s,group:rW,disabled:!!s.action.disabled,label:s.action.disabled||s.action.title,canPreview:!!(!((r=s.action.edit)===null||r===void 0)&&r.edits.length)}});const i=yhe.map(s=>({group:s,actions:[]}));for(const s of o){const r=s.action.kind?new Ne(s.action.kind):Ne.None;for(const a of i)if(a.group.kind.contains(r)){a.actions.push(s);break}}const n=[];for(const s of i)if(s.actions.length){n.push({kind:"header",group:s.group});for(const r of s.actions)n.push({kind:"action",item:r,group:s.group,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}return n}var xhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Dhe=function(o,e){return function(t,i){e(t,i,o)}},gN,lg;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})(lg||(lg={}));let Du=gN=class extends H{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new A),this.onClick=this._onClick.event,this._state=lg.Hidden,this._domNode=ee("div.lightBulbWidget"),this._register(Nt.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const n=this._editor.getModel();(this.state.type!==1||!n||this.state.editorPosition.lineNumber>=n.getLineCount())&&this.hide()})),this._register(nj(this._domNode,i=>{if(this.state.type!==1)return;this._editor.focus(),i.preventDefault();const{top:n,height:s}=Ai(this._domNode),r=this._editor.getOption(66);let a=Math.floor(r/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=r),this._onClick.fire({x:i.posx,y:n+s+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register($(this._domNode,"mouseenter",i=>{(i.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(de.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var i,n,s,r;this._preferredKbLabel=(n=(i=t.lookupKeybinding(nW))===null||i===void 0?void 0:i.getLabel())!==null&&n!==void 0?n:void 0,this._quickFixKbLabel=(r=(s=t.lookupKeybinding(DM))===null||s===void 0?void 0:s.getLabel())!==null&&r!==void 0?r:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,d=n.get(50),c=s.getLineContent(r),h=ty(c,l),u=d.spaceWidth*h>22,f=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let p=r;if(!u){if(r>1&&!f(r-1))p-=1;else if(!f(r+1))p+=1;else if(a*d.spaceWidth<22)return this.hide()}this.state=new lg.Showing(e,t,i,{position:{lineNumber:p,column:1},preference:gN._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==lg.Hidden&&(this.state=lg.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...Ie.asClassNameArray(oe.lightBulb)),this._domNode.classList.add(...Ie.asClassNameArray(oe.lightbulbAutofix)),this._preferredKbLabel)){this.title=g("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...Ie.asClassNameArray(oe.lightbulbAutofix)),this._domNode.classList.add(...Ie.asClassNameArray(oe.lightBulb)),this._quickFixKbLabel?this.title=g("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=g("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Du.ID="editor.contrib.lightbulbWidget";Du._posPref=[0];Du=gN=xhe([Dhe(1,Et)],Du);var khe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},KF=function(o,e){return function(t,i){e(t,i,o)}},aW=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},pN;let ld=pN=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new A,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new X,s=n.add(fy(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,n)=>aW(this,void 0,void 0,function*(){var s,r,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageId()),l||(l=ro);const d=yield Mee(this._languageService,n,l),c=document.createElement("span");if(c.innerHTML=(a=(r=pN._ttpTokenizer)===null||r===void 0?void 0:r.createHTML(d))!==null&&a!==void 0?a:d,this._options.editor){const h=this._options.editor.getOption(50);kn(c,h)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>lW(this._openerService,i,e.isTrusted),disposables:t}}}};ld._ttpTokenizer=dd("tokenizeToString",{createHTML(o){return o}});ld=pN=khe([KF(1,qt),KF(2,zs)],ld);function lW(o,e,t){return aW(this,void 0,void 0,function*(){try{return yield o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Ihe(t)})}catch(i){return He(i),!1}})}function Ihe(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}var Ehe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qF=function(o,e){return function(t,i){e(t,i,o)}},s1;let Fs=s1=class{static get(e){return e.getContribution(s1.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new pn,this._messageListeners=new X,this._mouseOverMessage=!1,this._editor=e,this._visible=s1.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){On(ac(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=ac(e)?fy(e,{actionHandler:{callback:n=>lW(this._openerService,n,ac(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new GF(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(de.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Dn(rr(),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($(this._messageWidget.value.getDomNode(),ae.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add($(this._messageWidget.value.getDomNode(),ae.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new L(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(GF.fadeOut(this._messageWidget.value))}};Fs.ID="editor.contrib.messageController";Fs.MESSAGE_VISIBLE=new ce("messageVisible",!1,g("messageVisible","Whether the editor is currently showing an inline message"));Fs=s1=Ehe([qF(1,Ae),qF(2,zs)],Fs);const Nhe=tn.bindToContribution(Fs.get);re(new Nhe({id:"leaveEditorMessage",precondition:Fs.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let GF=class{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 s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};ft(Fs.ID,Fs,4);var dW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mN=function(o,e){return function(t,i){e(t,i,o)}},The=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const cW="acceptSelectedCodeAction",hW="previewSelectedCodeAction";class Rhe{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,s;i.text.textContent=(s=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&s!==void 0?s:""}disposeTemplate(e){}}let _N=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");i.className="title",e.append(i);const n=new V0(e,to);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){var n,s,r;if(!((n=e.group)===null||n===void 0)&&n.icon?(i.icon.className=Ie.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=he(e.group.icon.color.id))):(i.icon.className=Ie.asClassName(oe.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=uW(e.label),i.keybinding.set(e.keybinding),gj(!!e.keybinding,i.keybinding.element);const a=(s=this._keybindingService.lookupKeybinding(cW))===null||s===void 0?void 0:s.getLabel(),l=(r=this._keybindingService.lookupKeybinding(hW))===null||r===void 0?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?i.container.title=g({},"{0} to apply, {1} to preview",a,l):i.container.title=g({},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};_N=dW([mN(1,Et)],_N);class Mhe extends UIEvent{constructor(){super("acceptSelectedAction")}}class ZF extends UIEvent{constructor(){super("previewSelectedAction")}}function Ahe(o){if(o.kind==="action")return o.label}let vN=class extends H{constructor(e,t,i,n,s,r){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=r,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Si),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new mr(e,this.domNode,a,[new _N(t,this._keybindingService),new Rhe],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Ahe},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let d=l.label?uW(l?.label):"";return l.disabled&&(d=g({},"{0}, Disabled Reason: {1}",d,l.disabled)),d}return null},getWidgetAriaLabel:()=>g({},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Xu),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(d=>d.kind==="header").length,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);const s=this._allMenuItems.map((d,c)=>{const h=document.getElementById(this._list.getElementID(c));if(h){h.style.width="auto";const u=h.getBoundingClientRect().width;return h.style.width="",u}return 0}),r=Math.max(...s,e),l=Math.min(n,document.body.clientHeight*.7);return this._list.layout(l,r),this.domNode.style.height=`${l}px`,this._list.domFocus(),r}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(t.length===0)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new ZF:new Mhe;this._list.setSelection([i],s)}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 ZF):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,s.item)}onListHover(e){return The(this,void 0,void 0,function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const i=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])})}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};vN=dW([mN(4,hd),mN(5,Et)],vN);function uW(o){return o.replace(/\r\n|\r|\n/g," ")}var Phe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hD=function(o,e){return function(t,i){e(t,i,o)}};T("actionBar.toggledBackground",{dark:zh,light:zh,hcDark:zh,hcLight:zh},g("actionBar.toggledBackground","Background color for toggled action items in action bar."));const ku={Visible:new ce("codeActionMenuVisible",!1,g("codeActionMenuVisible","Whether the action widget list is visible"))},nf=et("actionWidgetService");let Iu=class extends H{get isVisible(){return ku.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new pn)}show(e,t,i,n,s,r,a){const l=ku.Visible.bindTo(this._contextKeyService),d=this._instantiationService.createInstance(vN,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:c=>(l.set(!0),this._renderWidget(c,d,a??[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},r,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||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)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const r=new X,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),r.add($(l,ae.MOUSE_DOWN,p=>p.stopPropagation()));const d=document.createElement("div"),c=e.appendChild(d);c.classList.add("context-view-pointerBlock"),r.add($(c,ae.POINTER_MOVE,()=>c.remove())),r.add($(c,ae.MOUSE_DOWN,()=>c.remove()));let h=0;if(i.length){const p=this._createActionBar(".action-widget-action-bar",i);p&&(s.appendChild(p.getContainer().parentElement),r.add(p),h=p.getContainer().offsetWidth)}const u=(n=this._list.value)===null||n===void 0?void 0:n.layout(h);s.style.width=`${u}px`;const f=r.add(Qa(e));return r.add(f.onDidBlur(()=>this.hide())),r}_createActionBar(e,t){if(!t.length)return;const i=ee(e),n=new Wo(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Iu=Phe([hD(0,hd),hD(1,Ae),hD(2,Re)],Iu);dt(nf,Iu,1);const G0=1100;jt(class extends fo{constructor(){super({id:"hideCodeActionWidget",title:{value:g("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:ku.Visible,keybinding:{weight:G0,primary:9,secondary:[1033]}})}run(o){o.get(nf).hide()}});jt(class extends fo{constructor(){super({id:"selectPrevCodeAction",title:{value:g("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:ku.Visible,keybinding:{weight:G0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const e=o.get(nf);e instanceof Iu&&e.focusPrevious()}});jt(class extends fo{constructor(){super({id:"selectNextCodeAction",title:{value:g("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:ku.Visible,keybinding:{weight:G0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const e=o.get(nf);e instanceof Iu&&e.focusNext()}});jt(class extends fo{constructor(){super({id:cW,title:{value:g("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:ku.Visible,keybinding:{weight:G0,primary:3,secondary:[2137]}})}run(o){const e=o.get(nf);e instanceof Iu&&e.acceptSelected()}});jt(class extends fo{constructor(){super({id:hW,title:{value:g("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:ku.Visible,keybinding:{weight:G0,primary:2051}})}run(o){const e=o.get(nf);e instanceof Iu&&e.acceptSelected(!0)}});var Ohe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const fW=new ce("supportedCodeAction","");class Fhe extends H{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new ur),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),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(i=>lR(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Vs.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:n,column:s}=i.getPosition(),r=t.getLineContent(n);if(r.length===0)return;if(s===1){if(/\s/.test(r[0]))return}else if(s===t.getLineMaxColumn(n)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[s-2])&&/\s/.test(r[s-1]))return}return i}}var Fh;(function(o){o.Empty={type:0};class e{constructor(i,n,s){this.trigger=i,this.position=n,this._cancellablePromise=s,this.type=1,this.actions=s.catch(r=>{if(sa(r))return gW;throw r})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(Fh||(Fh={}));const gW=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class Bhe extends H{constructor(e,t,i,n,s,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=r,this._codeActionOracle=this._register(new pn),this._state=Fh.Empty,this._onDidChangeState=this._register(new A),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=fW.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(Fh.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:t?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Fh.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(i=>{var n;return(n=i.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Fhe(this._editor,this._markerService,i=>{var n;if(!i){this.setState(Fh.Empty);return}const s=i.selection.getStartPosition(),r=Wi(a=>Ohe(this,void 0,void 0,function*(){var l,d,c,h,u,f;if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===Vs.QuickFix||!((d=(l=i.trigger.filter)===null||l===void 0?void 0:l.include)===null||d===void 0)&&d.contains(Ne.QuickFix))){const p=yield D_(this._registry,e,i.selection,i.trigger,Jl.None,a);if(a.isCancellationRequested)return gW;if(!((c=p.validActions)===null||c===void 0?void 0:c.some(v=>v.action.kind?Ne.QuickFix.contains(new Ne(v.action.kind)):!1))){const v=this._markerService.read({resource:e.uri});if(v.length>0){const _=i.selection.getPosition();let b=_,C=Number.MAX_VALUE,w=!1;for(const S of v){const D=S.endColumn,x=S.endLineNumber,I=S.startLineNumber;(x===_.lineNumber||I===_.lineNumber)&&Math.abs(_.column-D)<C&&(C=Math.abs(_.column-D),w=!0,b=new P(x,D))}if(w){const S={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:!((h=i.trigger.filter)===null||h===void 0)&&h.include?(u=i.trigger.filter)===null||u===void 0?void 0:u.include:Ne.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:((f=i.trigger.context)===null||f===void 0?void 0:f.notAvailableMessage)||"",position:b}},D=new ve(b.lineNumber,b.column,b.lineNumber,b.column),x=yield D_(this._registry,e,D,S,Jl.None,a),I=[...p.validActions];return x.validActions.length!==0&&(x.validActions.forEach(N=>{N.highlightRange=N.action.isPreferred}),I.push(...x.validActions)),{validActions:I,allActions:p.allActions,documentation:p.documentation,hasAutoFix:p.hasAutoFix,dispose:()=>{p.dispose()}}}}}}return D_(this._registry,e,i.selection,i.trigger,Jl.None,a)}));i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(r,250)),this.setState(new Fh.Triggered(i.trigger,s,r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Vs.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var Whe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vl=function(o,e){return function(t,i){e(t,i,o)}},Cm=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},o1;const Vhe="quickfix-edit-highlight";let Pc=o1=class extends H{static get(e){return e.getContribution(o1.ID)}constructor(e,t,i,n,s,r,a,l,d,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=d,this._instantiationService=c,this._activeCodeActions=this._register(new pn),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Bhe(this._editor,s.codeActionProvider,t,i,r,l)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new Zc(()=>{const h=this._editor.getContribution(Du.ID);return h&&this._register(h.onClick(u=>this.showCodeActionList(u.actions,u,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=n.createInstance($w),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 s;if(!this._editor.hasModel())return;(s=Fs.get(this._editor))===null||s===void 0||s.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return Cm(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(bhe,e,Uw.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Vs.QuickFix,filter:{}})}})}update(e){var t,i,n,s,r,a,l;return Cm(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let d;try{d=yield e.actions}catch(c){He(c);return}if(!this._disposed)if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(d,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.include){const h=this.tryGetValidActionToApply(e.trigger,d);if(h){try{(s=this._lightBulbWidget.value)===null||s===void 0||s.hide(),yield this._applyCodeAction(h,!1,!1)}finally{d.dispose()}return}if(e.trigger.context){const u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(u&&u.action.disabled){(r=Fs.get(this._editor))===null||r===void 0||r.showMessage(u.action.disabled,e.trigger.context.position),d.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!d.allActions.length||!c&&!d.validActions.length)){(l=Fs.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,d.dispose();return}this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i){return Cm(this,void 0,void 0,function*(){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=P.isIPosition(t)?this.toCoords(t):t,l={onSelect:(d,c)=>Cm(this,void 0,void 0,function*(){this._applyCodeAction(d,!0,!!c),this._actionWidgetService.hide(),n.clear()}),onHide:()=>{var d;(d=this._editor)===null||d===void 0||d.focus(),n.clear()},onHover:(d,c)=>Cm(this,void 0,void 0,function*(){var h;if(yield d.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((h=d.action.edit)===null||h===void 0)&&h.edits.length)}}),onFocus:d=>{var c,h;if(d&&d.highlightRange&&d.action.diagnostics){const u=[{range:d.action.diagnostics[0],options:o1.DECORATION}];n.set(u);const f=d.action.diagnostics[0],p=(h=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:f.startLineNumber,column:f.startColumn}))===null||h===void 0?void 0:h.word;Ic(g("editingNewSelection","Context: {0} at line {1} and column {2}.",p,f.startLineNumber,f.startColumn))}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Lhe(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,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=Ai(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map(s=>{var r;return{id:s.id,label:s.title,tooltip:(r=s.tooltip)!==null&&r!==void 0?r:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(s.id,...(a=s.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:g("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:g("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};Pc.ID="editor.contrib.codeActionController";Pc.DECORATION=Ve.register({description:"quickfix-highlight",className:Vhe});Pc=o1=Whe([vl(1,ul),vl(2,Ae),vl(3,Re),vl(4,pe),vl(5,Jc),vl(6,li),vl(7,st),vl(8,nf),vl(9,Re)],Pc);gr((o,e)=>{((n,s)=>{s&&e.addRule(`.monaco-editor ${n} { background-color: ${s}; }`)})(".quickfix-edit-highlight",o.getColor(Va));const i=o.getColor(jd);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Gr(o.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function Z0(o){return Z.regex(fW.keys()[0],new RegExp("(\\s|^)"+ao(o.value)+"\\b"))}const EM={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:g("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:g("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[g("args.schema.apply.first","Always apply the first returned code action."),g("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),g("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:g("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function sf(o,e,t,i,n=Vs.Default){if(o.hasModel()){const s=Pc.get(o);s?.manualTriggerAtCurrentPosition(e,n,t,i)}}class Hhe extends fe{constructor(){super({id:DM,label:g("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Z.and(E.writable,E.hasCodeActionsProvider),kbOpts:{kbExpr:E.textInputFocus,primary:2137,weight:100}})}run(e,t){return sf(t,g("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Vs.QuickFix)}}class zhe extends tn{constructor(){super({id:iW,precondition:Z.and(E.writable,E.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:EM}]}})}runEditorCommand(e,t,i){const n=Ra.fromUser(i,{kind:Ne.Empty,apply:"ifSingle"});return sf(t,typeof i?.kind=="string"?n.preferred?g("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):g("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?g("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):g("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Uhe extends fe{constructor(){super({id:sW,label:g("refactor.label","Refactor..."),alias:"Refactor...",precondition:Z.and(E.writable,E.hasCodeActionsProvider),kbOpts:{kbExpr:E.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Z.and(E.writable,Z0(Ne.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:EM}]}})}run(e,t,i){const n=Ra.fromUser(i,{kind:Ne.Refactor,apply:"never"});return sf(t,typeof i?.kind=="string"?n.preferred?g("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):g("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?g("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):g("editor.action.refactor.noneMessage","No refactorings available"),{include:Ne.Refactor.contains(n.kind)?n.kind:Ne.None,onlyIncludePreferredActions:n.preferred},n.apply,Vs.Refactor)}}class $he extends fe{constructor(){super({id:oW,label:g("source.label","Source Action..."),alias:"Source Action...",precondition:Z.and(E.writable,E.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Z.and(E.writable,Z0(Ne.Source))},description:{description:"Source Action...",args:[{name:"args",schema:EM}]}})}run(e,t,i){const n=Ra.fromUser(i,{kind:Ne.Source,apply:"never"});return sf(t,typeof i?.kind=="string"?n.preferred?g("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):g("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?g("editor.action.source.noneMessage.preferred","No preferred source actions available"):g("editor.action.source.noneMessage","No source actions available"),{include:Ne.Source.contains(n.kind)?n.kind:Ne.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,Vs.SourceAction)}}class jhe extends fe{constructor(){super({id:kM,label:g("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Z.and(E.writable,Z0(Ne.SourceOrganizeImports)),kbOpts:{kbExpr:E.textInputFocus,primary:1581,weight:100}})}run(e,t){return sf(t,g("editor.action.organize.noneMessage","No organize imports action available"),{include:Ne.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Vs.OrganizeImports)}}class Khe extends fe{constructor(){super({id:IM,label:g("fixAll.label","Fix All"),alias:"Fix All",precondition:Z.and(E.writable,Z0(Ne.SourceFixAll))})}run(e,t){return sf(t,g("fixAll.noneMessage","No fix all action available"),{include:Ne.SourceFixAll,includeSourceActions:!0},"ifSingle",Vs.FixAll)}}class qhe extends fe{constructor(){super({id:nW,label:g("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Z.and(E.writable,Z0(Ne.QuickFix)),kbOpts:{kbExpr:E.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return sf(t,g("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ne.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Vs.AutoFix)}}ft(Pc.ID,Pc,3);ft(Du.ID,Du,4);ie(Hhe);ie(Uhe);ie($he);ie(jhe);ie(qhe);ie(Khe);re(new zhe);Jt.as(ra.Configuration).registerConfiguration(Object.assign(Object.assign({},ly),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:g("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));Jt.as(ra.Configuration).registerConfiguration(Object.assign(Object.assign({},ly),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:g("includeNearbyQuickfixes","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));var YF=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class bN{constructor(){this.lenses=[],this._disposables=new X}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 pW(o,e,t){return YF(this,void 0,void 0,function*(){const i=o.ordered(e),n=new Map,s=new bN,r=i.map((a,l)=>YF(this,void 0,void 0,function*(){n.set(a,l);try{const d=yield Promise.resolve(a.provideCodeLenses(e,t));d&&s.add(d,a)}catch(d){Ni(d)}}));return yield Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:n.get(a.provider)<n.get(l.provider)?-1:n.get(a.provider)>n.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),s})}lt.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;xt(ke.isUri(t)),xt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(pe),s=o.get(Zt).getModel(t);if(!s)throw No();const r=[],a=new X;return pW(n,s,Qe.None).then(l=>{a.add(l);const d=[];for(const c of l.lenses)i==null||c.symbol.command?r.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&d.push(Promise.resolve(c.provider.resolveCodeLens(s,c.symbol,Qe.None)).then(h=>r.push(h||c.symbol)));return Promise.all(d)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var Ghe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zhe=function(o,e){return function(t,i){e(t,i,o)}};const mW=et("ICodeLensCache");class XF{constructor(e,t){this.lineCount=e,this.data=t}}let CN=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Yc(20,.75);const t="codelens/cache";Vl(()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),de.once(e.onWillSaveState)(s=>{s.reason===mw.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new bN;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new XF(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}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 s of i.data.lenses)n.add(s.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 i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new L(a,1,a,11)});const r=new bN;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new XF(n.lineCount,r))}}catch{}}};CN=Ghe([Zhe(0,_r)],CN);dt(mW,CN,1);class Yhe{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){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class zy{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${zy._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 s=0;s<e.length;s++){const r=e[s];if(r&&(n=!0,r.command)){const a=lc(r.command.title.trim());r.command.id?(i.push(ee("a",{id:String(s),title:r.command.tooltip,role:"button"},...a)),this._commands.set(String(s),r.command)):i.push(ee("span",{title:r.command.tooltip},...a)),s+1<e.length&&i.push(ee("span",void 0," | "))}}n?(gn(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):gn(this._domNode,ee("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}}zy._idPool=0;class uD{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 i=0,n=t.length;i<n;i++)this._addDecorationsCallbacks[i](t[i])}}const QF=Ve.register({collapseOnReplaceEdit:!0,description:"codelens"});class JF{constructor(e,t,i,n,s,r){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a;const l=[];this._data.forEach((d,c)=>{d.symbol.command&&l.push(d.symbol),i.addDecoration({range:d.symbol.range,options:QF},h=>this._decorationIds[c]=h),a?a=L.plusRange(a,d.symbol.range):a=L.lift(d.symbol.range)}),this._viewZone=new Yhe(a.startLineNumber-1,s,r),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new zy(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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&&L.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:QF},s=>this._decorationIds[n]=s)})}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:n}=this._data[t];n.command=i.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?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 Xhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wm=function(o,e){return function(t,i){e(t,i,o)}},_W=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};let _p=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new X,this._localToDispose=new X,this._lenses=[],this._oldCodeLensModels=new X,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Dt(()=>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(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&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(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Ps.fontFamily)),this._editor.changeViewZones(r=>{for(const a of this._lenses)a.updateHeight(e,r)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(xc(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new Dt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Wi(r=>pW(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},He)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Me(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(r),l=c.getLineNumber())});const d=new uD;a.forEach(c=>{c.dispose(d,r),this._lenses.splice(this._lenses.indexOf(c),1)}),d.commit(s)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Me(()=>{if(this._editor.getModel()){const n=ta.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if(s?.tagName==="SPAN"&&(s=s.parentElement),s?.tagName==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new uD;for(const n of this._lenses)n.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 a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=ta.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const d=new uD;let c=0,h=0;for(;h<i.length&&c<this._lenses.length;){const u=i[h][0].symbol.range.startLineNumber,f=this._lenses[c].getLineNumber();f<u?(this._lenses[c].dispose(d,l),this._lenses.splice(c,1)):f===u?(this._lenses[c].updateCodeLensSymbols(i[h],d),h++,c++):(this._lenses.splice(c,0,new JF(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),c++,h++)}for(;c<this._lenses.length;)this._lenses[c].dispose(d,l),this._lenses.splice(c,1);for(;h<i.length;)this._lenses.push(new JF(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),h++;d.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=Wi(a=>{const l=i.map((d,c)=>{const h=new Array(d.length),u=d.map((f,p)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(m=>{h[p]=m},Ni):(h[p]=f.symbol,Promise.resolve(void 0)));return Promise.all(u).then(()=>{!a.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(h)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{He(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var e;return _W(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel})}};_p.ID="css.editor.codeLens";_p=Xhe([wm(1,pe),wm(2,Ho),wm(3,li),wm(4,Li),wm(5,mW)],_p);ft(_p.ID,_p,1);ie(class extends fe{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:E.hasCodeLensProvider,label:g("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return _W(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(aa),n=e.get(li),s=e.get(Li),r=t.getSelection().positionLineNumber,a=t.getContribution(_p.ID);if(!a)return;const l=yield a.getModel();if(!l)return;const d=[];for(const u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===r&&d.push({label:u.symbol.command.title,command:u.symbol.command});if(d.length===0)return;const c=yield i.pick(d,{canPickMany:!1,placeHolder:g("placeHolder","Select a command")});if(!c)return;let h=c.command;if(l.isDisposed){const u=yield a.getModel(),f=u?.lenses.find(p=>{var m;return p.symbol.range.startLineNumber===r&&((m=p.symbol.command)===null||m===void 0?void 0:m.title)===h.title});if(!f||!f.symbol.command)return;h=f.symbol.command}try{yield n.executeCommand(h.id,...h.arguments||[])}catch(u){s.error(u)}})}});var Qhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fD=function(o,e){return function(t,i){e(t,i,o)}},Jhe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class NM{constructor(e,t){this._editorWorkerClient=new O2(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return Jhe(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,i){const n=t.range,s=t.color,r=s.alpha,a=new V(new rt(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?V.Format.CSS.formatRGB(a):V.Format.CSS.formatRGBA(a),d=r?V.Format.CSS.formatHSL(a):V.Format.CSS.formatHSLA(a),c=r?V.Format.CSS.formatHex(a):V.Format.CSS.formatHexA(a),h=[];return h.push({label:l,textEdit:{range:n,text:l}}),h.push({label:d,textEdit:{range:n,text:d}}),h.push({label:c,textEdit:{range:n,text:c}}),h}}let wN=class extends H{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new NM(e,t)))}};wN=Qhe([fD(0,Zt),fD(1,At),fD(2,pe)],wN);Iy(wN);var Y0=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function vW(o,e,t,i=!0){return Y0(this,void 0,void 0,function*(){return TM(new eue,o,e,t,i)})}function bW(o,e,t,i){return Promise.resolve(t.provideColorPresentations(o,e,i))}class eue{constructor(){}compute(e,t,i,n){return Y0(this,void 0,void 0,function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({colorInfo:r,provider:e});return Array.isArray(s)})}}class tue{constructor(){}compute(e,t,i,n){return Y0(this,void 0,void 0,function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({range:r.range,color:[r.color.red,r.color.green,r.color.blue,r.color.alpha]});return Array.isArray(s)})}}class iue{constructor(e){this.colorInfo=e}compute(e,t,i,n){return Y0(this,void 0,void 0,function*(){const s=yield e.provideColorPresentations(t,this.colorInfo,Qe.None);return Array.isArray(s)&&n.push(...s),Array.isArray(s)})}}function TM(o,e,t,i,n){return Y0(this,void 0,void 0,function*(){let s=!1,r;const a=[],l=e.ordered(t);for(let d=l.length-1;d>=0;d--){const c=l[d];if(c instanceof NM)r=c;else try{(yield o.compute(c,t,i,a))&&(s=!0)}catch(h){Ni(h)}}return s?a:r&&n?(yield o.compute(r,t,i,a),a):[]})}function CW(o,e){const{colorProvider:t}=o.get(pe),i=o.get(Zt).getModel(e);if(!i)throw No();const n=o.get(st).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}lt.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof ke))throw No();const{model:i,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:s}=CW(o,t);return TM(new tue,n,i,Qe.None,s)});lt.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof ke)||!Array.isArray(t)||t.length!==4||!L.isIRange(s))throw No();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=CW(o,n),[d,c,h,u]=t;return TM(new iue({range:s,color:{red:d,green:c,blue:h,alpha:u}}),a,r,Qe.None,l)});var nue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gD=function(o,e){return function(t,i){e(t,i,o)}},e5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},SN;const wW=Object.create({});let Oc=SN=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new X),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new D0(this._editor),this._decoratorLimitReporter=new sue,this._colorDecorationClassRefs=this._register(new X),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:SN.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(s=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const a=r!==this._isColorDecoratorsEnabled||s.hasChanged(21),l=s.hasChanged(145);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(20)}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 ur,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return e5(this,void 0,void 0,function*(){this._computePromise=Wi(e=>e5(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const i=new Bn(!1),n=yield vW(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){He(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(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Ve.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;s<e.length&&t.length<i;s++){const{red:r,green:a,blue:l,alpha:d}=e[s].colorInfo.color,c=new rt(Math.round(r*255),Math.round(a*255),Math.round(l*255),d),h=`rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`,u=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:h}));t.push({range:{startLineNumber:e[s].colorInfo.range.startLineNumber,startColumn:e[s].colorInfo.range.startColumn,endLineNumber:e[s].colorInfo.range.endLineNumber,endColumn:e[s].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:m9,inlineClassName:`${u.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:wW}}})}const n=i<e.length?i:!1;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(L.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Oc.ID="editor.contrib.colorDetector";Oc.RECOMPUTE_TIME=1e3;Oc=SN=nue([gD(1,st),gD(2,pe),gD(3,Ho)],Oc);class sue{constructor(){this._onDidChange=new A,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}ft(Oc.ID,Oc,1);class oue{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 A,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new A,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new A,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 n=0;n<this.colorPresentations.length;n++)if(t.toLowerCase()===this.colorPresentations[n].label){i=n;break}if(i===-1){const n=t.split("(")[0].toLowerCase();for(let s=0;s<this.colorPresentations.length;s++)if(this.colorPresentations[s].label.toLowerCase().startsWith(n)){i=s;break}}i!==-1&&i!==this.presentationIndex&&(this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}const eo=ee;class rue extends H{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=eo(".colorpicker-header"),Y(e,this._domNode),this._pickedColorNode=Y(this._domNode,eo(".picked-color")),Y(this._pickedColorNode,eo("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Y(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const s=g("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",s),this._originalColorNode=Y(this._domNode,eo(".original-color")),this._originalColorNode.style.backgroundColor=V.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(z1)||V.white,this._register(i.onDidColorThemeChange(r=>{this.backgroundColor=r.getColor(z1)||V.white})),this._register($(this._pickedColorNode,ae.CLICK,()=>this.model.selectNextColorPresentation())),this._register($(this._originalColorNode,ae.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=V.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 aue(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=V.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 aue extends H{constructor(e){super(),this._onClicked=this._register(new A),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Y(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),Y(this._button,t),Y(t,eo(".button"+Ie.asCSSSelector(_i("color-picker-close",oe.close,g("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class lue extends H{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=eo(".colorpicker-body"),Y(e,this._domNode),this._saturationBox=new due(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 cue(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 hue(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 uue(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 V(new Aa(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new V(new Aa(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new V(new Aa(i===360?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 due extends H{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new A,this.onColorFlushed=this._onColorFlushed.event,this._domNode=eo(".saturation-wrap"),Y(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Y(this._domNode,this._canvas),this.selection=eo(".saturation-selection"),Y(this._domNode,this.selection),this.layout(),this._register($(this._domNode,ae.POINTER_DOWN,n=>this.onPointerDown(n))),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 Bp);const t=Ai(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=$(e.target.ownerDocument,ae.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 V(new Aa(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 s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=V.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,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 SW extends H{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new A,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=Y(e,eo(".standalone-strip")),this.overlay=Y(this.domNode,eo(".standalone-overlay"))):(this.domNode=Y(e,eo(".strip")),this.overlay=Y(this.domNode,eo(".overlay"))),this.slider=Y(this.domNode,eo(".slider")),this.slider.style.top="0px",this._register($(this.domNode,ae.POINTER_DOWN,n=>this.onPointerDown(n))),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 Bp),i=Ai(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=$(e.target.ownerDocument,ae.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 cue extends SW{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,s=new V(new rt(t,i,n,1)),r=new V(new rt(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class hue extends SW{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class uue extends H{constructor(e){super(),this._onClicked=this._register(new A),this.onClicked=this._onClicked.event,this._button=Y(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class fue extends fr{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(j_.onDidChange(()=>this.layout()));const r=eo(".colorpicker-widget");e.appendChild(r),this.header=this._register(new rue(r,this.model,n,s)),this.body=this._register(new lue(r,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var yW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LW=function(o,e){return function(t,i){e(t,i,o)}},vp=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class gue{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let jw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return ki.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return vp(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const n=Oc.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[yield xW(this,this._editor.getModel(),r.colorInfo,r.provider)]}return[]})}renderHoverParts(e,t){return DW(this,this._editor,this._themeService,t,e)}};jw=yW([LW(1,Ki)],jw);class pue{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let Uv=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return vp(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!Oc.get(this._editor))return null;const s=yield vW(i,this._editor.getModel(),Qe.None);let r=null,a=null;for(const h of s){const u=h.colorInfo;L.containsRange(u.range,e.range)&&(r=u,a=h.provider)}const l=r??e,d=a??t,c=!!r;return{colorHover:yield xW(this,this._editor.getModel(),l,d),foundInEditor:c}})}updateEditorModel(e){return vp(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield r1(this._editor.getModel(),t,this._color,i,e),i=kW(this._editor,i,t))})}renderHoverParts(e,t){return DW(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};Uv=yW([LW(1,Ki)],Uv);function xW(o,e,t,i){return vp(this,void 0,void 0,function*(){const n=e.getValueInRange(t.range),{red:s,green:r,blue:a,alpha:l}=t.color,d=new rt(Math.round(s*255),Math.round(r*255),Math.round(a*255),l),c=new V(d),h=yield bW(e,t,i,Qe.None),u=new oue(c,[],0);return u.colorPresentations=h||[],u.guessColorPresentation(c,n),o instanceof jw?new gue(o,L.lift(t.range),u,i):new pue(o,L.lift(t.range),u,i)})}function DW(o,e,t,i,n){if(i.length===0||!e.hasModel())return H.None;if(n.setMinimumDimensions){const u=e.getOption(66)+8;n.setMinimumDimensions(new gt(302,u))}const s=new X,r=i[0],a=e.getModel(),l=r.model,d=s.add(new fue(n.fragment,l,e.getOption(141),t,o instanceof Uv));n.setColorPicker(d);let c=!1,h=new L(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(o instanceof Uv){const u=i[0].model.color;o.color=u,r1(a,l,u,h,r),s.add(l.onColorFlushed(f=>{o.color=f}))}else s.add(l.onColorFlushed(u=>vp(this,void 0,void 0,function*(){yield r1(a,l,u,h,r),c=!0,h=kW(e,h,l,n)})));return s.add(l.onDidChangeColor(u=>{r1(a,l,u,h,r)})),s.add(e.onDidChangeModelContent(u=>{c?c=!1:(n.hide(),e.focus())})),s}function kW(o,e,t,i){let n,s;if(t.presentation.textEdit){n=[t.presentation.textEdit],s=new L(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const r=o.getModel()._setTrackedRange(null,s,3);o.pushUndoStop(),o.executeEdits("colorpicker",n),s=o.getModel()._getTrackedRange(r)||s}else n=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],s=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),o.pushUndoStop(),o.executeEdits("colorpicker",n);return t.presentation.additionalTextEdits&&(n=[...t.presentation.additionalTextEdits],o.executeEdits("colorpicker",n),i&&i.hide()),o.pushUndoStop(),s}function r1(o,e,t,i,n){return vp(this,void 0,void 0,function*(){const s=yield bW(o,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,Qe.None);e.colorPresentations=s||[]})}function yN(o,e){return!!o[e]}class pD{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=yN(e.event,t.triggerModifier),this.hasSideBySideModifier=yN(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class t5{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=yN(e,t.triggerModifier)}}class nC{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 i5(o){return o==="altKey"?at?new nC(57,"metaKey",6,"altKey"):new nC(5,"ctrlKey",6,"altKey"):at?new nC(6,"altKey",57,"metaKey"):new nC(6,"altKey",5,"ctrlKey")}class Uy extends H{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new A),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new A),this.onExecute=this._onExecute.event,this._onCancel=this._register(new A),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(i=t?.extractLineNumberFromMouseEvent)!==null&&i!==void 0?i:(n=>n.target.position?n.target.position.lineNumber:0),this._opts=i5(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(77)){const s=i5(this._editor.getOption(77));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new pD(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new pD(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new pD(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new t5(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new t5(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.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()}}var mue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bl=function(o,e){return function(t,i){e(t,i,o)}};let Fc=class extends rp{constructor(e,t,i,n,s,r,a,l,d,c,h,u,f){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),i,s,r,a,l,d,c,h,u,f),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(p=>this._onParentConfigurationChanged(p)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){vS(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Fc=mue([bl(4,Re),bl(5,_t),bl(6,li),bl(7,Ae),bl(8,Ki),bl(9,Li),bl(10,cd),bl(11,At),bl(12,pe)],Fc);const n5=new V(new rt(0,122,204)),_ue={showArrow:!0,showFrame:!0,className:"",frameColor:n5,arrowColor:n5,keepEditorSelection:!1},vue="vs.editor.contrib.zoneWidget";class bue{constructor(e,t,i,n,s,r,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Cue{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class $y{constructor(e){this._editor=e,this._ruleName=$y._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),eP(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(){eP(this._ruleName),Zk(`.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){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:L.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}$y._IdGenerator=new FR(".arrow-decoration-");class wue{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new X,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Il(t),vS(this.options,_ue,!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(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}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 $y(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&&e.minimap.minimapLeft===0?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 i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const n=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(n))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=L.isIRange(e)?L.lift(e):L.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:Ve.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const a=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const u=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,u)}let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(u=>{this._viewZone&&u.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new bue(r,i.lineNumber,i.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=u.addZone(this._viewZone),this._overlayWidget=new Cue(vue+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const u=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=u+"px",this.container.style.borderBottomWidth=u+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const u=h.validateRange(new L(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(u,u.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;this._resizeSash=this._disposables.add(new Tn(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;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(66),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var IW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},EW=function(o,e){return function(t,i){e(t,i,o)}};const NW=et("IPeekViewService");dt(NW,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}},1);var Ss;(function(o){o.inPeekEditor=new ce("inReferenceSearchEditor",!0,g("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(Ss||(Ss={}));let $v=class{constructor(e,t){e instanceof Fc&&Ss.inPeekEditor.bindTo(t)}dispose(){}};$v.ID="editor.contrib.referenceController";$v=IW([EW(1,Ae)],$v);ft($v.ID,$v,0);function Sue(o){const e=o.get(_t).getFocusedCodeEditor();return e instanceof Fc?e.getParentEditor():e}const yue={headerBackgroundColor:V.white,primaryHeadingColor:V.fromHex("#333333"),secondaryHeadingColor:V.fromHex("#6c6c6cb3")};let Kw=class extends wue{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new A,this.onDidClose=this._onDidClose.event,vS(this.options,yue,!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=ee(".head"),this._bodyElement=ee(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ee(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),wi(this._titleElement,"click",s=>this._onTitleClick(s))),Y(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ee("span.filename"),this._secondaryHeading=ee("span.dirname"),this._metaHeading=ee("span.meta"),Y(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=ee(".peekview-actions");Y(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Wo(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new as("peekview.close",g("label.close","Close"),Ie.asClassName(oe.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:_se.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:fn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Ts(this._metaHeading)):Jn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(66)*1.2),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`)}};Kw=IW([EW(2,Re)],Kw);const Lue=T("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:V.black,hcLight:V.white},g("peekViewTitleBackground","Background color of the peek view title area.")),TW=T("peekViewTitleLabel.foreground",{dark:V.white,light:V.black,hcDark:V.white,hcLight:er},g("peekViewTitleForeground","Color of the peek view title.")),RW=T("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},g("peekViewTitleInfoForeground","Color of the peek view title info.")),xue=T("peekView.border",{dark:bs,light:bs,hcDark:nt,hcLight:nt},g("peekViewBorder","Color of the peek view borders and arrow.")),Due=T("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:V.black,hcLight:V.white},g("peekViewResultsBackground","Background color of the peek view result list."));T("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:V.white,hcLight:er},g("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));T("peekViewResult.fileForeground",{dark:V.white,light:"#1E1E1E",hcDark:V.white,hcLight:er},g("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));T("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},g("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));T("peekViewResult.selectionForeground",{dark:V.white,light:"#6C6C6C",hcDark:V.white,hcLight:er},g("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Xd=T("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:V.black,hcLight:V.white},g("peekViewEditorBackground","Background color of the peek view editor."));T("peekViewEditorGutter.background",{dark:Xd,light:Xd,hcDark:Xd,hcLight:Xd},g("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));T("peekViewEditorStickyScroll.background",{dark:Xd,light:Xd,hcDark:Xd,hcLight:Xd},g("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));T("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},g("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));T("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},g("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));T("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ut,hcLight:Ut},g("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var kue=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class Bc{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=rE.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?g({},"{0} in {1} on line {2} at column {3}",t.value,Bo(this.uri),this.range.startLineNumber,this.range.startColumn):g("aria.oneReference","in {0} on line {1} at column {2}",Bo(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Iue{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:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),d=new L(n,l.startColumn,n,s),c=new L(r,a,r,1073741824),h=i.getValueInRange(d).replace(/^\s+/,""),u=i.getValueInRange(e),f=i.getValueInRange(c).replace(/\s+$/,"");return{value:h+u+f,highlight:{start:h.length,end:h.length+u.length}}}}class jv{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Pn}dispose(){St(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?g("aria.fileReferences.1","1 symbol in {0}, full path {1}",Bo(this.uri),this.uri.fsPath):g("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Bo(this.uri),this.uri.fsPath)}resolve(e){return kue(this,void 0,void 0,function*(){if(this._previews.size!==0)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 Iue(i))}catch(i){He(i)}return this})}}class Bs{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new A,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(Bs._compareReferences);let n;for(const s of e)if((!n||!$t.isEqual(n.uri,s.uri,!0))&&(n=new jv(this,s.uri),this.groups.push(n)),n.children.length===0||Bs._compareReferences(s,n.children[n.children.length-1])!==0){const r=new Bc(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){St(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Bs(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?g("aria.result.0","No results found"):this.references.length===1?g("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?g("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):g("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 s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+1<s||!t&&n>0?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:cu(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLen<s.prefixLen?1:n.offsetDist<s.offsetDist?-1:n.offsetDist>s.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()&&L.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 $t.compare(e.uri,t.uri)||L.compareRangesUsingStarts(e.range,t.range)}}var jy=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ky=function(o,e){return function(t,i){e(t,i,o)}},LN;let xN=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Bs||e instanceof jv}getChildren(e){if(e instanceof Bs)return e.groups;if(e instanceof jv)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};xN=jy([Ky(0,Ls)],xN);class Eue{getHeight(){return 23}getTemplateId(e){return e instanceof jv?Kv.id:X0.id}}let DN=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Bc){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return Bo(e.uri)}};DN=jy([Ky(0,Et)],DN);class Nue{getId(e){return e instanceof Bc?e.id:e.uri}}let kN=class extends H{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new Nw(i,{supportHighlights:!0})),this.badge=new NE(Y(i,ee(".count")),{},bB),e.appendChild(i)}set(e,t){const i=ny(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(g("referencesCount","{0} references",n)):this.badge.setTitleFormat(g("referenceCount","{0} reference",n))}};kN=jy([Ky(1,ap)],kN);let Kv=LN=class{constructor(e){this._instantiationService=e,this.templateId=LN.id}renderTemplate(e){return this._instantiationService.createInstance(kN,e)}renderElement(e,t,i){i.set(e.element,O0(e.filterData))}disposeTemplate(e){e.dispose()}};Kv.id="FileReferencesRenderer";Kv=LN=jy([Ky(0,Re)],Kv);class Tue{constructor(e){this.label=new cc(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${Bo(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!Zr.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,O0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class X0{constructor(){this.templateId=X0.id}renderTemplate(e){return new Tue(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}X0.id="OneReferenceRenderer";class Rue{getWidgetAriaLabel(){return g("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Mue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cl=function(o,e){return function(t,i){e(t,i,o)}},s5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class qy{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new X,this._callOnModelChange=new X,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()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n<s;n++){const r=e.children[n];this._decorationIgnoreSet.has(r.id)||r.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:r.range,options:qy.DecorationOptions}),i.push(n))}this._editor.changeDecorations(n=>{const s=n.deltaDecorations([],t);for(let r=0;r<s.length;r++)this._decorations.set(s[r],e.children[i[r]])})}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[i,n]of this._decorations){const s=t.getDecorationRange(i);if(!s)continue;let r=!1;if(!L.equalsRange(s,n.range)){if(L.spansMultipleLines(s))r=!0;else{const a=n.range.endColumn-n.range.startColumn,l=s.endColumn-s.startColumn;a!==l&&(r=!0)}r?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=s}}for(let i=0,n=e.length;i<n;i++)this._decorations.delete(e[i]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}qy.DecorationOptions=Ve.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Aue{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{}return{ratio:t||.7,heightInLines:i||18}}}class Pue extends DE{}let IN=class extends Kw{constructor(e,t,i,n,s,r,a,l,d,c,h,u){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},r),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=r,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=d,this._keybindingService=c,this._languageService=h,this._languageConfigurationService=u,this._disposeOnNewModel=new X,this._callOnDispose=new X,this._onDidSelectReference=new A,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new gt(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(),St(this._preview),St(this._previewNotAvailableMessage),St(this._tree),St(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(xue)||V.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(Lue)||V.transparent,primaryHeadingColor:e.getColor(TW),secondaryHeadingColor:e.getColor(RW)})}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=Y(e,ee("div.messages")),Jn(this._messageContainer),this._splitView=new xB(e,{orientation:1}),this._previewContainer=Y(e,ee("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Fc,this._previewContainer,t,{},this.editor),Jn(this._previewContainer),this._previewNotAvailableMessage=new il(g("missingPreviewMessage","no preview available"),ro,il.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=Y(e,ee("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Rue,keyboardNavigationLabelProvider:this._instantiationService.createInstance(DN),identityProvider:new Nue,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:Due}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(wi(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Pue,"ReferencesWidget",this._treeContainer,new Eue,[this._instantiationService.createInstance(Kv),this._instantiationService.createInstance(X0)],this._instantiationService.createInstance(xN),i),this._splitView.addView({onDidChange:de.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},Dw.Distribute),this._splitView.addView({onDidChange:de.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},Dw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof Bc&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),Jn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new gt(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=g("noResults","No results"),Ts(this._messageContainer),Promise.resolve(void 0)):(Jn(this._messageContainer),this._decorationsManager=new qy(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(t.detail!==2)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"),Ts(this._treeContainer),Ts(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Bc)return e;if(e instanceof jv&&e.children.length>0)return e.children[0]}revealReference(e){return s5(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return s5(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==qe.inMemory?this.setTitle(rJ(e.uri),this._uriLabel.getUriLabel(ny(e.uri))):this.setTitle(g("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const n=yield i;if(!this._model){n.dispose();return}St(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=L.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};IN=Mue([Cl(3,Ki),Cl(4,Ls),Cl(5,Re),Cl(6,NW),Cl(7,ap),Cl(8,sy),Cl(9,Et),Cl(10,qt),Cl(11,At)],IN);var Oue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sf=function(o,e){return function(t,i){e(t,i,o)}},o5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},a1;const of=new ce("referenceSearchVisible",!1,g("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Wc=a1=class{static get(e){return e.getContribution(a1.ID)}constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new X,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=of.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||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 s="peekViewLayout",r=Aue.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(IN,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(g("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:d,kind:c}=l;if(d)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(d,!1,!1);break;case"side":this.openReference(d,!0,!1);break;case"goto":i?this._gotoReference(d,!0):this.openReference(d,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var d;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(d=this._model)===null||d===void 0||d.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(g("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,h=new P(e.startLineNumber,e.startColumn),u=this._model.nearestReference(c,h);if(u)return this._widget.setSelection(u).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return o5(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),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()})}revealReference(e){return o5(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||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;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const n=L.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(s=>{var r;if(this._ignoreModelChangeEvent=!1,!s||!this._widget){this.closeWidget();return}if(this._editor===s)this._widget.show(n),this._widget.focusOnReferenceTree();else{const a=a1.get(s),l=this._model.clone();this.closeWidget(),s.focus(),a?.toggleWidget(n,Wi(d=>Promise.resolve(l)),(r=this._peekMode)!==null&&r!==void 0?r:!1)}},s=>{this._ignoreModelChangeEvent=!1,He(s)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};Wc.ID="editor.contrib.referencesController";Wc=a1=Oue([Sf(2,Ae),Sf(3,_t),Sf(4,Li),Sf(5,Re),Sf(6,_r),Sf(7,st)],Wc);function rf(o,e){const t=Sue(o);if(!t)return;const i=Wc.get(t);i&&e(i)}ws.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Pi(2089,60),when:Z.or(of,Ss.inPeekEditor),handler(o){rf(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});ws.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:Z.or(of,Ss.inPeekEditor),handler(o){rf(o,e=>{e.goToNextOrPreviousReference(!0)})}});ws.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:Z.or(of,Ss.inPeekEditor),handler(o){rf(o,e=>{e.goToNextOrPreviousReference(!1)})}});lt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");lt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");lt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");lt.registerCommand("closeReferenceSearch",o=>rf(o,e=>e.closeWidget()));ws.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:Z.and(Ss.inPeekEditor,Z.not("config.editor.stablePeek"))});ws.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:Z.and(of,Z.not("config.editor.stablePeek"))});ws.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Z.and(of,VB,JR.negate(),eM.negate()),handler(o){var e;const i=(e=o.get(Uo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Bc&&rf(o,n=>n.revealReference(i[0]))}});ws.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Z.and(of,VB,JR.negate(),eM.negate()),handler(o){var e;const i=(e=o.get(Uo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Bc&&rf(o,n=>n.openReference(i[0],!0,!0))}});lt.registerCommand("openReference",o=>{var e;const i=(e=o.get(Uo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Bc&&rf(o,n=>n.openReference(i[0],!1,!0))});var MW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xm=function(o,e){return function(t,i){e(t,i,o)}};const RM=new ce("hasSymbols",!1,g("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Gy=et("ISymbolNavigationService");let EN=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=RM.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new NN(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let d=!1,c=!1;for(const h of t.references)if(lR(h.uri,a.uri))d=!0,c=c||L.containsPosition(h.range,l);else if(d)break;(!d||!c)&&this.reset()});this._currentState=or(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:L.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?g("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):g("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};EN=MW([Xm(0,Ae),Xm(1,_t),Xm(2,Li),Xm(3,Et)],EN);dt(Gy,EN,1);re(new class extends tn{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:RM,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(Gy).revealNext(e)}});ws.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:RM,primary:9,handler(o){o.get(Gy).reset()}});let NN=class{constructor(e){this._listener=new Map,this._disposables=new X,this._onDidChange=new A,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(),St(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,or(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};NN=MW([Xm(0,_t)],NN);var MM=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function Q0(o,e,t,i){return MM(this,void 0,void 0,function*(){const s=t.ordered(o).map(a=>Promise.resolve(i(a,o,e)).then(void 0,l=>{Ni(l)})),r=yield Promise.all(s);return Ga(r.flat())})}function Zy(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function AW(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function PW(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function OW(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function Yy(o,e,t,i,n){return Q0(e,t,o,(s,r,a)=>MM(this,void 0,void 0,function*(){const l=yield s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const d=yield s.provideReferences(r,a,{includeDeclaration:!1},n);return d&&d.length===1?d:l}))}function J0(o){return MM(this,void 0,void 0,function*(){const e=yield o(),t=new Bs(e,""),i=t.references.map(n=>n.link);return t.dispose(),i})}hl("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(pe),n=Zy(i.definitionProvider,e,t,Qe.None);return J0(()=>n)});hl("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(pe),n=OW(i.typeDefinitionProvider,e,t,Qe.None);return J0(()=>n)});hl("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(pe),n=AW(i.declarationProvider,e,t,Qe.None);return J0(()=>n)});hl("_executeReferenceProvider",(o,e,t)=>{const i=o.get(pe),n=Yy(i.referenceProvider,e,t,!1,Qe.None);return J0(()=>n)});hl("_executeImplementationProvider",(o,e,t)=>{const i=o.get(pe),n=PW(i.implementationProvider,e,t,Qe.None);return J0(()=>n)});var lr=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Sm,ym,Lm,sC,oC,rC,aC,lC;hn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextPeek,title:g("peek.submenu","Peek"),group:"navigation",order:100});class bp{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof bp||P.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class qn extends oa{static all(){return qn._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of Xe.wrap(t.menu))(i.id===k.EditorContext||i.id===k.EditorContextPeek)&&(i.when=Z.and(e.precondition,i.when));return t}constructor(e,t){super(qn._patchConfig(t)),this.configuration=e,qn._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(Li),r=e.get(_t),a=e.get(Jc),l=e.get(Gy),d=e.get(pe),c=e.get(Re),h=t.getModel(),u=t.getPosition(),f=bp.is(i)?i:new bp(h,u),p=new Ac(t,5),m=PS(this._getLocationModel(d,f.model,f.position,p.token),p.token).then(v=>lr(this,void 0,void 0,function*(){var _;if(!v||p.token.isCancellationRequested)return;On(v.ariaMessage);let b;if(v.referenceAt(h.uri,u)){const w=this._getAlternativeCommand(t);!qn._activeAlternativeCommands.has(w)&&qn._allSymbolNavigationCommands.has(w)&&(b=qn._allSymbolNavigationCommands.get(w))}const C=v.references.length;if(C===0){if(!this.configuration.muteMessage){const w=h.getWordAtPosition(u);(_=Fs.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(w),u)}}else if(C===1&&b)qn._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(w=>b.runEditorCommand(w,t,i,n).finally(()=>{qn._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(r,l,t,v,n)}),v=>{s.error(v)}).finally(()=>{p.dispose()});return a.showWhile(m,250),m}_onResult(e,t,i,n,s){return lr(this,void 0,void 0,function*(){const r=this._getGoToPreference(i);if(!(i instanceof Fc)&&(this.configuration.openInPeek||r==="peek"&&n.references.length>1))this._openInPeek(i,n,s);else{const a=n.firstReference(),l=n.references.length>1&&r==="gotoAndPeek",d=yield this._openReference(i,e,a,this.configuration.openToSide,!l);l&&d?this._openInPeek(d,n,s):n.dispose(),r==="goto"&&t.put(a)}})}_openReference(e,t,i,n,s){return lr(this,void 0,void 0,function*(){let r;if(DU(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:L.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const l=a.getModel(),d=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&d.clear()},350)}return a}})}_openInPeek(e,t,i){const n=Wc.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),Wi(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}qn._allSymbolNavigationCommands=new Map;qn._activeAlternativeCommands=new Set;class eb extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield Zy(e.definitionProvider,t,i,n),g("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?g("noResultWord","No definition found for '{0}'",e.word):g("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}jt((Sm=class extends eb{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Sm.id,title:{value:g("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:g({},"Go to &&Definition")},precondition:Z.and(E.hasDefinitionProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:[{when:E.editorTextFocus,primary:70,weight:100},{when:Z.and(E.editorTextFocus,FB),primary:2118,weight:100}],menu:[{id:k.EditorContext,group:"navigation",order:1.1},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),lt.registerCommandAlias("editor.action.goToDeclaration",Sm.id)}},Sm.id="editor.action.revealDefinition",Sm));jt((ym=class extends eb{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:ym.id,title:{value:g("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:Z.and(E.hasDefinitionProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:[{when:E.editorTextFocus,primary:Pi(2089,70),weight:100},{when:Z.and(E.editorTextFocus,FB),primary:Pi(2089,2118),weight:100}]}),lt.registerCommandAlias("editor.action.openDeclarationToTheSide",ym.id)}},ym.id="editor.action.revealDefinitionAside",ym));jt((Lm=class extends eb{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Lm.id,title:{value:g("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:Z.and(E.hasDefinitionProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:k.EditorContextPeek,group:"peek",order:2}}),lt.registerCommandAlias("editor.action.previewDeclaration",Lm.id)}},Lm.id="editor.action.peekDefinition",Lm));class FW extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield AW(e.declarationProvider,t,i,n),g("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?g("decl.noResultWord","No declaration found for '{0}'",e.word):g("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}jt((sC=class extends FW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:sC.id,title:{value:g("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:g({},"Go to &&Declaration")},precondition:Z.and(E.hasDeclarationProvider,E.isInWalkThroughSnippet.toNegated()),menu:[{id:k.EditorContext,group:"navigation",order:1.3},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?g("decl.noResultWord","No declaration found for '{0}'",e.word):g("decl.generic.noResults","No declaration found")}},sC.id="editor.action.revealDeclaration",sC));jt(class extends FW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:g("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:Z.and(E.hasDeclarationProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:3}})}});class BW extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield OW(e.typeDefinitionProvider,t,i,n),g("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?g("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):g("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}jt((oC=class extends BW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:oC.ID,title:{value:g("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:g({},"Go to &&Type Definition")},precondition:Z.and(E.hasTypeDefinitionProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:0,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.4},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},oC.ID="editor.action.goToTypeDefinition",oC));jt((rC=class extends BW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:rC.ID,title:{value:g("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:Z.and(E.hasTypeDefinitionProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:4}})}},rC.ID="editor.action.peekTypeDefinition",rC));class WW extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield PW(e.implementationProvider,t,i,n),g("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?g("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):g("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}jt((aC=class extends WW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:aC.ID,title:{value:g("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:g({},"Go to &&Implementations")},precondition:Z.and(E.hasImplementationProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:2118,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.45},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},aC.ID="editor.action.goToImplementation",aC));jt((lC=class extends WW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:lC.ID,title:{value:g("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:Z.and(E.hasImplementationProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:3142,weight:100},menu:{id:k.EditorContextPeek,group:"peek",order:5}})}},lC.ID="editor.action.peekImplementation",lC));class VW extends qn{_getNoResultFoundMessage(e){return e?g("references.no","No references found for '{0}'",e.word):g("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}jt(class extends VW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:g("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:g({},"Go to &&References")},precondition:Z.and(E.hasReferenceProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:1094,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.45},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield Yy(e.referenceProvider,t,i,!0,n),g("ref.title","References"))})}});jt(class extends VW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:g("references.action.label","Peek References"),original:"Peek References"},precondition:Z.and(E.hasReferenceProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield Yy(e.referenceProvider,t,i,!1,n),g("ref.title","References"))})}});class Fue extends qn{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:g("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:Z.and(Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(this._references,g("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&g("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}lt.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:ke},{name:"position",description:"The position at which to start",constraint:P.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:(o,e,t,i,n,s,r)=>lr(void 0,void 0,void 0,function*(){xt(ke.isUri(e)),xt(P.isIPosition(t)),xt(Array.isArray(i)),xt(typeof n>"u"||typeof n=="string"),xt(typeof r>"u"||typeof r=="boolean");const a=o.get(_t),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(rl(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(d=>{const c=new class extends Fue{_getNoResultFoundMessage(h){return s||super._getNoResultFoundMessage(h)}}({muteMessage:!s,openInPeek:!!r,openToSide:!1},i,n);d.get(Re).invokeFunction(c.run.bind(c),l)})})});lt.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:ke},{name:"position",description:"The position at which to start",constraint:P.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:(o,e,t,i,n)=>lr(void 0,void 0,void 0,function*(){o.get(li).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)})});lt.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{xt(ke.isUri(e)),xt(P.isIPosition(t));const i=o.get(pe),n=o.get(_t);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!rl(s)||!s.hasModel())return;const r=Wc.get(s);if(!r)return;const a=Wi(d=>Yy(i.referenceProvider,s.getModel(),P.lift(t),!1,d).then(c=>new Bs(c,g("ref.title","References")))),l=new L(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});lt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var Bue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mD=function(o,e){return function(t,i){e(t,i,o)}},r5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Qm;let Eu=Qm=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new X,this.toUnhookForKeyboard=new X,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new Uy(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,a??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(a=>{He(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Qm.ID)}startFindDefinitionFromCursor(e){return r5(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(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return r5(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new x6(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Wi(a=>this.findDefinition(e,a));let s;try{s=yield this.previousPromise}catch(a){He(a);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const r=s[0].originSelectionRange?L.lift(s[0].originSelectionRange):new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let a=r;for(const{originSelectionRange:l}of s)l&&(a=L.plusRange(a,l));this.addDecoration(a,new xn().appendText(g("multipleResults","Click to show {0} definitions.",s.length)))}else{const a=s[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:d}}=l,{startLineNumber:c}=a.range;if(c<1||c>d.getLineCount()){l.dispose();return}const h=this.getPreviewValue(d,c,a),u=this.languageService.guessLanguageIdByFilepathOrFirstLine(d.uri);this.addDecoration(r,h?new xn().appendCodeblock(u||"",h):void 0),l.dispose()})}})}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=Qm.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<i.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);s=Math.min(s,l)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${s-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+Qm.MAX_SOURCE_PREVIEW_LINES);let s=t+1;for(;s<n;s++){const r=e.getLineFirstNonWhitespaceColumn(s);if(i===r)break}return new L(t,1,s+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&&e.target.type===6&&!(((i=e.target.detail.injectedText)===null||i===void 0?void 0:i.options)instanceof Mc)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?Zy(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const n=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(i);return new eb({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(Ae);return Ss.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};Eu.ID="editor.contrib.gotodefinitionatposition";Eu.MAX_SOURCE_PREVIEW_LINES=8;Eu=Qm=Bue([mD(1,Ls),mD(2,qt),mD(3,pe)],Eu);ft(Eu.ID,Eu,2);const dC=ee;class HW extends H{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 E0(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class AM extends H{static render(e,t,i){return new AM(e,t,i)}constructor(e,t,i){super(),this.actionContainer=Y(e,dC("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Y(this.actionContainer,dC("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Y(this.action,dC(`span.icon.${t.iconClass}`));const n=Y(this.action,dC("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register($(this.actionContainer,ae.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register($(this.actionContainer,ae.KEY_DOWN,s=>{const r=new Wt(s);(r.equals(3)||r.equals(10))&&(s.stopPropagation(),s.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 Wue(o,e){return o&&e?g("acessibleViewHint","Inspect this in the accessible view with {0}.",e):o?g("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var Vue=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Hue=function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],t;return e?e.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=o[s]&&function(r){return new Promise(function(a,l){r=o[s](r),n(a,l,r.done,r.value)})}}function n(s,r,a,l){Promise.resolve(l).then(function(d){s({value:d,done:a})},r)}};let zue=class{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}};class zW extends H{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new A),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Dt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Dt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Dt(()=>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(60).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=kj(e=>this._computer.computeAsync(e)),Vue(this,void 0,void 0,function*(){var e,t,i,n;try{try{for(var s=!0,r=Hue(this._asyncIterable),a;a=yield r.next(),e=a.done,!e;s=!0){n=a.value,s=!1;const l=n;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!s&&!e&&(i=r.return)&&(yield i.call(r))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){He(l)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new zue(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(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();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class _D{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class l1{constructor(e,t,i,n,s,r){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=r,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const af=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class PM{constructor(){this._onDidWillResize=new A,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new A,this.onDidResize=this._onDidResize.event,this._sashListener=new X,this._size=new gt(0,0),this._minSize=new gt(0,0),this._maxSize=new gt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Tn(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Tn(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Tn(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Lw.North}),this._southSash=new Tn(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Lw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(de.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(de.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(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(de.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(de.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{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:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const a=new gt(t,e);gt.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}}const Uue=30,$ue=24;class jue extends H{constructor(e,t=new gt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new PM),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=gt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new gt(i.dimension.width,i.dimension.height)),i.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!((e=this._contentPosition)===null||e===void 0)&&e.position?P.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!t||!i?void 0:Ai(t).top+i.top-Uue}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=Ai(t),s=Ap(t.ownerDocument.body),r=n.top+i.top+i.height;return s.height-r-$ue}_findPositionPreference(e,t){var i,n;const s=Math.min((i=this._availableVerticalSpaceBelow(t))!==null&&i!==void 0?i:1/0,e),r=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(r,s),e),l=Math.min(e,a);let d;return this._editor.getOption(60).above?d=l<=r?1:2:d=l<=s?2:1,d===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),d}_resize(e){this._resizableNode.layout(e.height,e.width)}}var OM=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zh=function(o,e){return function(t,i){e(t,i,o)}},d1,ma;const a5=ee;let qw=d1=class extends H{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(fc,this._editor)),this._participants=[];for(const n of af.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new Zw(this._editor,this._participants),this._hoverOperation=this._register(new zW(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;const s=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new UW(this._computer.anchor,s,n.isComplete))})),this._register(wi(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(ei.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 n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new _D(0,i.range,e.event.posx,e.event.posy)),i.type===7){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToText<n&&t.push(new _D(0,i.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((n,s)=>s.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new _D(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,s){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):!1:this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0: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)}_startHoverOperationIfNecessary(e,t,i,n,s){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=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(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):!1}_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){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=d1.computeHoverRanges(this._editor,e.range,t),r=new X,a=r.add(new Gw(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:u=>d=u,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:u=>this._widget.setMinimumDimensions(u),hide:()=>this.hide()};for(const u of this._participants){const f=t.filter(p=>p.owner===u);f.length>0&&r.add(u.renderHoverParts(c,f))}const h=t.some(u=>u.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const u=this._editor.createDecorationsCollection();u.set([{range:s,options:d1._DECORATION_OPTIONS}]),r.add(Me(()=>{u.clear()}))}this._widget.showAt(l,new que(d,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,h,e.initialMousePosX,e.initialMousePosY,r))}else r.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const d=e._getViewModel(),c=d.coordinatesConverter,h=c.convertModelRangeToViewRange(t),u=new P(h.startLineNumber,d.getLineMinColumn(h.startLineNumber));n=c.convertViewPositionToModelPosition(u).column}const s=t.startLineNumber;let r=t.startColumn,a=i[0].range,l=null;for(const d of i)a=L.plusRange(a,d.range),d.range.startLineNumber===s&&d.range.endLineNumber===s&&(r=Math.max(Math.min(r,d.range.startColumn),n)),d.forceShowAtRange&&(l=d.range);return{showAtPosition:l?l.getStartPosition():new P(s,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new P(s,r),highlightRange:a}}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()}};qw._DECORATION_OPTIONS=Ve.register({description:"content-hover-highlight",className:"hoverHighlight"});qw=d1=OM([Zh(1,Re),Zh(2,Et)],qw);class UW{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new Kue(this,this.anchor,t,this.isComplete)}}class Kue extends UW{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class que{constructor(e,t,i,n,s,r,a,l,d,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=s,this.source=r,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=d,this.disposables=c,this.closestMouseDistance=void 0}}const l5=30,vD=10,Gue=6;let fc=ma=class extends jue{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,i,n,s){const r=e.getOption(66)+8,a=150,l=new gt(a,r);super(e,l),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new HW),this._minimumSize=l,this._hoverVisibleKey=E.hoverVisible.bindTo(t),this._hoverFocusedKey=E.hoverFocused.bindTo(t),Y(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const d=this._register(Qa(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(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return ma.ID}static _applyDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return ma._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return ma._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){ma._applyMaxDimensions(this._hover.contentsDomNode,e,t),ma._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${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-vD))}_updateResizableNodeMaxDimensions(){var e,t;const i=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new gt(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;ma._lastDimensions=new gt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(i=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||i===void 0||i.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Gue;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{t+=i.clientHeight}),this._hasHorizontalScrollbar()&&(t+=vD),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(t=>t.scrollWidth>t.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=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?Ap(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=Ai(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=d5(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const n=d5(e,t,i.left,i.top,i.width,i.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||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(50),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(t=>this._editor.applyFontInfo(t))}_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,ma._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,ma._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:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var i,n,s,r;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const a=Hh(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(i=this._findPositionPreference(a,l))!==null&&i!==void 0?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();const d=Wue(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(r=(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||s===void 0?void 0:s.getAriaLabel())!==null&&r!==void 0?r:"");d&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+d)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new gt(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,n=this._hover.contentsDomNode,s=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(ps(i),Math.min(s,e)),this._setContentsDomNodeDimensions(ps(n),Math.min(s,e-vD))}setMinimumDimensions(e){this._minimumSize=new gt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new gt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=Hh(t),n=ps(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=Hh(t),n=ps(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const s=Hh(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(s,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-l5})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+l5})}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})}};fc.ID="editor.contrib.resizableContentHoverWidget";fc._lastDimensions=new gt(0,0);fc=ma=OM([Zh(1,Ae),Zh(2,st),Zh(3,cd),Zh(4,Et)],fc);let Gw=class extends H{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=a5("div.hover-row.status-bar"),this.actionsElement=Y(this.hoverElement,a5("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(AM.render(this.actionsElement,e,i))}append(e){const t=Y(this.actionsElement,e);return this._hasContent=!0,t}};Gw=OM([Zh(0,Et)],Gw);class Zw{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(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ki.EMPTY;const i=Zw._getLineDecorations(this._editor,t);return ki.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):ki.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Zw._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ga(t)}}function d5(o,e,t,i,n,s){const r=t+n/2,a=i+s/2,l=Math.max(Math.abs(o-r)-n/2,0),d=Math.max(Math.abs(e-a)-s/2,0);return Math.sqrt(l*l+d*d)}const c5=ee;class Fg extends H{constructor(e,t,i){super(),this._renderDisposeables=this._register(new X),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new HW),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new ld({editor:this._editor},t,i)),this._computer=new Zue(this._editor),this._hoverOperation=this._register(new zW(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Fg.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_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 n of t){const s=c5("div.hover-row.markdown-hover"),r=Y(s,c5("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}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(),s=this._editor.getOption(66),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Fg.ID="editor.contrib.modesGlyphHoverWidget";class Zue{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||cp(s)||i.push(...t2(s).map(e))}return i}}var Yue=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class Xue{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Que(o,e,t,i,n){return Yue(this,void 0,void 0,function*(){try{const s=yield Promise.resolve(o.provideHover(t,i,n));if(s&&efe(s))return new Xue(o,s,e)}catch(s){Ni(s)}})}function FM(o,e,t,i){const s=o.ordered(e).map((r,a)=>Que(r,a,e,t,i));return ki.fromPromises(s).coalesce()}function Jue(o,e,t,i){return FM(o,e,t,i).map(n=>n.hover).toPromise()}hl("_executeHoverProvider",(o,e,t)=>{const i=o.get(pe);return Jue(i.hoverProvider,e,t,Qe.None)});function efe(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var tfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cC=function(o,e){return function(t,i){e(t,i,o)}};const h5=ee;class Vr{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Yw=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new Vr(this,e.range,[new xn().appendText(g("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),h=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});let u=!1;c>=0&&l>c&&e.range.startColumn>=c&&(u=!0,r.push(new Vr(this,e.range,[{value:g("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!u&&typeof h=="number"&&l>=h&&r.push(new Vr(this,e.range,[{value:g("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const p of t){const m=p.range.startLineNumber===n?p.range.startColumn:1,v=p.range.endLineNumber===n?p.range.endColumn:s,_=p.options.hoverMessage;if(!_||cp(_))continue;p.options.beforeContentClassName&&(f=!0);const b=new L(e.range.startLineNumber,m,e.range.startLineNumber,v);r.push(new Vr(this,b,t2(_),f,a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return ki.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return ki.EMPTY;const s=new P(e.range.startLineNumber,e.range.startColumn);return FM(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!cp(r.hover.contents)).map(r=>{const a=r.hover.range?L.lift(r.hover.range):e.range;return new Vr(this,a,r.hover.contents,!1,r.ordinal)})}renderHoverParts(e,t){return $W(e,t,this._editor,this._languageService,this._openerService)}};Yw=tfe([cC(1,qt),cC(2,zs),cC(3,st),cC(4,pe)],Yw);function $W(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new X;for(const r of e)for(const a of r.contents){if(cp(a))continue;const l=h5("div.hover-row.markdown-hover"),d=Y(l,h5("div.hover-contents")),c=s.add(new ld({editor:t},i,n));s.add(c.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",o.onContentsChanged()}));const h=s.add(c.render(a));d.appendChild(h.element),o.fragment.appendChild(l)}return s}var jW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xw=function(o,e){return function(t,i){e(t,i,o)}};class u5{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let TN=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._dispoables=new X,this._markers=[],this._nextIdx=-1,ke.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let d=$_(a.resource.toString(),l.resource.toString());return d===0&&(n==="position"?d=L.compareRangesUsingStarts(a,l)||ni.compare(a.severity,l.severity):d=ni.compare(a.severity,l.severity)||L.compareRangesUsingStarts(a,l)),d},r=()=>{this._markers=this._markerService.read({resource:ke.isUri(e)?e:void 0,severities:ni.Error|ni.Warning|ni.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new u5(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=O_(this._markers,{resource:e.uri},(r,a)=>$_(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;r<this._markers.length;r++){let a=L.lift(this._markers[r]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new L(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=r,n=!0;break}if(this._markers[r].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(this._markers.length===0)return!1;const n=this._nextIdx;return this._nextIdx===-1?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(n=>n.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(L.containsPosition(this._markers[i],t))return new u5(this._markers[i],i+1,this._markers.length)}}};TN=jW([Xw(1,ul),Xw(2,st)],TN);const KW=et("IMarkerNavigationService");let RN=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new ns}getMarkerList(e){for(const t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new TN(e,this._markerService,this._configService)}};RN=jW([Xw(0,ul),Xw(1,st)],RN);dt(KW,RN,1);var MN;(function(o){function e(t){switch(t){case gi.Ignore:return"severity-ignore "+Ie.asClassName(oe.info);case gi.Info:return Ie.asClassName(oe.info);case gi.Warning:return Ie.asClassName(oe.warning);case gi.Error:return Ie.asClassName(oe.error);default:return""}}o.className=e})(MN||(MN={}));var ife=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yf=function(o,e){return function(t,i){e(t,i,o)}},AN;class nfe{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 X,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(wi(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new H7(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){St(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=(t?.length||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=Xa(i);this._lines=a.length,this._longestLineLength=0;for(const u of a)this._longestLineLength=Math.max(u.length+r,this._longestLineLength);fn(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),u.appendChild(f)}if(s)if(typeof s=="string"){const f=document.createElement("span");f.innerText=`(${s})`,f.classList.add("code"),u.appendChild(f)}else{this._codeLink=ee("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=p=>{this._openerService.open(s.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()};const f=Y(this._codeLink,ee("span"));f.innerText=s.value,u.appendChild(this._codeLink)}}if(fn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Fn(n)){const u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const f of n){const p=document.createElement("div"),m=document.createElement("a");m.classList.add("filename"),m.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,m.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(m,f);const v=document.createElement("span");v.innerText=f.message,p.appendChild(m),p.appendChild(v),this._lines+=1,u.appendChild(p)}}const d=this._editor.getOption(50),c=Math.ceil(d.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=d.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,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 ni.Error:t=g("Error","Error");break;case ni.Warning:t=g("Warning","Warning");break;case ni.Info:t=g("Info","Info");break;case ni.Hint:t=g("Hint","Hint");break}let i=g("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 Cp=AN=class extends Kw{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 X,this._onDidSelectRelatedInformation=new A,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=ni.Warning,this._backgroundColor=V.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(afe);let t=PN,i=sfe;this._severity===ni.Warning?(t=c1,i=ofe):this._severity===ni.Info&&(t=ON,i=rfe);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(TW),secondaryHeadingColor:e.getColor(RW)})}_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(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(AN.TitleMenu,this._contextKeyService);wB(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=Y(e,ee(""))}_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 nfe(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),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.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?g("problems","{0} of {1} problems",t,i):g("change","{0} of {1} problem",t,i);this.setTitle(Bo(a.uri),l)}this._icon.className=`codicon ${MN.className(ni.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,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()}};Cp.TitleMenu=new k("gotoErrorTitleMenu");Cp=AN=ife([yf(1,Ki),yf(2,zs),yf(3,dl),yf(4,Re),yf(5,Ae),yf(6,ap)],Cp);const f5=lv(Fa,VG),g5=lv(no,rv),p5=lv(bs,av),PN=T("editorMarkerNavigationError.background",{dark:f5,light:f5,hcDark:nt,hcLight:nt},g("editorMarkerNavigationError","Editor marker navigation widget error color.")),sfe=T("editorMarkerNavigationError.headerBackground",{dark:we(PN,.1),light:we(PN,.1),hcDark:null,hcLight:null},g("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),c1=T("editorMarkerNavigationWarning.background",{dark:g5,light:g5,hcDark:nt,hcLight:nt},g("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),ofe=T("editorMarkerNavigationWarning.headerBackground",{dark:we(c1,.1),light:we(c1,.1),hcDark:"#0C141F",hcLight:we(c1,.2)},g("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ON=T("editorMarkerNavigationInfo.background",{dark:p5,light:p5,hcDark:nt,hcLight:nt},g("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),rfe=T("editorMarkerNavigationInfo.headerBackground",{dark:we(ON,.1),light:we(ON,.1),hcDark:null,hcLight:null},g("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),afe=T("editorMarkerNavigation.background",{dark:ji,light:ji,hcDark:ji,hcLight:ji},g("editorMarkerNavigationBackground","Editor marker navigation widget background."));var lfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hC=function(o,e){return function(t,i){e(t,i,o)}},qW=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Jm;let Vc=Jm=class{static get(e){return e.getContribution(Jm.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new X,this._editor=e,this._widgetVisible=GW.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(Cp,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(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!L.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:L.lift(i).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 P(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 qW(this,void 0,void 0,function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=Jm.get(r))===null||i===void 0||i.close(),(n=Jm.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}})}};Vc.ID="editor.contrib.markerController";Vc=Jm=lfe([hC(1,KW),hC(2,Ae),hC(3,_t),hC(4,Re)],Vc);class Xy extends fe{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return qW(this,void 0,void 0,function*(){t.hasModel()&&((i=Vc.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class gc extends Xy{constructor(){super(!0,!1,{id:gc.ID,label:gc.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:578,weight:100},menuOpts:{menuId:Cp.TitleMenu,title:gc.LABEL,icon:_i("marker-navigation-next",oe.arrowDown,g("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}gc.ID="editor.action.marker.next";gc.LABEL=g("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class su extends Xy{constructor(){super(!1,!1,{id:su.ID,label:su.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:1602,weight:100},menuOpts:{menuId:Cp.TitleMenu,title:su.LABEL,icon:_i("marker-navigation-previous",oe.arrowUp,g("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}su.ID="editor.action.marker.prev";su.LABEL=g("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class dfe extends Xy{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:g("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:E.focus,primary:66,weight:100},menuOpts:{menuId:k.MenubarGoMenu,title:g({},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class cfe extends Xy{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:g("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:E.focus,primary:1090,weight:100},menuOpts:{menuId:k.MenubarGoMenu,title:g({},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}ft(Vc.ID,Vc,4);ie(gc);ie(su);ie(dfe);ie(cfe);const GW=new ce("markersNavigationVisible",!1),hfe=tn.bindToContribution(Vc.get);re(new hfe({id:"closeMarkersNavigation",precondition:GW,handler:o=>o.close(),kbOpts:{weight:150,kbExpr:E.focus,primary:9,secondary:[1033]}}));var ufe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bD=function(o,e){return function(t,i){e(t,i,o)}};const Go=ee;class ffe{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const m5={type:1,filter:{include:Ne.QuickFix},triggerAction:Vs.QuickFixHover};let FN=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()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,d=a.range.endLineNumber===n?a.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const h=new L(e.range.startLineNumber,l,e.range.startLineNumber,d);r.push(new ffe(this,h,c))}return r}renderHoverParts(e,t){if(!t.length)return H.None;const i=new X;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>ni.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=Go("div.hover-row"),n=Y(i,Go("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const d=Y(n,Go("span"));if(d.style.whiteSpace="pre-wrap",d.innerText=r,s||a)if(a&&typeof a!="string"){const c=Go("span");if(s){const p=Y(c,Go("span"));p.innerText=s}const h=Y(c,Go("a.code-link"));h.setAttribute("href",a.target.toString()),t.add($(h,"click",p=>{this._openerService.open(a.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()}));const u=Y(h,Go("span"));u.innerText=a.value;const f=Y(n,c);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const c=Y(n,Go("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(Fn(l))for(const{message:c,resource:h,startLineNumber:u,startColumn:f}of l){const p=Y(n,Go("div"));p.style.marginTop="8px";const m=Y(p,Go("a"));m.innerText=`${Bo(h)}(${u}, ${f}): `,m.style.cursor="pointer",t.add($(m,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:f}}}).catch(He)}));const v=Y(p,Go("span"));v.innerText=c,this._editor.applyFontInfo(v)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===ni.Error||t.marker.severity===ni.Warning||t.marker.severity===ni.Info)&&e.statusBar.addAction({label:g("view problem","View Problem"),commandId:gc.ID,run:()=>{var n;e.hide(),(n=Vc.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const n=e.statusBar.append(Go("div"));this.recentMarkerCodeActionsInfo&&(Sw.makeKey(this.recentMarkerCodeActionsInfo.marker)===Sw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=g("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?H.None:i.add(xc(()=>n.textContent=g("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=" ");const r=this.getCodeActions(t.marker);i.add(Me(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=g("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Me(()=>{l||a.dispose()})),e.statusBar.addAction({label:g("quick fixes","Quick Fix..."),commandId:DM,run:d=>{l=!0;const c=Pc.get(this._editor),h=Ai(d);e.hide(),c?.showCodeActions(m5,a,{x:h.left,y:h.top,width:h.width,height:h.height})}})},He)}}getCodeActions(e){return Wi(t=>D_(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),m5,Jl.None,t))}};FN=ufe([bD(1,H2),bD(2,zs),bD(3,pe)],FN);const ZW="editor.action.inlineSuggest.commit",YW="editor.action.inlineSuggest.showPrevious",XW="editor.action.inlineSuggest.showNext";var gfe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class pfe extends H{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new iU),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new X),this.options=i,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new qv(()=>{var n;return(n=this.toggleMenuActionViewItem)===null||n===void 0?void 0:n.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Wo(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(n,s)=>{var r;if(n.id===qv.ID)return this.toggleMenuActionViewItem=new pw(n,n.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Ie.asClassNameArray((r=i.moreIcon)!==null&&r!==void 0?r:oe.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 a=i.actionViewItemProvider(n,s);if(a)return a}if(n instanceof qg){const a=new pw(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}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(n=>{this.actionBar.push(n,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(n)})})}getKeybindingLabel(e){var t,i,n;const s=this.lookupKeybindings?(i=(t=this.options).getKeyBinding)===null||i===void 0?void 0:i.call(t,e):void 0;return(n=s?.getLabel())!==null&&n!==void 0?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class qv extends as{constructor(e,t){t=t||g("moreActions","More Actions..."),super(qv.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return gfe(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}qv.ID="toolbar.toggle.more";var mfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xm=function(o,e){return function(t,i){e(t,i,o)}};let BN=class extends pfe{constructor(e,t,i,n,s,r,a){super(e,s,Object.assign(Object.assign({getKeyBinding:d=>{var c;return(c=r.lookupKeybinding(d.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"})),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._sessionDisposables=this._store.add(new X);const l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(d=>a.publicLog2("workbenchActionExecuted",{id:d.action.id,from:l})))}setActions(e,t=[],i){var n,s,r;this._sessionDisposables.clear();const a=e.slice(),l=t.slice(),d=[];let c=0;const h=[];let u=!1;if(((n=this._options)===null||n===void 0?void 0:n.hiddenItemStrategy)!==-1)for(let f=0;f<a.length;f++){const p=a[f];!(p instanceof dr)&&!(p instanceof G_)||p.hideActions&&(d.push(p.hideActions.toggle),p.hideActions.toggle.checked&&c++,p.hideActions.isHidden&&(u=!0,a[f]=void 0,((s=this._options)===null||s===void 0?void 0:s.hiddenItemStrategy)!==0&&(h[f]=p)))}if(((r=this._options)===null||r===void 0?void 0:r.overflowBehavior)!==void 0){const f=Lse(new Set(this._options.overflowBehavior.exempted),Xe.map(a,v=>v?.id)),p=this._options.overflowBehavior.maxItems-f.size;let m=0;for(let v=0;v<a.length;v++){const _=a[v];_&&(m++,!f.has(_.id)&&m>=p&&(a[v]=void 0,h[v]=_))}}xA(a),xA(h),super.setActions(a,en.join(h,l)),d.length>0&&this._sessionDisposables.add($(this.getElement(),"contextmenu",f=>{var p,m,v,_,b;const C=new Do(f),w=this.getItemAction(C.target);if(!w)return;C.preventDefault(),C.stopPropagation();let S=!1;if(c===1&&((p=this._options)===null||p===void 0?void 0:p.hiddenItemStrategy)===0){S=!0;for(let I=0;I<d.length;I++)if(d[I].checked){d[I]=pg({id:w.id,label:w.label,checked:!0,enabled:!1,run(){}});break}}let D;if(!S&&(w instanceof dr||w instanceof G_)){if(!w.hideActions)return;D=w.hideActions.hide}else D=pg({id:"label",label:g("hide","Hide"),enabled:!1,run(){}});const x=en.join([D],d);!((m=this._options)===null||m===void 0)&&m.resetMenu&&!i&&(i=[this._options.resetMenu]),u&&i&&(x.push(new en),x.push(pg({id:"resetThisMenu",label:g("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>C,getActions:()=>x,menuId:(v=this._options)===null||v===void 0?void 0:v.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(_=this._options)===null||_===void 0?void 0:_.menuOptions),skipTelemetry:typeof((b=this._options)===null||b===void 0?void 0:b.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};BN=mfe([xm(2,dl),xm(3,Ae),xm(4,pr),xm(5,Et),xm(6,go)],BN);var BM=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hr=function(o,e){return function(t,i){e(t,i,o)}},h1;let WN=class extends H{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=un(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=ot(this,n=>{var s,r,a;const l=(s=this.model.read(n))===null||s===void 0?void 0:s.ghostText.read(n);if(!this.alwaysShowToolbar.read(n)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const d=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new P(l.lineNumber,Math.min(d,(a=(r=this.sessionPosition)===null||r===void 0?void 0:r.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Ns((n,s)=>{const r=this.model.read(n);if(!r||!this.alwaysShowToolbar.read(n))return;const a=s.add(this.instantiationService.createInstance(Hc,this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(l=>{var d;return(d=l?.inlineCompletion.source.inlineCompletions.commands)!==null&&d!==void 0?d:[]})));e.addContentWidget(a),s.add(Me(()=>e.removeContentWidget(a))),s.add(Mt(l=>{this.position.read(l)&&r.lastTriggerKind.read(l)!==Yl.Explicit&&r.triggerExplicitly()}))}))}};WN=BM([Hr(2,Re)],WN);const _fe=_i("inline-suggestion-hints-next",oe.chevronRight,g("parameterHintsNextIcon","Icon for show next parameter hint.")),vfe=_i("inline-suggestion-hints-previous",oe.chevronLeft,g("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Hc=h1=class extends H{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new as(e,t,i,!0,()=>this._commandService.executeCommand(e)),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let r=t;return s&&(r=g({},"{0} ({1})",t,s.getLabel())),n.tooltip=r,n}constructor(e,t,i,n,s,r,a,l,d,c,h){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=r,this._commandService=a,this.keybindingService=d,this._contextKeyService=c,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${h1.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=rn("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[rn("div@toolBar")]),this.previousAction=this.createCommandAction(YW,g("previous","Previous"),Ie.asClassName(vfe)),this.availableSuggestionCountAction=new as("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(XW,g("next","Next"),Ie.asClassName(_fe)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(k.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Dt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Dt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(VN,this.nodes.toolBar,k.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:u=>u.startsWith("primary")},actionViewItemProvider:(u,f)=>{if(u instanceof dr)return l.createInstance(Cfe,u,void 0);if(u===this.availableSuggestionCountAction){const p=new bfe(void 0,u,{label:!0,icon:!1});return p.setClass("availableSuggestionCount"),p}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(u=>{h1._dropDownVisible=u})),this._register(Mt(u=>{this._position.read(u),this.editor.layoutContentWidget(this)})),this._register(Mt(u=>{const f=this._suggestionCount.read(u),p=this._currentSuggestionIdx.read(u);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${p+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Mt(u=>{const f=this._extraCommands.read(u);if(mi(this.lastCommands,f))return;this.lastCommands=f;const p=f.map(m=>({class:void 0,id:m.id,enabled:!0,tooltip:m.tooltip||"",label:m.title,run:v=>this._commandService.executeCommand(m.id)}));for(const[m,v]of this.inlineCompletionsActionsMenus.getActions())for(const _ of v)_ instanceof dr&&p.push(_);p.length>0&&p.unshift(new en),this.toolBar.setAdditionalSecondaryActions(p)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Hc._dropDownVisible=!1;Hc.id=0;Hc=h1=BM([Hr(6,li),Hr(7,Re),Hr(8,Et),Hr(9,Ae),Hr(10,dl)],Hc);class bfe extends hp{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Cfe=class extends bu{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=rn("div.keybinding").root;new V0(t,to,Object.assign({disableTitle:!0},zoe)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},VN=class extends BN{constructor(e,t,i,n,s,r,a,l){super(e,Object.assign({resetMenu:t},i),n,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,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,s,r,a;const l=[],d=[];wB(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:d},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(s=(n=this.options2)===null||n===void 0?void 0:n.toolbarOptions)===null||s===void 0?void 0:s.shouldInlineSubmenu,(a=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),d.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,d)}setPrependedPrimaryActions(e){mi(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){mi(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};VN=BM([Hr(3,dl),Hr(4,Ae),Hr(5,pr),Hr(6,Et),Hr(7,go)],VN);var wfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uC=function(o,e){return function(t,i){e(t,i,o)}},HN;let ys=HN=class extends H{static get(e){return e.getContribution(HN.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new X,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Dt(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(60);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._hidingDelay=t.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;if(i.type===9&&i.detail===fc.ID){this._hoverClicked=!0;return}i.type===12&&i.detail===Fg.ID||(i.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;const n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,r;const a=e.target;return!!(this._isHoverSticky&&a.type===9&&a.detail===fc.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((s=(n=e.event.browserEvent.view)===null||n===void 0?void 0:n.getSelection())===null||s===void 0)&&s.isCollapsed)||!this._isHoverSticky&&a.type===9&&a.detail===fc.ID&&(!((r=this._contentWidget)===null||r===void 0)&&r.isColorPickerVisible)||this._isHoverSticky&&a.type===12&&a.detail===Fg.ID)}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((i=this._contentWidget)===null||i===void 0)&&i.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((n=this._contentWidget)===null||n===void 0)&&n.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((s=this._contentWidget)===null||s===void 0)&&s.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n;if(!e)return;const s=e.target,r=(t=s.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),a=this._editor.getOption(146);if(r&&(a==="click"&&!this._hoverActivatedByColorDecoratorClick||a==="hover"&&!this._isHoverEnabled||a==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!r&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(i=this._glyphWidget)===null||i===void 0||i.hide();return}if(s.type===2&&s.position){(n=this._contentWidget)===null||n===void 0||n.hide(),this._glyphWidget||(this._glyphWidget=new Fg(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(s.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!n&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Hc.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(qw,this._editor)),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverActivatedByColorDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};ys.ID="editor.contrib.hover";ys=HN=wfe([uC(1,Re),uC(2,zs),uC(3,qt),uC(4,Et)],ys);class Sfe extends fe{constructor(){super({id:"editor.action.showHover",label:g({},"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:E.editorTextFocus,primary:Pi(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=ys.get(t);if(!n)return;const s=t.getPosition(),r=new L(s.lineNumber,s.column,s.lineNumber,s.column),a=t.getOption(2)===2||!!i?.focus;n.isHoverVisible?n.focus():n.showContentHover(r,1,1,a)}}class yfe extends fe{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:g({},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=ys.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new L(n.lineNumber,n.column,n.lineNumber,n.column),r=Eu.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,1,!0)})}}class Lfe extends fe{constructor(){super({id:"editor.action.scrollUpHover",label:g({},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:16,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollUp()}}class xfe extends fe{constructor(){super({id:"editor.action.scrollDownHover",label:g({},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:18,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollDown()}}class Dfe extends fe{constructor(){super({id:"editor.action.scrollLeftHover",label:g({},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:15,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollLeft()}}class kfe extends fe{constructor(){super({id:"editor.action.scrollRightHover",label:g({},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:17,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollRight()}}class Ife extends fe{constructor(){super({id:"editor.action.pageUpHover",label:g({},"Page Up Hover"),alias:"Page Up Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=ys.get(t);i&&i.pageUp()}}class Efe extends fe{constructor(){super({id:"editor.action.pageDownHover",label:g({},"Page Down Hover"),alias:"Page Down Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=ys.get(t);i&&i.pageDown()}}class Nfe extends fe{constructor(){super({id:"editor.action.goToTopHover",label:g({},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=ys.get(t);i&&i.goToTop()}}class Tfe extends fe{constructor(){super({id:"editor.action.goToBottomHover",label:g({},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=ys.get(t);i&&i.goToBottom()}}ft(ys.ID,ys,2);ie(Sfe);ie(yfe);ie(Lfe);ie(xfe);ie(Dfe);ie(kfe);ie(Ife);ie(Efe);ie(Nfe);ie(Tfe);af.register(Yw);af.register(FN);gr((o,e)=>{const t=o.getColor(tZ);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class zN extends H{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==wW||!i.range)return;const n=this._editor.getContribution(ys.ID);if(n&&!n.isColorPickerVisible){const s=new L(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(s,1,0,!1,!0)}}}zN.ID="editor.contrib.colorContribution";ft(zN.ID,zN,2);af.register(jw);var QW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fr=function(o,e){return function(t,i){e(t,i,o)}},_5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},UN,$N;let zc=UN=class extends H{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=r,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=E.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=E.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Qw(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),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(UN.ID)}};zc.ID="editor.contrib.standaloneColorPickerController";zc=UN=QW([Fr(1,Ae),Fr(2,Zt),Fr(3,Et),Fr(4,Re),Fr(5,pe),Fr(6,At)],zc);ft(zc.ID,zc,1);const v5=8,Rfe=22;let Qw=$N=class extends H{constructor(e,t,i,n,s,r,a,l){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=r,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new A),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(Uv,this._editor),this._position=(d=this._editor._getViewModel())===null||d===void 0?void 0:d.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),h=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},u=this._register(Qa(this._body));this._register(u.onDidBlur(f=>{this.hide()})),this._register(u.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var p;const m=(p=f.target.element)===null||p===void 0?void 0:p.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(h),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return $N.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).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 _5(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new Mfe(t.result,t.foundInEditor))})}_computeAsync(e){return _5(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 NM(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null})}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new Gw(this._keybindingService));let s;const r={fragment:i,statusBar:n,setColorPicker:m=>s=m,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(r,[e])),s===void 0)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(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),s.layout();const a=s.body,l=a.saturationBox.domNode.clientWidth,d=a.domNode.clientWidth-l-Rfe-v5,c=s.body.enterButton;c?.onClicked(()=>{this.updateEditor(),this.hide()});const h=s.header,u=h.pickedColorNode;u.style.width=l+v5+"px";const f=h.originalColorNode;f.style.width=d+"px";const p=s.header.closeButton;p?.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Qw.ID="editor.contrib.standaloneColorPickerWidget";Qw=$N=QW([Fr(3,Re),Fr(4,Zt),Fr(5,Et),Fr(6,pe),Fr(7,At)],Qw);class Mfe{constructor(e,t){this.value=e,this.foundInEditor=t}}class Afe extends oa{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:g("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:g({},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:k.CommandPalette}]})}runEditorCommand(e,t){var i;(i=zc.get(t))===null||i===void 0||i.showOrFocus()}}class Pfe extends fe{constructor(){super({id:"editor.action.hideColorPicker",label:g({},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:E.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=zc.get(t))===null||i===void 0||i.hide()}}class Ofe extends fe{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:g({},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:E.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=zc.get(t))===null||i===void 0||i.insertColor()}}ie(Pfe);ie(Ofe);jt(Afe);class Qd{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,s=e.length;if(i+n>s)return!1;for(let r=0;r<n;r++){const a=e.charCodeAt(i+r),l=t.charCodeAt(r);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,h=s.getLineContent(a),u=s.getLineContent(d);let f=h.lastIndexOf(t,l-1+t.length),p=u.indexOf(i,c-1-i.length);if(f!==-1&&p!==-1)if(a===d)h.substring(f+t.length,p).indexOf(i)>=0&&(f=-1,p=-1);else{const v=h.substring(f+t.length),_=u.substring(0,p);(v.indexOf(i)>=0||_.indexOf(i)>=0)&&(f=-1,p=-1)}let m;f!==-1&&p!==-1?(n&&f+t.length<h.length&&h.charCodeAt(f+t.length)===32&&(t=t+" "),n&&p>0&&u.charCodeAt(p-1)===32&&(i=" "+i,p-=1),m=Qd._createRemoveBlockCommentOperations(new L(a,f+t.length+1,d,p+1),t,i)):(m=Qd._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=m.length===1?i:null);for(const v of m)r.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return L.isEmpty(e)?n.push(Xt.delete(new L(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Xt.delete(new L(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Xt.delete(new L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return L.isEmpty(e)?s.push(Xt.replace(new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Xt.insert(new P(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Xt.insert(new P(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new ve(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new ve(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class kl{constructor(e,t,i,n,s,r,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,a=r?r.lineCommentToken:null;if(!a)return null;const l=[];for(let d=0,c=i-t+1;d<c;d++)l[d]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,i,n,s,r,a,l){let d=!0,c;e===0?c=!0:e===1?c=!1:c=!0;for(let h=0,u=n.length;h<u;h++){const f=n[h],p=s+h;if(p===s&&a){f.ignore=!0;continue}const m=i.getLineContent(p),v=Gn(m);if(v===-1){f.ignore=r,f.commentStrOffset=m.length;continue}if(d=!1,f.ignore=!1,f.commentStrOffset=v,c&&!Qd._haystackHasNeedleAtOffset(m,f.commentStr,v)&&(e===0?c=!1:e===1||(f.ignore=!0)),c&&t){const _=v+f.commentStrLength;_<m.length&&m.charCodeAt(_)===32&&(f.commentStrLength+=1)}}if(e===0&&d){c=!1;for(let h=0,u=n.length;h<u;h++)n[h].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:n}}static _gatherPreflightData(e,t,i,n,s,r,a,l){const d=kl._gatherPreflightCommentStrings(i,n,s,l);return d===null?{supported:!1}:kl._analyzeLines(e,t,i,d,n,r,a,l)}_executeLineComments(e,t,i,n){let s;i.shouldRemoveComments?s=kl._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(kl._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const r=new P(n.positionLineNumber,n.positionColumn);for(let a=0,l=s.length;a<l;a++)t.addEditOperation(s[a].range,s[a].text),L.isEmpty(s[a].range)&&L.getStartPosition(s[a].range).equals(r)&&e.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(s[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let s=t.startLineNumber,r=t.endLineNumber;const a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let l=e.getLineContent(s).lastIndexOf(i,a-1),d=e.getLineContent(r).indexOf(n,t.endColumn-1-i.length);return l!==-1&&d===-1&&(d=e.getLineContent(s).indexOf(n,l+i.length),r=s),l===-1&&d!==-1&&(l=e.getLineContent(r).lastIndexOf(i,d),s=r),t.isEmpty()&&(l===-1||d===-1)&&(l=e.getLineContent(s).indexOf(i),l!==-1&&(d=e.getLineContent(s).indexOf(n,l+i.length))),l!==-1&&e.getLineContent(s).charCodeAt(l+i.length)===32&&(i+=" "),d!==-1&&e.getLineContent(r).charCodeAt(d-1)===32&&(n=" "+n,d-=1),l!==-1&&d!==-1?Qd._createRemoveBlockCommentOperations(new L(s,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),s=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const r=s.blockCommentStartToken,a=s.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,r,a);if(!l){if(i.isEmpty()){const d=e.getLineContent(i.startLineNumber);let c=Gn(d);c===-1&&(c=d.length),l=Qd._createAddBlockCommentOperations(new L(i.startLineNumber,c+1,i.startLineNumber,d.length+1),r,a,this._insertSpace)}else l=Qd._createAddBlockCommentOperations(new L(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),r,a,this._insertSpace);l.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=t.trackSelection(i);for(const d of l)t.addEditOperation(d.range,d.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new L(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":`
637
+ hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:oc(t,a.open),close:oc(t,a.close)});else throw zt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}var zle=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function Ule(o){Zg.registerLanguage(o)}function $le(){let o=[];return o=o.concat(Zg.getLanguages()),o}function jle(o){return Te.get(qt).languageIdCodec.encodeLanguageId(o)}function Kle(o,e){return Te.withServices(()=>{const i=Te.get(qt).onDidRequestRichLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function qle(o,e){return Te.withServices(()=>{const i=Te.get(qt).onDidRequestBasicLanguageFeatures(n=>{n===o&&(i.dispose(),e())});return i})}function Gle(o,e){if(!Te.get(qt).isRegisteredLanguageId(o))throw new Error(`Cannot set configuration for unknown language ${o}`);return Te.get(At).register(o,e,100)}class Zle{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if(typeof this._actual.tokenize=="function")return zv.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 CS(n.tokens,n.endState)}}class zv{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 s=0,r=e.length;s<r;s++){const a=e[s];let l=a.startIndex;s===0?l=0:l<n&&(l=n),i[s]=new H_(l,a.scopes,t),n=l}return i}static adaptTokenize(e,t,i,n){const s=t.tokenize(i,n),r=zv._toClassicTokens(s.tokens,e);let a;return s.endState.equals(n)?a=n:a=s.endState,new f2(r,a)}tokenize(e,t,i){return zv.adaptTokenize(this._languageId,this._actual,e,i)}_toBinaryTokens(e,t){const i=e.encodeLanguageId(this._languageId),n=this._standaloneThemeService.getColorTheme().tokenTheme,s=[];let r=0,a=0;for(let d=0,c=t.length;d<c;d++){const h=t[d],u=n.match(i,h.scopes)|1024;if(r>0&&s[r-1]===u)continue;let f=h.startIndex;d===0?f=0:f<a&&(f=a),s[r++]=f,s[r++]=u,a=f}const l=new Uint32Array(r);for(let d=0;d<r;d++)l[d]=s[d];return l}tokenizeEncoded(e,t,i){const n=this._actual.tokenize(e,i),s=this._toBinaryTokens(this._languageService.languageIdCodec,n.tokens);let r;return n.endState.equals(i)?r=i:r=n.endState,new CS(s,r)}}function Yle(o){return typeof o.getInitialState=="function"}function Xle(o){return"tokenizeEncoded"in o}function S6(o){return o&&typeof o.then=="function"}function Qle(o){const e=Te.get(mo);if(o){const t=[null];for(let i=1,n=o.length;i<n;i++)t[i]=V.fromHex(o[i]);e.setColorMapOverride(t)}else e.setColorMapOverride(null)}function y6(o,e){return Xle(e)?new Zle(o,e):new zv(o,e,Te.get(qt),Te.get(mo))}function _M(o,e){const t=new EU(()=>zle(this,void 0,void 0,function*(){const i=yield Promise.resolve(e.create());return i?Yle(i)?y6(o,i):new sv(Te.get(qt),Te.get(mo),o,w6(o,i),Te.get(st)):null}));return ei.registerFactory(o,t)}function Jle(o,e){if(!Te.get(qt).isRegisteredLanguageId(o))throw new Error(`Cannot set tokens provider for unknown language ${o}`);return S6(e)?_M(o,{create:()=>e}):ei.register(o,y6(o,e))}function ede(o,e){const t=i=>new sv(Te.get(qt),Te.get(mo),o,w6(o,i),Te.get(st));return S6(e)?_M(o,{create:()=>e}):ei.register(o,t(e))}function tde(o,e){return Te.get(pe).referenceProvider.register(o,e)}function ide(o,e){return Te.get(pe).renameProvider.register(o,e)}function nde(o,e){return Te.get(pe).signatureHelpProvider.register(o,e)}function sde(o,e){return Te.get(pe).hoverProvider.register(o,{provideHover:(i,n,s)=>{const r=i.getWordAtPosition(n);return Promise.resolve(e.provideHover(i,n,s)).then(a=>{if(a)return!a.range&&r&&(a.range=new L(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn)),a.range||(a.range=new L(n.lineNumber,n.column,n.lineNumber,n.column)),a})}})}function ode(o,e){return Te.get(pe).documentSymbolProvider.register(o,e)}function rde(o,e){return Te.get(pe).documentHighlightProvider.register(o,e)}function ade(o,e){return Te.get(pe).linkedEditingRangeProvider.register(o,e)}function lde(o,e){return Te.get(pe).definitionProvider.register(o,e)}function dde(o,e){return Te.get(pe).implementationProvider.register(o,e)}function cde(o,e){return Te.get(pe).typeDefinitionProvider.register(o,e)}function hde(o,e){return Te.get(pe).codeLensProvider.register(o,e)}function ude(o,e,t){return Te.get(pe).codeActionProvider.register(o,{providedCodeActionKinds:t?.providedCodeActionKinds,documentation:t?.documentation,provideCodeActions:(n,s,r,a)=>{const d=Te.get(ul).read({resource:n.uri}).filter(c=>L.areIntersectingOrTouching(c,s));return e.provideCodeActions(n,s,{markers:d,only:r.only,trigger:r.trigger},a)},resolveCodeAction:e.resolveCodeAction})}function fde(o,e){return Te.get(pe).documentFormattingEditProvider.register(o,e)}function gde(o,e){return Te.get(pe).documentRangeFormattingEditProvider.register(o,e)}function pde(o,e){return Te.get(pe).onTypeFormattingEditProvider.register(o,e)}function mde(o,e){return Te.get(pe).linkProvider.register(o,e)}function _de(o,e){return Te.get(pe).completionProvider.register(o,e)}function vde(o,e){return Te.get(pe).colorProvider.register(o,e)}function bde(o,e){return Te.get(pe).foldingRangeProvider.register(o,e)}function Cde(o,e){return Te.get(pe).declarationProvider.register(o,e)}function wde(o,e){return Te.get(pe).selectionRangeProvider.register(o,e)}function Sde(o,e){return Te.get(pe).documentSemanticTokensProvider.register(o,e)}function yde(o,e){return Te.get(pe).documentRangeSemanticTokensProvider.register(o,e)}function Lde(o,e){return Te.get(pe).inlineCompletionsProvider.register(o,e)}function xde(o,e){return Te.get(pe).inlayHintsProvider.register(o,e)}function Dde(){return{register:Ule,getLanguages:$le,onLanguage:Kle,onLanguageEncountered:qle,getEncodedLanguageId:jle,setLanguageConfiguration:Gle,setColorMap:Qle,registerTokensProviderFactory:_M,setTokensProvider:Jle,setMonarchTokensProvider:ede,registerReferenceProvider:tde,registerRenameProvider:ide,registerCompletionItemProvider:_de,registerSignatureHelpProvider:nde,registerHoverProvider:sde,registerDocumentSymbolProvider:ode,registerDocumentHighlightProvider:rde,registerLinkedEditingRangeProvider:ade,registerDefinitionProvider:lde,registerImplementationProvider:dde,registerTypeDefinitionProvider:cde,registerCodeLensProvider:hde,registerCodeActionProvider:ude,registerDocumentFormattingEditProvider:fde,registerDocumentRangeFormattingEditProvider:gde,registerOnTypeFormattingEditProvider:pde,registerLinkProvider:mde,registerColorProvider:vde,registerFoldingRangeProvider:bde,registerDeclarationProvider:Cde,registerSelectionRangeProvider:wde,registerDocumentSemanticTokensProvider:Sde,registerDocumentRangeSemanticTokensProvider:yde,registerInlineCompletionsProvider:Lde,registerInlayHintsProvider:xde,DocumentHighlightKind:dk,CompletionItemKind:nk,CompletionItemTag:sk,CompletionItemInsertTextRule:ik,SymbolKind:Mk,SymbolTag:Ak,IndentAction:pk,CompletionTriggerKind:ok,SignatureHelpTriggerKind:Rk,InlayHintKind:_k,InlineCompletionTriggerKind:vk,CodeActionTriggerType:tk,FoldingRangeKind:ss,SelectedSuggestionInfo:a9}}const vM=et("IEditorCancelService"),L6=new ce("cancellableOperation",!1,g("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));dt(vM,class{constructor(){this._tokens=new WeakMap}add(o,e){let t=this._tokens.get(o);t||(t=o.invokeWithinContext(n=>{const s=L6.bindTo(n.get(Ae)),r=new ns;return{key:s,tokens:r}}),this._tokens.set(o,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(o){const e=this._tokens.get(o);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},1);class kde extends Si{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(vM).add(e,this))}dispose(){this._unregister(),super.dispose()}}re(new class extends tn{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:L6})}runEditorCommand(o,e){o.get(vM).cancel(e)}});let x6=class hN{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const i=e.getModel();this.modelVersionId=i?du("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof hN))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 hN(e,this.flags))}};class Ac extends kde{constructor(e,t,i,n){super(e,n),this._listener=new X,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!L.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!L.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class bM extends Si{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}function rl(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===y0.ICodeEditor:!1}function D6(o){return o&&typeof o.getEditorType=="function"?o.getEditorType()===y0.IDiffEditor:!1}function Ide(o){return!!o&&typeof o=="object"&&typeof o.onDidChangeActiveEditor=="function"}function k6(o){return rl(o)?o:D6(o)?o.getModifiedEditor():Ide(o)&&rl(o.activeCodeEditor)?o.activeCodeEditor:null}class pp{static _handleEolEdits(e,t){let i;const n=[];for(const s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&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 n=ta.capture(e),s=pp._handleEolEdits(e,t);s.length===1&&pp._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map(r=>Xt.replace(L.lift(r.range),r.text))):e.executeEdits("formatEditsCommand",s.map(r=>Xt.replaceMove(L.lift(r.range),r.text))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class zF{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}class Ede{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(zF.toKey(e))}has(e){return this._set.has(zF.toKey(e))}}var ia=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function CM(o){if(o=o.filter(n=>n.range),!o.length)return;let{range:e}=o[0];for(let n=1;n<o.length;n++)e=L.plusRange(e,o[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?o.length===1?On(g("hint11","Made 1 formatting edit on line {0}",t)):On(g("hintn1","Made {0} formatting edits on line {1}",o.length,t)):o.length===1?On(g("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):On(g("hintnn","Made {0} formatting edits between lines {1} and {2}",o.length,t,i))}function I6(o,e,t){const i=[],n=new Ede,s=o.ordered(t);for(const a of s)i.push(a),a.extensionId&&n.add(a.extensionId);const r=e.ordered(t);for(const a of r){if(a.extensionId){if(n.has(a.extensionId))continue;n.add(a.extensionId)}i.push({displayName:a.displayName,extensionId:a.extensionId,provideDocumentFormattingEdits(l,d,c){return a.provideDocumentRangeFormattingEdits(l,l.getFullModelRange(),d,c)}})}return i}class Lu{static setFormatterSelector(e){return{dispose:Lu._selectors.unshift(e)}}static select(e,t,i){return ia(this,void 0,void 0,function*(){if(e.length===0)return;const n=Xe.first(Lu._selectors);if(n)return yield n(e,t,i)})}}Lu._selectors=new ns;function E6(o,e,t,i,n,s){return ia(this,void 0,void 0,function*(){const r=o.get(Re),{documentRangeFormattingEditProvider:a}=o.get(pe),l=rl(e)?e.getModel():e,d=a.ordered(l),c=yield Lu.select(d,l,i);c&&(n.report(c),yield r.invokeFunction(Nde,c,e,t,s))})}function Nde(o,e,t,i,n){var s,r;return ia(this,void 0,void 0,function*(){const a=o.get(vr),l=o.get(po);let d,c;rl(t)?(d=t.getModel(),c=new Ac(t,5,void 0,n)):(d=t,c=new bM(t,n));const h=[];let u=0;for(const _ of t2(i).sort(L.compareRangesUsingStarts))u>0&&L.areIntersectingOrTouching(h[u-1],_)?h[u-1]=L.fromPositions(h[u-1].getStartPosition(),_.getEndPosition()):u=h.push(_);const f=_=>ia(this,void 0,void 0,function*(){var b,C;l.trace("[format][provideDocumentRangeFormattingEdits] (request)",(b=e.extensionId)===null||b===void 0?void 0:b.value,_);const w=(yield e.provideDocumentRangeFormattingEdits(d,_,d.getFormattingOptions(),c.token))||[];return l.trace("[format][provideDocumentRangeFormattingEdits] (response)",(C=e.extensionId)===null||C===void 0?void 0:C.value,w),w}),p=(_,b)=>{if(!_.length||!b.length)return!1;const C=_.reduce((w,S)=>L.plusRange(w,S.range),_[0].range);if(!b.some(w=>L.intersectRanges(C,w.range)))return!1;for(const w of _)for(const S of b)if(L.intersectRanges(w.range,S.range))return!0;return!1},m=[],v=[];try{if(typeof e.provideDocumentRangesFormattingEdits=="function"){l.trace("[format][provideDocumentRangeFormattingEdits] (request)",(s=e.extensionId)===null||s===void 0?void 0:s.value,h);const _=(yield e.provideDocumentRangesFormattingEdits(d,h,d.getFormattingOptions(),c.token))||[];l.trace("[format][provideDocumentRangeFormattingEdits] (response)",(r=e.extensionId)===null||r===void 0?void 0:r.value,_),v.push(_)}else{for(const _ of h){if(c.token.isCancellationRequested)return!0;v.push(yield f(_))}for(let _=0;_<h.length;++_)for(let b=_+1;b<h.length;++b){if(c.token.isCancellationRequested)return!0;if(p(v[_],v[b])){const C=L.plusRange(h[_],h[b]),w=yield f(C);h.splice(b,1),h.splice(_,1),h.push(C),v.splice(b,1),v.splice(_,1),v.push(w),_=0,b=0}}}for(const _ of v){if(c.token.isCancellationRequested)return!0;const b=yield a.computeMoreMinimalEdits(d.uri,_);b&&m.push(...b)}}finally{c.dispose()}if(m.length===0)return!1;if(rl(t))pp.execute(t,m,!0),CM(m),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:_}]=m,b=new ve(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn);d.pushEditOperations([b],m.map(C=>({text:C.text,range:L.lift(C.range),forceMoveMarkers:!0})),C=>{for(const{range:w}of C)if(L.areIntersectingOrTouching(w,b))return[new ve(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn)];return null})}return!0})}function Tde(o,e,t,i,n){return ia(this,void 0,void 0,function*(){const s=o.get(Re),r=o.get(pe),a=rl(e)?e.getModel():e,l=I6(r.documentFormattingEditProvider,r.documentRangeFormattingEditProvider,a),d=yield Lu.select(l,a,t);d&&(i.report(d),yield s.invokeFunction(Rde,d,e,t,n))})}function Rde(o,e,t,i,n){return ia(this,void 0,void 0,function*(){const s=o.get(vr);let r,a;rl(t)?(r=t.getModel(),a=new Ac(t,5,void 0,n)):(r=t,a=new bM(t,n));let l;try{const d=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,d),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(rl(t))pp.execute(t,l,i!==2),i!==2&&(CM(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:d}]=l,c=new ve(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);r.pushEditOperations([c],l.map(h=>({text:h.text,range:L.lift(h.range),forceMoveMarkers:!0})),h=>{for(const{range:u}of h)if(L.areIntersectingOrTouching(u,c))return[new ve(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function Mde(o,e,t,i,n,s){return ia(this,void 0,void 0,function*(){const r=e.documentRangeFormattingEditProvider.ordered(t);for(const a of r){const l=yield Promise.resolve(a.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(Ni);if(Fn(l))return yield o.computeMoreMinimalEdits(t.uri,l)}})}function Ade(o,e,t,i,n){return ia(this,void 0,void 0,function*(){const s=I6(e.documentFormattingEditProvider,e.documentRangeFormattingEditProvider,t);for(const r of s){const a=yield Promise.resolve(r.provideDocumentFormattingEdits(t,i,n)).catch(Ni);if(Fn(a))return yield o.computeMoreMinimalEdits(t.uri,a)}})}function N6(o,e,t,i,n,s,r){const a=e.onTypeFormattingEditProvider.ordered(t);return a.length===0||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,s,r)).catch(Ni).then(l=>o.computeMoreMinimalEdits(t.uri,l))}lt.registerCommand("_executeFormatRangeProvider",function(o,...e){return ia(this,void 0,void 0,function*(){const[t,i,n]=e;xt(ke.isUri(t)),xt(L.isIRange(i));const s=o.get(Ls),r=o.get(vr),a=o.get(pe),l=yield s.createModelReference(t);try{return Mde(r,a,l.object.textEditorModel,L.lift(i),n,Qe.None)}finally{l.dispose()}})});lt.registerCommand("_executeFormatDocumentProvider",function(o,...e){return ia(this,void 0,void 0,function*(){const[t,i]=e;xt(ke.isUri(t));const n=o.get(Ls),s=o.get(vr),r=o.get(pe),a=yield n.createModelReference(t);try{return Ade(s,r,a.object.textEditorModel,i,Qe.None)}finally{a.dispose()}})});lt.registerCommand("_executeFormatOnTypeProvider",function(o,...e){return ia(this,void 0,void 0,function*(){const[t,i,n,s]=e;xt(ke.isUri(t)),xt(P.isIPosition(i)),xt(typeof n=="string");const r=o.get(Ls),a=o.get(vr),l=o.get(pe),d=yield r.createModelReference(t);try{return N6(a,l,d.object.textEditorModel,P.lift(i),n,s,Qe.None)}finally{d.dispose()}})});na.wrappingIndent.defaultValue=0;na.glyphMargin.defaultValue=!1;na.autoIndent.defaultValue=3;na.overviewRulerLanes.defaultValue=2;Lu.setFormatterSelector((o,e,t)=>Promise.resolve(o[0]));const hs=l9();hs.editor=Ole();hs.languages=Dde();const Pde=hs.CancellationTokenSource,Ode=hs.Emitter,Fde=hs.KeyCode,Bde=hs.KeyMod,Wde=hs.Position,Vde=hs.Range,Hde=hs.Selection,zde=hs.SelectionDirection,Ude=hs.MarkerSeverity,$de=hs.MarkerTag,jde=hs.Uri,Kde=hs.Token,qde=hs.editor,Gde=hs.languages,lD=globalThis.MonacoEnvironment;(lD?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=hs);typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&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"]});const j0=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:Pde,Emitter:Ode,KeyCode:Fde,KeyMod:Bde,MarkerSeverity:Ude,MarkerTag:$de,Position:Wde,Range:Vde,Selection:Hde,SelectionDirection:zde,Token:Kde,Uri:jde,editor:qde,languages:Gde},Symbol.toStringTag,{value:"Module"}));var Zde=Object.defineProperty,Yde=Object.getOwnPropertyDescriptor,Xde=Object.getOwnPropertyNames,Qde=Object.prototype.hasOwnProperty,Jde=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xde(e))!Qde.call(o,n)&&n!==t&&Zde(o,n,{get:()=>e[n],enumerable:!(i=Yde(e,n))||i.enumerable});return o},ece=(o,e,t)=>(Jde(o,e,"default"),t),Ym={};ece(Ym,j0);var T6={},dD={},R6=class{static getOrCreate(o){return dD[o]||(dD[o]=new R6(o)),dD[o]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(o){this._languageId=o,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,T6[this._languageId].loader().then(o=>this._lazyLoadPromiseResolve(o),o=>this._lazyLoadPromiseReject(o))),this._lazyLoadPromise}};function ye(o){const e=o.id;T6[e]=o,Ym.languages.register(o);const t=R6.getOrCreate(e);Ym.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),Ym.languages.onLanguageEncountered(e,async()=>{const i=await t.load();Ym.languages.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>be(()=>import("./abap-CRCWOmpq.js"),[])});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>be(()=>import("./apex-DnsZk_dE.js"),[])});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>be(()=>import("./azcli-1IWB1ccx.js"),[])});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>be(()=>import("./bat-DPkNLes8.js"),[])});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>be(()=>import("./bicep-Corcdgou.js"),[])});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>be(()=>import("./cameligo-CGrWLZr3.js"),[])});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>be(()=>import("./clojure-D9WOWImG.js"),[])});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>be(()=>import("./coffee-B7EJu28W.js"),[])});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>be(()=>import("./cpp-BaF-TIV3.js"),[])});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>be(()=>import("./cpp-BaF-TIV3.js"),[])});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>be(()=>import("./csharp-BoL64M5l.js"),[])});ye({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>be(()=>import("./csp-C46ZqvIl.js"),[])});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>be(()=>import("./css-DQU6DXDx.js"),[])});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>be(()=>import("./cypher-D84EuPTj.js"),[])});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>be(()=>import("./dart-D8lhlL1r.js"),[])});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>be(()=>import("./dockerfile-DLk6rpji.js"),[])});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>be(()=>import("./ecl-BO6FnfXk.js"),[])});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>be(()=>import("./elixir-BRjLKONM.js"),[])});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>be(()=>import("./flow9-Cac8vKd7.js"),[])});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>be(()=>import("./fsharp-fd1GTHhf.js"),[])});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>be(()=>import("./freemarker2-CtIurkuU.js"),__vite__mapDeps([0,1,2,3])).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>be(()=>import("./go-O9LJTZXk.js"),[])});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>be(()=>import("./graphql-LQdxqEYJ.js"),[])});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>be(()=>import("./handlebars-sthQLz2Z.js"),__vite__mapDeps([4,1,2,3]))});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>be(()=>import("./hcl-DxDQ3s82.js"),[])});ye({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:()=>be(()=>import("./html-DM9e-U-z.js"),__vite__mapDeps([5,1,2,3]))});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>be(()=>import("./ini-BvajGCUy.js"),[])});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>be(()=>import("./java-SYsfObOQ.js"),[])});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>be(()=>import("./javascript-C-rqiNxS.js"),__vite__mapDeps([6,7,1,2,3]))});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>be(()=>import("./julia-DQXNmw_w.js"),[])});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>be(()=>import("./kotlin-qQ0MG-9I.js"),[])});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>be(()=>import("./less-GGFNNJHn.js"),[])});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>be(()=>import("./lexon-Canl7DCW.js"),[])});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>be(()=>import("./lua-D28Ae8-K.js"),[])});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>be(()=>import("./liquid-C7Pz5ZI3.js"),__vite__mapDeps([8,1,2,3]))});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>be(()=>import("./m3-DPitgjJI.js"),[])});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>be(()=>import("./markdown-B811l8j2.js"),[])});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>be(()=>import("./mdx-B00F0-De.js"),__vite__mapDeps([9,1,2,3]))});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>be(()=>import("./mips-CdjsipkG.js"),[])});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>be(()=>import("./msdax-CYqgjx_P.js"),[])});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>be(()=>import("./mysql-BHd6q0vd.js"),[])});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>be(()=>import("./objective-c-B1aVtJYH.js"),[])});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>be(()=>import("./pascal-BhNW15KB.js"),[])});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>be(()=>import("./pascaligo-5jv8CcQD.js"),[])});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>be(()=>import("./perl-DlYyT36c.js"),[])});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>be(()=>import("./pgsql-Dy0bjov7.js"),[])});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>be(()=>import("./php-120yhfDK.js"),[])});ye({id:"pla",extensions:[".pla"],loader:()=>be(()=>import("./pla-CjnFlu4u.js"),[])});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>be(()=>import("./postiats-CQpG440k.js"),[])});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>be(()=>import("./powerquery-DdJtto1Z.js"),[])});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>be(()=>import("./powershell-Bu_VLpJB.js"),[])});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>be(()=>import("./protobuf-IBS6jZEB.js"),[])});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>be(()=>import("./pug-kFxLfcjb.js"),[])});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>be(()=>import("./python-CBWCROMG.js"),__vite__mapDeps([10,1,2,3]))});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>be(()=>import("./qsharp-gaqVKiJ_.js"),[])});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>be(()=>import("./r-BIFz-_sK.js"),[])});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>be(()=>import("./razor-BxsnWZFP.js"),__vite__mapDeps([11,1,2,3]))});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>be(()=>import("./redis-CHOsPHWR.js"),[])});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>be(()=>import("./redshift-CBifECDb.js"),[])});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>be(()=>import("./restructuredtext-CghPJEOS.js"),[])});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>be(()=>import("./ruby-CYWGW-b1.js"),[])});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>be(()=>import("./rust-DMDD0SHb.js"),[])});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>be(()=>import("./sb-BYAiYHFx.js"),[])});ye({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:()=>be(()=>import("./scala-Bqvq8jcR.js"),[])});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>be(()=>import("./scheme-Dhb-2j9p.js"),[])});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>be(()=>import("./scss-CTwUZ5N7.js"),[])});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>be(()=>import("./shell-CsDZo4DB.js"),[])});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>be(()=>import("./solidity-CME5AdoB.js"),[])});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>be(()=>import("./sophia-RYC1BQQz.js"),[])});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>be(()=>import("./sparql-KEyrF7De.js"),[])});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>be(()=>import("./sql-BdTr02Mf.js"),[])});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>be(()=>import("./st-C7iG7M4S.js"),[])});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>be(()=>import("./swift-D7IUmUK8.js"),[])});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>be(()=>import("./systemverilog-DgMryOEJ.js"),[])});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>be(()=>import("./systemverilog-DgMryOEJ.js"),[])});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>be(()=>import("./tcl-PloMZuKG.js"),[])});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>be(()=>import("./twig-BfRIq3la.js"),[])});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>be(()=>import("./typescript-Bq9U0L_Y.js"),__vite__mapDeps([7,1,2,3]))});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>be(()=>import("./vb-BwAE3J76.js"),[])});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>be(()=>import("./wgsl-B_1kOXbF.js"),[])});ye({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:()=>be(()=>import("./xml-pmw-kWy1.js"),__vite__mapDeps([12,1,2,3]))});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>be(()=>import("./yaml-DUYUU1_r.js"),__vite__mapDeps([13,1,2,3]))});var tce=Object.defineProperty,ice=Object.getOwnPropertyDescriptor,nce=Object.getOwnPropertyNames,sce=Object.prototype.hasOwnProperty,oce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of nce(e))!sce.call(o,n)&&n!==t&&tce(o,n,{get:()=>e[n],enumerable:!(i=ice(e,n))||i.enumerable});return o},rce=(o,e,t)=>(oce(o,e,"default"),t),$p={};rce($p,j0);var wM=class{_onDidChange=new $p.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)}},SM={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}},yM={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},M6=new wM("css",SM,yM),A6=new wM("scss",SM,yM),P6=new wM("less",SM,yM);$p.languages.css={cssDefaults:M6,lessDefaults:P6,scssDefaults:A6};function LM(){return be(()=>import("./cssMode-hgwruqj4.js"),__vite__mapDeps([14,1,2,3]))}$p.languages.onLanguage("less",()=>{LM().then(o=>o.setupMode(P6))});$p.languages.onLanguage("scss",()=>{LM().then(o=>o.setupMode(A6))});$p.languages.onLanguage("css",()=>{LM().then(o=>o.setupMode(M6))});var ace=Object.defineProperty,lce=Object.getOwnPropertyDescriptor,dce=Object.getOwnPropertyNames,cce=Object.prototype.hasOwnProperty,hce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of dce(e))!cce.call(o,n)&&n!==t&&ace(o,n,{get:()=>e[n],enumerable:!(i=lce(e,n))||i.enumerable});return o},uce=(o,e,t)=>(hce(o,e,"default"),t),Ay={};uce(Ay,j0);var fce=class{_onDidChange=new Ay.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)}},gce={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"},Py={format:gce,suggest:{},data:{useDefaultDataProvider:!0}};function Oy(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===L_,documentFormattingEdits:o===L_,documentRangeFormattingEdits:o===L_}}var L_="html",UF="handlebars",$F="razor",O6=Fy(L_,Py,Oy(L_)),pce=O6.defaults,F6=Fy(UF,Py,Oy(UF)),mce=F6.defaults,B6=Fy($F,Py,Oy($F)),_ce=B6.defaults;Ay.languages.html={htmlDefaults:pce,razorDefaults:_ce,handlebarDefaults:mce,htmlLanguageService:O6,handlebarLanguageService:F6,razorLanguageService:B6,registerHTMLLanguageService:Fy};function vce(){return be(()=>import("./htmlMode-HvTeKP_c.js"),__vite__mapDeps([15,1,2,3]))}function Fy(o,e=Py,t=Oy(o)){const i=new fce(o,e,t);let n;const s=Ay.languages.onLanguage(o,async()=>{n=(await vce()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n?.dispose(),n=void 0}}}var bce=Object.defineProperty,Cce=Object.getOwnPropertyDescriptor,wce=Object.getOwnPropertyNames,Sce=Object.prototype.hasOwnProperty,yce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of wce(e))!Sce.call(o,n)&&n!==t&&bce(o,n,{get:()=>e[n],enumerable:!(i=Cce(e,n))||i.enumerable});return o},Lce=(o,e,t)=>(yce(o,e,"default"),t),K0={};Lce(K0,j0);var xce=class{_onDidChange=new K0.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)}},Dce={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},kce={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},W6=new xce("json",Dce,kce);K0.languages.json={jsonDefaults:W6};function Ice(){return be(()=>import("./jsonMode-BJ3x3raR.js"),__vite__mapDeps([16,1,2,3]))}K0.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});K0.languages.onLanguage("json",()=>{Ice().then(o=>o.setupMode(W6))});var Ece=Object.defineProperty,Nce=Object.getOwnPropertyDescriptor,Tce=Object.getOwnPropertyNames,Rce=Object.prototype.hasOwnProperty,Mce=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Tce(e))!Rce.call(o,n)&&n!==t&&Ece(o,n,{get:()=>e[n],enumerable:!(i=Nce(e,n))||i.enumerable});return o},Ace=(o,e,t)=>(Mce(o,e,"default"),t),Pce="5.0.2",mp={};Ace(mp,j0);var V6=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(V6||{}),H6=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(H6||{}),z6=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(z6||{}),U6=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(U6||{}),$6=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))($6||{}),j6=class{_onDidChange=new mp.Emitter;_onDidExtraLibsChange=new mp.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;_modeConfiguration;constructor(o,e,t,i,n){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(o,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===o)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},Oce=Pce,K6={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},q6=new j6({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},K6),G6=new j6({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},K6),Fce=()=>By().then(o=>o.getTypeScriptWorker()),Bce=()=>By().then(o=>o.getJavaScriptWorker());mp.languages.typescript={ModuleKind:V6,JsxEmit:H6,NewLineKind:z6,ScriptTarget:U6,ModuleResolutionKind:$6,typescriptVersion:Oce,typescriptDefaults:q6,javascriptDefaults:G6,getTypeScriptWorker:Fce,getJavaScriptWorker:Bce};function By(){return be(()=>import("./tsMode-dvsmiEdm.js"),__vite__mapDeps([17,1,2,3]))}mp.languages.onLanguage("typescript",()=>By().then(o=>o.setupTypeScript(q6)));mp.languages.onLanguage("javascript",()=>By().then(o=>o.setupJavaScript(G6)));class Wce extends fo{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:g("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:oe.map,toggled:Z.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Z.has("isInDiffEditor"),menu:{when:Z.has("isInDiffEditor"),id:k.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(st),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}jt(Wce);class Z6 extends fo{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:g("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:Z.has("isInDiffEditor")})}run(e,...t){const i=e.get(st),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}jt(Z6);class Y6 extends fo{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:g("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:Z.has("isInDiffEditor")})}run(e,...t){const i=e.get(st),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}jt(Y6);hn.appendMenuItem(k.EditorTitle,{command:{id:new Y6().desc.id,title:g("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Z.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Z.has("isInDiffEditor")},order:11,group:"1_diff",when:Z.and(E.diffEditorRenderSideBySideInlineBreakpointReached,Z.has("isInDiffEditor"))});hn.appendMenuItem(k.EditorTitle,{command:{id:new Z6().desc.id,title:g("showMoves","Show Moved Code Blocks"),icon:oe.move,toggled:Mp.create("config.diffEditor.experimental.showMoves",!0),precondition:Z.has("isInDiffEditor")},order:10,group:"1_diff",when:Z.has("isInDiffEditor")});const Wy={value:g("diffEditor","Diff Editor"),original:"Diff Editor"};class Vce extends oa{constructor(){super({id:"diffEditor.switchSide",title:{value:g("switchSide","Switch Side"),original:"Switch Side"},icon:oe.arrowSwap,precondition:Z.has("isInDiffEditor"),f1:!0,category:Wy})}runEditorCommand(e,t,i){const n=Kp(e);if(n instanceof yu){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}jt(Vce);class Hce extends oa{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:g("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:oe.close,precondition:E.comparingMovedCode,f1:!1,category:Wy,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=Kp(e);n instanceof yu&&n.exitCompareMove()}}jt(Hce);class zce extends oa{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:g("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:oe.fold,precondition:Z.has("isInDiffEditor"),f1:!0,category:Wy})}runEditorCommand(e,t,...i){const n=Kp(e);n instanceof yu&&n.collapseAllUnchangedRegions()}}jt(zce);class Uce extends oa{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:g("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:oe.unfold,precondition:Z.has("isInDiffEditor"),f1:!0,category:Wy})}runEditorCommand(e,t,...i){const n=Kp(e);n instanceof yu&&n.showAllUnchangedRegions()}}jt(Uce);const X6={value:g("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class jp extends fo{constructor(){super({id:jp.id,title:{value:g("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:X6,precondition:Z.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=Kp(e);t?.accessibleDiffViewerNext()}}jp.id="editor.action.accessibleDiffViewer.next";hn.appendMenuItem(k.EditorTitle,{command:{id:jp.id,title:g("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Z.has("isInDiffEditor")},order:10,group:"2_diff",when:Z.and(E.accessibleDiffViewerVisible.negate(),Z.has("isInDiffEditor"))});class q0 extends fo{constructor(){super({id:q0.id,title:{value:g("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:X6,precondition:Z.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=Kp(e);t?.accessibleDiffViewerPrev()}}q0.id="editor.action.accessibleDiffViewer.prev";function Kp(o){var e;const t=o.get(_t),i=t.listDiffEditors(),n=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!n)return null;for(let r=0,a=i.length;r<a;r++){const l=i[r];if(l.getModifiedEditor().getId()===n.getId()||l.getOriginalEditor().getId()===n.getId())return l}const s=rr();if(s)for(const r of i){const a=r.getContainerDomNode();if($ce(a,s))return r}return null}function $ce(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}lt.registerCommandAlias("editor.action.diffReview.next",jp.id);jt(jp);lt.registerCommandAlias("editor.action.diffReview.prev",q0.id);jt(q0);var jce=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kce=function(o,e){return function(t,i){e(t,i,o)}},Vy=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},uN;const Hy=new ce("selectionAnchorSet",!1);let ad=uN=class{static get(e){return e.getContribution(uN.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Hy.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(ve.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new xn().appendText(g("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),On(g("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(ve.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()}};ad.ID="editor.contrib.selectionAnchorController";ad=uN=jce([Kce(1,Ae)],ad);class qce extends fe{constructor(){super({id:"editor.action.setSelectionAnchor",label:g("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:Pi(2089,2080),weight:100}})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class Gce extends fe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:g("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Hy})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class Zce extends fe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:g("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Hy,kbOpts:{kbExpr:E.editorTextFocus,primary:Pi(2089,2089),weight:100}})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class Yce extends fe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:g("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Hy,kbOpts:{kbExpr:E.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return Vy(this,void 0,void 0,function*(){(i=ad.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}ft(ad.ID,ad,4);ie(qce);ie(Gce);ie(Zce);ie(Yce);const Xce=T("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},g("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Qce extends fe{constructor(){super({id:"editor.action.jumpToBracket",label:g("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=ar.get(t))===null||i===void 0||i.jumpToBracket()}}class Jce extends fe{constructor(){super({id:"editor.action.selectToBracket",label:g("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 s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=ar.get(t))===null||n===void 0||n.selectToBracket(s)}}class ehe extends fe{constructor(){super({id:"editor.action.removeBrackets",label:g("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=ar.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class the{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class ar extends H{static get(e){return e.getContribution(ar.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Dt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),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(i=>{const n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new ve(r.lineNumber,r.column,r.lineNumber,r.column):new ve(n.lineNumber,n.column,n.lineNumber,n.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 s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(L.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new ve(a.lineNumber,a.column,l.lineNumber,l.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 s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")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()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h<u;h++){const f=e[h];f.isEmpty()&&(s[r++]=f.getStartPosition())}s.length>1&&s.sort(P.compare);const a=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const f=s[h];for(;d<c&&n[d].position.isBefore(f);)d++;if(d<c&&n[d].position.equals(f))a[l++]=n[d];else{let p=t.bracketPairs.matchBracket(f,20),m=ar._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!p&&this._matchBrackets==="always"&&(p=t.bracketPairs.findEnclosingBrackets(f,20),m=ar._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new the(f,p,m)}}this._lastBracketsData=a,this._lastVersionId=i}}ar.ID="editor.contrib.bracketMatchingController";ar._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Ve.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ti(Xce),position:lo.Center}});ar._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Ve.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});ft(ar.ID,ar,1);ie(Jce);ie(Qce);ie(ehe);hn.appendMenuItem(k.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:g({},"Go to &&Bracket")},order:2});class ihe{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,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new L(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,s,i,s),a)}else{const r=new L(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new L(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new ve(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ve(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class Q6 extends fe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new ihe(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class nhe extends Q6{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:g("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:E.writable})}}class she extends Q6{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:g("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:E.writable})}}ie(nhe);ie(she);class ohe extends fe{constructor(){super({id:"editor.action.transposeLetters",label:g("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:E.writable,kbOpts:{kbExpr:E.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;const c=l===d?r.getPosition():Ct.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=Ct.leftPosition(i,c),u=Ct.leftPosition(i,h),f=i.getValueInRange(L.fromPositions(u,h)),p=i.getValueInRange(L.fromPositions(h,c)),m=L.fromPositions(u,c);n.push(new wn(m,p+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}ie(ohe);var rhe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const xu="9_cutcopypaste",ahe=Za||document.queryCommandSupported("cut"),J6=Za||document.queryCommandSupported("copy"),lhe=typeof navigator.clipboard>"u"||Mo?document.queryCommandSupported("paste"):!0;function xM(o){return o.register(),o}const dhe=ahe?xM(new Pp({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Za?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:g({},"Cu&&t"),order:1},{menuId:k.EditorContext,group:xu,title:g("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1},{menuId:k.CommandPalette,group:"",title:g("actions.clipboard.cutLabel","Cut"),order:1},{menuId:k.SimpleEditorContext,group:xu,title:g("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1}]})):void 0,che=J6?xM(new Pp({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Za?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:g({},"&&Copy"),order:2},{menuId:k.EditorContext,group:xu,title:g("actions.clipboard.copyLabel","Copy"),order:2},{menuId:k.CommandPalette,group:"",title:g("actions.clipboard.copyLabel","Copy"),order:1},{menuId:k.SimpleEditorContext,group:xu,title:g("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;hn.appendMenuItem(k.MenubarEditMenu,{submenu:k.MenubarCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});hn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextCopy,title:{value:g("copy as","Copy As"),original:"Copy As"},group:xu,order:3});hn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1,when:Z.and(Z.notEquals("resourceScheme","output"),E.editorTextFocus)});hn.appendMenuItem(k.EditorTitleContext,{submenu:k.EditorTitleContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});hn.appendMenuItem(k.ExplorerContext,{submenu:k.ExplorerContextShare,title:{value:g("share","Share"),original:"Share"},group:"11_share",order:-1});const cD=lhe?xM(new Pp({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Za?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:g({},"&&Paste"),order:4},{menuId:k.EditorContext,group:xu,title:g("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4},{menuId:k.CommandPalette,group:"",title:g("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:k.SimpleEditorContext,group:xu,title:g("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4}]})):void 0;class hhe extends fe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:g("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(_I.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),_I.forceCopyWithSyntaxHighlighting=!1)}}function eW(o,e){o&&(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(_t).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(37),r=n.getSelection();return r&&r.isEmpty()&&!s||n.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(MS().execCommand(e),!0)))}eW(dhe,"cut");eW(che,"copy");cD&&(cD.addImplementation(1e4,"code-editor",(o,e)=>{const t=o.get(_t),i=o.get(gd),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!n.getContainerDomNode().ownerDocument.execCommand("paste")&&Kc?rhe(void 0,void 0,void 0,function*(){const r=yield i.readText();if(r!==""){const a=hv.INSTANCE.get(r);let l=!1,d=null,c=null;a&&(l=n.getOption(37)&&!!a.isFromEmptySelection,d=typeof a.multicursorText<"u"?a.multicursorText:null,c=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:d,mode:c})}}):!0:!1}),cD.addImplementation(0,"generic-dom",(o,e)=>(MS().execCommand("paste"),!0)));J6&&ie(hhe);var uhe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class Ne{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+Ne.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Ne(this.value+Ne.sep+e)}}Ne.sep=".";Ne.None=new Ne("@@none@@");Ne.Empty=new Ne("");Ne.QuickFix=new Ne("quickfix");Ne.Refactor=new Ne("refactor");Ne.RefactorExtract=Ne.Refactor.append("extract");Ne.RefactorInline=Ne.Refactor.append("inline");Ne.RefactorMove=Ne.Refactor.append("move");Ne.RefactorRewrite=Ne.Refactor.append("rewrite");Ne.Notebook=new Ne("notebook");Ne.Source=new Ne("source");Ne.SourceOrganizeImports=Ne.Source.append("organizeImports");Ne.SourceFixAll=Ne.Source.append("fixAll");Ne.SurroundWith=Ne.Refactor.append("surround");var Vs;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(Vs||(Vs={}));function fhe(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>tW(e,t,o.include))||!o.includeSourceActions&&Ne.Source.contains(e))}function ghe(o,e){const t=e.kind?new Ne(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>tW(t,i,o.include))||!o.includeSourceActions&&t&&Ne.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function tW(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class Ra{static fromUser(e,t){return!e||typeof e!="object"?new Ra(t.kind,t.apply,!1):new Ra(Ra.getKindFromUser(e,t.kind),Ra.getApplyFromUser(e,t.apply),Ra.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Ne(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class phe{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}resolve(e){var t;return uhe(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Ni(n)}i&&(this.action.edit=i.edit)}return this})}}var zw=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const iW="editor.action.codeAction",DM="editor.action.quickFix",nW="editor.action.autoFix",sW="editor.action.refactor",oW="editor.action.sourceAction",kM="editor.action.organizeImports",IM="editor.action.fixAll";class x_ extends H{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return Fn(e.diagnostics)?Fn(t.diagnostics)?x_.codeActionsPreferredComparator(e,t):-1:Fn(t.diagnostics)?1:x_.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(x_.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Ne.QuickFix.contains(new Ne(e.kind))&&!!e.isPreferred)}}const jF={actions:[],documentation:void 0};function D_(o,e,t,i,n,s){var r;return zw(this,void 0,void 0,function*(){const a=i.filter||{},l=Object.assign(Object.assign({},a),{excludes:[...a.excludes||[],Ne.Notebook]}),d={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new bM(e,s),h=i.type===2,u=mhe(o,e,h?l:a),f=new X,p=u.map(v=>zw(this,void 0,void 0,function*(){try{n.report(v);const _=yield v.provideCodeActions(e,t,d,c.token);if(_&&f.add(_),c.token.isCancellationRequested)return jF;const b=(_?.actions||[]).filter(w=>w&&ghe(a,w)),C=vhe(v,b,a.include);return{actions:b.map(w=>new phe(w,v)),documentation:C}}catch(_){if(sa(_))throw _;return Ni(_),jF}})),m=o.onDidChange(()=>{const v=o.all(e);mi(v,u)||c.cancel()});try{const v=yield Promise.all(p),_=v.map(C=>C.actions).flat(),b=[...Ga(v.map(C=>C.documentation)),..._he(o,e,i,_)];return new x_(_,b,f)}finally{m.dispose(),c.dispose()}})}function mhe(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>fhe(t,new Ne(n))):!0)}function*_he(o,e,t,i){var n,s,r;if(e&&i.length)for(const a of o.all(e))a._getAdditionalMenuItems&&(yield*(n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.call(a,{trigger:t.type,only:(r=(s=t.filter)===null||s===void 0?void 0:s.include)===null||r===void 0?void 0:r.value},i.map(l=>l.action)))}function vhe(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Ne(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n?.command}for(const n of e)if(n.kind){for(const s of i)if(s.kind.contains(new Ne(n.kind)))return s.command}}var Uw;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions"})(Uw||(Uw={}));function bhe(o,e,t,i,n=Qe.None){var s;return zw(this,void 0,void 0,function*(){const r=o.get(P0),a=o.get(li),l=o.get(go),d=o.get(Li);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(n),!n.isCancellationRequested&&!(!((s=e.action.edit)===null||s===void 0)&&s.edits.length&&!(yield r.apply(e.action.edit,{editor:i?.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Uw.OnSave,showPreview:i?.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const h=Che(c);d.error(typeof h=="string"?h:g("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Che(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}lt.registerCommand("_executeCodeActionProvider",function(o,e,t,i,n){return zw(this,void 0,void 0,function*(){if(!(e instanceof ke))throw No();const{codeActionProvider:s}=o.get(pe),r=o.get(Zt).getModel(e);if(!r)throw No();const a=ve.isISelection(t)?ve.liftSelection(t):L.isIRange(t)?r.validateRange(t):void 0;if(!a)throw No();const l=typeof i=="string"?new Ne(i):void 0,d=yield D_(s,r,a,{type:1,triggerAction:Vs.Default,filter:{includeSourceActions:!0,include:l}},Jl.None,Qe.None),c=[],h=Math.min(d.validActions.length,typeof n=="number"?n:0);for(let u=0;u<h;u++)c.push(d.validActions[u].resolve(Qe.None));try{return yield Promise.all(c),d.validActions.map(u=>u.action)}finally{setTimeout(()=>d.dispose(),100)}})});var whe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},She=function(o,e){return function(t,i){e(t,i,o)}},fN;let $w=fN=class{constructor(e){this.keybindingService=e}getResolver(){const e=new Zc(()=>this.keybindingService.getKeybindings().filter(t=>fN.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===kM?i={kind:Ne.SourceOrganizeImports.value}:t.command===IM&&(i={kind:Ne.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Ra.fromUser(i,{kind:Ne.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i?.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Ne(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}};$w.codeActionCommands=[sW,iW,oW,kM,IM];$w=fN=whe([She(0,Et)],$w);T("symbolIcon.arrayForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.booleanForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.colorForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.constantForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},g("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.fileForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.folderForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.keyForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.keywordForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},g("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.moduleForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.namespaceForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.nullForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.numberForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.objectForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.operatorForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.packageForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.propertyForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.referenceForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.snippetForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.stringForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.structForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.textForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.typeParameterForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.unitForeground",{dark:se,light:se,hcDark:se,hcLight:se},g("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));T("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},g("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const rW=Object.freeze({kind:Ne.Empty,title:g("codeAction.widget.id.more","More Actions...")}),yhe=Object.freeze([{kind:Ne.QuickFix,title:g("codeAction.widget.id.quickfix","Quick Fix")},{kind:Ne.RefactorExtract,title:g("codeAction.widget.id.extract","Extract"),icon:oe.wrench},{kind:Ne.RefactorInline,title:g("codeAction.widget.id.inline","Inline"),icon:oe.wrench},{kind:Ne.RefactorRewrite,title:g("codeAction.widget.id.convert","Rewrite"),icon:oe.wrench},{kind:Ne.RefactorMove,title:g("codeAction.widget.id.move","Move"),icon:oe.wrench},{kind:Ne.SurroundWith,title:g("codeAction.widget.id.surround","Surround With"),icon:oe.symbolSnippet},{kind:Ne.Source,title:g("codeAction.widget.id.source","Source Action"),icon:oe.symbolFile},rW]);function Lhe(o,e,t){if(!e)return o.map(s=>{var r;return{kind:"action",item:s,group:rW,disabled:!!s.action.disabled,label:s.action.disabled||s.action.title,canPreview:!!(!((r=s.action.edit)===null||r===void 0)&&r.edits.length)}});const i=yhe.map(s=>({group:s,actions:[]}));for(const s of o){const r=s.action.kind?new Ne(s.action.kind):Ne.None;for(const a of i)if(a.group.kind.contains(r)){a.actions.push(s);break}}const n=[];for(const s of i)if(s.actions.length){n.push({kind:"header",group:s.group});for(const r of s.actions)n.push({kind:"action",item:r,group:s.group,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}return n}var xhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Dhe=function(o,e){return function(t,i){e(t,i,o)}},gN,lg;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})(lg||(lg={}));let Du=gN=class extends H{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new A),this.onClick=this._onClick.event,this._state=lg.Hidden,this._domNode=ee("div.lightBulbWidget"),this._register(Nt.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const n=this._editor.getModel();(this.state.type!==1||!n||this.state.editorPosition.lineNumber>=n.getLineCount())&&this.hide()})),this._register(nj(this._domNode,i=>{if(this.state.type!==1)return;this._editor.focus(),i.preventDefault();const{top:n,height:s}=Ai(this._domNode),r=this._editor.getOption(66);let a=Math.floor(r/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(a+=r),this._onClick.fire({x:i.posx,y:n+s+a,actions:this.state.actions,trigger:this.state.trigger})})),this._register($(this._domNode,"mouseenter",i=>{(i.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(de.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var i,n,s,r;this._preferredKbLabel=(n=(i=t.lookupKeybinding(nW))===null||i===void 0?void 0:i.getLabel())!==null&&n!==void 0?n:void 0,this._quickFixKbLabel=(r=(s=t.lookupKeybinding(DM))===null||s===void 0?void 0:s.getLabel())!==null&&r!==void 0?r:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,d=n.get(50),c=s.getLineContent(r),h=ty(c,l),u=d.spaceWidth*h>22,f=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let p=r;if(!u){if(r>1&&!f(r-1))p-=1;else if(!f(r+1))p+=1;else if(a*d.spaceWidth<22)return this.hide()}this.state=new lg.Showing(e,t,i,{position:{lineNumber:p,column:1},preference:gN._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==lg.Hidden&&(this.state=lg.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...Ie.asClassNameArray(oe.lightBulb)),this._domNode.classList.add(...Ie.asClassNameArray(oe.lightbulbAutofix)),this._preferredKbLabel)){this.title=g("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...Ie.asClassNameArray(oe.lightbulbAutofix)),this._domNode.classList.add(...Ie.asClassNameArray(oe.lightBulb)),this._quickFixKbLabel?this.title=g("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=g("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};Du.ID="editor.contrib.lightbulbWidget";Du._posPref=[0];Du=gN=xhe([Dhe(1,Et)],Du);var khe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},KF=function(o,e){return function(t,i){e(t,i,o)}},aW=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},pN;let ld=pN=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new A,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new X,s=n.add(fy(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i));return s.element.classList.add("rendered-markdown"),{element:s.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,n)=>aW(this,void 0,void 0,function*(){var s,r,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageId()),l||(l=ro);const d=yield Mee(this._languageService,n,l),c=document.createElement("span");if(c.innerHTML=(a=(r=pN._ttpTokenizer)===null||r===void 0?void 0:r.createHTML(d))!==null&&a!==void 0?a:d,this._options.editor){const h=this._options.editor.getOption(50);kn(c,h)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>lW(this._openerService,i,e.isTrusted),disposables:t}}}};ld._ttpTokenizer=dd("tokenizeToString",{createHTML(o){return o}});ld=pN=khe([KF(1,qt),KF(2,zs)],ld);function lW(o,e,t){return aW(this,void 0,void 0,function*(){try{return yield o.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Ihe(t)})}catch(i){return He(i),!1}})}function Ihe(o){return o===!0?!0:o&&Array.isArray(o.enabledCommands)?o.enabledCommands:!1}var Ehe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qF=function(o,e){return function(t,i){e(t,i,o)}},s1;let Fs=s1=class{static get(e){return e.getContribution(s1.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new pn,this._messageListeners=new X,this._mouseOverMessage=!1,this._editor=e,this._visible=s1.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){On(ac(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=ac(e)?fy(e,{actionHandler:{callback:n=>lW(this._openerService,n,ac(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new GF(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(de.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Dn(rr(),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($(this._messageWidget.value.getDomNode(),ae.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add($(this._messageWidget.value.getDomNode(),ae.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new L(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(GF.fadeOut(this._messageWidget.value))}};Fs.ID="editor.contrib.messageController";Fs.MESSAGE_VISIBLE=new ce("messageVisible",!1,g("messageVisible","Whether the editor is currently showing an inline message"));Fs=s1=Ehe([qF(1,Ae),qF(2,zs)],Fs);const Nhe=tn.bindToContribution(Fs.get);re(new Nhe({id:"leaveEditorMessage",precondition:Fs.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let GF=class{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 s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};ft(Fs.ID,Fs,4);var dW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mN=function(o,e){return function(t,i){e(t,i,o)}},The=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const cW="acceptSelectedCodeAction",hW="previewSelectedCodeAction";class Rhe{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,s;i.text.textContent=(s=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&s!==void 0?s:""}disposeTemplate(e){}}let _N=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");i.className="title",e.append(i);const n=new V0(e,to);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){var n,s,r;if(!((n=e.group)===null||n===void 0)&&n.icon?(i.icon.className=Ie.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=he(e.group.icon.color.id))):(i.icon.className=Ie.asClassName(oe.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=uW(e.label),i.keybinding.set(e.keybinding),gj(!!e.keybinding,i.keybinding.element);const a=(s=this._keybindingService.lookupKeybinding(cW))===null||s===void 0?void 0:s.getLabel(),l=(r=this._keybindingService.lookupKeybinding(hW))===null||r===void 0?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?i.container.title=g({},"{0} to apply, {1} to preview",a,l):i.container.title=g({},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};_N=dW([mN(1,Et)],_N);class Mhe extends UIEvent{constructor(){super("acceptSelectedAction")}}class ZF extends UIEvent{constructor(){super("previewSelectedAction")}}function Ahe(o){if(o.kind==="action")return o.label}let vN=class extends H{constructor(e,t,i,n,s,r){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=r,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Si),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new mr(e,this.domNode,a,[new _N(t,this._keybindingService),new Rhe],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Ahe},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let d=l.label?uW(l?.label):"";return l.disabled&&(d=g({},"{0}, Disabled Reason: {1}",d,l.disabled)),d}return null},getWidgetAriaLabel:()=>g({},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Xu),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(d=>d.kind==="header").length,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);const s=this._allMenuItems.map((d,c)=>{const h=document.getElementById(this._list.getElementID(c));if(h){h.style.width="auto";const u=h.getBoundingClientRect().width;return h.style.width="",u}return 0}),r=Math.max(...s,e),l=Math.min(n,document.body.clientHeight*.7);return this._list.layout(l,r),this.domNode.style.height=`${l}px`,this._list.domFocus(),r}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(t.length===0)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new ZF:new Mhe;this._list.setSelection([i],s)}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 ZF):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,s.item)}onListHover(e){return The(this,void 0,void 0,function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const i=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])})}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};vN=dW([mN(4,hd),mN(5,Et)],vN);function uW(o){return o.replace(/\r\n|\r|\n/g," ")}var Phe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hD=function(o,e){return function(t,i){e(t,i,o)}};T("actionBar.toggledBackground",{dark:zh,light:zh,hcDark:zh,hcLight:zh},g("actionBar.toggledBackground","Background color for toggled action items in action bar."));const ku={Visible:new ce("codeActionMenuVisible",!1,g("codeActionMenuVisible","Whether the action widget list is visible"))},nf=et("actionWidgetService");let Iu=class extends H{get isVisible(){return ku.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new pn)}show(e,t,i,n,s,r,a){const l=ku.Visible.bindTo(this._contextKeyService),d=this._instantiationService.createInstance(vN,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:c=>(l.set(!0),this._renderWidget(c,d,a??[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},r,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||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)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const r=new X,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),r.add($(l,ae.MOUSE_DOWN,p=>p.stopPropagation()));const d=document.createElement("div"),c=e.appendChild(d);c.classList.add("context-view-pointerBlock"),r.add($(c,ae.POINTER_MOVE,()=>c.remove())),r.add($(c,ae.MOUSE_DOWN,()=>c.remove()));let h=0;if(i.length){const p=this._createActionBar(".action-widget-action-bar",i);p&&(s.appendChild(p.getContainer().parentElement),r.add(p),h=p.getContainer().offsetWidth)}const u=(n=this._list.value)===null||n===void 0?void 0:n.layout(h);s.style.width=`${u}px`;const f=r.add(Qa(e));return r.add(f.onDidBlur(()=>this.hide())),r}_createActionBar(e,t){if(!t.length)return;const i=ee(e),n=new Wo(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};Iu=Phe([hD(0,hd),hD(1,Ae),hD(2,Re)],Iu);dt(nf,Iu,1);const G0=1100;jt(class extends fo{constructor(){super({id:"hideCodeActionWidget",title:{value:g("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:ku.Visible,keybinding:{weight:G0,primary:9,secondary:[1033]}})}run(o){o.get(nf).hide()}});jt(class extends fo{constructor(){super({id:"selectPrevCodeAction",title:{value:g("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:ku.Visible,keybinding:{weight:G0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const e=o.get(nf);e instanceof Iu&&e.focusPrevious()}});jt(class extends fo{constructor(){super({id:"selectNextCodeAction",title:{value:g("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:ku.Visible,keybinding:{weight:G0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const e=o.get(nf);e instanceof Iu&&e.focusNext()}});jt(class extends fo{constructor(){super({id:cW,title:{value:g("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:ku.Visible,keybinding:{weight:G0,primary:3,secondary:[2137]}})}run(o){const e=o.get(nf);e instanceof Iu&&e.acceptSelected()}});jt(class extends fo{constructor(){super({id:hW,title:{value:g("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:ku.Visible,keybinding:{weight:G0,primary:2051}})}run(o){const e=o.get(nf);e instanceof Iu&&e.acceptSelected(!0)}});var Ohe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const fW=new ce("supportedCodeAction","");class Fhe extends H{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new ur),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),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(i=>lR(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Vs.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:n,column:s}=i.getPosition(),r=t.getLineContent(n);if(r.length===0)return;if(s===1){if(/\s/.test(r[0]))return}else if(s===t.getLineMaxColumn(n)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[s-2])&&/\s/.test(r[s-1]))return}return i}}var Fh;(function(o){o.Empty={type:0};class e{constructor(i,n,s){this.trigger=i,this.position=n,this._cancellablePromise=s,this.type=1,this.actions=s.catch(r=>{if(sa(r))return gW;throw r})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(Fh||(Fh={}));const gW=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class Bhe extends H{constructor(e,t,i,n,s,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=r,this._codeActionOracle=this._register(new pn),this._state=Fh.Empty,this._onDidChangeState=this._register(new A),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=fW.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(Fh.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:t?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Fh.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(i=>{var n;return(n=i.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Fhe(this._editor,this._markerService,i=>{var n;if(!i){this.setState(Fh.Empty);return}const s=i.selection.getStartPosition(),r=Wi(a=>Ohe(this,void 0,void 0,function*(){var l,d,c,h,u,f;if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===Vs.QuickFix||!((d=(l=i.trigger.filter)===null||l===void 0?void 0:l.include)===null||d===void 0)&&d.contains(Ne.QuickFix))){const p=yield D_(this._registry,e,i.selection,i.trigger,Jl.None,a);if(a.isCancellationRequested)return gW;if(!((c=p.validActions)===null||c===void 0?void 0:c.some(v=>v.action.kind?Ne.QuickFix.contains(new Ne(v.action.kind)):!1))){const v=this._markerService.read({resource:e.uri});if(v.length>0){const _=i.selection.getPosition();let b=_,C=Number.MAX_VALUE,w=!1;for(const S of v){const D=S.endColumn,x=S.endLineNumber,I=S.startLineNumber;(x===_.lineNumber||I===_.lineNumber)&&Math.abs(_.column-D)<C&&(C=Math.abs(_.column-D),w=!0,b=new P(x,D))}if(w){const S={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:!((h=i.trigger.filter)===null||h===void 0)&&h.include?(u=i.trigger.filter)===null||u===void 0?void 0:u.include:Ne.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:((f=i.trigger.context)===null||f===void 0?void 0:f.notAvailableMessage)||"",position:b}},D=new ve(b.lineNumber,b.column,b.lineNumber,b.column),x=yield D_(this._registry,e,D,S,Jl.None,a),I=[...p.validActions];return x.validActions.length!==0&&(x.validActions.forEach(N=>{N.highlightRange=N.action.isPreferred}),I.push(...x.validActions)),{validActions:I,allActions:p.allActions,documentation:p.documentation,hasAutoFix:p.hasAutoFix,dispose:()=>{p.dispose()}}}}}}return D_(this._registry,e,i.selection,i.trigger,Jl.None,a)}));i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(r,250)),this.setState(new Fh.Triggered(i.trigger,s,r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Vs.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var Whe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vl=function(o,e){return function(t,i){e(t,i,o)}},Cm=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},o1;const Vhe="quickfix-edit-highlight";let Pc=o1=class extends H{static get(e){return e.getContribution(o1.ID)}constructor(e,t,i,n,s,r,a,l,d,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=d,this._instantiationService=c,this._activeCodeActions=this._register(new pn),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Bhe(this._editor,s.codeActionProvider,t,i,r,l)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new Zc(()=>{const h=this._editor.getContribution(Du.ID);return h&&this._register(h.onClick(u=>this.showCodeActionList(u.actions,u,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=n.createInstance($w),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 s;if(!this._editor.hasModel())return;(s=Fs.get(this._editor))===null||s===void 0||s.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return Cm(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(bhe,e,Uw.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Vs.QuickFix,filter:{}})}})}update(e){var t,i,n,s,r,a,l;return Cm(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let d;try{d=yield e.actions}catch(c){He(c);return}if(!this._disposed)if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(d,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.include){const h=this.tryGetValidActionToApply(e.trigger,d);if(h){try{(s=this._lightBulbWidget.value)===null||s===void 0||s.hide(),yield this._applyCodeAction(h,!1,!1)}finally{d.dispose()}return}if(e.trigger.context){const u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(u&&u.action.disabled){(r=Fs.get(this._editor))===null||r===void 0||r.showMessage(u.action.disabled,e.trigger.context.position),d.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!d.allActions.length||!c&&!d.validActions.length)){(l=Fs.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,d.dispose();return}this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i){return Cm(this,void 0,void 0,function*(){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=P.isIPosition(t)?this.toCoords(t):t,l={onSelect:(d,c)=>Cm(this,void 0,void 0,function*(){this._applyCodeAction(d,!0,!!c),this._actionWidgetService.hide(),n.clear()}),onHide:()=>{var d;(d=this._editor)===null||d===void 0||d.focus(),n.clear()},onHover:(d,c)=>Cm(this,void 0,void 0,function*(){var h;if(yield d.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((h=d.action.edit)===null||h===void 0)&&h.edits.length)}}),onFocus:d=>{var c,h;if(d&&d.highlightRange&&d.action.diagnostics){const u=[{range:d.action.diagnostics[0],options:o1.DECORATION}];n.set(u);const f=d.action.diagnostics[0],p=(h=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:f.startLineNumber,column:f.startColumn}))===null||h===void 0?void 0:h.word;Ic(g("editingNewSelection","Context: {0} at line {1} and column {2}.",p,f.startLineNumber,f.startColumn))}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Lhe(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,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=Ai(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t?.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map(s=>{var r;return{id:s.id,label:s.title,tooltip:(r=s.tooltip)!==null&&r!==void 0?r:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(s.id,...(a=s.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:g("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:g("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};Pc.ID="editor.contrib.codeActionController";Pc.DECORATION=Ve.register({description:"quickfix-highlight",className:Vhe});Pc=o1=Whe([vl(1,ul),vl(2,Ae),vl(3,Re),vl(4,pe),vl(5,Jc),vl(6,li),vl(7,st),vl(8,nf),vl(9,Re)],Pc);gr((o,e)=>{((n,s)=>{s&&e.addRule(`.monaco-editor ${n} { background-color: ${s}; }`)})(".quickfix-edit-highlight",o.getColor(Va));const i=o.getColor(jd);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Gr(o.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function Z0(o){return Z.regex(fW.keys()[0],new RegExp("(\\s|^)"+ao(o.value)+"\\b"))}const EM={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:g("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:g("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[g("args.schema.apply.first","Always apply the first returned code action."),g("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),g("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:g("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function sf(o,e,t,i,n=Vs.Default){if(o.hasModel()){const s=Pc.get(o);s?.manualTriggerAtCurrentPosition(e,n,t,i)}}class Hhe extends fe{constructor(){super({id:DM,label:g("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Z.and(E.writable,E.hasCodeActionsProvider),kbOpts:{kbExpr:E.textInputFocus,primary:2137,weight:100}})}run(e,t){return sf(t,g("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Vs.QuickFix)}}class zhe extends tn{constructor(){super({id:iW,precondition:Z.and(E.writable,E.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:EM}]}})}runEditorCommand(e,t,i){const n=Ra.fromUser(i,{kind:Ne.Empty,apply:"ifSingle"});return sf(t,typeof i?.kind=="string"?n.preferred?g("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):g("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?g("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):g("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Uhe extends fe{constructor(){super({id:sW,label:g("refactor.label","Refactor..."),alias:"Refactor...",precondition:Z.and(E.writable,E.hasCodeActionsProvider),kbOpts:{kbExpr:E.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Z.and(E.writable,Z0(Ne.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:EM}]}})}run(e,t,i){const n=Ra.fromUser(i,{kind:Ne.Refactor,apply:"never"});return sf(t,typeof i?.kind=="string"?n.preferred?g("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):g("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?g("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):g("editor.action.refactor.noneMessage","No refactorings available"),{include:Ne.Refactor.contains(n.kind)?n.kind:Ne.None,onlyIncludePreferredActions:n.preferred},n.apply,Vs.Refactor)}}class $he extends fe{constructor(){super({id:oW,label:g("source.label","Source Action..."),alias:"Source Action...",precondition:Z.and(E.writable,E.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Z.and(E.writable,Z0(Ne.Source))},description:{description:"Source Action...",args:[{name:"args",schema:EM}]}})}run(e,t,i){const n=Ra.fromUser(i,{kind:Ne.Source,apply:"never"});return sf(t,typeof i?.kind=="string"?n.preferred?g("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):g("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?g("editor.action.source.noneMessage.preferred","No preferred source actions available"):g("editor.action.source.noneMessage","No source actions available"),{include:Ne.Source.contains(n.kind)?n.kind:Ne.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,Vs.SourceAction)}}class jhe extends fe{constructor(){super({id:kM,label:g("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Z.and(E.writable,Z0(Ne.SourceOrganizeImports)),kbOpts:{kbExpr:E.textInputFocus,primary:1581,weight:100}})}run(e,t){return sf(t,g("editor.action.organize.noneMessage","No organize imports action available"),{include:Ne.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Vs.OrganizeImports)}}class Khe extends fe{constructor(){super({id:IM,label:g("fixAll.label","Fix All"),alias:"Fix All",precondition:Z.and(E.writable,Z0(Ne.SourceFixAll))})}run(e,t){return sf(t,g("fixAll.noneMessage","No fix all action available"),{include:Ne.SourceFixAll,includeSourceActions:!0},"ifSingle",Vs.FixAll)}}class qhe extends fe{constructor(){super({id:nW,label:g("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Z.and(E.writable,Z0(Ne.QuickFix)),kbOpts:{kbExpr:E.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return sf(t,g("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Ne.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Vs.AutoFix)}}ft(Pc.ID,Pc,3);ft(Du.ID,Du,4);ie(Hhe);ie(Uhe);ie($he);ie(jhe);ie(qhe);ie(Khe);re(new zhe);Jt.as(ra.Configuration).registerConfiguration(Object.assign(Object.assign({},ly),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:g("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));Jt.as(ra.Configuration).registerConfiguration(Object.assign(Object.assign({},ly),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:g("includeNearbyQuickfixes","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));var YF=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class bN{constructor(){this.lenses=[],this._disposables=new X}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 pW(o,e,t){return YF(this,void 0,void 0,function*(){const i=o.ordered(e),n=new Map,s=new bN,r=i.map((a,l)=>YF(this,void 0,void 0,function*(){n.set(a,l);try{const d=yield Promise.resolve(a.provideCodeLenses(e,t));d&&s.add(d,a)}catch(d){Ni(d)}}));return yield Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:n.get(a.provider)<n.get(l.provider)?-1:n.get(a.provider)>n.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),s})}lt.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;xt(ke.isUri(t)),xt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(pe),s=o.get(Zt).getModel(t);if(!s)throw No();const r=[],a=new X;return pW(n,s,Qe.None).then(l=>{a.add(l);const d=[];for(const c of l.lenses)i==null||c.symbol.command?r.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&d.push(Promise.resolve(c.provider.resolveCodeLens(s,c.symbol,Qe.None)).then(h=>r.push(h||c.symbol)));return Promise.all(d)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var Ghe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zhe=function(o,e){return function(t,i){e(t,i,o)}};const mW=et("ICodeLensCache");class XF{constructor(e,t){this.lineCount=e,this.data=t}}let CN=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Yc(20,.75);const t="codelens/cache";Vl(()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),de.once(e.onWillSaveState)(s=>{s.reason===mw.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new bN;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new XF(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}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 s of i.data.lenses)n.add(s.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 i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new L(a,1,a,11)});const r=new bN;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new XF(n.lineCount,r))}}catch{}}};CN=Ghe([Zhe(0,_r)],CN);dt(mW,CN,1);class Yhe{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){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class zy{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${zy._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 s=0;s<e.length;s++){const r=e[s];if(r&&(n=!0,r.command)){const a=lc(r.command.title.trim());r.command.id?(i.push(ee("a",{id:String(s),title:r.command.tooltip,role:"button"},...a)),this._commands.set(String(s),r.command)):i.push(ee("span",{title:r.command.tooltip},...a)),s+1<e.length&&i.push(ee("span",void 0," | "))}}n?(gn(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):gn(this._domNode,ee("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}}zy._idPool=0;class uD{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 i=0,n=t.length;i<n;i++)this._addDecorationsCallbacks[i](t[i])}}const QF=Ve.register({collapseOnReplaceEdit:!0,description:"codelens"});class JF{constructor(e,t,i,n,s,r){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a;const l=[];this._data.forEach((d,c)=>{d.symbol.command&&l.push(d.symbol),i.addDecoration({range:d.symbol.range,options:QF},h=>this._decorationIds[c]=h),a?a=L.plusRange(a,d.symbol.range):a=L.lift(d.symbol.range)}),this._viewZone=new Yhe(a.startLineNumber-1,s,r),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new zy(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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&&L.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:QF},s=>this._decorationIds[n]=s)})}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:n}=this._data[t];n.command=i.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?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 Xhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wm=function(o,e){return function(t,i){e(t,i,o)}},_W=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};let _p=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new X,this._localToDispose=new X,this._lenses=[],this._oldCodeLensModels=new X,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Dt(()=>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(a=>{(a.hasChanged(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&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(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Ps.fontFamily)),this._editor.changeViewZones(r=>{for(const a of this._lenses)a.updateHeight(e,r)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(xc(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new Dt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Wi(r=>pW(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},He)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Me(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(r),l=c.getLineNumber())});const d=new uD;a.forEach(c=>{c.dispose(d,r),this._lenses.splice(this._lenses.indexOf(c),1)}),d.commit(s)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Me(()=>{if(this._editor.getModel()){const n=ta.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if(s?.tagName==="SPAN"&&(s=s.parentElement),s?.tagName==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new uD;for(const n of this._lenses)n.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 a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=ta.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const d=new uD;let c=0,h=0;for(;h<i.length&&c<this._lenses.length;){const u=i[h][0].symbol.range.startLineNumber,f=this._lenses[c].getLineNumber();f<u?(this._lenses[c].dispose(d,l),this._lenses.splice(c,1)):f===u?(this._lenses[c].updateCodeLensSymbols(i[h],d),h++,c++):(this._lenses.splice(c,0,new JF(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),c++,h++)}for(;c<this._lenses.length;)this._lenses[c].dispose(d,l),this._lenses.splice(c,1);for(;h<i.length;)this._lenses.push(new JF(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),h++;d.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=Wi(a=>{const l=i.map((d,c)=>{const h=new Array(d.length),u=d.map((f,p)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(m=>{h[p]=m},Ni):(h[p]=f.symbol,Promise.resolve(void 0)));return Promise.all(u).then(()=>{!a.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(h)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{He(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var e;return _W(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel})}};_p.ID="css.editor.codeLens";_p=Xhe([wm(1,pe),wm(2,Ho),wm(3,li),wm(4,Li),wm(5,mW)],_p);ft(_p.ID,_p,1);ie(class extends fe{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:E.hasCodeLensProvider,label:g("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return _W(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(aa),n=e.get(li),s=e.get(Li),r=t.getSelection().positionLineNumber,a=t.getContribution(_p.ID);if(!a)return;const l=yield a.getModel();if(!l)return;const d=[];for(const u of l.lenses)u.symbol.command&&u.symbol.range.startLineNumber===r&&d.push({label:u.symbol.command.title,command:u.symbol.command});if(d.length===0)return;const c=yield i.pick(d,{canPickMany:!1,placeHolder:g("placeHolder","Select a command")});if(!c)return;let h=c.command;if(l.isDisposed){const u=yield a.getModel(),f=u?.lenses.find(p=>{var m;return p.symbol.range.startLineNumber===r&&((m=p.symbol.command)===null||m===void 0?void 0:m.title)===h.title});if(!f||!f.symbol.command)return;h=f.symbol.command}try{yield n.executeCommand(h.id,...h.arguments||[])}catch(u){s.error(u)}})}});var Qhe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fD=function(o,e){return function(t,i){e(t,i,o)}},Jhe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class NM{constructor(e,t){this._editorWorkerClient=new O2(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return Jhe(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,i){const n=t.range,s=t.color,r=s.alpha,a=new V(new rt(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?V.Format.CSS.formatRGB(a):V.Format.CSS.formatRGBA(a),d=r?V.Format.CSS.formatHSL(a):V.Format.CSS.formatHSLA(a),c=r?V.Format.CSS.formatHex(a):V.Format.CSS.formatHexA(a),h=[];return h.push({label:l,textEdit:{range:n,text:l}}),h.push({label:d,textEdit:{range:n,text:d}}),h.push({label:c,textEdit:{range:n,text:c}}),h}}let wN=class extends H{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new NM(e,t)))}};wN=Qhe([fD(0,Zt),fD(1,At),fD(2,pe)],wN);Iy(wN);var Y0=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function vW(o,e,t,i=!0){return Y0(this,void 0,void 0,function*(){return TM(new eue,o,e,t,i)})}function bW(o,e,t,i){return Promise.resolve(t.provideColorPresentations(o,e,i))}class eue{constructor(){}compute(e,t,i,n){return Y0(this,void 0,void 0,function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({colorInfo:r,provider:e});return Array.isArray(s)})}}class tue{constructor(){}compute(e,t,i,n){return Y0(this,void 0,void 0,function*(){const s=yield e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({range:r.range,color:[r.color.red,r.color.green,r.color.blue,r.color.alpha]});return Array.isArray(s)})}}class iue{constructor(e){this.colorInfo=e}compute(e,t,i,n){return Y0(this,void 0,void 0,function*(){const s=yield e.provideColorPresentations(t,this.colorInfo,Qe.None);return Array.isArray(s)&&n.push(...s),Array.isArray(s)})}}function TM(o,e,t,i,n){return Y0(this,void 0,void 0,function*(){let s=!1,r;const a=[],l=e.ordered(t);for(let d=l.length-1;d>=0;d--){const c=l[d];if(c instanceof NM)r=c;else try{(yield o.compute(c,t,i,a))&&(s=!0)}catch(h){Ni(h)}}return s?a:r&&n?(yield o.compute(r,t,i,a),a):[]})}function CW(o,e){const{colorProvider:t}=o.get(pe),i=o.get(Zt).getModel(e);if(!i)throw No();const n=o.get(st).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}lt.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof ke))throw No();const{model:i,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:s}=CW(o,t);return TM(new tue,n,i,Qe.None,s)});lt.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof ke)||!Array.isArray(t)||t.length!==4||!L.isIRange(s))throw No();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=CW(o,n),[d,c,h,u]=t;return TM(new iue({range:s,color:{red:d,green:c,blue:h,alpha:u}}),a,r,Qe.None,l)});var nue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gD=function(o,e){return function(t,i){e(t,i,o)}},e5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},SN;const wW=Object.create({});let Oc=SN=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new X),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new D0(this._editor),this._decoratorLimitReporter=new sue,this._colorDecorationClassRefs=this._register(new X),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:SN.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(s=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const a=r!==this._isColorDecoratorsEnabled||s.hasChanged(21),l=s.hasChanged(145);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(20)}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 ur,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return e5(this,void 0,void 0,function*(){this._computePromise=Wi(e=>e5(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const i=new Bn(!1),n=yield vW(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){He(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(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Ve.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;s<e.length&&t.length<i;s++){const{red:r,green:a,blue:l,alpha:d}=e[s].colorInfo.color,c=new rt(Math.round(r*255),Math.round(a*255),Math.round(l*255),d),h=`rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`,u=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:h}));t.push({range:{startLineNumber:e[s].colorInfo.range.startLineNumber,startColumn:e[s].colorInfo.range.startColumn,endLineNumber:e[s].colorInfo.range.endLineNumber,endColumn:e[s].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:m9,inlineClassName:`${u.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:wW}}})}const n=i<e.length?i:!1;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(L.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Oc.ID="editor.contrib.colorDetector";Oc.RECOMPUTE_TIME=1e3;Oc=SN=nue([gD(1,st),gD(2,pe),gD(3,Ho)],Oc);class sue{constructor(){this._onDidChange=new A,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}ft(Oc.ID,Oc,1);class oue{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 A,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new A,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new A,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 n=0;n<this.colorPresentations.length;n++)if(t.toLowerCase()===this.colorPresentations[n].label){i=n;break}if(i===-1){const n=t.split("(")[0].toLowerCase();for(let s=0;s<this.colorPresentations.length;s++)if(this.colorPresentations[s].label.toLowerCase().startsWith(n)){i=s;break}}i!==-1&&i!==this.presentationIndex&&(this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}const eo=ee;class rue extends H{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=eo(".colorpicker-header"),Y(e,this._domNode),this._pickedColorNode=Y(this._domNode,eo(".picked-color")),Y(this._pickedColorNode,eo("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Y(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const s=g("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",s),this._originalColorNode=Y(this._domNode,eo(".original-color")),this._originalColorNode.style.backgroundColor=V.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(z1)||V.white,this._register(i.onDidColorThemeChange(r=>{this.backgroundColor=r.getColor(z1)||V.white})),this._register($(this._pickedColorNode,ae.CLICK,()=>this.model.selectNextColorPresentation())),this._register($(this._originalColorNode,ae.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=V.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 aue(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=V.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 aue extends H{constructor(e){super(),this._onClicked=this._register(new A),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Y(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),Y(this._button,t),Y(t,eo(".button"+Ie.asCSSSelector(_i("color-picker-close",oe.close,g("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class lue extends H{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=eo(".colorpicker-body"),Y(e,this._domNode),this._saturationBox=new due(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 cue(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 hue(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 uue(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 V(new Aa(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new V(new Aa(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new V(new Aa(i===360?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 due extends H{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new A,this.onColorFlushed=this._onColorFlushed.event,this._domNode=eo(".saturation-wrap"),Y(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Y(this._domNode,this._canvas),this.selection=eo(".saturation-selection"),Y(this._domNode,this.selection),this.layout(),this._register($(this._domNode,ae.POINTER_DOWN,n=>this.onPointerDown(n))),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 Bp);const t=Ai(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=$(e.target.ownerDocument,ae.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 V(new Aa(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 s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=V.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,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 SW extends H{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new A,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=Y(e,eo(".standalone-strip")),this.overlay=Y(this.domNode,eo(".standalone-overlay"))):(this.domNode=Y(e,eo(".strip")),this.overlay=Y(this.domNode,eo(".overlay"))),this.slider=Y(this.domNode,eo(".slider")),this.slider.style.top="0px",this._register($(this.domNode,ae.POINTER_DOWN,n=>this.onPointerDown(n))),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 Bp),i=Ai(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=$(e.target.ownerDocument,ae.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 cue extends SW{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,s=new V(new rt(t,i,n,1)),r=new V(new rt(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class hue extends SW{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class uue extends H{constructor(e){super(),this._onClicked=this._register(new A),this.onClicked=this._onClicked.event,this._button=Y(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class fue extends fr{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(j_.onDidChange(()=>this.layout()));const r=eo(".colorpicker-widget");e.appendChild(r),this.header=this._register(new rue(r,this.model,n,s)),this.body=this._register(new lue(r,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var yW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},LW=function(o,e){return function(t,i){e(t,i,o)}},vp=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class gue{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let jw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return ki.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return vp(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const n=Oc.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[yield xW(this,this._editor.getModel(),r.colorInfo,r.provider)]}return[]})}renderHoverParts(e,t){return DW(this,this._editor,this._themeService,t,e)}};jw=yW([LW(1,Ki)],jw);class pue{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let Uv=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return vp(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!Oc.get(this._editor))return null;const s=yield vW(i,this._editor.getModel(),Qe.None);let r=null,a=null;for(const h of s){const u=h.colorInfo;L.containsRange(u.range,e.range)&&(r=u,a=h.provider)}const l=r??e,d=a??t,c=!!r;return{colorHover:yield xW(this,this._editor.getModel(),l,d),foundInEditor:c}})}updateEditorModel(e){return vp(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new L(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield r1(this._editor.getModel(),t,this._color,i,e),i=kW(this._editor,i,t))})}renderHoverParts(e,t){return DW(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};Uv=yW([LW(1,Ki)],Uv);function xW(o,e,t,i){return vp(this,void 0,void 0,function*(){const n=e.getValueInRange(t.range),{red:s,green:r,blue:a,alpha:l}=t.color,d=new rt(Math.round(s*255),Math.round(r*255),Math.round(a*255),l),c=new V(d),h=yield bW(e,t,i,Qe.None),u=new oue(c,[],0);return u.colorPresentations=h||[],u.guessColorPresentation(c,n),o instanceof jw?new gue(o,L.lift(t.range),u,i):new pue(o,L.lift(t.range),u,i)})}function DW(o,e,t,i,n){if(i.length===0||!e.hasModel())return H.None;if(n.setMinimumDimensions){const u=e.getOption(66)+8;n.setMinimumDimensions(new gt(302,u))}const s=new X,r=i[0],a=e.getModel(),l=r.model,d=s.add(new fue(n.fragment,l,e.getOption(141),t,o instanceof Uv));n.setColorPicker(d);let c=!1,h=new L(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(o instanceof Uv){const u=i[0].model.color;o.color=u,r1(a,l,u,h,r),s.add(l.onColorFlushed(f=>{o.color=f}))}else s.add(l.onColorFlushed(u=>vp(this,void 0,void 0,function*(){yield r1(a,l,u,h,r),c=!0,h=kW(e,h,l,n)})));return s.add(l.onDidChangeColor(u=>{r1(a,l,u,h,r)})),s.add(e.onDidChangeModelContent(u=>{c?c=!1:(n.hide(),e.focus())})),s}function kW(o,e,t,i){let n,s;if(t.presentation.textEdit){n=[t.presentation.textEdit],s=new L(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const r=o.getModel()._setTrackedRange(null,s,3);o.pushUndoStop(),o.executeEdits("colorpicker",n),s=o.getModel()._getTrackedRange(r)||s}else n=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],s=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),o.pushUndoStop(),o.executeEdits("colorpicker",n);return t.presentation.additionalTextEdits&&(n=[...t.presentation.additionalTextEdits],o.executeEdits("colorpicker",n),i&&i.hide()),o.pushUndoStop(),s}function r1(o,e,t,i,n){return vp(this,void 0,void 0,function*(){const s=yield bW(o,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,Qe.None);e.colorPresentations=s||[]})}function yN(o,e){return!!o[e]}class pD{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=yN(e.event,t.triggerModifier),this.hasSideBySideModifier=yN(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class t5{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=yN(e,t.triggerModifier)}}class nC{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 i5(o){return o==="altKey"?at?new nC(57,"metaKey",6,"altKey"):new nC(5,"ctrlKey",6,"altKey"):at?new nC(6,"altKey",57,"metaKey"):new nC(6,"altKey",5,"ctrlKey")}class Uy extends H{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new A),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new A),this.onExecute=this._onExecute.event,this._onCancel=this._register(new A),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(i=t?.extractLineNumberFromMouseEvent)!==null&&i!==void 0?i:(n=>n.target.position?n.target.position.lineNumber:0),this._opts=i5(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(77)){const s=i5(this._editor.getOption(77));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new pD(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new pD(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new pD(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new t5(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new t5(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.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()}}var mue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bl=function(o,e){return function(t,i){e(t,i,o)}};let Fc=class extends rp{constructor(e,t,i,n,s,r,a,l,d,c,h,u,f){super(e,Object.assign(Object.assign({},n.getRawOptions()),{overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()}),i,s,r,a,l,d,c,h,u,f),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(p=>this._onParentConfigurationChanged(p)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){vS(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Fc=mue([bl(4,Re),bl(5,_t),bl(6,li),bl(7,Ae),bl(8,Ki),bl(9,Li),bl(10,cd),bl(11,At),bl(12,pe)],Fc);const n5=new V(new rt(0,122,204)),_ue={showArrow:!0,showFrame:!0,className:"",frameColor:n5,arrowColor:n5,keepEditorSelection:!1},vue="vs.editor.contrib.zoneWidget";class bue{constructor(e,t,i,n,s,r,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Cue{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class $y{constructor(e){this._editor=e,this._ruleName=$y._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),eP(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(){eP(this._ruleName),Zk(`.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){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:L.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}$y._IdGenerator=new FR(".arrow-decoration-");class wue{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new X,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Il(t),vS(this.options,_ue,!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(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}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 $y(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&&e.minimap.minimapLeft===0?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 i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const n=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(n))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=L.isIRange(e)?L.lift(e):L.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:Ve.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const a=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const u=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,u)}let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(u=>{this._viewZone&&u.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new bue(r,i.lineNumber,i.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=u.addZone(this._viewZone),this._overlayWidget=new Cue(vue+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const u=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=u+"px",this.container.style.borderBottomWidth=u+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const u=h.validateRange(new L(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(u,u.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;this._resizeSash=this._disposables.add(new Tn(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;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(66),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var IW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},EW=function(o,e){return function(t,i){e(t,i,o)}};const NW=et("IPeekViewService");dt(NW,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}},1);var Ss;(function(o){o.inPeekEditor=new ce("inReferenceSearchEditor",!0,g("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(Ss||(Ss={}));let $v=class{constructor(e,t){e instanceof Fc&&Ss.inPeekEditor.bindTo(t)}dispose(){}};$v.ID="editor.contrib.referenceController";$v=IW([EW(1,Ae)],$v);ft($v.ID,$v,0);function Sue(o){const e=o.get(_t).getFocusedCodeEditor();return e instanceof Fc?e.getParentEditor():e}const yue={headerBackgroundColor:V.white,primaryHeadingColor:V.fromHex("#333333"),secondaryHeadingColor:V.fromHex("#6c6c6cb3")};let Kw=class extends wue{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new A,this.onDidClose=this._onDidClose.event,vS(this.options,yue,!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=ee(".head"),this._bodyElement=ee(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ee(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),wi(this._titleElement,"click",s=>this._onTitleClick(s))),Y(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ee("span.filename"),this._secondaryHeading=ee("span.dirname"),this._metaHeading=ee("span.meta"),Y(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=ee(".peekview-actions");Y(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Wo(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new as("peekview.close",g("label.close","Close"),Ie.asClassName(oe.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:_se.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:fn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Ts(this._metaHeading)):Jn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(66)*1.2),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`)}};Kw=IW([EW(2,Re)],Kw);const Lue=T("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:V.black,hcLight:V.white},g("peekViewTitleBackground","Background color of the peek view title area.")),TW=T("peekViewTitleLabel.foreground",{dark:V.white,light:V.black,hcDark:V.white,hcLight:er},g("peekViewTitleForeground","Color of the peek view title.")),RW=T("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},g("peekViewTitleInfoForeground","Color of the peek view title info.")),xue=T("peekView.border",{dark:bs,light:bs,hcDark:nt,hcLight:nt},g("peekViewBorder","Color of the peek view borders and arrow.")),Due=T("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:V.black,hcLight:V.white},g("peekViewResultsBackground","Background color of the peek view result list."));T("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:V.white,hcLight:er},g("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));T("peekViewResult.fileForeground",{dark:V.white,light:"#1E1E1E",hcDark:V.white,hcLight:er},g("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));T("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},g("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));T("peekViewResult.selectionForeground",{dark:V.white,light:"#6C6C6C",hcDark:V.white,hcLight:er},g("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Xd=T("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:V.black,hcLight:V.white},g("peekViewEditorBackground","Background color of the peek view editor."));T("peekViewEditorGutter.background",{dark:Xd,light:Xd,hcDark:Xd,hcLight:Xd},g("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));T("peekViewEditorStickyScroll.background",{dark:Xd,light:Xd,hcDark:Xd,hcLight:Xd},g("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));T("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},g("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));T("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},g("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));T("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Ut,hcLight:Ut},g("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var kue=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class Bc{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=rE.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?g({},"{0} in {1} on line {2} at column {3}",t.value,Bo(this.uri),this.range.startLineNumber,this.range.startColumn):g("aria.oneReference","in {0} on line {1} at column {2}",Bo(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Iue{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:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),d=new L(n,l.startColumn,n,s),c=new L(r,a,r,1073741824),h=i.getValueInRange(d).replace(/^\s+/,""),u=i.getValueInRange(e),f=i.getValueInRange(c).replace(/\s+$/,"");return{value:h+u+f,highlight:{start:h.length,end:h.length+u.length}}}}class jv{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Pn}dispose(){St(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?g("aria.fileReferences.1","1 symbol in {0}, full path {1}",Bo(this.uri),this.uri.fsPath):g("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Bo(this.uri),this.uri.fsPath)}resolve(e){return kue(this,void 0,void 0,function*(){if(this._previews.size!==0)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 Iue(i))}catch(i){He(i)}return this})}}class Bs{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new A,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(Bs._compareReferences);let n;for(const s of e)if((!n||!$t.isEqual(n.uri,s.uri,!0))&&(n=new jv(this,s.uri),this.groups.push(n)),n.children.length===0||Bs._compareReferences(s,n.children[n.children.length-1])!==0){const r=new Bc(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){St(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Bs(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?g("aria.result.0","No results found"):this.references.length===1?g("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?g("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):g("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 s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+1<s||!t&&n>0?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:cu(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLen<s.prefixLen?1:n.offsetDist<s.offsetDist?-1:n.offsetDist>s.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()&&L.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 $t.compare(e.uri,t.uri)||L.compareRangesUsingStarts(e.range,t.range)}}var jy=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ky=function(o,e){return function(t,i){e(t,i,o)}},LN;let xN=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Bs||e instanceof jv}getChildren(e){if(e instanceof Bs)return e.groups;if(e instanceof jv)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};xN=jy([Ky(0,Ls)],xN);class Eue{getHeight(){return 23}getTemplateId(e){return e instanceof jv?Kv.id:X0.id}}let DN=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Bc){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return Bo(e.uri)}};DN=jy([Ky(0,Et)],DN);class Nue{getId(e){return e instanceof Bc?e.id:e.uri}}let kN=class extends H{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new Nw(i,{supportHighlights:!0})),this.badge=new NE(Y(i,ee(".count")),{},bB),e.appendChild(i)}set(e,t){const i=ny(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(g("referencesCount","{0} references",n)):this.badge.setTitleFormat(g("referenceCount","{0} reference",n))}};kN=jy([Ky(1,ap)],kN);let Kv=LN=class{constructor(e){this._instantiationService=e,this.templateId=LN.id}renderTemplate(e){return this._instantiationService.createInstance(kN,e)}renderElement(e,t,i){i.set(e.element,O0(e.filterData))}disposeTemplate(e){e.dispose()}};Kv.id="FileReferencesRenderer";Kv=LN=jy([Ky(0,Re)],Kv);class Tue{constructor(e){this.label=new cc(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${Bo(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!Zr.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,O0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class X0{constructor(){this.templateId=X0.id}renderTemplate(e){return new Tue(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}X0.id="OneReferenceRenderer";class Rue{getWidgetAriaLabel(){return g("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Mue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cl=function(o,e){return function(t,i){e(t,i,o)}},s5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class qy{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new X,this._callOnModelChange=new X,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()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n<s;n++){const r=e.children[n];this._decorationIgnoreSet.has(r.id)||r.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:r.range,options:qy.DecorationOptions}),i.push(n))}this._editor.changeDecorations(n=>{const s=n.deltaDecorations([],t);for(let r=0;r<s.length;r++)this._decorations.set(s[r],e.children[i[r]])})}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[i,n]of this._decorations){const s=t.getDecorationRange(i);if(!s)continue;let r=!1;if(!L.equalsRange(s,n.range)){if(L.spansMultipleLines(s))r=!0;else{const a=n.range.endColumn-n.range.startColumn,l=s.endColumn-s.startColumn;a!==l&&(r=!0)}r?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=s}}for(let i=0,n=e.length;i<n;i++)this._decorations.delete(e[i]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}qy.DecorationOptions=Ve.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Aue{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{}return{ratio:t||.7,heightInLines:i||18}}}class Pue extends DE{}let IN=class extends Kw{constructor(e,t,i,n,s,r,a,l,d,c,h,u){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},r),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=r,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=d,this._keybindingService=c,this._languageService=h,this._languageConfigurationService=u,this._disposeOnNewModel=new X,this._callOnDispose=new X,this._onDidSelectReference=new A,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new gt(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(),St(this._preview),St(this._previewNotAvailableMessage),St(this._tree),St(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(xue)||V.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(Lue)||V.transparent,primaryHeadingColor:e.getColor(TW),secondaryHeadingColor:e.getColor(RW)})}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=Y(e,ee("div.messages")),Jn(this._messageContainer),this._splitView=new xB(e,{orientation:1}),this._previewContainer=Y(e,ee("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Fc,this._previewContainer,t,{},this.editor),Jn(this._previewContainer),this._previewNotAvailableMessage=new il(g("missingPreviewMessage","no preview available"),ro,il.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=Y(e,ee("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Rue,keyboardNavigationLabelProvider:this._instantiationService.createInstance(DN),identityProvider:new Nue,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:Due}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(wi(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Pue,"ReferencesWidget",this._treeContainer,new Eue,[this._instantiationService.createInstance(Kv),this._instantiationService.createInstance(X0)],this._instantiationService.createInstance(xN),i),this._splitView.addView({onDidChange:de.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},Dw.Distribute),this._splitView.addView({onDidChange:de.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},Dw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof Bc&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),Jn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new gt(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=g("noResults","No results"),Ts(this._messageContainer),Promise.resolve(void 0)):(Jn(this._messageContainer),this._decorationsManager=new qy(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(t.detail!==2)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"),Ts(this._treeContainer),Ts(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Bc)return e;if(e instanceof jv&&e.children.length>0)return e.children[0]}revealReference(e){return s5(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return s5(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==qe.inMemory?this.setTitle(rJ(e.uri),this._uriLabel.getUriLabel(ny(e.uri))):this.setTitle(g("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const n=yield i;if(!this._model){n.dispose();return}St(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=L.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};IN=Mue([Cl(3,Ki),Cl(4,Ls),Cl(5,Re),Cl(6,NW),Cl(7,ap),Cl(8,sy),Cl(9,Et),Cl(10,qt),Cl(11,At)],IN);var Oue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sf=function(o,e){return function(t,i){e(t,i,o)}},o5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},a1;const of=new ce("referenceSearchVisible",!1,g("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Wc=a1=class{static get(e){return e.getContribution(a1.ID)}constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new X,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=of.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||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 s="peekViewLayout",r=Aue.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(IN,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(g("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:d,kind:c}=l;if(d)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(d,!1,!1);break;case"side":this.openReference(d,!0,!1);break;case"goto":i?this._gotoReference(d,!0):this.openReference(d,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var d;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(d=this._model)===null||d===void 0||d.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(g("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,h=new P(e.startLineNumber,e.startColumn),u=this._model.nearestReference(c,h);if(u)return this._widget.setSelection(u).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return o5(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),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n,!1),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()})}revealReference(e){return o5(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||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;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const n=L.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(s=>{var r;if(this._ignoreModelChangeEvent=!1,!s||!this._widget){this.closeWidget();return}if(this._editor===s)this._widget.show(n),this._widget.focusOnReferenceTree();else{const a=a1.get(s),l=this._model.clone();this.closeWidget(),s.focus(),a?.toggleWidget(n,Wi(d=>Promise.resolve(l)),(r=this._peekMode)!==null&&r!==void 0?r:!1)}},s=>{this._ignoreModelChangeEvent=!1,He(s)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};Wc.ID="editor.contrib.referencesController";Wc=a1=Oue([Sf(2,Ae),Sf(3,_t),Sf(4,Li),Sf(5,Re),Sf(6,_r),Sf(7,st)],Wc);function rf(o,e){const t=Sue(o);if(!t)return;const i=Wc.get(t);i&&e(i)}ws.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Pi(2089,60),when:Z.or(of,Ss.inPeekEditor),handler(o){rf(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});ws.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:Z.or(of,Ss.inPeekEditor),handler(o){rf(o,e=>{e.goToNextOrPreviousReference(!0)})}});ws.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:Z.or(of,Ss.inPeekEditor),handler(o){rf(o,e=>{e.goToNextOrPreviousReference(!1)})}});lt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");lt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");lt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");lt.registerCommand("closeReferenceSearch",o=>rf(o,e=>e.closeWidget()));ws.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:Z.and(Ss.inPeekEditor,Z.not("config.editor.stablePeek"))});ws.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:Z.and(of,Z.not("config.editor.stablePeek"))});ws.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Z.and(of,VB,JR.negate(),eM.negate()),handler(o){var e;const i=(e=o.get(Uo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Bc&&rf(o,n=>n.revealReference(i[0]))}});ws.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Z.and(of,VB,JR.negate(),eM.negate()),handler(o){var e;const i=(e=o.get(Uo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Bc&&rf(o,n=>n.openReference(i[0],!0,!0))}});lt.registerCommand("openReference",o=>{var e;const i=(e=o.get(Uo).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Bc&&rf(o,n=>n.openReference(i[0],!1,!0))});var MW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xm=function(o,e){return function(t,i){e(t,i,o)}};const RM=new ce("hasSymbols",!1,g("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Gy=et("ISymbolNavigationService");let EN=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=RM.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new NN(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let d=!1,c=!1;for(const h of t.references)if(lR(h.uri,a.uri))d=!0,c=c||L.containsPosition(h.range,l);else if(d)break;(!d||!c)&&this.reset()});this._currentState=or(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:L.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?g("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):g("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};EN=MW([Xm(0,Ae),Xm(1,_t),Xm(2,Li),Xm(3,Et)],EN);dt(Gy,EN,1);re(new class extends tn{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:RM,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(Gy).revealNext(e)}});ws.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:RM,primary:9,handler(o){o.get(Gy).reset()}});let NN=class{constructor(e){this._listener=new Map,this._disposables=new X,this._onDidChange=new A,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(),St(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,or(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};NN=MW([Xm(0,_t)],NN);var MM=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function Q0(o,e,t,i){return MM(this,void 0,void 0,function*(){const s=t.ordered(o).map(a=>Promise.resolve(i(a,o,e)).then(void 0,l=>{Ni(l)})),r=yield Promise.all(s);return Ga(r.flat())})}function Zy(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function AW(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function PW(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function OW(o,e,t,i){return Q0(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function Yy(o,e,t,i,n){return Q0(e,t,o,(s,r,a)=>MM(this,void 0,void 0,function*(){const l=yield s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const d=yield s.provideReferences(r,a,{includeDeclaration:!1},n);return d&&d.length===1?d:l}))}function J0(o){return MM(this,void 0,void 0,function*(){const e=yield o(),t=new Bs(e,""),i=t.references.map(n=>n.link);return t.dispose(),i})}hl("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(pe),n=Zy(i.definitionProvider,e,t,Qe.None);return J0(()=>n)});hl("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(pe),n=OW(i.typeDefinitionProvider,e,t,Qe.None);return J0(()=>n)});hl("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(pe),n=AW(i.declarationProvider,e,t,Qe.None);return J0(()=>n)});hl("_executeReferenceProvider",(o,e,t)=>{const i=o.get(pe),n=Yy(i.referenceProvider,e,t,!1,Qe.None);return J0(()=>n)});hl("_executeImplementationProvider",(o,e,t)=>{const i=o.get(pe),n=PW(i.implementationProvider,e,t,Qe.None);return J0(()=>n)});var lr=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Sm,ym,Lm,sC,oC,rC,aC,lC;hn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextPeek,title:g("peek.submenu","Peek"),group:"navigation",order:100});class bp{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof bp||P.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class qn extends oa{static all(){return qn._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of Xe.wrap(t.menu))(i.id===k.EditorContext||i.id===k.EditorContextPeek)&&(i.when=Z.and(e.precondition,i.when));return t}constructor(e,t){super(qn._patchConfig(t)),this.configuration=e,qn._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(Li),r=e.get(_t),a=e.get(Jc),l=e.get(Gy),d=e.get(pe),c=e.get(Re),h=t.getModel(),u=t.getPosition(),f=bp.is(i)?i:new bp(h,u),p=new Ac(t,5),m=PS(this._getLocationModel(d,f.model,f.position,p.token),p.token).then(v=>lr(this,void 0,void 0,function*(){var _;if(!v||p.token.isCancellationRequested)return;On(v.ariaMessage);let b;if(v.referenceAt(h.uri,u)){const w=this._getAlternativeCommand(t);!qn._activeAlternativeCommands.has(w)&&qn._allSymbolNavigationCommands.has(w)&&(b=qn._allSymbolNavigationCommands.get(w))}const C=v.references.length;if(C===0){if(!this.configuration.muteMessage){const w=h.getWordAtPosition(u);(_=Fs.get(t))===null||_===void 0||_.showMessage(this._getNoResultFoundMessage(w),u)}}else if(C===1&&b)qn._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(w=>b.runEditorCommand(w,t,i,n).finally(()=>{qn._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(r,l,t,v,n)}),v=>{s.error(v)}).finally(()=>{p.dispose()});return a.showWhile(m,250),m}_onResult(e,t,i,n,s){return lr(this,void 0,void 0,function*(){const r=this._getGoToPreference(i);if(!(i instanceof Fc)&&(this.configuration.openInPeek||r==="peek"&&n.references.length>1))this._openInPeek(i,n,s);else{const a=n.firstReference(),l=n.references.length>1&&r==="gotoAndPeek",d=yield this._openReference(i,e,a,this.configuration.openToSide,!l);l&&d?this._openInPeek(d,n,s):n.dispose(),r==="goto"&&t.put(a)}})}_openReference(e,t,i,n,s){return lr(this,void 0,void 0,function*(){let r;if(DU(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:L.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const l=a.getModel(),d=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&d.clear()},350)}return a}})}_openInPeek(e,t,i){const n=Wc.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),Wi(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}qn._allSymbolNavigationCommands=new Map;qn._activeAlternativeCommands=new Set;class eb extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield Zy(e.definitionProvider,t,i,n),g("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?g("noResultWord","No definition found for '{0}'",e.word):g("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}jt((Sm=class extends eb{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Sm.id,title:{value:g("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:g({},"Go to &&Definition")},precondition:Z.and(E.hasDefinitionProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:[{when:E.editorTextFocus,primary:70,weight:100},{when:Z.and(E.editorTextFocus,FB),primary:2118,weight:100}],menu:[{id:k.EditorContext,group:"navigation",order:1.1},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),lt.registerCommandAlias("editor.action.goToDeclaration",Sm.id)}},Sm.id="editor.action.revealDefinition",Sm));jt((ym=class extends eb{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:ym.id,title:{value:g("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:Z.and(E.hasDefinitionProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:[{when:E.editorTextFocus,primary:Pi(2089,70),weight:100},{when:Z.and(E.editorTextFocus,FB),primary:Pi(2089,2118),weight:100}]}),lt.registerCommandAlias("editor.action.openDeclarationToTheSide",ym.id)}},ym.id="editor.action.revealDefinitionAside",ym));jt((Lm=class extends eb{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Lm.id,title:{value:g("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:Z.and(E.hasDefinitionProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:k.EditorContextPeek,group:"peek",order:2}}),lt.registerCommandAlias("editor.action.previewDeclaration",Lm.id)}},Lm.id="editor.action.peekDefinition",Lm));class FW extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield AW(e.declarationProvider,t,i,n),g("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?g("decl.noResultWord","No declaration found for '{0}'",e.word):g("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}jt((sC=class extends FW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:sC.id,title:{value:g("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:g({},"Go to &&Declaration")},precondition:Z.and(E.hasDeclarationProvider,E.isInWalkThroughSnippet.toNegated()),menu:[{id:k.EditorContext,group:"navigation",order:1.3},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?g("decl.noResultWord","No declaration found for '{0}'",e.word):g("decl.generic.noResults","No declaration found")}},sC.id="editor.action.revealDeclaration",sC));jt(class extends FW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:g("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:Z.and(E.hasDeclarationProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:3}})}});class BW extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield OW(e.typeDefinitionProvider,t,i,n),g("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?g("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):g("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}jt((oC=class extends BW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:oC.ID,title:{value:g("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:g({},"Go to &&Type Definition")},precondition:Z.and(E.hasTypeDefinitionProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:0,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.4},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},oC.ID="editor.action.goToTypeDefinition",oC));jt((rC=class extends BW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:rC.ID,title:{value:g("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:Z.and(E.hasTypeDefinitionProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:4}})}},rC.ID="editor.action.peekTypeDefinition",rC));class WW extends qn{_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield PW(e.implementationProvider,t,i,n),g("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?g("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):g("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}jt((aC=class extends WW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:aC.ID,title:{value:g("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:g({},"Go to &&Implementations")},precondition:Z.and(E.hasImplementationProvider,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:2118,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.45},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},aC.ID="editor.action.goToImplementation",aC));jt((lC=class extends WW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:lC.ID,title:{value:g("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:Z.and(E.hasImplementationProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:3142,weight:100},menu:{id:k.EditorContextPeek,group:"peek",order:5}})}},lC.ID="editor.action.peekImplementation",lC));class VW extends qn{_getNoResultFoundMessage(e){return e?g("references.no","No references found for '{0}'",e.word):g("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}jt(class extends VW{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:g("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:g({},"Go to &&References")},precondition:Z.and(E.hasReferenceProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),keybinding:{when:E.editorTextFocus,primary:1094,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.45},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield Yy(e.referenceProvider,t,i,!0,n),g("ref.title","References"))})}});jt(class extends VW{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:g("references.action.label","Peek References"),original:"Peek References"},precondition:Z.and(E.hasReferenceProvider,Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(yield Yy(e.referenceProvider,t,i,!1,n),g("ref.title","References"))})}});class Fue extends qn{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:g("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:Z.and(Ss.notInPeekEditor,E.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return lr(this,void 0,void 0,function*(){return new Bs(this._references,g("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&g("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}lt.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:ke},{name:"position",description:"The position at which to start",constraint:P.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:(o,e,t,i,n,s,r)=>lr(void 0,void 0,void 0,function*(){xt(ke.isUri(e)),xt(P.isIPosition(t)),xt(Array.isArray(i)),xt(typeof n>"u"||typeof n=="string"),xt(typeof r>"u"||typeof r=="boolean");const a=o.get(_t),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(rl(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(d=>{const c=new class extends Fue{_getNoResultFoundMessage(h){return s||super._getNoResultFoundMessage(h)}}({muteMessage:!s,openInPeek:!!r,openToSide:!1},i,n);d.get(Re).invokeFunction(c.run.bind(c),l)})})});lt.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:ke},{name:"position",description:"The position at which to start",constraint:P.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:(o,e,t,i,n)=>lr(void 0,void 0,void 0,function*(){o.get(li).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)})});lt.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{xt(ke.isUri(e)),xt(P.isIPosition(t));const i=o.get(pe),n=o.get(_t);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!rl(s)||!s.hasModel())return;const r=Wc.get(s);if(!r)return;const a=Wi(d=>Yy(i.referenceProvider,s.getModel(),P.lift(t),!1,d).then(c=>new Bs(c,g("ref.title","References")))),l=new L(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});lt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var Bue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mD=function(o,e){return function(t,i){e(t,i,o)}},r5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Qm;let Eu=Qm=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new X,this.toUnhookForKeyboard=new X,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new Uy(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,a??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(a=>{He(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Qm.ID)}startFindDefinitionFromCursor(e){return r5(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(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return r5(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new x6(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Wi(a=>this.findDefinition(e,a));let s;try{s=yield this.previousPromise}catch(a){He(a);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const r=s[0].originSelectionRange?L.lift(s[0].originSelectionRange):new L(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let a=r;for(const{originSelectionRange:l}of s)l&&(a=L.plusRange(a,l));this.addDecoration(a,new xn().appendText(g("multipleResults","Click to show {0} definitions.",s.length)))}else{const a=s[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:d}}=l,{startLineNumber:c}=a.range;if(c<1||c>d.getLineCount()){l.dispose();return}const h=this.getPreviewValue(d,c,a),u=this.languageService.guessLanguageIdByFilepathOrFirstLine(d.uri);this.addDecoration(r,h?new xn().appendCodeblock(u||"",h):void 0),l.dispose()})}})}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=Qm.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<i.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);s=Math.min(s,l)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${s-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+Qm.MAX_SOURCE_PREVIEW_LINES);let s=t+1;for(;s<n;s++){const r=e.getLineFirstNonWhitespaceColumn(s);if(i===r)break}return new L(t,1,s+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&&e.target.type===6&&!(((i=e.target.detail.injectedText)===null||i===void 0?void 0:i.options)instanceof Mc)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?Zy(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const n=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(i);return new eb({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(Ae);return Ss.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};Eu.ID="editor.contrib.gotodefinitionatposition";Eu.MAX_SOURCE_PREVIEW_LINES=8;Eu=Qm=Bue([mD(1,Ls),mD(2,qt),mD(3,pe)],Eu);ft(Eu.ID,Eu,2);const dC=ee;class HW extends H{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 E0(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class AM extends H{static render(e,t,i){return new AM(e,t,i)}constructor(e,t,i){super(),this.actionContainer=Y(e,dC("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Y(this.actionContainer,dC("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Y(this.action,dC(`span.icon.${t.iconClass}`));const n=Y(this.action,dC("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register($(this.actionContainer,ae.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this._register($(this.actionContainer,ae.KEY_DOWN,s=>{const r=new Wt(s);(r.equals(3)||r.equals(10))&&(s.stopPropagation(),s.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 Wue(o,e){return o&&e?g("acessibleViewHint","Inspect this in the accessible view with {0}.",e):o?g("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var Vue=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Hue=function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=o[Symbol.asyncIterator],t;return e?e.call(o):(o=typeof __values=="function"?__values(o):o[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=o[s]&&function(r){return new Promise(function(a,l){r=o[s](r),n(a,l,r.done,r.value)})}}function n(s,r,a,l){Promise.resolve(l).then(function(d){s({value:d,done:a})},r)}};let zue=class{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}};class zW extends H{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new A),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Dt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Dt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Dt(()=>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(60).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=kj(e=>this._computer.computeAsync(e)),Vue(this,void 0,void 0,function*(){var e,t,i,n;try{try{for(var s=!0,r=Hue(this._asyncIterable),a;a=yield r.next(),e=a.done,!e;s=!0){n=a.value,s=!1;const l=n;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!s&&!e&&(i=r.return)&&(yield i.call(r))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){He(l)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new zue(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(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();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class _D{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class l1{constructor(e,t,i,n,s,r){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=r,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const af=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class PM{constructor(){this._onDidWillResize=new A,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new A,this.onDidResize=this._onDidResize.event,this._sashListener=new X,this._size=new gt(0,0),this._minSize=new gt(0,0),this._maxSize=new gt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Tn(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Tn(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Tn(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Lw.North}),this._southSash=new Tn(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Lw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(de.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(de.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(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(de.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(de.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{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:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const a=new gt(t,e);gt.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}}const Uue=30,$ue=24;class jue extends H{constructor(e,t=new gt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new PM),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=gt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new gt(i.dimension.width,i.dimension.height)),i.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!((e=this._contentPosition)===null||e===void 0)&&e.position?P.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!t||!i?void 0:Ai(t).top+i.top-Uue}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=Ai(t),s=Ap(t.ownerDocument.body),r=n.top+i.top+i.height;return s.height-r-$ue}_findPositionPreference(e,t){var i,n;const s=Math.min((i=this._availableVerticalSpaceBelow(t))!==null&&i!==void 0?i:1/0,e),r=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(r,s),e),l=Math.min(e,a);let d;return this._editor.getOption(60).above?d=l<=r?1:2:d=l<=s?2:1,d===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),d}_resize(e){this._resizableNode.layout(e.height,e.width)}}var OM=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zh=function(o,e){return function(t,i){e(t,i,o)}},d1,ma;const a5=ee;let qw=d1=class extends H{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(fc,this._editor)),this._participants=[];for(const n of af.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new Zw(this._editor,this._participants),this._hoverOperation=this._register(new zW(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;const s=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new UW(this._computer.anchor,s,n.isComplete))})),this._register(wi(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(ei.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 n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new _D(0,i.range,e.event.posx,e.event.posy)),i.type===7){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToText<n&&t.push(new _D(0,i.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((n,s)=>s.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new _D(0,e,void 0,void 0),t,i,n,null)}_startShowingOrUpdateHover(e,t,i,n,s){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):!1:this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0: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)}_startHoverOperationIfNecessary(e,t,i,n,s){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=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(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):!1}_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){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=d1.computeHoverRanges(this._editor,e.range,t),r=new X,a=r.add(new Gw(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:u=>d=u,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:u=>this._widget.setMinimumDimensions(u),hide:()=>this.hide()};for(const u of this._participants){const f=t.filter(p=>p.owner===u);f.length>0&&r.add(u.renderHoverParts(c,f))}const h=t.some(u=>u.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const u=this._editor.createDecorationsCollection();u.set([{range:s,options:d1._DECORATION_OPTIONS}]),r.add(Me(()=>{u.clear()}))}this._widget.showAt(l,new que(d,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,h,e.initialMousePosX,e.initialMousePosY,r))}else r.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const d=e._getViewModel(),c=d.coordinatesConverter,h=c.convertModelRangeToViewRange(t),u=new P(h.startLineNumber,d.getLineMinColumn(h.startLineNumber));n=c.convertViewPositionToModelPosition(u).column}const s=t.startLineNumber;let r=t.startColumn,a=i[0].range,l=null;for(const d of i)a=L.plusRange(a,d.range),d.range.startLineNumber===s&&d.range.endLineNumber===s&&(r=Math.max(Math.min(r,d.range.startColumn),n)),d.forceShowAtRange&&(l=d.range);return{showAtPosition:l?l.getStartPosition():new P(s,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new P(s,r),highlightRange:a}}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()}};qw._DECORATION_OPTIONS=Ve.register({description:"content-hover-highlight",className:"hoverHighlight"});qw=d1=OM([Zh(1,Re),Zh(2,Et)],qw);class UW{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new Kue(this,this.anchor,t,this.isComplete)}}class Kue extends UW{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class que{constructor(e,t,i,n,s,r,a,l,d,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=n,this.stoleFocus=s,this.source=r,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=d,this.disposables=c,this.closestMouseDistance=void 0}}const l5=30,vD=10,Gue=6;let fc=ma=class extends jue{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,i,n,s){const r=e.getOption(66)+8,a=150,l=new gt(a,r);super(e,l),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new HW),this._minimumSize=l,this._hoverVisibleKey=E.hoverVisible.bindTo(t),this._hoverFocusedKey=E.hoverFocused.bindTo(t),Y(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const d=this._register(Qa(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(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return ma.ID}static _applyDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return ma._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return ma._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){ma._applyMaxDimensions(this._hover.contentsDomNode,e,t),ma._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${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-vD))}_updateResizableNodeMaxDimensions(){var e,t;const i=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new gt(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;ma._lastDimensions=new gt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(i=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||i===void 0||i.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Gue;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{t+=i.clientHeight}),this._hasHorizontalScrollbar()&&(t+=vD),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(t=>t.scrollWidth>t.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=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth<t?Ap(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=Ai(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=d5(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const n=d5(e,t,i.left,i.top,i.width,i.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||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(50),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(t=>this._editor.applyFontInfo(t))}_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,ma._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,ma._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:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var i,n,s,r;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const a=Hh(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(i=this._findPositionPreference(a,l))!==null&&i!==void 0?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();const d=Wue(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(r=(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||s===void 0?void 0:s.getAriaLabel())!==null&&r!==void 0?r:"");d&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+d)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new gt(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,n=this._hover.contentsDomNode,s=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(ps(i),Math.min(s,e)),this._setContentsDomNodeDimensions(ps(n),Math.min(s,e-vD))}setMinimumDimensions(e){this._minimumSize=new gt(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new gt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=Hh(t),n=ps(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=Hh(t),n=ps(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const s=Hh(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(s,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-l5})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+l5})}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})}};fc.ID="editor.contrib.resizableContentHoverWidget";fc._lastDimensions=new gt(0,0);fc=ma=OM([Zh(1,Ae),Zh(2,st),Zh(3,cd),Zh(4,Et)],fc);let Gw=class extends H{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=a5("div.hover-row.status-bar"),this.actionsElement=Y(this.hoverElement,a5("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(AM.render(this.actionsElement,e,i))}append(e){const t=Y(this.actionsElement,e);return this._hasContent=!0,t}};Gw=OM([Zh(0,Et)],Gw);class Zw{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(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;if(r.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ki.EMPTY;const i=Zw._getLineDecorations(this._editor,t);return ki.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):ki.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Zw._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ga(t)}}function d5(o,e,t,i,n,s){const r=t+n/2,a=i+s/2,l=Math.max(Math.abs(o-r)-n/2,0),d=Math.max(Math.abs(e-a)-s/2,0);return Math.sqrt(l*l+d*d)}const c5=ee;class Fg extends H{constructor(e,t,i){super(),this._renderDisposeables=this._register(new X),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new HW),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new ld({editor:this._editor},t,i)),this._computer=new Zue(this._editor),this._hoverOperation=this._register(new zW(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Fg.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_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 n of t){const s=c5("div.hover-row.markdown-hover"),r=Y(s,c5("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}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(),s=this._editor.getOption(66),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Fg.ID="editor.contrib.modesGlyphHoverWidget";class Zue{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||cp(s)||i.push(...t2(s).map(e))}return i}}var Yue=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class Xue{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Que(o,e,t,i,n){return Yue(this,void 0,void 0,function*(){try{const s=yield Promise.resolve(o.provideHover(t,i,n));if(s&&efe(s))return new Xue(o,s,e)}catch(s){Ni(s)}})}function FM(o,e,t,i){const s=o.ordered(e).map((r,a)=>Que(r,a,e,t,i));return ki.fromPromises(s).coalesce()}function Jue(o,e,t,i){return FM(o,e,t,i).map(n=>n.hover).toPromise()}hl("_executeHoverProvider",(o,e,t)=>{const i=o.get(pe);return Jue(i.hoverProvider,e,t,Qe.None)});function efe(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var tfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cC=function(o,e){return function(t,i){e(t,i,o)}};const h5=ee;class Vr{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Yw=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new Vr(this,e.range,[new xn().appendText(g("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),h=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});let u=!1;c>=0&&l>c&&e.range.startColumn>=c&&(u=!0,r.push(new Vr(this,e.range,[{value:g("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!u&&typeof h=="number"&&l>=h&&r.push(new Vr(this,e.range,[{value:g("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const p of t){const m=p.range.startLineNumber===n?p.range.startColumn:1,v=p.range.endLineNumber===n?p.range.endColumn:s,_=p.options.hoverMessage;if(!_||cp(_))continue;p.options.beforeContentClassName&&(f=!0);const b=new L(e.range.startLineNumber,m,e.range.startLineNumber,v);r.push(new Vr(this,b,t2(_),f,a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return ki.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return ki.EMPTY;const s=new P(e.range.startLineNumber,e.range.startColumn);return FM(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!cp(r.hover.contents)).map(r=>{const a=r.hover.range?L.lift(r.hover.range):e.range;return new Vr(this,a,r.hover.contents,!1,r.ordinal)})}renderHoverParts(e,t){return $W(e,t,this._editor,this._languageService,this._openerService)}};Yw=tfe([cC(1,qt),cC(2,zs),cC(3,st),cC(4,pe)],Yw);function $W(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new X;for(const r of e)for(const a of r.contents){if(cp(a))continue;const l=h5("div.hover-row.markdown-hover"),d=Y(l,h5("div.hover-contents")),c=s.add(new ld({editor:t},i,n));s.add(c.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",o.onContentsChanged()}));const h=s.add(c.render(a));d.appendChild(h.element),o.fragment.appendChild(l)}return s}var jW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xw=function(o,e){return function(t,i){e(t,i,o)}};class u5{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let TN=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new A,this.onDidChange=this._onDidChange.event,this._dispoables=new X,this._markers=[],this._nextIdx=-1,ke.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let d=$_(a.resource.toString(),l.resource.toString());return d===0&&(n==="position"?d=L.compareRangesUsingStarts(a,l)||ni.compare(a.severity,l.severity):d=ni.compare(a.severity,l.severity)||L.compareRangesUsingStarts(a,l)),d},r=()=>{this._markers=this._markerService.read({resource:ke.isUri(e)?e:void 0,severities:ni.Error|ni.Warning|ni.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new u5(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=O_(this._markers,{resource:e.uri},(r,a)=>$_(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;r<this._markers.length;r++){let a=L.lift(this._markers[r]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new L(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=r,n=!0;break}if(this._markers[r].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(this._markers.length===0)return!1;const n=this._nextIdx;return this._nextIdx===-1?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(n=>n.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(L.containsPosition(this._markers[i],t))return new u5(this._markers[i],i+1,this._markers.length)}}};TN=jW([Xw(1,ul),Xw(2,st)],TN);const KW=et("IMarkerNavigationService");let RN=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new ns}getMarkerList(e){for(const t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new TN(e,this._markerService,this._configService)}};RN=jW([Xw(0,ul),Xw(1,st)],RN);dt(KW,RN,1);var MN;(function(o){function e(t){switch(t){case gi.Ignore:return"severity-ignore "+Ie.asClassName(oe.info);case gi.Info:return Ie.asClassName(oe.info);case gi.Warning:return Ie.asClassName(oe.warning);case gi.Error:return Ie.asClassName(oe.error);default:return""}}o.className=e})(MN||(MN={}));var ife=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yf=function(o,e){return function(t,i){e(t,i,o)}},AN;class nfe{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 X,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(wi(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new H7(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){St(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=(t?.length||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=Xa(i);this._lines=a.length,this._longestLineLength=0;for(const u of a)this._longestLineLength=Math.max(u.length+r,this._longestLineLength);fn(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),u.appendChild(f)}if(s)if(typeof s=="string"){const f=document.createElement("span");f.innerText=`(${s})`,f.classList.add("code"),u.appendChild(f)}else{this._codeLink=ee("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=p=>{this._openerService.open(s.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()};const f=Y(this._codeLink,ee("span"));f.innerText=s.value,u.appendChild(this._codeLink)}}if(fn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Fn(n)){const u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const f of n){const p=document.createElement("div"),m=document.createElement("a");m.classList.add("filename"),m.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,m.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(m,f);const v=document.createElement("span");v.innerText=f.message,p.appendChild(m),p.appendChild(v),this._lines+=1,u.appendChild(p)}}const d=this._editor.getOption(50),c=Math.ceil(d.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=d.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,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 ni.Error:t=g("Error","Error");break;case ni.Warning:t=g("Warning","Warning");break;case ni.Info:t=g("Info","Info");break;case ni.Hint:t=g("Hint","Hint");break}let i=g("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 Cp=AN=class extends Kw{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 X,this._onDidSelectRelatedInformation=new A,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=ni.Warning,this._backgroundColor=V.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(afe);let t=PN,i=sfe;this._severity===ni.Warning?(t=c1,i=ofe):this._severity===ni.Info&&(t=ON,i=rfe);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(TW),secondaryHeadingColor:e.getColor(RW)})}_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(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(AN.TitleMenu,this._contextKeyService);wB(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=Y(e,ee(""))}_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 nfe(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),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.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?g("problems","{0} of {1} problems",t,i):g("change","{0} of {1} problem",t,i);this.setTitle(Bo(a.uri),l)}this._icon.className=`codicon ${MN.className(ni.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,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()}};Cp.TitleMenu=new k("gotoErrorTitleMenu");Cp=AN=ife([yf(1,Ki),yf(2,zs),yf(3,dl),yf(4,Re),yf(5,Ae),yf(6,ap)],Cp);const f5=lv(Fa,VG),g5=lv(no,rv),p5=lv(bs,av),PN=T("editorMarkerNavigationError.background",{dark:f5,light:f5,hcDark:nt,hcLight:nt},g("editorMarkerNavigationError","Editor marker navigation widget error color.")),sfe=T("editorMarkerNavigationError.headerBackground",{dark:we(PN,.1),light:we(PN,.1),hcDark:null,hcLight:null},g("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),c1=T("editorMarkerNavigationWarning.background",{dark:g5,light:g5,hcDark:nt,hcLight:nt},g("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),ofe=T("editorMarkerNavigationWarning.headerBackground",{dark:we(c1,.1),light:we(c1,.1),hcDark:"#0C141F",hcLight:we(c1,.2)},g("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ON=T("editorMarkerNavigationInfo.background",{dark:p5,light:p5,hcDark:nt,hcLight:nt},g("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),rfe=T("editorMarkerNavigationInfo.headerBackground",{dark:we(ON,.1),light:we(ON,.1),hcDark:null,hcLight:null},g("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),afe=T("editorMarkerNavigation.background",{dark:ji,light:ji,hcDark:ji,hcLight:ji},g("editorMarkerNavigationBackground","Editor marker navigation widget background."));var lfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hC=function(o,e){return function(t,i){e(t,i,o)}},qW=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},Jm;let Vc=Jm=class{static get(e){return e.getContribution(Jm.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new X,this._editor=e,this._widgetVisible=GW.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(Cp,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(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!L.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:L.lift(i).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 P(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 qW(this,void 0,void 0,function*(){if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=yield this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=Jm.get(r))===null||i===void 0||i.close(),(n=Jm.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}})}};Vc.ID="editor.contrib.markerController";Vc=Jm=lfe([hC(1,KW),hC(2,Ae),hC(3,_t),hC(4,Re)],Vc);class Xy extends fe{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return qW(this,void 0,void 0,function*(){t.hasModel()&&((i=Vc.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class gc extends Xy{constructor(){super(!0,!1,{id:gc.ID,label:gc.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:578,weight:100},menuOpts:{menuId:Cp.TitleMenu,title:gc.LABEL,icon:_i("marker-navigation-next",oe.arrowDown,g("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}gc.ID="editor.action.marker.next";gc.LABEL=g("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class su extends Xy{constructor(){super(!1,!1,{id:su.ID,label:su.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:1602,weight:100},menuOpts:{menuId:Cp.TitleMenu,title:su.LABEL,icon:_i("marker-navigation-previous",oe.arrowUp,g("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}su.ID="editor.action.marker.prev";su.LABEL=g("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class dfe extends Xy{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:g("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:E.focus,primary:66,weight:100},menuOpts:{menuId:k.MenubarGoMenu,title:g({},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class cfe extends Xy{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:g("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:E.focus,primary:1090,weight:100},menuOpts:{menuId:k.MenubarGoMenu,title:g({},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}ft(Vc.ID,Vc,4);ie(gc);ie(su);ie(dfe);ie(cfe);const GW=new ce("markersNavigationVisible",!1),hfe=tn.bindToContribution(Vc.get);re(new hfe({id:"closeMarkersNavigation",precondition:GW,handler:o=>o.close(),kbOpts:{weight:150,kbExpr:E.focus,primary:9,secondary:[1033]}}));var ufe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bD=function(o,e){return function(t,i){e(t,i,o)}};const Go=ee;class ffe{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const m5={type:1,filter:{include:Ne.QuickFix},triggerAction:Vs.QuickFixHover};let FN=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()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,d=a.range.endLineNumber===n?a.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const h=new L(e.range.startLineNumber,l,e.range.startLineNumber,d);r.push(new ffe(this,h,c))}return r}renderHoverParts(e,t){if(!t.length)return H.None;const i=new X;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>ni.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=Go("div.hover-row"),n=Y(i,Go("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const d=Y(n,Go("span"));if(d.style.whiteSpace="pre-wrap",d.innerText=r,s||a)if(a&&typeof a!="string"){const c=Go("span");if(s){const p=Y(c,Go("span"));p.innerText=s}const h=Y(c,Go("a.code-link"));h.setAttribute("href",a.target.toString()),t.add($(h,"click",p=>{this._openerService.open(a.target,{allowCommands:!0}),p.preventDefault(),p.stopPropagation()}));const u=Y(h,Go("span"));u.innerText=a.value;const f=Y(n,c);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const c=Y(n,Go("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(Fn(l))for(const{message:c,resource:h,startLineNumber:u,startColumn:f}of l){const p=Y(n,Go("div"));p.style.marginTop="8px";const m=Y(p,Go("a"));m.innerText=`${Bo(h)}(${u}, ${f}): `,m.style.cursor="pointer",t.add($(m,"click",_=>{_.stopPropagation(),_.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:f}}}).catch(He)}));const v=Y(p,Go("span"));v.innerText=c,this._editor.applyFontInfo(v)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===ni.Error||t.marker.severity===ni.Warning||t.marker.severity===ni.Info)&&e.statusBar.addAction({label:g("view problem","View Problem"),commandId:gc.ID,run:()=>{var n;e.hide(),(n=Vc.get(this._editor))===null||n===void 0||n.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const n=e.statusBar.append(Go("div"));this.recentMarkerCodeActionsInfo&&(Sw.makeKey(this.recentMarkerCodeActionsInfo.marker)===Sw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=g("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?H.None:i.add(xc(()=>n.textContent=g("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=" ");const r=this.getCodeActions(t.marker);i.add(Me(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=g("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Me(()=>{l||a.dispose()})),e.statusBar.addAction({label:g("quick fixes","Quick Fix..."),commandId:DM,run:d=>{l=!0;const c=Pc.get(this._editor),h=Ai(d);e.hide(),c?.showCodeActions(m5,a,{x:h.left,y:h.top,width:h.width,height:h.height})}})},He)}}getCodeActions(e){return Wi(t=>D_(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),m5,Jl.None,t))}};FN=ufe([bD(1,H2),bD(2,zs),bD(3,pe)],FN);const ZW="editor.action.inlineSuggest.commit",YW="editor.action.inlineSuggest.showPrevious",XW="editor.action.inlineSuggest.showNext";var gfe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};class pfe extends H{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new iU),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new X),this.options=i,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new qv(()=>{var n;return(n=this.toggleMenuActionViewItem)===null||n===void 0?void 0:n.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new Wo(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,actionViewItemProvider:(n,s)=>{var r;if(n.id===qv.ID)return this.toggleMenuActionViewItem=new pw(n,n.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Ie.asClassNameArray((r=i.moreIcon)!==null&&r!==void 0?r:oe.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 a=i.actionViewItemProvider(n,s);if(a)return a}if(n instanceof qg){const a=new pw(n,n.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:n.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}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(n=>{this.actionBar.push(n,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(n)})})}getKeybindingLabel(e){var t,i,n;const s=this.lookupKeybindings?(i=(t=this.options).getKeyBinding)===null||i===void 0?void 0:i.call(t,e):void 0;return(n=s?.getLabel())!==null&&n!==void 0?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class qv extends as{constructor(e,t){t=t||g("moreActions","More Actions..."),super(qv.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return gfe(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}qv.ID="toolbar.toggle.more";var mfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xm=function(o,e){return function(t,i){e(t,i,o)}};let BN=class extends pfe{constructor(e,t,i,n,s,r,a){super(e,s,Object.assign(Object.assign({getKeyBinding:d=>{var c;return(c=r.lookupKeybinding(d.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof t?.telemetrySource=="string"})),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._sessionDisposables=this._store.add(new X);const l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(d=>a.publicLog2("workbenchActionExecuted",{id:d.action.id,from:l})))}setActions(e,t=[],i){var n,s,r;this._sessionDisposables.clear();const a=e.slice(),l=t.slice(),d=[];let c=0;const h=[];let u=!1;if(((n=this._options)===null||n===void 0?void 0:n.hiddenItemStrategy)!==-1)for(let f=0;f<a.length;f++){const p=a[f];!(p instanceof dr)&&!(p instanceof G_)||p.hideActions&&(d.push(p.hideActions.toggle),p.hideActions.toggle.checked&&c++,p.hideActions.isHidden&&(u=!0,a[f]=void 0,((s=this._options)===null||s===void 0?void 0:s.hiddenItemStrategy)!==0&&(h[f]=p)))}if(((r=this._options)===null||r===void 0?void 0:r.overflowBehavior)!==void 0){const f=Lse(new Set(this._options.overflowBehavior.exempted),Xe.map(a,v=>v?.id)),p=this._options.overflowBehavior.maxItems-f.size;let m=0;for(let v=0;v<a.length;v++){const _=a[v];_&&(m++,!f.has(_.id)&&m>=p&&(a[v]=void 0,h[v]=_))}}xA(a),xA(h),super.setActions(a,en.join(h,l)),d.length>0&&this._sessionDisposables.add($(this.getElement(),"contextmenu",f=>{var p,m,v,_,b;const C=new Do(f),w=this.getItemAction(C.target);if(!w)return;C.preventDefault(),C.stopPropagation();let S=!1;if(c===1&&((p=this._options)===null||p===void 0?void 0:p.hiddenItemStrategy)===0){S=!0;for(let I=0;I<d.length;I++)if(d[I].checked){d[I]=pg({id:w.id,label:w.label,checked:!0,enabled:!1,run(){}});break}}let D;if(!S&&(w instanceof dr||w instanceof G_)){if(!w.hideActions)return;D=w.hideActions.hide}else D=pg({id:"label",label:g("hide","Hide"),enabled:!1,run(){}});const x=en.join([D],d);!((m=this._options)===null||m===void 0)&&m.resetMenu&&!i&&(i=[this._options.resetMenu]),u&&i&&(x.push(new en),x.push(pg({id:"resetThisMenu",label:g("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>C,getActions:()=>x,menuId:(v=this._options)===null||v===void 0?void 0:v.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(_=this._options)===null||_===void 0?void 0:_.menuOptions),skipTelemetry:typeof((b=this._options)===null||b===void 0?void 0:b.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};BN=mfe([xm(2,dl),xm(3,Ae),xm(4,pr),xm(5,Et),xm(6,go)],BN);var BM=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hr=function(o,e){return function(t,i){e(t,i,o)}},h1;let WN=class extends H{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=un(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=ot(this,n=>{var s,r,a;const l=(s=this.model.read(n))===null||s===void 0?void 0:s.ghostText.read(n);if(!this.alwaysShowToolbar.read(n)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const d=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new P(l.lineNumber,Math.min(d,(a=(r=this.sessionPosition)===null||r===void 0?void 0:r.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Ns((n,s)=>{const r=this.model.read(n);if(!r||!this.alwaysShowToolbar.read(n))return;const a=s.add(this.instantiationService.createInstance(Hc,this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(l=>{var d;return(d=l?.inlineCompletion.source.inlineCompletions.commands)!==null&&d!==void 0?d:[]})));e.addContentWidget(a),s.add(Me(()=>e.removeContentWidget(a))),s.add(Mt(l=>{this.position.read(l)&&r.lastTriggerKind.read(l)!==Yl.Explicit&&r.triggerExplicitly()}))}))}};WN=BM([Hr(2,Re)],WN);const _fe=_i("inline-suggestion-hints-next",oe.chevronRight,g("parameterHintsNextIcon","Icon for show next parameter hint.")),vfe=_i("inline-suggestion-hints-previous",oe.chevronLeft,g("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Hc=h1=class extends H{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new as(e,t,i,!0,()=>this._commandService.executeCommand(e)),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let r=t;return s&&(r=g({},"{0} ({1})",t,s.getLabel())),n.tooltip=r,n}constructor(e,t,i,n,s,r,a,l,d,c,h){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=r,this._commandService=a,this.keybindingService=d,this._contextKeyService=c,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${h1.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=rn("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[rn("div@toolBar")]),this.previousAction=this.createCommandAction(YW,g("previous","Previous"),Ie.asClassName(vfe)),this.availableSuggestionCountAction=new as("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(XW,g("next","Next"),Ie.asClassName(_fe)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(k.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Dt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Dt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(VN,this.nodes.toolBar,k.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:u=>u.startsWith("primary")},actionViewItemProvider:(u,f)=>{if(u instanceof dr)return l.createInstance(Cfe,u,void 0);if(u===this.availableSuggestionCountAction){const p=new bfe(void 0,u,{label:!0,icon:!1});return p.setClass("availableSuggestionCount"),p}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(u=>{h1._dropDownVisible=u})),this._register(Mt(u=>{this._position.read(u),this.editor.layoutContentWidget(this)})),this._register(Mt(u=>{const f=this._suggestionCount.read(u),p=this._currentSuggestionIdx.read(u);f!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${p+1}/${f}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),f!==void 0&&f>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Mt(u=>{const f=this._extraCommands.read(u);if(mi(this.lastCommands,f))return;this.lastCommands=f;const p=f.map(m=>({class:void 0,id:m.id,enabled:!0,tooltip:m.tooltip||"",label:m.title,run:v=>this._commandService.executeCommand(m.id)}));for(const[m,v]of this.inlineCompletionsActionsMenus.getActions())for(const _ of v)_ instanceof dr&&p.push(_);p.length>0&&p.unshift(new en),this.toolBar.setAdditionalSecondaryActions(p)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Hc._dropDownVisible=!1;Hc.id=0;Hc=h1=BM([Hr(6,li),Hr(7,Re),Hr(8,Et),Hr(9,Ae),Hr(10,dl)],Hc);class bfe extends hp{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Cfe=class extends bu{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=rn("div.keybinding").root;new V0(t,to,Object.assign({disableTitle:!0},zoe)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},VN=class extends BN{constructor(e,t,i,n,s,r,a,l){super(e,Object.assign({resetMenu:t},i),n,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,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,s,r,a;const l=[],d=[];wB(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:d},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(s=(n=this.options2)===null||n===void 0?void 0:n.toolbarOptions)===null||s===void 0?void 0:s.shouldInlineSubmenu,(a=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),d.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,d)}setPrependedPrimaryActions(e){mi(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){mi(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};VN=BM([Hr(3,dl),Hr(4,Ae),Hr(5,pr),Hr(6,Et),Hr(7,go)],VN);var wfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uC=function(o,e){return function(t,i){e(t,i,o)}},HN;let ys=HN=class extends H{static get(e){return e.getContribution(HN.ID)}constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._toUnhook=new X,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Dt(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(60);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._hidingDelay=t.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const i=e.target;if(i.type===9&&i.detail===fc.ID){this._hoverClicked=!0;return}i.type===12&&i.detail===Fg.ID||(i.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,i;const n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,r;const a=e.target;return!!(this._isHoverSticky&&a.type===9&&a.detail===fc.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((s=(n=e.event.browserEvent.view)===null||n===void 0?void 0:n.getSelection())===null||s===void 0)&&s.isCollapsed)||!this._isHoverSticky&&a.type===9&&a.detail===fc.ID&&(!((r=this._contentWidget)===null||r===void 0)&&r.isColorPickerVisible)||this._isHoverSticky&&a.type===12&&a.detail===Fg.ID)}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((i=this._contentWidget)===null||i===void 0)&&i.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((n=this._contentWidget)===null||n===void 0)&&n.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((s=this._contentWidget)===null||s===void 0)&&s.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n;if(!e)return;const s=e.target,r=(t=s.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),a=this._editor.getOption(146);if(r&&(a==="click"&&!this._hoverActivatedByColorDecoratorClick||a==="hover"&&!this._isHoverEnabled||a==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!r&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(i=this._glyphWidget)===null||i===void 0||i.hide();return}if(s.type===2&&s.position){(n=this._contentWidget)===null||n===void 0||n.hide(),this._glyphWidget||(this._glyphWidget=new Fg(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(s.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!n&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Hc.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(qw,this._editor)),this._contentWidget}showContentHover(e,t,i,n,s=!1){this._hoverActivatedByColorDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};ys.ID="editor.contrib.hover";ys=HN=wfe([uC(1,Re),uC(2,zs),uC(3,qt),uC(4,Et)],ys);class Sfe extends fe{constructor(){super({id:"editor.action.showHover",label:g({},"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:E.editorTextFocus,primary:Pi(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=ys.get(t);if(!n)return;const s=t.getPosition(),r=new L(s.lineNumber,s.column,s.lineNumber,s.column),a=t.getOption(2)===2||!!i?.focus;n.isHoverVisible?n.focus():n.showContentHover(r,1,1,a)}}class yfe extends fe{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:g({},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=ys.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new L(n.lineNumber,n.column,n.lineNumber,n.column),r=Eu.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,1,!0)})}}class Lfe extends fe{constructor(){super({id:"editor.action.scrollUpHover",label:g({},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:16,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollUp()}}class xfe extends fe{constructor(){super({id:"editor.action.scrollDownHover",label:g({},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:18,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollDown()}}class Dfe extends fe{constructor(){super({id:"editor.action.scrollLeftHover",label:g({},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:15,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollLeft()}}class kfe extends fe{constructor(){super({id:"editor.action.scrollRightHover",label:g({},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:17,weight:100}})}run(e,t){const i=ys.get(t);i&&i.scrollRight()}}class Ife extends fe{constructor(){super({id:"editor.action.pageUpHover",label:g({},"Page Up Hover"),alias:"Page Up Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=ys.get(t);i&&i.pageUp()}}class Efe extends fe{constructor(){super({id:"editor.action.pageDownHover",label:g({},"Page Down Hover"),alias:"Page Down Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=ys.get(t);i&&i.pageDown()}}class Nfe extends fe{constructor(){super({id:"editor.action.goToTopHover",label:g({},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=ys.get(t);i&&i.goToTop()}}class Tfe extends fe{constructor(){super({id:"editor.action.goToBottomHover",label:g({},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=ys.get(t);i&&i.goToBottom()}}ft(ys.ID,ys,2);ie(Sfe);ie(yfe);ie(Lfe);ie(xfe);ie(Dfe);ie(kfe);ie(Ife);ie(Efe);ie(Nfe);ie(Tfe);af.register(Yw);af.register(FN);gr((o,e)=>{const t=o.getColor(tZ);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class zN extends H{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==wW||!i.range)return;const n=this._editor.getContribution(ys.ID);if(n&&!n.isColorPickerVisible){const s=new L(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(s,1,0,!1,!0)}}}zN.ID="editor.contrib.colorContribution";ft(zN.ID,zN,2);af.register(jw);var QW=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Fr=function(o,e){return function(t,i){e(t,i,o)}},_5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},UN,$N;let zc=UN=class extends H{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=r,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=E.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=E.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Qw(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),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(UN.ID)}};zc.ID="editor.contrib.standaloneColorPickerController";zc=UN=QW([Fr(1,Ae),Fr(2,Zt),Fr(3,Et),Fr(4,Re),Fr(5,pe),Fr(6,At)],zc);ft(zc.ID,zc,1);const v5=8,Rfe=22;let Qw=$N=class extends H{constructor(e,t,i,n,s,r,a,l){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=r,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new A),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(Uv,this._editor),this._position=(d=this._editor._getViewModel())===null||d===void 0?void 0:d.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),h=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},u=this._register(Qa(this._body));this._register(u.onDidBlur(f=>{this.hide()})),this._register(u.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var p;const m=(p=f.target.element)===null||p===void 0?void 0:p.classList;m&&m.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(h),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return $N.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).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 _5(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new Mfe(t.result,t.foundInEditor))})}_computeAsync(e){return _5(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 NM(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null})}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new Gw(this._keybindingService));let s;const r={fragment:i,statusBar:n,setColorPicker:m=>s=m,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(r,[e])),s===void 0)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(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),s.layout();const a=s.body,l=a.saturationBox.domNode.clientWidth,d=a.domNode.clientWidth-l-Rfe-v5,c=s.body.enterButton;c?.onClicked(()=>{this.updateEditor(),this.hide()});const h=s.header,u=h.pickedColorNode;u.style.width=l+v5+"px";const f=h.originalColorNode;f.style.width=d+"px";const p=s.header.closeButton;p?.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Qw.ID="editor.contrib.standaloneColorPickerWidget";Qw=$N=QW([Fr(3,Re),Fr(4,Zt),Fr(5,Et),Fr(6,pe),Fr(7,At)],Qw);class Mfe{constructor(e,t){this.value=e,this.foundInEditor=t}}class Afe extends oa{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:g("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:g({},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:k.CommandPalette}]})}runEditorCommand(e,t){var i;(i=zc.get(t))===null||i===void 0||i.showOrFocus()}}class Pfe extends fe{constructor(){super({id:"editor.action.hideColorPicker",label:g({},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:E.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=zc.get(t))===null||i===void 0||i.hide()}}class Ofe extends fe{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:g({},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:E.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=zc.get(t))===null||i===void 0||i.insertColor()}}ie(Pfe);ie(Ofe);jt(Afe);class Qd{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,s=e.length;if(i+n>s)return!1;for(let r=0;r<n;r++){const a=e.charCodeAt(i+r),l=t.charCodeAt(r);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,h=s.getLineContent(a),u=s.getLineContent(d);let f=h.lastIndexOf(t,l-1+t.length),p=u.indexOf(i,c-1-i.length);if(f!==-1&&p!==-1)if(a===d)h.substring(f+t.length,p).indexOf(i)>=0&&(f=-1,p=-1);else{const v=h.substring(f+t.length),_=u.substring(0,p);(v.indexOf(i)>=0||_.indexOf(i)>=0)&&(f=-1,p=-1)}let m;f!==-1&&p!==-1?(n&&f+t.length<h.length&&h.charCodeAt(f+t.length)===32&&(t=t+" "),n&&p>0&&u.charCodeAt(p-1)===32&&(i=" "+i,p-=1),m=Qd._createRemoveBlockCommentOperations(new L(a,f+t.length+1,d,p+1),t,i)):(m=Qd._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=m.length===1?i:null);for(const v of m)r.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return L.isEmpty(e)?n.push(Xt.delete(new L(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(Xt.delete(new L(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(Xt.delete(new L(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return L.isEmpty(e)?s.push(Xt.replace(new L(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(Xt.insert(new P(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(Xt.insert(new P(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new ve(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new ve(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class kl{constructor(e,t,i,n,s,r,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,a=r?r.lineCommentToken:null;if(!a)return null;const l=[];for(let d=0,c=i-t+1;d<c;d++)l[d]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,i,n,s,r,a,l){let d=!0,c;e===0?c=!0:e===1?c=!1:c=!0;for(let h=0,u=n.length;h<u;h++){const f=n[h],p=s+h;if(p===s&&a){f.ignore=!0;continue}const m=i.getLineContent(p),v=Gn(m);if(v===-1){f.ignore=r,f.commentStrOffset=m.length;continue}if(d=!1,f.ignore=!1,f.commentStrOffset=v,c&&!Qd._haystackHasNeedleAtOffset(m,f.commentStr,v)&&(e===0?c=!1:e===1||(f.ignore=!0)),c&&t){const _=v+f.commentStrLength;_<m.length&&m.charCodeAt(_)===32&&(f.commentStrLength+=1)}}if(e===0&&d){c=!1;for(let h=0,u=n.length;h<u;h++)n[h].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:n}}static _gatherPreflightData(e,t,i,n,s,r,a,l){const d=kl._gatherPreflightCommentStrings(i,n,s,l);return d===null?{supported:!1}:kl._analyzeLines(e,t,i,d,n,r,a,l)}_executeLineComments(e,t,i,n){let s;i.shouldRemoveComments?s=kl._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(kl._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const r=new P(n.positionLineNumber,n.positionColumn);for(let a=0,l=s.length;a<l;a++)t.addEditOperation(s[a].range,s[a].text),L.isEmpty(s[a].range)&&L.getStartPosition(s[a].range).equals(r)&&e.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(s[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let s=t.startLineNumber,r=t.endLineNumber;const a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let l=e.getLineContent(s).lastIndexOf(i,a-1),d=e.getLineContent(r).indexOf(n,t.endColumn-1-i.length);return l!==-1&&d===-1&&(d=e.getLineContent(s).indexOf(n,l+i.length),r=s),l===-1&&d!==-1&&(l=e.getLineContent(r).lastIndexOf(i,d),s=r),t.isEmpty()&&(l===-1||d===-1)&&(l=e.getLineContent(s).indexOf(i),l!==-1&&(d=e.getLineContent(s).indexOf(n,l+i.length))),l!==-1&&e.getLineContent(s).charCodeAt(l+i.length)===32&&(i+=" "),d!==-1&&e.getLineContent(r).charCodeAt(d-1)===32&&(n=" "+n,d-=1),l!==-1&&d!==-1?Qd._createRemoveBlockCommentOperations(new L(s,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),s=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const r=s.blockCommentStartToken,a=s.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,r,a);if(!l){if(i.isEmpty()){const d=e.getLineContent(i.startLineNumber);let c=Gn(d);c===-1&&(c=d.length),l=Qd._createAddBlockCommentOperations(new L(i.startLineNumber,c+1,i.startLineNumber,d.length+1),r,a,this._insertSpace)}else l=Qd._createAddBlockCommentOperations(new L(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),r,a,this._insertSpace);l.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=t.trackSelection(i);for(const d of l)t.addEditOperation(d.range,d.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new L(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":`
638
638
  `),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=kl._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 ve(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.ignore||i.push(Xt.delete(new L(t+n,r.commentStrOffset+1,t+n,r.commentStrOffset+r.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let s=0,r=e.length;s<r;s++){const a=e[s];a.ignore||i.push(Xt.insert(new P(t+s,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let s=1073741824,r,a;for(let l=0,d=t.length;l<d;l++){if(t[l].ignore)continue;const c=e.getLineContent(i+l);let h=0;for(let u=0,f=t[l].commentStrOffset;h<s&&u<f;u++)h=kl.nextVisibleColumn(h,n,c.charCodeAt(u)===9,1);h<s&&(s=h)}s=Math.floor(s/n)*n;for(let l=0,d=t.length;l<d;l++){if(t[l].ignore)continue;const c=e.getLineContent(i+l);let h=0;for(r=0,a=t[l].commentStrOffset;h<s&&r<a;r++)h=kl.nextVisibleColumn(h,n,c.charCodeAt(r)===9,1);h>s?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class WM extends fe{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(At);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(23),l=t.getSelections().map((c,h)=>({selection:c,index:h,ignoreFirstLine:!1}));l.sort((c,h)=>L.compareRangesUsingStarts(c.selection,h.selection));let d=l[0];for(let c=1;c<l.length;c++){const h=l[c];d.selection.endLineNumber===h.selection.startLineNumber&&(d.index<h.index?h.ignoreFirstLine=!0:(d.ignoreFirstLine=!0,d=h))}for(const c of l)s.push(new kl(i,c.selection,r.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,c.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class Ffe extends WM{constructor(){super(0,{id:"editor.action.commentLine",label:g("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:k.MenubarEditMenu,group:"5_insert",title:g({},"&&Toggle Line Comment"),order:1}})}}class Bfe extends WM{constructor(){super(1,{id:"editor.action.addCommentLine",label:g("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:Pi(2089,2081),weight:100}})}}class Wfe extends WM{constructor(){super(2,{id:"editor.action.removeCommentLine",label:g("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:Pi(2089,2099),weight:100}})}}class Vfe extends fe{constructor(){super({id:"editor.action.blockComment",label:g("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:k.MenubarEditMenu,group:"5_insert",title:g({},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(At);if(!t.hasModel())return;const n=t.getOption(23),s=[],r=t.getSelections();for(const a of r)s.push(new Qd(a,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}ie(Ffe);ie(Bfe);ie(Wfe);ie(Vfe);var Hfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mh=function(o,e){return function(t,i){e(t,i,o)}},jN;let wp=jN=class{static get(e){return e.getContribution(jN.ID)}constructor(e,t,i,n,s,r,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new X,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(d=>this._onContextMenu(d))),this._toDispose.add(this._editor.onMouseWheel(d=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),h=d.srcElement;h.shadowRoot&&gu(c)===h.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(d=>{this._editor.getOption(24)&&d.keyCode===58&&(d.preventDefault(),d.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?k.SimpleEditorContext:k.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const r of s){const[,a]=r;let l=0;for(const d of a)if(d instanceof G_){const c=this._getMenuActions(e,d.item.submenu);c.length>0&&(i.push(new qg(d.id,d.label,c)),l++)}else i.push(d),l++;l&&i.push(new en)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const r=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Ai(this._editor.getDomNode()),l=a.left+r.left,d=a.top+r.top+r.height;n={x:l,y:d}}const s=this._editor.getOption(126)&&!Yr;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:r=>{const a=this._keybindingFor(r);if(a)return new hp(r,r,{label:!0,keybinding:a.getLabel(),isMenu:!0});const l=r;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new hp(r,r,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:r=>this._keybindingFor(r),onHide:r=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||wie(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(72);let i=0;const n=d=>({id:`menu-action-${++i}`,label:d.label,tooltip:"",class:void 0,enabled:typeof d.enabled>"u"?!0:d.enabled,checked:d.checked,run:d.run}),s=(d,c)=>new qg(`menu-action-${++i}`,d,c,void 0),r=(d,c,h,u,f)=>{if(!c)return n({label:d,enabled:c,run:()=>{}});const p=v=>()=>{this._configurationService.updateValue(h,v)},m=[];for(const v of f)m.push(n({label:v.label,checked:u===v.value,run:p(v.value)}));return s(d,m)},a=[];a.push(n({label:g("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new en),a.push(n({label:g("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(r(g("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:g("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:g("context.minimap.size.fill","Fill"),value:"fill"},{label:g("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(r(g("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:g("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:g("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(126)&&!Yr;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:d=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};wp.ID="editor.contrib.contextmenu";wp=jN=Hfe([mh(1,pr),mh(2,hd),mh(3,Ae),mh(4,Et),mh(5,dl),mh(6,st),mh(7,_u)],wp);class zfe extends fe{constructor(){super({id:"editor.action.showContextMenu",label:g("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=wp.get(t))===null||i===void 0||i.showContextMenu()}}ft(wp.ID,wp,2);ie(zfe);class CD{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0}}class wD{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class Nu extends H{static get(e){return e.getContribution(Nu.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new CD(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new wD(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new wD(new CD(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new wD(new CD(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}}Nu.ID="editor.contrib.cursorUndoRedoController";class Ufe extends fe{constructor(){super({id:"cursorUndo",label:g("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;(n=Nu.get(t))===null||n===void 0||n.cursorUndo()}}class $fe extends fe{constructor(){super({id:"cursorRedo",label:g("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;(n=Nu.get(t))===null||n===void 0||n.cursorRedo()}}ft(Nu.ID,Nu,0);ie(Ufe);ie($fe);class jfe{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);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new L(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.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new ve(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);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new ve(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);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new ve(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);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new ve(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.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 ve(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}function Lf(o){return at?o.altKey:o.ctrlKey}class id extends H{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),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(35)||this._editor.getOption(22)||(Lf(e)&&(this._modifierPressed=!0),this._mouseDown&&Lf(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(Lf(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===id.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(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}Lf(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 P(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new ve(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new ve(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Lf(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(id.ID,new jfe(this._dragSelection,t,Lf(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 L(e.lineNumber,e.column,e.lineNumber,e.column),options:id._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}id.ID="editor.contrib.dragAndDrop";id.TRIGGER_KEY_VALUE=at?6:5;id._DECORATION_OPTIONS=Ve.register({description:"dnd-target",className:"dnd-target"});ft(id.ID,id,2);const Qy=(function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}})();var JW=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function VM(o){return{asString:()=>JW(this,void 0,void 0,function*(){return o}),asFile:()=>{},value:typeof o=="string"?o:void 0}}function Kfe(o,e,t){const i={id:Qy(),name:o,uri:e,data:t};return{asString:()=>JW(this,void 0,void 0,function*(){return""}),asFile:()=>i,value:void 0}}class eV{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 Xe.some(this,([i,n])=>n.asFile())&&t.push("files"),iV(Jw(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?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 Jw(e)}}function Jw(o){return o.toLowerCase()}function tV(o,e){return iV(Jw(o),e.map(Jw))}function iV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const Jy=Object.freeze({create:o=>vc(o.map(e=>e.toString())).join(`\r
639
639
  `),split:o=>o.split(`\r
640
640
  `),parse:o=>Jy.split(o).filter(e=>!e.startsWith("#"))}),b5={EDITORS:"CodeEditors",FILES:"CodeFiles"};class qfe{}const Gfe={DragAndDropContribution:"workbench.contributions.dragAndDrop"};Jt.add(Gfe.DragAndDropContribution,new qfe);class Gv{constructor(){}static getInstance(){return Gv.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}Gv.INSTANCE=new Gv;var Zfe=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};function nV(o){const e=new eV;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,VM(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,Yfe(n))}}return e}function Yfe(o){const e=o.path?ke.parse(o.path):void 0;return Kfe(o.name,e,()=>Zfe(this,void 0,void 0,function*(){return new Uint8Array(yield o.arrayBuffer())}))}const Xfe=Object.freeze([b5.EDITORS,b5.FILES,Dv.RESOURCES,Dv.INTERNAL_URI_LIST]);function sV(o,e=!1){const t=nV(o),i=t.get(Dv.INTERNAL_URI_LIST);if(i)t.replace(pi.uriList,i);else if(e||!t.has(pi.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=r.path;try{a?n.push(ke.file(a).toString()):n.push(ke.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(pi.uriList,VM(Jy.create(n)))}for(const n of Xfe)t.delete(n);return t}function Qfe(o,e,t){var i,n;return{edits:[...e.map(s=>new Ql(o,typeof t.insertText=="string"?{range:s,text:t.insertText,insertAsSnippet:!1}:{range:s,text:t.insertText.snippet,insertAsSnippet:!0})),...(n=(i=t.additionalEdit)===null||i===void 0?void 0:i.edits)!==null&&n!==void 0?n:[]]}}function oV(o){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}const i=new Map;for(const a of o)for(const l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(const d of o)if(d!==a&&t(l,d)){let c=i.get(a);c||(c=[],i.set(a,c)),c.push(d)}if(!i.size)return Array.from(o);const n=new Set,s=[];function r(a){if(!a.length)return[];const l=a[0];if(s.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(n.has(l))return r(a.slice(1));let d=[];const c=i.get(l);return c&&(s.push(l),d=r(c),s.pop()),n.add(l),[...d,l,...r(a.slice(1))]}return r(Array.from(o))}var Jfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ege=function(o,e){return function(t,i){e(t,i,o)}},tge=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const ige=Ve.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:m9,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class eL extends H{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=ee(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=ee("span.icon");this.domNode.append(t),t.classList.add(...Ie.asClassNameArray(oe.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(66);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(66))&&i()})),this._register($(this.domNode,ae.CLICK,n=>{this.delegate.cancel()}))}getId(){return eL.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)}}eL.baseId="editor.widget.inlineProgressWidget";let eS=class extends H{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new pn),this._currentWidget=new pn,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,i){return tge(this,void 0,void 0,function*(){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=xc(()=>{const s=L.fromPositions(e);this._currentDecorations.set([{range:s,options:ige}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(eL,this.id,this._editor,s,t,i))},this._showDelay);try{return yield i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};eS=Jfe([ege(2,Re)],eS);var rV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},k_=function(o,e){return function(t,i){e(t,i,o)}},C5=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},KN;let tS=KN=class extends H{constructor(e,t,i,n,s,r,a,l,d,c){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=r,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(Me(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Me((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(h=>{s.containsPosition(h.position)||this.dispose()})),this._register(de.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=ee(".post-edit-widget"),this.button=this._register(new EE(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register($(this.domNode,ae.CLICK,()=>this.showSelector()))}getId(){return KN.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Ai(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>pg({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};tS.baseId="editor.widget.postEditWidget";tS=KN=rV([k_(7,pr),k_(8,Ae),k_(9,Et)],tS);let iS=class extends H{constructor(e,t,i,n,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=r,this._currentWidget=this._register(new pn),this._register(de.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,i,n){var s,r;return C5(this,void 0,void 0,function*(){const a=this._editor.getModel();if(!a||!e.length)return;const l=t.allEdits[t.activeEditIndex];if(!l)return;let d=[];(typeof l.insertText=="string"?l.insertText==="":l.insertText.snippet==="")?d=[]:d=e.map(v=>new Ql(a.uri,typeof l.insertText=="string"?{range:v,text:l.insertText,insertAsSnippet:!1}:{range:v,text:l.insertText.snippet,insertAsSnippet:!0}));const h={edits:[...d,...(r=(s=l.additionalEdit)===null||s===void 0?void 0:s.edits)!==null&&r!==void 0?r:[]]},u=e[0],f=a.deltaDecorations([],[{range:u,options:{description:"paste-line-suffix",stickiness:0}}]);let p,m;try{p=yield this._bulkEditService.apply(h,{editor:this._editor,token:n}),m=a.getDecorationRange(f[0])}finally{a.deltaDecorations(f,[])}i&&p.isApplied&&t.allEdits.length>1&&this.show(m??u,t,v=>C5(this,void 0,void 0,function*(){const _=this._editor.getModel();_&&(yield _.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:v,allEdits:t.allEdits},i,n))}))})}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(tS,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};iS=rV([k_(4,Re),k_(5,P0)],iS);var nge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xf=function(o,e){return function(t,i){e(t,i,o)}},wl=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},qN;const aV="editor.changePasteType",lV=new ce("pasteWidgetVisible",!1,g("pasteWidgetVisible","Whether the paste widget is showing")),SD="application/vnd.code.copyMetadata";let Tu=qN=class extends H{static get(e){return e.getContribution(qN.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register($(l,"copy",d=>this.handleCopy(d))),this._register($(l,"cut",d=>this.handleCopy(d))),this._register($(l,"paste",d=>this.handlePaste(d),!0)),this._pasteProgressManager=this._register(new eS("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(iS,"pasteIntoEditor",e,lV,{id:aV,label:g("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},MS().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,i;if(!this._editor.hasTextFocus()||(Kc&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!s?.length)return;const r=this._editor.getOption(37);let a=s;const l=s.length===1&&s[0].isEmpty();if(l){if(!r)return;a=[new L(a[0].startLineNumber,1,a[0].startLineNumber,1+n.getLineLength(a[0].startLineNumber))]}const d=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(s,r,En),h={multicursorText:Array.isArray(d)?d:null,pasteOnNewLine:l,mode:null},u=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(_=>!!_.prepareDocumentPaste);if(!u.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:h});return}const f=nV(e.clipboardData),p=u.flatMap(_=>{var b;return(b=_.copyMimeTypes)!==null&&b!==void 0?b:[]}),m=Qy();this.setCopyMetadata(e.clipboardData,{id:m,providerCopyMimeTypes:p,defaultPastePayload:h});const v=Wi(_=>wl(this,void 0,void 0,function*(){const b=Ga(yield Promise.all(u.map(C=>wl(this,void 0,void 0,function*(){try{return yield C.prepareDocumentPaste(n,a,f,_)}catch(w){console.error(w);return}}))));b.reverse();for(const C of b)for(const[w,S]of C)f.replace(w,S);return f}));(i=this._currentCopyOperation)===null||i===void 0||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:m,dataTransferPromise:v}}handlePaste(e){var t,i;return wl(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const n=this._editor.getModel(),s=this._editor.getSelections();if(!s?.length||!n||!this.isPasteAsEnabled())return;const r=this.fetchCopyMetadata(e),a=sV(e.clipboardData);a.delete(SD);const l=[...e.clipboardData.types,...(i=r?.providerCopyMimeTypes)!==null&&i!==void 0?i:[],pi.uriList],d=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(c=>{var h;return(h=c.pasteMimeTypes)===null||h===void 0?void 0:h.some(u=>tV(u,l))});d.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,d,s,a,r):this.doPasteInline(d,s,a,r))})}doPasteInline(e,t,i,n){const s=Wi(r=>wl(this,void 0,void 0,function*(){const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new Ac(a,3,void 0,r);try{if(yield this.mergeInDataFromCopy(i,n,d.token),d.token.isCancellationRequested)return;const c=e.filter(u=>w5(u,i));if(!c.length||c.length===1&&c[0].id==="text"){yield this.applyDefaultPasteHandler(i,n,d.token);return}const h=yield this.getPasteEdits(c,i,l,t,d.token);if(d.token.isCancellationRequested)return;if(h.length===1&&h[0].providerId==="text"){yield this.applyDefaultPasteHandler(i,n,d.token);return}if(h.length){const u=a.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:h},u,d.token)}yield this.applyDefaultPasteHandler(i,n,d.token)}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),g("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,s){const r=Wi(a=>wl(this,void 0,void 0,function*(){const l=this._editor;if(!l.hasModel())return;const d=l.getModel(),c=new Ac(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,s,c.token),c.token.isCancellationRequested)return;let h=t.filter(m=>w5(m,n));e&&(h=h.filter(m=>m.id===e));const u=yield this.getPasteEdits(h,n,d,i,c.token);if(c.token.isCancellationRequested||!u.length)return;let f;if(e)f=u.at(0);else{const m=yield this._quickInputService.pick(u.map(v=>({label:v.label,description:v.providerId,detail:v.detail,edit:v})),{placeHolder:g("pasteAsPickerPlaceholder","Select Paste Action")});f=m?.edit}if(!f)return;const p=Qfe(d.uri,i,f);yield this._bulkEditService.apply(p,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:g("pasteAsProgress","Running paste handlers")},()=>r)}setCopyMetadata(e,t){e.setData(SD,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(SD);if(i)try{return JSON.parse(i)}catch{return}const[n,s]=vI.getTextData(e.clipboardData);if(s)return{defaultPastePayload:{mode:s.mode,multicursorText:(t=s.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!s.isFromEmptySelection}}}mergeInDataFromCopy(e,t,i){var n;return wl(this,void 0,void 0,function*(){if(t?.id&&((n=this._currentCopyOperation)===null||n===void 0?void 0:n.handle)===t.id){const s=yield this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[r,a]of s)e.replace(r,a)}if(!e.has(pi.uriList)){const s=yield this._clipboardService.readResources();if(i.isCancellationRequested)return;s.length&&e.append(pi.uriList,VM(Jy.create(s)))}})}getPasteEdits(e,t,i,n,s){return wl(this,void 0,void 0,function*(){const r=yield PS(Promise.all(e.map(l=>wl(this,void 0,void 0,function*(){var d;try{const c=yield(d=l.provideDocumentPasteEdits)===null||d===void 0?void 0:d.call(l,i,n,t,s);if(c)return Object.assign(Object.assign({},c),{providerId:l.id})}catch(c){console.error(c)}}))),s),a=Ga(r??[]);return oV(a)})}applyDefaultPasteHandler(e,t,i){var n,s,r;return wl(this,void 0,void 0,function*(){const a=(n=e.get(pi.text))!==null&&n!==void 0?n:e.get("text");if(!a)return;const l=yield a.asString();if(i.isCancellationRequested)return;const d={text:l,pasteOnNewLine:(s=t?.defaultPastePayload.pasteOnNewLine)!==null&&s!==void 0?s:!1,multicursorText:(r=t?.defaultPastePayload.multicursorText)!==null&&r!==void 0?r:null,mode:null};this._editor.trigger("keyboard","paste",d)})}};Tu.ID="editor.contrib.copyPasteActionController";Tu=qN=nge([xf(1,Re),xf(2,P0),xf(3,gd),xf(4,pe),xf(5,aa),xf(6,Z8)],Tu);function w5(o,e){var t;return!!(!((t=o.pasteMimeTypes)===null||t===void 0)&&t.some(i=>e.matches(i)))}var HM=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zv=function(o,e){return function(t,i){e(t,i,o)}},Sp=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})};const zM=g("builtIn","Built-in");class UM{provideDocumentPasteEdits(e,t,i,n){return Sp(this,void 0,void 0,function*(){const s=yield this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,detail:s.detail,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,i,n){return Sp(this,void 0,void 0,function*(){const s=yield this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0})}}class dV extends UM{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[pi.text],this.pasteMimeTypes=[pi.text]}getEdit(e,t){return Sp(this,void 0,void 0,function*(){const i=e.get(pi.text);if(!i||e.has(pi.uriList))return;const n=yield i.asString();return{handledMimeType:pi.text,label:g("text.label","Insert Plain Text"),detail:zM,insertText:n}})}}class cV extends UM{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[pi.uriList],this.pasteMimeTypes=[pi.uriList]}getEdit(e,t){return Sp(this,void 0,void 0,function*(){const i=yield hV(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:a,originalText:l})=>a.scheme===qe.file?a.fsPath:(n++,l)).join(" ");let r;return n>0?r=i.length>1?g("defaultDropProvider.uriList.uris","Insert Uris"):g("defaultDropProvider.uriList.uri","Insert Uri"):r=i.length>1?g("defaultDropProvider.uriList.paths","Insert Paths"):g("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:pi.uriList,insertText:s,label:r,detail:zM}})}}let nS=class extends UM{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[pi.uriList],this.pasteMimeTypes=[pi.uriList]}getEdit(e,t){return Sp(this,void 0,void 0,function*(){const i=yield hV(e);if(!i.length||t.isCancellationRequested)return;const n=Ga(i.map(({uri:s})=>{const r=this._workspaceContextService.getWorkspaceFolder(s);return r?cJ(r.uri,s):void 0}));if(n.length)return{handledMimeType:pi.uriList,insertText:n.join(" "),label:i.length>1?g("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):g("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:zM}})}};nS=HM([Zv(0,_u)],nS);function hV(o){return Sp(this,void 0,void 0,function*(){const e=o.get(pi.uriList);if(!e)return[];const t=yield e.asString(),i=[];for(const n of Jy.parse(t))try{i.push({uri:ke.parse(n),originalText:n})}catch{}return i})}let GN=class extends H{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new dV)),this._register(e.documentOnDropEditProvider.register("*",new cV)),this._register(e.documentOnDropEditProvider.register("*",new nS(t)))}};GN=HM([Zv(0,pe),Zv(1,_u)],GN);let ZN=class extends H{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new dV)),this._register(e.documentPasteEditProvider.register("*",new cV)),this._register(e.documentPasteEditProvider.register("*",new nS(t)))}};ZN=HM([Zv(0,pe),Zv(1,_u)],ZN);ft(Tu.ID,Tu,0);Iy(ZN);re(new class extends tn{constructor(){super({id:aV,precondition:lV,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;return(i=Tu.get(e))===null||i===void 0?void 0:i.changePasteType()}});ie(class extends fe{constructor(){super({id:"editor.action.pasteAs",label:g("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:g("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(o,e,t){var i;const n=typeof t?.id=="string"?t.id:void 0;return(i=Tu.get(e))===null||i===void 0?void 0:i.pasteAs(n)}});class sge{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}}}class S5{constructor(e){this.identifier=e}}const uV=et("treeViewsDndService");dt(uV,sge,1);var oge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fC=function(o,e){return function(t,i){e(t,i,o)}},Dm=function(o,e,t,i){function n(s){return s instanceof t?s:new t(function(r){r(s)})}return new(t||(t=Promise))(function(s,r){function a(c){try{d(i.next(c))}catch(h){r(h)}}function l(c){try{d(i.throw(c))}catch(h){r(h)}}function d(c){c.done?s(c.value):n(c.value).then(a,l)}d((i=i.apply(o,e||[])).next())})},YN;const fV="editor.experimental.dropIntoEditor.defaultProvider",gV="editor.changeDropType",pV=new ce("dropWidgetVisible",!1,g("dropWidgetVisible","Whether the drop widget is showing"));let yp=YN=class extends H{static get(e){return e.getContribution(YN.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=Gv.getInstance(),this._dropProgressManager=this._register(t.createInstance(eS,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(iS,"dropIntoEditor",e,pV,{id:gV,label:g("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,i){var n;return Dm(this,void 0,void 0,function*(){if(!i.dataTransfer||!e.hasModel())return;(n=this._currentOperation)===null||n===void 0||n.cancel(),e.focus(),e.setPosition(t);const s=Wi(r=>Dm(this,void 0,void 0,function*(){const a=new Ac(e,1,void 0,r);try{const l=yield this.extractDataTransferData(i);if(l.size===0||a.token.isCancellationRequested)return;const d=e.getModel();if(!d)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(d).filter(u=>u.dropMimeTypes?u.dropMimeTypes.some(f=>l.matches(f)):!0),h=yield this.getDropEdits(c,d,t,l,a);if(a.token.isCancellationRequested)return;if(h.length){const u=this.getInitialActiveEditIndex(d,h),f=e.getOption(36).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([L.fromPositions(t)],{activeEditIndex:u,allEdits:h},f,r)}}finally{a.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,g("dropIntoEditorProgress","Running drop handlers. Click to cancel"),s),this._currentOperation=s})}getDropEdits(e,t,i,n,s){return Dm(this,void 0,void 0,function*(){const r=yield PS(Promise.all(e.map(l=>Dm(this,void 0,void 0,function*(){try{const d=yield l.provideDocumentOnDropEdits(t,i,n,s.token);if(d)return Object.assign(Object.assign({},d),{providerId:l.id})}catch(d){console.error(d)}}))),s.token),a=Ga(r??[]);return oV(a)})}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(fV,{resource:e.uri});for(const[n,s]of Object.entries(i)){const r=t.findIndex(a=>s===a.providerId&&a.handledMimeType&&tV(n,[a.handledMimeType]));if(r>=0)return r}return 0}extractDataTransferData(e){return Dm(this,void 0,void 0,function*(){if(!e.dataTransfer)return new eV;const t=sV(e.dataTransfer);if(this.treeItemsTransfer.hasData(S5.prototype)){const i=this.treeItemsTransfer.getData(S5.prototype);if(Array.isArray(i))for(const n of i){const s=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(s)for(const[r,a]of s)t.replace(r,a)}}return t})}};yp.ID="editor.contrib.dropIntoEditorController";yp=YN=oge([fC(1,Re),fC(2,st),fC(3,pe),fC(4,uV)],yp);ft(yp.ID,yp,2);re(new class extends tn{constructor(){super({id:gV,precondition:pV,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;(i=yp.get(e))===null||i===void 0||i.changeDropType()}});Iy(GN);Jt.as(ra.Configuration).registerConfiguration(Object.assign(Object.assign({},ly),{properties:{[fV]:{type:"object",scope:5,description:g("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}));class jn{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(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);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 i of t){const n=i.options;if(n===jn._FIND_MATCH_DECORATION||n===jn._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n<s;n++){const r=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(r)){t=this._decorations[n],i=n+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(n=>{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,jn._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,jn._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);s=new L(s.startLineNumber,s.startColumn,r,a)}this._rangeHighlightDecorationId=n.addDecoration(s,jn._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=jn._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=jn._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),d=this._editor.getLayoutInfo().height/a,c=Math.max(2,Math.ceil(3/d));let h=e[0].range.startLineNumber,u=e[0].range.endLineNumber;for(let f=1,p=e.length;f<p;f++){const m=e[f].range;u+c>=m.startLineNumber?m.endLineNumber>u&&(u=m.endLineNumber):(s.push({range:new L(h,1,u,1),options:jn._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=m.startLineNumber,u=m.endLineNumber)}s.push({range:new L(h,1,u,1),options:jn._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const r=new Array(e.length);for(let a=0,l=e.length;a<l;a++)r[a]={range:e[a].range,options:n};this._decorations=i.deltaDecorations(this._decorations,r),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,s),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>i.removeDecoration(a)),this._findScopeDecorationIds=[]),t?.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,jn._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)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(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;t<i;t++){const n=this._decorations[t],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.startLineNumber<e.lineNumber)){if(s.startLineNumber>e.lineNumber)return s;if(!(s.startColumn<e.column))return s}}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}}jn._CURRENT_FIND_MATCH_DECORATION=Ve.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:ti(q2),position:lo.Center},minimap:{color:ti(Xf),position:Os.Inline}});jn._FIND_MATCH_DECORATION=Ve.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:ti(q2),position:lo.Center},minimap:{color:ti(Xf),position:Os.Inline}});jn._FIND_MATCH_NO_OVERVIEW_DECORATION=Ve.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});jn._FIND_MATCH_ONLY_OVERVIEW_DECORATION=Ve.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:ti(q2),position:lo.Center}});jn._RANGE_HIGHLIGHT_DECORATION=Ve.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});jn._FIND_SCOPE_DECORATION=Ve.register({description:"find-scope",className:"findScope",isWholeLine:!0});class rge{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 i=[];for(let r=0;r<this._ranges.length;r++)i.push({range:this._ranges[r],text:this._replaceStrings[r]});i.sort((r,a)=>L.compareRangesUsingStarts(r.range,a.range));const n=[];let s=i[0];for(let r=1;r<i.length;r++)s.range.endLineNumber===i[r].range.startLineNumber&&s.range.endColumn===i[r].range.startColumn?(s.range=s.range.plusRange(i[r].range),s.text=s.text+i[r].text):(n.push(s),s=i[r]);n.push(s);for(const r of n)t.addEditOperation(r.range,r.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function mV(o,e){if(o&&o[0]!==""){const t=y5(o,e,"-"),i=y5(o,e,"_");return t&&!i?L5(o,e,"-"):!t&&i?L5(o,e,"_"):o[0].toUpperCase()===o[0]?e.toUpperCase():o[0].toLowerCase()===o[0]?e.toLowerCase():HU(o[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function y5(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function L5(o,e,t){const i=e.split(t),n=o[0].split(t);let s="";return i.forEach((r,a)=>{s+=mV([n[a]],r)+t}),s.slice(0,-1)}class x5{constructor(e){this.staticValue=e,this.kind=0}}class age{constructor(e){this.pieces=e,this.kind=1}}class Lp{static fromStaticValue(e){return new Lp([ou.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new x5(""):e.length===1&&e[0].staticValue!==null?this._state=new x5(e[0].staticValue):this._state=new age(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?mV(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n<s;n++){const r=this._state.pieces[n];if(r.staticValue!==null){i+=r.staticValue;continue}let a=Lp._substitute(r.matchIndex,e);if(r.caseOps!==null&&r.caseOps.length>0){const l=[],d=r.caseOps.length;let c=0;for(let h=0,u=a.length;h<u;h++){if(c>=d){l.push(a.slice(h));break}switch(r.caseOps[c]){case"U":l.push(a[h].toUpperCase());break;case"u":l.push(a[h].toUpperCase()),c++;break;case"L":l.push(a[h].toLowerCase());break;case"l":l.push(a[h].toLowerCase()),c++;break;default:l.push(a[h])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)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 ou{static staticValue(e){return new ou(e,-1,null)}static caseOps(e,t){return new ou(null,e,t)}constructor(e,t,i){this.staticValue=e,this.matchIndex=t,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}}class lge{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){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=ou.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=ou.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=ou.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new Lp(this._result)}}function dge(o){if(!o||o.length===0)return new Lp(null);const e=[],t=new lge(o);for(let i=0,n=o.length;i<n;i++){const s=o.charCodeAt(i);if(s===92){if(i++,i>=n)break;const r=o.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(`