(()=>{"use strict";var e={556:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.localize=t.init=t.Localize=void 0;const r=n(147),s=n(17),a=n(496);class i{constructor(e={}){this.options=e}localize(e,...t){const n=this.bundle[e]||e;return this.format(n,t)}init(e){this.extensionPath=e,this.bundle=this.resolveLanguagePack()}format(e,t=[]){let n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>{const r=n[0];return void 0!==t[r]?t[r]:e})),n}resolveLanguagePack(){const e=".nls.json";let t="";const n=this.extensionPath||process.cwd(),a=s.join(n,"package"),i=this.options;if(i.locale){let e=i.locale;for(;e;){const n=".nls."+e+".json";if(r.existsSync(a+n)){t=n;break}{const n=e.lastIndexOf("-");n>0?e=e.substring(0,n):(t=".nls.json",e=null)}}}else t=e;let o={};t!==e&&(o=JSON.parse(r.readFileSync(s.join(a+e),"utf8")));const l=s.join(a+t),c=r.existsSync(l)?JSON.parse(r.readFileSync(l,"utf8")):{};return Object.assign(Object.assign({},o),c)}}t.Localize=i;const o=new i({locale:a.env.language});t.init=function(e){return o.init(e)},t.localize=function(e,...t){return o.localize(e,...t)}},496:e=>{e.exports=require("vscode")},81:e=>{e.exports=require("child_process")},147:e=>{e.exports=require("fs")},17:e=>{e.exports=require("path")}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.deactivate=e.activate=void 0;const t=n(496),s=n(81),a=n(556);let i,o,l;e.activate=function(e){(0,a.init)(e.extensionPath);const n=process.env.X_IDE_CHECK_STORAGE_INTERVAL||60,r=process.env.X_CGROUP_ID;let c,u,p=0,m=!0;const d={full:(0,a.localize)("full"),warn:(0,a.localize)("warn"),memWarn:(0,a.localize)("memWarn"),memKillWarn:(0,a.localize)("memKillWarn")},v=(0,a.localize)("noCue"),f=(0,a.localize)("certain"),g=e=>{e!==u&&(u=e,m=!0),m&&"normal"!==e&&t.window.showWarningMessage(d[u],f,v).then((e=>{e===v&&(m=!1)}))};i=setInterval((()=>{s.exec("df -ah /|grep overlay|awk '{print $5}'",((e,t,n)=>{if(e||!t)return;const r=+t.trim().slice(0,-1),s=new Map([[r<95,"normal"],[r>=95,"warn"],[100===r,"full"]]);g(s.get(!0))}))}),1e3*+n),o=setInterval((()=>{s.exec("free -m /|grep Mem|awk '{print $3/$2}'",((e,t,n)=>{if(e||!t)return;const r=+t.trim().slice(0,-1),s=new Map([[r<.8,"normal"],[r>=.8,"memWarn"]]);g(s.get(!0))}))}),1e3*+n),l=setInterval((()=>{null!==r&&s.exec("dmesg -r | grep -E '"+r+"' | awk '/mems_allowed=0/ {print $1}' | cut -d \"[\" -f 2 | awk -F ']' 'END {print $1}'",((e,t,n)=>{if(e||!t)return;const r=+t.trim().slice(0,-1);if(0===p)p+=1,c=r;else{const e=new Map([[r!==c,"memKillWarn"]]);g(e.get(!0)),c=r}}))}),5e3);const h=t.commands.registerCommand("loader.messageHandler",(e=>{"maturity"===e.type&&t.window.showWarningMessage((0,a.localize)("maturity"))}));e.subscriptions.push(h)},e.deactivate=function(){clearInterval(i),clearInterval(o),clearInterval(l)}})(),module.exports=r})();