// Vencord 50c5124e
// Standalone: false
// Platform: win32
// Updater Disabled: false
"use strict";function a(e,o=300){let n;return function(...d){clearTimeout(n),n=setTimeout(()=>{e(...d)},o)}}var t=require("electron/renderer");var s=require("electron/renderer");function r(e,...o){return s.ipcRenderer.invoke(e,...o)}function i(e,...o){return s.ipcRenderer.sendSync(e,...o)}var S={},g=i("VencordGetPluginIpcMethodMap");for(let[e,o]of Object.entries(g)){let n=S[e]={};for(let[d,m]of Object.entries(o))n[d]=(...c)=>r(m,...c)}var E={themes:{uploadTheme:async(e,o)=>{throw new Error("uploadTheme is WEB only")},deleteTheme:async e=>{throw new Error("deleteTheme is WEB only")},getThemesList:()=>r("VencordGetThemesList"),getThemeData:e=>r("VencordGetThemeData",e),getSystemValues:()=>r("VencordGetThemeSystemValues"),openFolder:()=>r("VencordOpenThemesFolder")},updater:{getUpdates:()=>r("VencordGetUpdates"),update:()=>r("VencordUpdate"),rebuild:()=>r("VencordBuild"),getRepo:()=>r("VencordGetRepo")},settings:{get:()=>i("VencordGetSettings"),set:(e,o)=>r("VencordSetSettings",e,o),openFolder:()=>r("VencordOpenSettingsFolder")},quickCss:{get:()=>r("VencordGetQuickCss"),set:e=>r("VencordSetQuickCss",e),addChangeListener(e){s.ipcRenderer.on("VencordQuickCssUpdate",(o,n)=>e(n))},addThemeChangeListener(e){s.ipcRenderer.on("VencordThemeUpdate",()=>e())},openFile:()=>r("VencordOpenQuickCss"),openEditor:()=>r("VencordOpenMonacoEditor"),getEditorTheme:()=>i("VencordGetMonacoTheme")},native:{getVersions:()=>process.versions,openExternal:e=>r("VencordOpenExternal",e),getRendererCss:()=>r("VencordGetRendererCss"),onRendererCssUpdate:e=>{}},csp:{isDomainAllowed:(e,o)=>r("VencordCspIsDomainAllowed",e,o),removeOverride:e=>r("VencordCspRemoveOverride",e),requestAddOverride:(e,o,n)=>r("VencordCspRequestAddOverride",e,o,n)},pluginHelpers:S};t.contextBridge.exposeInMainWorld("VencordNative",E);location.protocol!=="data:"?(r("VencordInitFileWatchers"),t.webFrame.executeJavaScript(i("VencordPreloadGetRendererJs")),require(process.env.DISCORD_PRELOAD)):(t.contextBridge.exposeInMainWorld("setCss",a(E.quickCss.set)),t.contextBridge.exposeInMainWorld("getCurrentCss",E.quickCss.get),t.contextBridge.exposeInMainWorld("getTheme",E.quickCss.getEditorTheme));
//# sourceURL=file:///VencordPreload
//# sourceMappingURL=vencord://preload.js.map
