code-server
Version:
Run VS Code on a remote server.
24 lines (16 loc) • 20.4 MB
JavaScript
"use strict";var Fhi=Object.create;var Z0e=Object.defineProperty;var Pgn=Object.getOwnPropertyDescriptor;var Ohi=Object.getOwnPropertyNames;var Uhi=Object.getPrototypeOf,qhi=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Be=(t,e)=>{for(var n in e)Z0e(t,n,{get:e[n],enumerable:!0})},Ngn=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ohi(e))!qhi.call(t,o)&&o!==n&&Z0e(t,o,{get:()=>e[o],enumerable:!(r=Pgn(e,o))||r.enumerable});return t};var q=(t,e,n)=>(n=t!=null?Fhi(Uhi(t)):{},Ngn(e||!t||!t.__esModule?Z0e(n,"default",{value:t,enumerable:!0}):n,t)),Ra=t=>Ngn(Z0e({},"__esModule",{value:!0}),t),S=(t,e,n,r)=>{for(var o=r>1?void 0:r?Pgn(e,n):e,a=t.length-1,s;a>=0;a--)(s=t[a])&&(o=(r?s(e,n,o):s(o))||o);return r&&o&&Z0e(e,n,o),o},b=(t,e)=>(n,r)=>e(n,r,t);function fbt(){return globalThis._VSCODE_NLS_LANGUAGE}var FYa,Lgn=N(()=>{"use strict";FYa=fbt()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0});function Ogn(t){switch(t){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}var cX,MFe,QFe,V0e,zhi,Qgn,gbt,jhi,Ghi,Hhi,Whi,PFe,NFe,Mgn,Zhi,cL,lL,Gv,Fgn,Vhi,LFe,Yc,FFe,OFe,Ugn,lX,Yhi,qgn,UFe,wB,LO,Khi,Jhi,$gn,Xhi,OYa,UYa,qYa,$Ya,Kf=N(()=>{"use strict";Lgn();cX="en",MFe=!1,QFe=!1,V0e=!1,zhi=!1,Qgn=!1,gbt=!1,jhi=!1,Ghi=!1,Hhi=!1,Whi=!1,NFe=cX,Mgn=cX,lL=globalThis;typeof lL.vscode<"u"&&typeof lL.vscode.process<"u"?Gv=lL.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Gv=process);Fgn=typeof Gv?.versions?.electron=="string",Vhi=Fgn&&Gv?.type==="renderer";if(typeof Gv=="object"){MFe=Gv.platform==="win32",QFe=Gv.platform==="darwin",V0e=Gv.platform==="linux",zhi=V0e&&!!Gv.env.SNAP&&!!Gv.env.SNAP_REVISION,jhi=Fgn,Hhi=!!Gv.env.CI||!!Gv.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!Gv.env.GITHUB_WORKSPACE,PFe=cX,NFe=cX;let t=Gv.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t);PFe=e.userLocale,Mgn=e.osLocale,NFe=e.resolvedLanguage||cX,Zhi=e.languagePack?.translationsConfigFile}catch{}Qgn=!0}else typeof navigator=="object"&&!Vhi?(cL=navigator.userAgent,MFe=cL.indexOf("Windows")>=0,QFe=cL.indexOf("Macintosh")>=0,Ghi=(cL.indexOf("Macintosh")>=0||cL.indexOf("iPad")>=0||cL.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,V0e=cL.indexOf("Linux")>=0,Whi=cL?.indexOf("Mobi")>=0,gbt=!0,NFe=fbt()||cX,PFe=navigator.language.toLowerCase(),Mgn=PFe):console.error("Unable to resolve platform.");LFe=0;QFe?LFe=1:MFe?LFe=3:V0e&&(LFe=2);Yc=MFe,FFe=QFe,OFe=V0e,Ugn=Qgn,lX=gbt,Yhi=gbt&&typeof lL.importScripts=="function",qgn=Yhi?lL.origin:void 0,UFe=LFe,wB=cL,LO=NFe;(r=>{function t(){return LO}r.value=t;function e(){return LO.length===2?LO==="en":LO.length>=3?LO[0]==="e"&&LO[1]==="n"&&LO[2]==="-":!1}r.isDefaultVariant=e;function n(){return LO==="en"}r.isDefault=n})(Khi||={});Jhi=typeof lL.postMessage=="function"&&!lL.importScripts,$gn=(()=>{if(Jhi){let t=[];lL.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,o=t.length;r<o;r++){let a=t[r];if(a.id===n.data.vscodeScheduleAsyncWork){t.splice(r,1),a.callback();return}}});let e=0;return n=>{let r=++e;t.push({id:r,callback:n}),lL.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})(),Xhi=!!(wB&&wB.indexOf("Chrome")>=0),OYa=!!(wB&&wB.indexOf("Firefox")>=0),UYa=!!(!Xhi&&wB&&wB.indexOf("Safari")>=0),qYa=!!(wB&&wB.indexOf("Edg/")>=0),$Ya=!!(wB&&wB.indexOf("Android")>=0)});var Z$,hbt,Y0e,V$,qFe,GYa,K0e=N(()=>{"use strict";Kf();hbt=globalThis.vscode;if(typeof hbt<"u"&&typeof hbt.process<"u"){let t=hbt.process;Z$={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Z$={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Z$={get platform(){return Yc?"win32":FFe?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};Y0e=Z$.cwd,V$=Z$.env,qFe=Z$.platform,GYa=Z$.arch});function sbi(t,e){if(t===null||typeof t!="object")throw new $Fe(e,"Object",t)}function tm(t,e){if(typeof t!="string")throw new $Fe(e,"string",t)}function Aa(t){return t===Jf||t===Hv}function bbt(t){return t===Jf}function dL(t){return t>=nbi&&t<=ibi||t>=rbi&&t<=obi}function zFe(t,e,n,r){let o="",a=0,s=-1,c=0,l=0;for(let u=0;u<=t.length;++u){if(u<t.length)l=t.charCodeAt(u);else{if(r(l))break;l=Jf}if(r(l)){if(!(s===u-1||c===1))if(c===2){if(o.length<2||a!==2||o.charCodeAt(o.length-1)!==Y$||o.charCodeAt(o.length-2)!==Y$){if(o.length>2){let d=o.lastIndexOf(n);d===-1?(o="",a=0):(o=o.slice(0,d),a=o.length-1-o.lastIndexOf(n)),s=u,c=0;continue}else if(o.length!==0){o="",a=0,s=u,c=0;continue}}e&&(o+=o.length>0?`${n}..`:"..",a=2)}else o.length>0?o+=`${n}${t.slice(s+1,u)}`:o=t.slice(s+1,u),a=u-s-1;s=u,c=0}else l===Y$&&c!==-1?++c:c=-1}return o}function cbi(t){return t?`${t[0]==="."?"":"."}${t}`:""}function zgn(t,e){sbi(e,"pathObject");let n=e.dir||e.root,r=e.base||`${e.name||""}${cbi(e.ext)}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}var nbi,rbi,ibi,obi,Y$,Jf,Hv,uL,abi,$Fe,Wv,nm,lbi,Ui,MO,ud,Rr,sC,ja,Cl,lr,pL,HYa,WYa,ZYa,Mu,J0e,mr=N(()=>{"use strict";K0e();nbi=65,rbi=97,ibi=90,obi=122,Y$=46,Jf=47,Hv=92,uL=58,abi=63,$Fe=class extends Error{constructor(e,n,r){let o;typeof n=="string"&&n.indexOf("not ")===0?(o="must not be",n=n.replace(/^not /,"")):o="must be";let a=e.indexOf(".")!==-1?"property":"argument",s=`The "${e}" ${a} ${o} of type ${n}`;s+=`. Received type ${typeof r}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};Wv=qFe==="win32";nm={resolve(...t){let e="",n="",r=!1;for(let o=t.length-1;o>=-1;o--){let a;if(o>=0){if(a=t[o],tm(a,`paths[${o}]`),a.length===0)continue}else e.length===0?a=Y0e():(a=V$[`=${e}`]||Y0e(),(a===void 0||a.slice(0,2).toLowerCase()!==e.toLowerCase()&&a.charCodeAt(2)===Hv)&&(a=`${e}\\`));let s=a.length,c=0,l="",u=!1,d=a.charCodeAt(0);if(s===1)Aa(d)&&(c=1,u=!0);else if(Aa(d))if(u=!0,Aa(a.charCodeAt(1))){let p=2,m=p;for(;p<s&&!Aa(a.charCodeAt(p));)p++;if(p<s&&p!==m){let A=a.slice(m,p);for(m=p;p<s&&Aa(a.charCodeAt(p));)p++;if(p<s&&p!==m){for(m=p;p<s&&!Aa(a.charCodeAt(p));)p++;(p===s||p!==m)&&(l=`\\\\${A}\\${a.slice(m,p)}`,c=p)}}}else c=1;else dL(d)&&a.charCodeAt(1)===uL&&(l=a.slice(0,2),c=2,s>2&&Aa(a.charCodeAt(2))&&(u=!0,c=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${a.slice(c)}\\${n}`,r=u,u&&e.length>0)break}return n=zFe(n,!r,"\\",Aa),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){tm(t,"path");let e=t.length;if(e===0)return".";let n=0,r,o=!1,a=t.charCodeAt(0);if(e===1)return bbt(a)?"\\":t;if(Aa(a))if(o=!0,Aa(t.charCodeAt(1))){let c=2,l=c;for(;c<e&&!Aa(t.charCodeAt(c));)c++;if(c<e&&c!==l){let u=t.slice(l,c);for(l=c;c<e&&Aa(t.charCodeAt(c));)c++;if(c<e&&c!==l){for(l=c;c<e&&!Aa(t.charCodeAt(c));)c++;if(c===e)return`\\\\${u}\\${t.slice(l)}\\`;c!==l&&(r=`\\\\${u}\\${t.slice(l,c)}`,n=c)}}}else n=1;else dL(a)&&t.charCodeAt(1)===uL&&(r=t.slice(0,2),n=2,e>2&&Aa(t.charCodeAt(2))&&(o=!0,n=3));let s=n<e?zFe(t.slice(n),!o,"\\",Aa):"";if(s.length===0&&!o&&(s="."),s.length>0&&Aa(t.charCodeAt(e-1))&&(s+="\\"),!o&&r===void 0&&t.includes(":")){if(s.length>=2&&dL(s.charCodeAt(0))&&s.charCodeAt(1)===uL)return`.\\${s}`;let c=t.indexOf(":");do if(c===e-1||Aa(t.charCodeAt(c+1)))return`.\\${s}`;while((c=t.indexOf(":",c+1))!==-1)}return r===void 0?o?`\\${s}`:s:o?`${r}\\${s}`:`${r}${s}`},isAbsolute(t){tm(t,"path");let e=t.length;if(e===0)return!1;let n=t.charCodeAt(0);return Aa(n)||e>2&&dL(n)&&t.charCodeAt(1)===uL&&Aa(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let a=0;a<t.length;++a){let s=t[a];tm(s,"path"),s.length>0&&(e===void 0?e=n=s:e+=`\\${s}`)}if(e===void 0)return".";let r=!0,o=0;if(typeof n=="string"&&Aa(n.charCodeAt(0))){++o;let a=n.length;a>1&&Aa(n.charCodeAt(1))&&(++o,a>2&&(Aa(n.charCodeAt(2))?++o:r=!1))}if(r){for(;o<e.length&&Aa(e.charCodeAt(o));)o++;o>=2&&(e=`\\${e.slice(o)}`)}return nm.normalize(e)},relative(t,e){if(tm(t,"from"),tm(e,"to"),t===e)return"";let n=nm.resolve(t),r=nm.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";if(n.length!==t.length||r.length!==e.length){let f=n.split("\\"),g=r.split("\\");f[f.length-1]===""&&f.pop(),g[g.length-1]===""&&g.pop();let h=f.length,y=g.length,_=h<y?h:y,v;for(v=0;v<_&&f[v].toLowerCase()===g[v].toLowerCase();v++);return v===0?r:v===_?y>_?g.slice(v).join("\\"):h>_?"..\\".repeat(h-1-v)+"..":"":"..\\".repeat(h-v)+g.slice(v).join("\\")}let o=0;for(;o<t.length&&t.charCodeAt(o)===Hv;)o++;let a=t.length;for(;a-1>o&&t.charCodeAt(a-1)===Hv;)a--;let s=a-o,c=0;for(;c<e.length&&e.charCodeAt(c)===Hv;)c++;let l=e.length;for(;l-1>c&&e.charCodeAt(l-1)===Hv;)l--;let u=l-c,d=s<u?s:u,p=-1,m=0;for(;m<d;m++){let f=t.charCodeAt(o+m);if(f!==e.charCodeAt(c+m))break;f===Hv&&(p=m)}if(m!==d){if(p===-1)return r}else{if(u>d){if(e.charCodeAt(c+m)===Hv)return r.slice(c+m+1);if(m===2)return r.slice(c+m)}s>d&&(t.charCodeAt(o+m)===Hv?p=m:m===2&&(p=3)),p===-1&&(p=0)}let A="";for(m=o+p+1;m<=a;++m)(m===a||t.charCodeAt(m)===Hv)&&(A+=A.length===0?"..":"\\..");return c+=p,A.length>0?`${A}${r.slice(c,l)}`:(r.charCodeAt(c)===Hv&&++c,r.slice(c,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=nm.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===Hv){if(e.charCodeAt(1)===Hv){let n=e.charCodeAt(2);if(n!==abi&&n!==Y$)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(dL(e.charCodeAt(0))&&e.charCodeAt(1)===uL&&e.charCodeAt(2)===Hv)return`\\\\?\\${e}`;return e},dirname(t){tm(t,"path");let e=t.length;if(e===0)return".";let n=-1,r=0,o=t.charCodeAt(0);if(e===1)return Aa(o)?t:".";if(Aa(o)){if(n=r=1,Aa(t.charCodeAt(1))){let c=2,l=c;for(;c<e&&!Aa(t.charCodeAt(c));)c++;if(c<e&&c!==l){for(l=c;c<e&&Aa(t.charCodeAt(c));)c++;if(c<e&&c!==l){for(l=c;c<e&&!Aa(t.charCodeAt(c));)c++;if(c===e)return t;c!==l&&(n=r=c+1)}}}}else dL(o)&&t.charCodeAt(1)===uL&&(n=e>2&&Aa(t.charCodeAt(2))?3:2,r=n);let a=-1,s=!0;for(let c=e-1;c>=r;--c)if(Aa(t.charCodeAt(c))){if(!s){a=c;break}}else s=!1;if(a===-1){if(n===-1)return".";a=n}return t.slice(0,a)},basename(t,e){e!==void 0&&tm(e,"suffix"),tm(t,"path");let n=0,r=-1,o=!0,a;if(t.length>=2&&dL(t.charCodeAt(0))&&t.charCodeAt(1)===uL&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let s=e.length-1,c=-1;for(a=t.length-1;a>=n;--a){let l=t.charCodeAt(a);if(Aa(l)){if(!o){n=a+1;break}}else c===-1&&(o=!1,c=a+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(r=a):(s=-1,r=c))}return n===r?r=c:r===-1&&(r=t.length),t.slice(n,r)}for(a=t.length-1;a>=n;--a)if(Aa(t.charCodeAt(a))){if(!o){n=a+1;break}}else r===-1&&(o=!1,r=a+1);return r===-1?"":t.slice(n,r)},extname(t){tm(t,"path");let e=0,n=-1,r=0,o=-1,a=!0,s=0;t.length>=2&&t.charCodeAt(1)===uL&&dL(t.charCodeAt(0))&&(e=r=2);for(let c=t.length-1;c>=e;--c){let l=t.charCodeAt(c);if(Aa(l)){if(!a){r=c+1;break}continue}o===-1&&(a=!1,o=c+1),l===Y$?n===-1?n=c:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||o===-1||s===0||s===1&&n===o-1&&n===r+1?"":t.slice(n,o)},format:zgn.bind(null,"\\"),parse(t){tm(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.length,r=0,o=t.charCodeAt(0);if(n===1)return Aa(o)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(Aa(o)){if(r=1,Aa(t.charCodeAt(1))){let p=2,m=p;for(;p<n&&!Aa(t.charCodeAt(p));)p++;if(p<n&&p!==m){for(m=p;p<n&&Aa(t.charCodeAt(p));)p++;if(p<n&&p!==m){for(m=p;p<n&&!Aa(t.charCodeAt(p));)p++;p===n?r=p:p!==m&&(r=p+1)}}}}else if(dL(o)&&t.charCodeAt(1)===uL){if(n<=2)return e.root=e.dir=t,e;if(r=2,Aa(t.charCodeAt(2))){if(n===3)return e.root=e.dir=t,e;r=3}}r>0&&(e.root=t.slice(0,r));let a=-1,s=r,c=-1,l=!0,u=t.length-1,d=0;for(;u>=r;--u){if(o=t.charCodeAt(u),Aa(o)){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),o===Y$?a===-1?a=u:d!==1&&(d=1):a!==-1&&(d=-1)}return c!==-1&&(a===-1||d===0||d===1&&a===c-1&&a===s+1?e.base=e.name=t.slice(s,c):(e.name=t.slice(s,a),e.base=t.slice(s,c),e.ext=t.slice(a,c))),s>0&&s!==r?e.dir=t.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},lbi=(()=>{if(Wv){let t=/\\/g;return()=>{let e=Y0e().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Y0e()})(),Ui={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=0&&!n;r--){let o=t[r];tm(o,`paths[${r}]`),o.length!==0&&(e=`${o}/${e}`,n=o.charCodeAt(0)===Jf)}if(!n){let r=lbi();e=`${r}/${e}`,n=r.charCodeAt(0)===Jf}return e=zFe(e,!n,"/",bbt),n?`/${e}`:e.length>0?e:"."},normalize(t){if(tm(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Jf,n=t.charCodeAt(t.length-1)===Jf;return t=zFe(t,!e,"/",bbt),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return tm(t,"path"),t.length>0&&t.charCodeAt(0)===Jf},join(...t){if(t.length===0)return".";let e=[];for(let n=0;n<t.length;++n){let r=t[n];tm(r,"path"),r.length>0&&e.push(r)}return e.length===0?".":Ui.normalize(e.join("/"))},relative(t,e){if(tm(t,"from"),tm(e,"to"),t===e||(t=Ui.resolve(t),e=Ui.resolve(e),t===e))return"";let n=1,r=t.length,o=r-n,a=1,s=e.length-a,c=o<s?o:s,l=-1,u=0;for(;u<c;u++){let p=t.charCodeAt(n+u);if(p!==e.charCodeAt(a+u))break;p===Jf&&(l=u)}if(u===c)if(s>c){if(e.charCodeAt(a+u)===Jf)return e.slice(a+u+1);if(u===0)return e.slice(a+u)}else o>c&&(t.charCodeAt(n+u)===Jf?l=u:u===0&&(l=0));let d="";for(u=n+l+1;u<=r;++u)(u===r||t.charCodeAt(u)===Jf)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(a+l)}`},toNamespacedPath(t){return t},dirname(t){if(tm(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Jf,n=-1,r=!0;for(let o=t.length-1;o>=1;--o)if(t.charCodeAt(o)===Jf){if(!r){n=o;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&tm(e,"suffix"),tm(t,"path");let n=0,r=-1,o=!0,a;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let s=e.length-1,c=-1;for(a=t.length-1;a>=0;--a){let l=t.charCodeAt(a);if(l===Jf){if(!o){n=a+1;break}}else c===-1&&(o=!1,c=a+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(r=a):(s=-1,r=c))}return n===r?r=c:r===-1&&(r=t.length),t.slice(n,r)}for(a=t.length-1;a>=0;--a)if(t.charCodeAt(a)===Jf){if(!o){n=a+1;break}}else r===-1&&(o=!1,r=a+1);return r===-1?"":t.slice(n,r)},extname(t){tm(t,"path");let e=-1,n=0,r=-1,o=!0,a=0;for(let s=t.length-1;s>=0;--s){let c=t[s];if(c==="/"){if(!o){n=s+1;break}continue}r===-1&&(o=!1,r=s+1),c==="."?e===-1?e=s:a!==1&&(a=1):e!==-1&&(a=-1)}return e===-1||r===-1||a===0||a===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:zgn.bind(null,"/"),parse(t){tm(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.charCodeAt(0)===Jf,r;n?(e.root="/",r=1):r=0;let o=-1,a=0,s=-1,c=!0,l=t.length-1,u=0;for(;l>=r;--l){let d=t.charCodeAt(l);if(d===Jf){if(!c){a=l+1;break}continue}s===-1&&(c=!1,s=l+1),d===Y$?o===-1?o=l:u!==1&&(u=1):o!==-1&&(u=-1)}if(s!==-1){let d=a===0&&n?1:a;o===-1||u===0||u===1&&o===s-1&&o===a+1?e.base=e.name=t.slice(d,s):(e.name=t.slice(d,o),e.base=t.slice(d,s),e.ext=t.slice(o,s))}return a>0?e.dir=t.slice(0,a-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ui.win32=nm.win32=nm;Ui.posix=nm.posix=Ui;MO=Wv?nm.normalize:Ui.normalize,ud=Wv?nm.isAbsolute:Ui.isAbsolute,Rr=Wv?nm.join:Ui.join,sC=Wv?nm.resolve:Ui.resolve,ja=Wv?nm.relative:Ui.relative,Cl=Wv?nm.dirname:Ui.dirname,lr=Wv?nm.basename:Ui.basename,pL=Wv?nm.extname:Ui.extname,HYa=Wv?nm.format:Ui.format,WYa=Wv?nm.parse:Ui.parse,ZYa=Wv?nm.toNamespacedPath:Ui.toNamespacedPath,Mu=Wv?nm.sep:Ui.sep,J0e=Wv?nm.delimiter:Ui.delimiter});var Bt=D((VYa,Wgn)=>{"use strict";var ybt=Object.defineProperty,ubi=Object.getOwnPropertyDescriptor,dbi=Object.getOwnPropertyNames,pbi=Object.prototype.hasOwnProperty,mbi=(t,e)=>{for(var n in e)ybt(t,n,{get:e[n],enumerable:!0})},Abi=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of dbi(e))!pbi.call(t,o)&&o!==n&&ybt(t,o,{get:()=>e[o],enumerable:!(r=ubi(e,o))||r.enumerable});return t},fbi=t=>Abi(ybt({},"__esModule",{value:!0}),t),Ggn={};mbi(Ggn,{config:()=>vbi,t:()=>Hgn});Wgn.exports=fbi(Ggn);var gbi=require("fs"),hbi=require("fs/promises");async function bbi(t){if(t.protocol==="file:")return await(0,hbi.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let r=`Unexpected ${e.status} response while trying to read ${t}`;try{r+=`: ${await e.text()}`}catch{}throw new Error(r)}return await e.text()}throw new Error("Unsupported protocol")}function ybi(t){return(0,gbi.readFileSync)(t,"utf8")}var X0e;function vbi(t){if("contents"in t){typeof t.contents=="string"?X0e=JSON.parse(t.contents):X0e=t.contents;return}if("fsPath"in t){let e=ybi(t.fsPath),n=JSON.parse(e);X0e=jgn(n)?n.contents.bundle:n;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((n,r)=>{bbi(e).then(o=>{try{let a=JSON.parse(o);X0e=jgn(a)?a.contents.bundle:a,n()}catch(a){r(a)}}).catch(o=>{r(o)})})}}function Hgn(...t){let e=t[0],n,r,o;if(typeof e=="string")n=e,r=e,t.splice(0,1),o=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let s=t.slice(1);if(e.length!==s.length+1)throw new Error("expected a string as the first argument to l10n.t");let c=e[0];for(let l=1;l<e.length;l++)c+=`{${l-1}}`+e[l];return Hgn(c,...s)}else r=e.message,n=r,e.comment&&e.comment.length>0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),o=e.args??{};let a=X0e?.[n];return a?typeof a=="string"?jFe(a,o):a.comment?jFe(a.message,o):jFe(r,o):jFe(r,o)}var _bi=/{([^}]+)}/g;function jFe(t,e){return Object.keys(e).length===0?t:t.replace(_bi,(n,r)=>e[r]??n)}function jgn(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}});function wbi(t,e,n){e[QS.DI_TARGET]===e?e[QS.DI_DEPENDENCIES].push({id:t,index:n}):(e[QS.DI_DEPENDENCIES]=[{id:t,index:n}],e[QS.DI_TARGET]=e)}function pe(t){if(QS.serviceIds.has(t))return QS.serviceIds.get(t);let e=function(n,r,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");wbi(e,n,o)};return e.toString=()=>t,QS.serviceIds.set(t,e),e}var QS,G,Pe=N(()=>{"use strict";(o=>{o.serviceIds=new Map,o.DI_TARGET="$di$target",o.DI_DEPENDENCIES="$di$dependencies";function r(a){return a[o.DI_DEPENDENCIES]||[]}o.getServiceDependencies=r})(QS||={});G=pe("instantiationService")});function uX(t,e){let n=Object.create(null);for(let r of t){let o=e(r),a=n[o];a||(a=n[o]=[]),a.push(r)}return n}function Kgn(t,e){let n=[],r=[];for(let[o,a]of t)e.has(o)||n.push(a);for(let[o,a]of e)t.has(o)||r.push(a);return{removed:n,added:r}}var Vgn,Ygn,Zgn,dX=N(()=>{"use strict";Zgn=class{constructor(e,n){this.toKey=n;this._map=new Map;this[Vgn]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let n=this.toKey(e);return this._map.set(n,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,n){this._map.forEach(r=>e.call(n,r,r,this))}[(Ygn=Symbol.iterator,Vgn=Symbol.toStringTag,Ygn)](){return this.values()}}});function CB(t){Xgn.onUnexpectedError(t)}function Rp(t){ai(t)||Xgn.onUnexpectedError(t)}function ai(t){return t instanceof Ar?!0:t instanceof Error&&t.name===_bt&&t.message===_bt}function jo(t){return t?new Error(`Illegal argument: ${t}`):new Error("Illegal argument")}function ehn(t){return t?new Error(`Illegal state: ${t}`):new Error("Illegal state")}var vbt,Xgn,_bt,Ar,Jgn,GFe,An,Rn=N(()=>{"use strict";vbt=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?GFe.isErrorNoTelemetry(e)?new GFe(e.message+`
`+e.stack):new Error(e.message+`
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(n=>{n(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Xgn=new vbt;_bt="Canceled";Ar=class extends Error{constructor(){super(_bt),this.name=this.message}},Jgn=class t extends Error{static{this._name="PendingMigrationError"}static is(e){return e instanceof t||e instanceof Error&&e.name===t._name}constructor(e){super(e),this.name=t._name}};GFe=class t extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let n=new t;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},An=class t extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}}});function HFe(t,e){let n=this,r=!1,o;return function(){if(r)return o;if(r=!0,e)try{o=t.apply(n,arguments)}finally{e()}else o=t.apply(n,arguments);return o}}var WFe=N(()=>{"use strict";});function wh(t,e,n=t.length-1){let r=wbt(t,e,n);if(r!==-1)return t[r]}function wbt(t,e,n=t.length-1){for(let r=n;r>=0;r--){let o=t[r];if(e(o,r))return r}return-1}function mL(t,e){let n=Zv(t,e);return n===-1?void 0:t[n]}function Zv(t,e,n=0,r=t.length){let o=n,a=r;for(;o<a;){let s=Math.floor((o+a)/2);e(t[s])?o=s+1:a=s}return o-1}function ZFe(t,e){let n=K$(t,e);return n===t.length?void 0:t[n]}function K$(t,e,n=0,r=t.length){let o=n,a=r;for(;o<a;){let s=Math.floor((o+a)/2);e(t[s])?a=s:o=s+1}return o}function Vv(t,e){for(let n of t){let r=e(n);if(r!==void 0)return r}}var eve,Wd=N(()=>{"use strict";eve=class t{constructor(e){this._array=e;this._findLastMonotonousLastIdx=0}static{this.assertInvariants=!1}findLastMonotonous(e){if(t.assertInvariants){if(this._prevFindLastPredicate){for(let r of this._array)if(this._prevFindLastPredicate(r)&&!e(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let n=Zv(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=n+1,n===-1?void 0:this._array[n]}}});function pu(t,e,n=(r,o)=>r===o){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,o=t.length;r<o;r++)if(!n(t[r],e[r]))return!1;return!0}function nhn(t,e){let n=0,r=t-1;for(;n<=r;){let o=(n+r)/2|0,a=e(o);if(a<0)n=o+1;else if(a>0)r=o-1;else return o}return-(n+1)}function*QO(t,e){let n,r;for(let o of t)r!==void 0&&e(r,o)?n.push(o):(n&&(yield n),n=[o]),r=o;n&&(yield n)}function rhn(t,e){for(let n=0;n<=t.length;n++)e(n===0?void 0:t[n-1],n===t.length?void 0:t[n])}function ihn(t,e){for(let n=0;n<t.length;n++)e(n===0?void 0:t[n-1],t[n],n+1===t.length?void 0:t[n+1])}function sr(t){return t.filter(e=>!!e)}function ohn(t){return!Array.isArray(t)||t.length===0}function Cbt(t){return Array.isArray(t)&&t.length>0}function YFe(t,e=n=>n){let n=new Set;return t.filter(r=>{let o=e(r);return n.has(o)?!1:(n.add(o),!0)})}function KFe(t){let e=new Set;return n=>{let r=t(n);return e.has(r)?!1:(e.add(r),!0)}}function ahn(t,e){let n=typeof e=="number"?t:0;typeof e=="number"?n=t:(n=0,e=t);let r=[];if(n<=e)for(let o=n;o<e;o++)r.push(o);else for(let o=n;o>e;o--)r.push(o);return r}function tve(t,e){let n;if(typeof e=="number"){let r=e;n=()=>{let o=Math.sin(r++)*179426549;return o-Math.floor(o)}}else n=Math.random;for(let r=t.length-1;r>0;r-=1){let o=Math.floor(n()*(r+1)),a=t[r];t[r]=t[o],t[o]=a}}function Yv(t,e){for(let n of e)t.push(n)}function JFe(t){return Array.isArray(t)?t:[t]}function Ch(t,e){return(n,r)=>e(t(n),t(r))}function chn(t){return(e,n)=>-t(e,n)}function XFe(t,e){return t.reduce((n,r)=>n+e(r),0)}var shn,l0,VFe,thn,Br=N(()=>{"use strict";Wd();Rn();(c=>{function t(l){return l<0}c.isLessThan=t;function e(l){return l<=0}c.isLessThanOrEqual=e;function n(l){return l>0}c.isGreaterThan=n;function r(l){return l===0}c.isNeitherLessOrGreaterThan=r,c.greaterThan=1,c.lessThan=-1,c.neitherLessOrGreaterThan=0})(shn||={});l0=(t,e)=>t-e;VFe=class{constructor(e){this.firstIdx=0;this.items=e,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let n=this.firstIdx;for(;n<this.items.length&&e(this.items[n]);)n++;let r=n===this.firstIdx?null:this.items.slice(this.firstIdx,n);return this.firstIdx=n,r}takeFromEndWhile(e){let n=this.lastIdx;for(;n>=0&&e(this.items[n]);)n--;let r=n===this.lastIdx?null:this.items.slice(n+1,this.lastIdx+1);return this.lastIdx=n,r}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}removeLast(){let e=this.items[this.lastIdx];return this.lastIdx--,e}takeCount(e){let n=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,n}},thn=class t{constructor(e){this.iterate=e}static{this.empty=new t(e=>{})}forEach(e){this.iterate(n=>(e(n),!0))}toArray(){let e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new t(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new t(n=>this.iterate(r=>n(e(r))))}some(e){let n=!1;return this.iterate(r=>(n=e(r),!n)),n}findFirst(e){let n;return this.iterate(r=>e(r)?(n=r,!1):!0),n}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(o=>((r||shn.isGreaterThan(e(o,n)))&&(r=!1,n=o),!0)),n}}});function xbi(t){return Array.isArray(t)}var Ebt,lhn,Gn,uhn,Bi,dhn,Ibt,kbt,Nm,pX,pi=N(()=>{"use strict";Ebt=class{constructor(e,n){this.uri=e;this.value=n}};Gn=class t{constructor(e,n){this[lhn]="ResourceMap";if(e instanceof t)this.map=new Map(e.map),this.toKey=n??t.defaultToKey;else if(xbi(e)){this.map=new Map,this.toKey=n??t.defaultToKey;for(let[r,o]of e)this.set(r,o)}else this.map=new Map,this.toKey=e??t.defaultToKey}static{this.defaultToKey=e=>e.toString()}set(e,n){return this.map.set(this.toKey(e),new Ebt(e,n)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,n){typeof n<"u"&&(e=e.bind(n));for(let[r,o]of this.map)e(o.value,o.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(lhn=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},Bi=class{constructor(e,n){this[uhn]="ResourceSet";!e||typeof e=="function"?this._map=new Gn(e):(this._map=new Gn(n),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,n){this._map.forEach((r,o)=>e.call(n,o,o,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(uhn=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},Ibt=class{constructor(){this[dhn]="LinkedMap";this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){let r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let o=this._map.get(e);if(o)o.value=n,r!==0&&this.touch(o,r);else{switch(o={key:e,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(o);break;case 1:this.addItemFirst(o);break;case 2:this.addItemLast(o);break;default:this.addItemLast(o);break}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){let r=this._state,o=this._head;for(;o;){if(n?e.bind(n)(o.value,o.key,this):e(o.value,o.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");o=o.next}}keys(){let e=this,n=this._state,r=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let a={value:r.key,done:!1};return r=r.next,a}else return{value:void 0,done:!0}}};return o}values(){let e=this,n=this._state,r=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let a={value:r.value,done:!1};return r=r.next,a}else return{value:void 0,done:!0}}};return o}entries(){let e=this,n=this._state,r=this._head,o={[Symbol.iterator](){return o},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let a={value:[r.key,r.value],done:!1};return r=r.next,a}else return{value:void 0,done:!0}}};return o}[(dhn=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;let r=e.next,o=e.previous;e===this._tail?(o.next=void 0,this._tail=o):(r.previous=o,o.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;let r=e.next,o=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=o,o.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}},kbt=class extends Ibt{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},Nm=class extends kbt{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}},pX=class{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){let r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){let r=this.map.get(e);r&&r.forEach(n)}get(e){let n=this.map.get(e);return n||new Set}}});function mi(t,e="Unreachable"){throw new Error(e)}function dd(t,e="unexpected state"){if(!t)throw typeof e=="string"?new An(`Assertion Failed: ${e}`):e}function J$(t,e="Soft Assertion Failed"){t||Rp(new An(e))}function u0(t){if(!t()){debugger;t(),Rp(new An("Assertion Failed"))}}function mX(t,e){let n=0;for(;n<t.length-1;){let r=t[n],o=t[n+1];if(!e(r,o))return!1;n++}return!0}var cs=N(()=>{"use strict";Rn();});function Qu(t){return typeof t=="string"}function eOe(t){return Ebi(t,Qu)}function Ebi(t,e){return Array.isArray(t)&&t.every(e)}function Lm(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&!(t instanceof RegExp)&&!(t instanceof Date)}function xh(t){return typeof t=="number"&&!isNaN(t)}function phn(t){return!!t&&typeof t[Symbol.iterator]=="function"}function mhn(t){return t===!0||t===!1}function Ibi(t){return typeof t>"u"}function Go(t){return!Sbt(t)}function Sbt(t){return Ibi(t)||t===null}function $c(t,e){if(!t)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function tOe(t,e){for(let n in e)if(!(n in t))return!1;return!0}var aa=N(()=>{"use strict";cs();});var Ba,Eh=N(()=>{"use strict";aa();(E=>{function t(I){return!!I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}E.is=t;let e=Object.freeze([]);function n(){return e}E.empty=n;function*r(I){yield I}E.single=r;function o(I){return t(I)?I:r(I)}E.wrap=o;function a(I){return I??e}E.from=a;function*s(I){for(let T=I.length-1;T>=0;T--)yield I[T]}E.reverse=s;function c(I){return!I||I[Symbol.iterator]().next().done===!0}E.isEmpty=c;function l(I){return I[Symbol.iterator]().next().value}E.first=l;function u(I,T){let k=0;for(let B of I)if(T(B,k++))return!0;return!1}E.some=u;function d(I,T){let k=0;for(let B of I)if(!T(B,k++))return!1;return!0}E.every=d;function p(I,T){for(let k of I)if(T(k))return k}E.find=p;function*m(I,T){for(let k of I)T(k)&&(yield k)}E.filter=m;function*A(I,T){let k=0;for(let B of I)yield T(B,k++)}E.map=A;function*f(I,T){let k=0;for(let B of I)yield*T(B,k++)}E.flatMap=f;function*g(...I){for(let T of I)phn(T)?yield*T:yield T}E.concat=g;function h(I,T,k){let B=k;for(let L of I)B=T(B,L);return B}E.reduce=h;function y(I){let T=0;for(let k of I)T++;return T}E.length=y;function*_(I,T,k=I.length){for(T<-I.length&&(T=0),T<0&&(T+=I.length),k<0?k+=I.length:k>I.length&&(k=I.length);T<k;T++)yield I[T]}E.slice=_;function v(I,T=Number.POSITIVE_INFINITY){let k=[];if(T===0)return[k,I];let B=I[Symbol.iterator]();for(let L=0;L<T;L++){let U=B.next();if(U.done)return[k,E.empty()];k.push(U.value)}return[k,{[Symbol.iterator](){return B}}]}E.consume=v;async function w(I){let T=[];for await(let k of I)T.push(k);return T}E.asyncToArray=w;async function x(I){let T=[];for await(let k of I)T=T.concat(k);return T}E.asyncToArrayFlat=x})(Ba||={})});function Sbi(t){AX=t}function FO(t){return AX?.trackDisposable(t),t}function OO(t){AX?.markAsDisposed(t)}function X$(t,e){AX?.setParent(t,e)}function Tbi(t,e){if(AX)for(let n of t)AX.setParent(n,e)}function UO(t){return typeof t=="object"&&t!==null&&typeof t.dispose=="function"&&t.dispose.length===0}function cC(t){if(Ba.is(t)){let e=[];for(let n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function qO(...t){let e=Bn(()=>cC(t));return Tbi(t,e),e}function Bn(t){return new Tbt(t)}var kbi,AX,fhn,Tbt,nt,me,Xf,fX,rm,nOe,qe=N(()=>{"use strict";Br();dX();pi();WFe();Eh();Rn();kbi=!1,AX=null,fhn=class t{constructor(){this.livingDisposables=new Map}static{this.idx=0}getDisposableData(e){let n=this.livingDisposables.get(e);return n||(n={parent:null,source:null,isSingleton:!1,value:e,idx:t.idx++},this.livingDisposables.set(e,n)),n}trackDisposable(e){let n=this.getDisposableData(e);n.source||(n.source=new Error().stack)}setParent(e,n){let r=this.getDisposableData(e);r.parent=n}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,n){let r=n.get(e);if(r)return r;let o=e.parent?this.getRootParent(this.getDisposableData(e.parent),n):e;return n.set(e,o),o}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,e).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(e=10,n){let r;if(n)r=n;else{let l=new Map,u=[...this.livingDisposables.values()].filter(p=>p.source!==null&&!this.getRootParent(p,l).isSingleton);if(u.length===0)return;let d=new Set(u.map(p=>p.value));if(r=u.filter(p=>!(p.parent&&d.has(p.parent))),r.length===0)throw new Error("There are cyclic diposable chains!")}if(!r)return;function o(l){function u(p,m){for(;p.length>0&&m.some(A=>typeof A=="string"?A===p[0]:p[0].match(A));)p.shift()}let d=l.source.split(`
`).map(p=>p.trim().replace("at ","")).filter(p=>p!=="");return u(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let a=new pX;for(let l of r){let u=o(l);for(let d=0;d<=u.length;d++)a.add(u.slice(0,d).join(`
`),l)}r.sort(Ch(l=>l.idx,l0));let s="",c=0;for(let l of r.slice(0,e)){c++;let u=o(l),d=[];for(let p=0;p<u.length;p++){let m=u[p];m=`(shared with ${a.get(u.slice(0,p+1).join(`
`)).size}/${r.length} leaks) at ${m}`;let f=a.get(u.slice(0,p).join(`
`)),g=uX([...f].map(h=>o(h)[p]),h=>h);delete g[u[p]];for(let[h,y]of Object.entries(g))y&&d.unshift(` - stacktraces of ${y.length} other leaks continue with ${h}`);d.unshift(m)}s+=`
==================== Leaking disposable ${c}/${r.length}: ${l.value.constructor.name} ====================
${d.join(`
`)}
============================================================
`}return r.length>e&&(s+=`
... and ${r.length-e} more leaking disposables
`),{leaks:r,details:s}}};if(kbi){let t="__is_disposable_tracked__";Sbi(new class{trackDisposable(e){let n=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[t]||console.log(n)},3e3)}setParent(e,n){if(e&&e!==me.None)try{e[t]=!0}catch{}}markAsDisposed(e){if(e&&e!==me.None)try{e[t]=!0}catch{}}markAsSingleton(e){}})}Tbt=class{constructor(e){this._isDisposed=!1,this._fn=e,FO(this)}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,OO(this),this._fn()}}};nt=class t{constructor(){this._toDispose=new Set;this._isDisposed=!1;FO(this)}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(OO(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{cC(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===me.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return X$(e,this),this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.delete(e)&&X$(e,null)}assertNotDisposed(){this._isDisposed&&Rp(new An("Object disposed"))}},me=class{constructor(){this._store=new nt;FO(this),X$(this._store,this)}static{this.None=Object.freeze({dispose(){}})}dispose(){OO(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}},Xf=class{constructor(){this._isDisposed=!1;FO(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&X$(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,OO(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&X$(e,null),e}},fX=class{constructor(e){this._disposable=e;this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}},rm=class{constructor(e=new Map){this._isDisposed=!1;this._store=e,FO(this)}dispose(){OO(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{cC(this._store.values())}finally{this._store.clear()}}has(e){return this._store.has(e)}get size(){return this._store.size}get(e){return this._store.get(e)}set(e,n,r=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),r||this._store.get(e)?.dispose(),this._store.set(e,n),X$(n,this)}deleteAndDispose(e){this._store.get(e)?.dispose(),this._store.delete(e)}deleteAndLeak(e){let n=this._store.get(e);return n&&X$(n,null),this._store.delete(e),n}keys(){return this._store.keys()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}},nOe=class extends rm{constructor(){super(new Gn)}}});var Fu,FS,gX=N(()=>{"use strict";Fu=class t{static{this.Undefined=new t(void 0)}constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}},FS=class{constructor(){this._first=Fu.Undefined;this._last=Fu.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===Fu.Undefined}clear(){let e=this._first;for(;e!==Fu.Undefined;){let n=e.next;e.prev=Fu.Undefined,e.next=Fu.Undefined,e=n}this._first=Fu.Undefined,this._last=Fu.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){let r=new Fu(e);if(this._first===Fu.Undefined)this._first=r,this._last=r;else if(n){let a=this._last;this._last=r,r.prev=a,a.next=r}else{let a=this._first;this._first=r,r.next=a,a.prev=r}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(r))}}shift(){if(this._first!==Fu.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Fu.Undefined){let e=this._last.element;return this._remove(this._last),e}}peek(){if(this._last!==Fu.Undefined)return this._last.element}_remove(e){if(e.prev!==Fu.Undefined&&e.next!==Fu.Undefined){let n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===Fu.Undefined&&e.next===Fu.Undefined?(this._first=Fu.Undefined,this._last=Fu.Undefined):e.next===Fu.Undefined?(this._last=this._last.prev,this._last.next=Fu.Undefined):e.prev===Fu.Undefined&&(this._first=this._first.next,this._first.prev=Fu.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Fu.Undefined;)yield e.element,e=e.next}}});var Rbi,Ai,pd=N(()=>{"use strict";Rbi=globalThis.performance.now.bind(globalThis.performance),Ai=class t{static create(e){return new t(e)}constructor(e){this._now=e===!1?Date.now:Rbi,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}});function Lbt(t,e){e instanceof nt?e.add(t):Array.isArray(e)&&e.push(t)}function bhn(t,e){if(e instanceof nt)e.delete(t);else if(Array.isArray(e)){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}t.dispose()}var ghn,Bbi,Io,Rbt,hhn,Bbt,nve,Dbt,Pbt,Dbi,hX,Pbi,Nbi,at,Nbt,or=N(()=>{"use strict";dX();Rn();WFe();qe();gX();pd();ghn=!1,Bbi=!1;(M=>{M.None=()=>me.None;function e(Q){if(Bbi){let{onDidAddListener:V}=Q,re=nve.create(),J=0;Q.onDidAddListener=()=>{++J===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),re.print()),V?.()}}}function n(Q,V,re){return A(Q,()=>{},0,void 0,V??!0,void 0,re)}M.defer=n;function r(Q){return(V,re=null,J)=>{let Ae=!1,te;return te=Q(K=>{if(!Ae)return te?te.dispose():Ae=!0,V.call(re,K)},null,J),Ae&&te.dispose(),te}}M.once=r;function o(Q,V){return M.once(M.filter(Q,V))}M.onceIf=o;function a(Q,V,re){return p((J,Ae=null,te)=>Q(K=>J.call(Ae,V(K)),null,te),re)}M.map=a;function s(Q,V,re){return p((J,Ae=null,te)=>Q(K=>{V(K),J.call(Ae,K)},null,te),re)}M.forEach=s;function c(Q,V,re){return p((J,Ae=null,te)=>Q(K=>V(K)&&J.call(Ae,K),null,te),re)}M.filter=c;function l(Q){return Q}M.signal=l;function u(...Q){return(V,re=null,J)=>{let Ae=qO(...Q.map(te=>te(K=>V.call(re,K))));return m(Ae,J)}}M.any=u;function d(Q,V,re,J){let Ae=re;return a(Q,te=>(Ae=V(Ae,te),Ae),J)}M.reduce=d;function p(Q,V){let re,J={onWillAddFirstListener(){re=Q(Ae.fire,Ae)},onDidRemoveLastListener(){re?.dispose()}};V||e(J);let Ae=new at(J);return V?.add(Ae),Ae.event}function m(Q,V){return V instanceof Array?V.push(Q):V&&V.add(Q),Q}function A(Q,V,re=100,J=!1,Ae=!1,te,K){let be,H,$,ce=0,ke,We={leakWarningThreshold:te,onWillAddFirstListener(){be=Q(ae=>{ce++,H=V(H,ae),J&&!$&&(Le.fire(H),H=void 0),ke=()=>{let se=H;H=void 0,$=void 0,(!J||ce>1)&&Le.fire(se),ce=0},typeof re=="number"?($&&clearTimeout($),$=setTimeout(ke,re)):$===void 0&&($=null,queueMicrotask(ke))})},onWillRemoveListener(){Ae&&ce>0&&ke?.()},onDidRemoveLastListener(){ke=void 0,be.dispose()}};K||e(We);let Le=new at(We);return K?.add(Le),Le.event}M.debounce=A;function f(Q,V=0,re,J){return M.debounce(Q,(Ae,te)=>Ae?(Ae.push(te),Ae):[te],V,void 0,re??!0,void 0,J)}M.accumulate=f;function g(Q,V,re=100,J=!0,Ae=!0,te,K){let be,H,$,ce=0,ke={leakWarningThreshold:te,onWillAddFirstListener(){be=Q(Le=>{ce++,H=V(H,Le),$===void 0&&(J&&(We.fire(H),H=void 0,ce=0),typeof re=="number"?$=setTimeout(()=>{Ae&&ce>0&&We.fire(H),H=void 0,$=void 0,ce=0},re):($=0,queueMicrotask(()=>{Ae&&ce>0&&We.fire(H),H=void 0,$=void 0,ce=0})))})},onDidRemoveLastListener(){be.dispose()}};K||e(ke);let We=new at(ke);return K?.add(We),We.event}M.throttle=g;function h(Q,V=(J,Ae)=>J===Ae,re){let J=!0,Ae;return c(Q,te=>{let K=J||!V(te,Ae);return J=!1,Ae=te,K},re)}M.latch=h;function y(Q,V,re){return[M.filter(Q,V,re),M.filter(Q,J=>!V(J),re)]}M.split=y;function _(Q,V=!1,re=[],J){let Ae=re.slice(),te=Q(H=>{Ae?Ae.push(H):be.fire(H)});J&&J.add(te);let K=()=>{Ae?.forEach(H=>be.fire(H)),Ae=null},be=new at({onWillAddFirstListener(){te||(te=Q(H=>be.fire(H)),J&&J.add(te))},onDidAddFirstListener(){Ae&&(V?setTimeout(K):K())},onDidRemoveLastListener(){te&&te.dispose(),te=null}});return J&&J.add(be),be.event}M.buffer=_;function v(Q,V){return(J,Ae,te)=>{let K=V(new x);return Q(function(be){let H=K.evaluate(be);H!==w&&J.call(Ae,H)},void 0,te)}}M.chain=v;let w=Symbol("HaltChainable");class x{constructor(){this.steps=[]}map(V){return this.steps.push(V),this}forEach(V){return this.steps.push(re=>(V(re),re)),this}filter(V){return this.steps.push(re=>V(re)?re:w),this}reduce(V,re){let J=re;return this.steps.push(Ae=>(J=V(J,Ae),J)),this}latch(V=(re,J)=>re===J){let re=!0,J;return this.steps.push(Ae=>{let te=re||!V(Ae,J);return re=!1,J=Ae,te?Ae:w}),this}evaluate(V){for(let re of this.steps)if(V=re(V),V===w)break;return V}}function E(Q,V,re=J=>J){let J=(...be)=>K.fire(re(...be)),Ae=()=>Q.on(V,J),te=()=>Q.removeListener(V,J),K=new at({onWillAddFirstListener:Ae,onDidRemoveLastListener:te});return K.event}M.fromNodeEventEmitter=E;function I(Q,V,re=J=>J){let J=(...be)=>K.fire(re(...be)),Ae=()=>Q.addEventListener(V,J),te=()=>Q.removeEventListener(V,J),K=new at({onWillAddFirstListener:Ae,onDidRemoveLastListener:te});return K.event}M.fromDOMEventEmitter=I;function T(Q,V){let re,J,Ae=new Promise(te=>{J=r(Q)(te),Lbt(J,V),re=()=>{bhn(J,V)}});return Ae.cancel=re,V&&Ae.finally(()=>bhn(J,V)),Ae}M.toPromise=T;function k(Q,V){return Q(re=>V.fire(re))}M.forward=k;function B(Q,V,re){return V(re),Q(J=>V(J))}M.runAndSubscribe=B;class L{constructor(V,re){this._observable=V;this._counter=0;this._hasChanged=!1;let J={onWillAddFirstListener:()=>{V.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{V.removeObserver(this)}};re||e(J),this.emitter=new at(J),re&&re.add(this.emitter)}beginUpdate(V){this._counter++}handlePossibleChange(V){}handleChange(V,re){this._hasChanged=!0}endUpdate(V){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function U(Q,V){return new L(Q,V).emitter.event}M.fromObservable=U;function O(Q){return(V,re,J)=>{let Ae=0,te=!1,K={beginUpdate(){Ae++},endUpdate(){Ae--,Ae===0&&(Q.reportChanges(),te&&(te=!1,V.call(re)))},handlePossibleChange(){},handleChange(){te=!0}};Q.addObserver(K),Q.reportChanges();let be={dispose(){Q.removeObserver(K)}};return Lbt(be,J),be}}M.fromObservableLight=O})(Io||={});Rbt=class t{constructor(e){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${e}_${t._idPool++}`,t.all.add(this)}static{this.all=new Set}static{this._idPool=0}start(e){this._stopWatch=new Ai,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},hhn=-1,Bbt=class t{constructor(e,n,r=(t._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e;this.threshold=n;this.name=r;this._warnCountdown=0}static{this._idPool=1}dispose(){this._stacks?.clear()}check(e,n){let r=this.threshold;if(r<=0||n<r)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let[a,s]=this.getMostFrequentStack(),c=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${s}):`;console.warn(c),console.warn(a);let l=new Dbt(c,a);this._errorHandler(l)}return()=>{let a=this._stacks.get(e.value)||0;this._stacks.set(e.value,a-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(let[r,o]of this._stacks)(!e||n<o)&&(e=[r,o],n=o);return e}},nve=class t{constructor(e){this.value=e}static create(){let e=new Error;return new t(e.stack??"")}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},Dbt=class extends Er