(function(){"use strict";const{ipcRenderer:o,webFrame:t,contextBridge:a}=require("electron");function s(e){if(!e||!e.startsWith("vscode:"))throw new Error(`Unsupported event IPC channel '${e}'`);return!0}function d(e){for(const r of process.argv)if(r.indexOf(`--${e}=`)===0)return r.split("=")[1]}let n;const c=(async()=>{const e=d("vscode-window-config");if(!e)throw new Error("Preload: did not find expected vscode-window-config in renderer process arguments list.");try{s(e);const r=n=await o.invoke(e);return Object.assign(process.env,r.userEnv),t.setZoomLevel(r.zoomLevel??0),r}catch(r){throw new Error(`Preload: unable to fetch vscode-window-config: ${r}`)}})(),v=(async()=>{const[e,r]=await Promise.all([(async()=>(await c).userEnv)(),o.invoke("vscode:fetchShellEnv")]);return{...process.env,...r,...e}})(),i={ipcRenderer:{send(e,...r){s(e)&&o.send(e,...r)},invoke(e,...r){return s(e),o.invoke(e,...r)},on(e,r){return s(e),o.on(e,r),this},once(e,r){return s(e),o.once(e,r),this},removeListener(e,r){return s(e),o.removeListener(e,r),this}},ipcMessagePort:{acquire(e,r){if(s(e)){const u=(f,p)=>{r===p&&(o.off(e,u),window.postMessage(r,"*",f.ports))};o.on(e,u)}}},webFrame:{setZoomLevel(e){typeof e=="number"&&t.setZoomLevel(e)}},process:{get platform(){return process.platform},get arch(){return process.arch},get env(){return{...process.env}},get versions(){return process.versions},get type(){return"renderer"},get execPath(){return process.execPath},cwd(){return process.env.VSCODE_CWD||process.execPath.substr(0,process.execPath.lastIndexOf(process.platform==="win32"?"\\":"/"))},shellEnv(){return v},getProcessMemoryInfo(){return process.getProcessMemoryInfo()},on(e,r){process.on(e,r)}},context:{configuration(){return n},async resolveConfiguration(){return c}}};if(process.contextIsolated)try{a.exposeInMainWorld("vscode",i)}catch(e){console.error(e)}else window.vscode=i})();

//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/019f4d1419fbc8219a181fab7892ebccf7ee29a2/core/vs/base/parts/sandbox/electron-sandbox/preload.js.map
