(function(){lete=window.require("fs"),t=window.require("process"),a=t.platform,n=("win32"===a?t.env.APPDATA:"darwin"===a?t.env.HOME+"/Library/Preferences":process.env.HOME+"/.config")+"/BetterDiscord/",o="localStorage.json",s={};if(e.existsSync(`${n}${o}`))try{s=JSON.parse(e.readFileSync(`${n}${o}`))}catch(e){console.log(e)}elseif(e.existsSync(o))try{s=JSON.parse(e.readFileSync(o))}catch(e){console.log(e)}varr=s;r.setItem=function(e,t){r[e]=t,this.save()},r.getItem=function(e){returnr[e]||null},r.save=function(){e.writeFileSync(`${n}${o}`,JSON.stringify(this),null,4)};vari=newProxy(r,{set:function(e,t,a){r[t]=a,r.save()},get:function(e,t){returnr[t]||null}});window.localStorage=i})(),(()=>{lete=document.createElement("div");e.className="bd-loaderv2",e.title="BandagedBD is loading...",document.body.appendChild(e)})();varDataStore=(()=>{conste=require("fs"),t=require("path"),a=DiscordNative.globals.releaseChannel;returnnewclass{constructor(){this.data={settings:{stable:{},canary:{},ptb:{}}},this.pluginData={}}initialize(){try{e.existsSync(this.BDFile)||e.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4));constt=require(this.BDFile);if(t.hasOwnProperty("settings")&&(this.data=t),!e.existsSync(this.settingsFile))return;letn=require(this.settingsFile);e.unlinkSync(this.settingsFile),n=n.hasOwnProperty("settings")?Object.assign({stable:{},canary:{},ptb:{}},{[a]:n}):Object.assign({stable:{},canary:{},ptb:{}},n),this.setBDData("settings",n)}catch(e){BdApi.alert("Corrupt Storage","The bd storage has somehow become corrupt. You may either try to salvage the file or delete it then reload.")}}getBDFile(){returnthis._BDFile||(this._BDFile=t.resolve(bdConfig.dataPath,"bdstorage.json"))}getsettingsFile(){returnthis._settingsFile||(this._settingsFile=t.resolve(bdConfig.dataPath,"bdsettings.json"))}getPluginFile(e){returnt.resolve(ContentManager.pluginsFolder,e+".config.json")}getSettingGroup(e){returnthis.data.settings[a][e]||null}setSettingGroup(t,n){this.data.settings[a][t]=n,e.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getBDData(e){returnthis.data[e]||""}setBDData(t,a){this.data[t]=a,e.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getPluginData(t,a){returnvoid0===this.pluginData[t]?e.existsSync(this.getPluginFile(t))?(this.pluginData[t]=JSON.parse(e.readFileSync(this.getPluginFile(t))),this.pluginData[t][a]||void0):void0:this.pluginData[t][a]||void0}setPluginData(t,a,n){void0===n||(this.pluginData[t]===void0&&(this.pluginData[t]={}),this.pluginData[t][a]=n,e.writeFileSync(this.getPluginFile(t),JSON.stringify(this.pluginData[t],null,4)))}deletePluginData(t,a){this.pluginData[t]===void0&&(this.pluginData[t]={}),deletethis.pluginData[t][a],e.writeFileSync(this.getPluginFile(t),JSON.stringify(this.pluginData[t],null,4))}}})(),BDEvents=(()=>{conste=require("events");returnnewclassextendse{dispatch(e,...t){this.emit(e,...t)}off(e,t){this.removeListener(e,t)}}})();window.bdStorage=class{staticget(e){returnUtils.warn("Deprecation Notice","Please use BdApi.getBDData(). bdStorage may be removed in future versions."),DataStore.getBDData(e)}staticset(e,t){Utils.warn("Deprecation Notice","Please use BdApi.setBDData(). bdStorage may be removed in future versions."),DataStore.setBDData(e,t)}},window.bdPluginStorage=class{staticget(e,t){returnUtils.warn("Deprecation Notice",`${e}, please use BdApi.loadData() or BdApi.getData(). bdPluginStorage may be removed in future versions.`),DataStore.getPluginData(e,t)||null}staticset(e,t,a){returnUtils.warn("Deprecation Notice",`${e}, please use BdApi.saveData() or BdApi.setData(). bdPluginStorage may be removed in future versions.`),"undefined"==typeofa?Utils.warn("Deprecation Notice","Trying to set undefined value in plugin "+e):voidDataStore.setPluginData(e,t,a)}staticdelete(e,t){Utils.warn("Deprecation Notice",`${e}, please use BdApi.deleteData(). bdPluginStorage may be removed in future versions.`),DataStore.deletePluginData(e,t)}};varsettingsPanel,emoteModule,quickEmoteMenu,voiceMode,pluginModule,themeModule,dMode,pub