From da94a8e5c12b06380092d19f5ba23875f5a93667 Mon Sep 17 00:00:00 2001 From: Jean Ouina Date: Sat, 6 Jun 2020 21:10:14 +0200 Subject: [PATCH] Adding Blur option --- BetterDiscordApp/js/main.js | 18 +++++-- BetterDiscordApp/js/main.min.js | 10 ++-- BetterDiscordApp/src/0globals.js | 4 +- BetterDiscordApp/src/modules/AntiAdDM.js | 7 +++ BetterDiscordApp/src/modules/blurPrivate.js | 53 +++++++++++++++++++ BetterDiscordApp/src/modules/settingsPanel.js | 9 ++++ .../core/app/BetterDiscord/index.js | 5 +- .../core/app/discord_native/remoteApp.js | 3 +- 8 files changed, 97 insertions(+), 12 deletions(-) create mode 100644 BetterDiscordApp/src/modules/blurPrivate.js diff --git a/BetterDiscordApp/js/main.js b/BetterDiscordApp/js/main.js index 8a74f68..838465c 100644 --- a/BetterDiscordApp/js/main.js +++ b/BetterDiscordApp/js/main.js @@ -95,7 +95,7 @@ module.exports = /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minimumDiscordVersion\", function() { return minimumDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentDiscordVersion\", function() { return currentDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minSupportedVersion\", function() { return minSupportedVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdVersion\", function() { return bbdVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdChangelog\", function() { return bbdChangelog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settings\", function() { return settings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultCookie\", function() { return defaultCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsCookie\", function() { return settingsCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsRPC\", function() { return settingsRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultRPC\", function() { return defaultRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdpluginErrors\", function() { return bdpluginErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemeErrors\", function() { return bdthemeErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdConfig\", function() { return bdConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemes\", function() { return bdthemes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdplugins\", function() { return bdplugins; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pluginCookie\", function() { return pluginCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"themeCookie\", function() { return themeCookie; });\n// var settingsPanel, voiceMode, pluginModule, themeModule, dMode, publicServersModule, mainCore, BDV2;\nconst minimumDiscordVersion = \"0.0.306\";\nconst currentDiscordVersion = window.DiscordNative && window.DiscordNative.remoteApp && window.DiscordNative.remoteApp.getVersion && window.DiscordNative.remoteApp.getVersion() || \"0.0.306\";\nconst minSupportedVersion = \"0.3.0\";\nconst bbdVersion = \"0.3.4\";\nconst bbdChangelog = {\n description: \"LightCord Edition.\",\n changes: [{\n title: \"What's New?\",\n items: [\"**LightCord** is now using BandagedBD. That means all plugins you were using can be used too !\", \"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.\", \"Initialization sequence has once again been changed slightly to hopefully improve loading times.\", \"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote.\"]\n }, {\n title: \"Bug Fixes\",\n type: \"fixed\",\n items: [\"Some fixes related to showing modals in the `BdApi`.\"]\n }]\n};\nconst settings = {\n \"Custom css live update\": {\n id: \"bda-css-0\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"Custom css auto udpate\": {\n id: \"bda-css-1\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"BetterDiscord Blue\": {\n id: \"bda-gs-b\",\n info: \"Replace Discord blue with BD Blue\",\n implemented: false,\n hidden: false,\n cat: \"core\"\n },\n\n /* Core */\n\n /* ====== */\n \"Public Servers\": {\n id: \"bda-gs-1\",\n info: \"Display public servers button\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Minimal Mode\": {\n id: \"bda-gs-2\",\n info: \"Hide elements and reduce the size of elements.\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Mode\": {\n id: \"bda-gs-4\",\n info: \"Only show voice chat\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Hide Channels\": {\n id: \"bda-gs-3\",\n info: \"Hide channels in minimal mode\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Dark Mode\": {\n id: \"bda-gs-5\",\n info: \"Make certain elements dark by default(wip)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Disconnect\": {\n id: \"bda-dc-0\",\n info: \"Disconnect from voice server when closing Discord\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"24 Hour Timestamps\": {\n id: \"bda-gs-6\",\n info: \"Replace 12hr timestamps with proper ones\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Colored Text\": {\n id: \"bda-gs-7\",\n info: \"Make text color the same as role color\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Normalize Classes\": {\n id: \"fork-ps-4\",\n info: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n\n /* Content */\n \"Content Error Modal\": {\n id: \"fork-ps-1\",\n info: \"Shows a modal with plugin/theme errors\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Show Toasts\": {\n id: \"fork-ps-2\",\n info: \"Shows a small notification for important information\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Scroll To Settings\": {\n id: \"fork-ps-3\",\n info: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Automatic Loading\": {\n id: \"fork-ps-5\",\n info: \"Automatically loads, reloads, and unloads plugins and themes\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n\n /* Developer */\n \"Developer Mode\": {\n id: \"bda-gs-8\",\n info: \"Developer Mode Toggle\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"Copy Selector\": {\n id: \"fork-dm-1\",\n info: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"React DevTools\": {\n id: \"reactDevTools\",\n info: \"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.\",\n implemented: true,\n hidden: true,\n cat: \"core\",\n category: \"developer settings\"\n },\n\n /** LightCord */\n \"Disable BetterDiscord\": {\n id: \"bd-disable\",\n info: \"Disable Betterdiscord (plugins, themes, etc).\",\n implemented: false,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Calling Ring Beat\": {\n id: \"lightcord-2\",\n info: \"Enable Discord's special calling beat.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Developer Options\": {\n id: \"lightcord-1\",\n info: \"Enable Discord's Internal Developer Options. This allow the \\\"Experiments\\\" tab and the \\\"Developer Options\\\" tab. (must close and reopen settings)\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Ad Block\": {\n id: \"lightcord-4\",\n info: \"Block any BOT that dm you with an invite link. Even in an embed.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Enable Lightcord Servers\": {\n id: \"lightcord-5\",\n info: \"Disabling it erase any informations about you in our servers. But you won't see anything like custom badges.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n\n /** Lightcord Window */\n \"Always-on-Top\": {\n id: \"lightcord-3\",\n info: \"Enable window's Always-on-Top mode, where Lightcord stays on top of other applications.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Window\"\n },\n\n /** RichPresence */\n \"Enable\": {\n id: \"lightcord-presence-1\",\n info: \"Enable RichPresence below.\",\n implemented: true,\n hidden: false,\n cat: \"status\"\n }\n};\nconst defaultCookie = {\n \"bda-gs-1\": true,\n \"bda-gs-2\": false,\n \"bda-gs-3\": false,\n \"bda-gs-4\": false,\n \"bda-gs-5\": true,\n \"bda-gs-6\": false,\n \"bda-gs-7\": false,\n \"bda-gs-8\": true,\n \"bda-es-0\": true,\n \"bda-es-1\": true,\n \"bda-es-2\": true,\n \"bda-es-4\": false,\n \"bda-es-6\": true,\n \"bda-es-7\": true,\n \"bda-gs-b\": false,\n \"bda-es-8\": true,\n \"bda-dc-0\": false,\n \"bda-css-0\": false,\n \"bda-css-1\": false,\n \"bda-es-9\": true,\n \"fork-dm-1\": false,\n \"fork-ps-1\": true,\n \"fork-ps-2\": true,\n \"fork-ps-3\": true,\n \"fork-ps-4\": true,\n \"fork-ps-5\": true,\n \"fork-es-2\": false,\n \"fork-es-3\": true,\n \"fork-wp-1\": false,\n \"fork-wp-2\": false,\n \"fork-beta\": true,\n \"reactDevTools\": false,\n \"lightcord-1\": false,\n \"lightcord-2\": true,\n \"lightcord-presence-1\": false,\n \"lightcord-3\": false,\n \"lightcord-4\": false,\n \"lightcord-5\": true\n};\nconst settingsCookie = {};\nconst settingsRPC = {};\nconst defaultRPC = {\n \"name\": \"Lightcord\",\n \"application_id\": \"711416957718757418\",\n \"state\": \"Lightcord Client\",\n \"details\": \"Browsing Discord\",\n \"timestamps.start\": Date.now(),\n \"assets.small\": null,\n \"assets.large\": \"712323821037682791\"\n};\nconst bdpluginErrors = [];\nconst bdthemeErrors = []; // define for backwards compatibility\n\nconst bdConfig = Object.create(BetterDiscordConfig);\nconst bdthemes = {};\nconst bdplugins = {};\nconst pluginCookie = {};\nconst themeCookie = {};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvMGdsb2JhbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjLzBnbG9iYWxzLmpzPzAwZDIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdmFyIHNldHRpbmdzUGFuZWwsIHZvaWNlTW9kZSwgcGx1Z2luTW9kdWxlLCB0aGVtZU1vZHVsZSwgZE1vZGUsIHB1YmxpY1NlcnZlcnNNb2R1bGUsIG1haW5Db3JlLCBCRFYyO1xuZXhwb3J0IGNvbnN0IG1pbmltdW1EaXNjb3JkVmVyc2lvbiA9IFwiMC4wLjMwNlwiO1xuZXhwb3J0IGNvbnN0IGN1cnJlbnREaXNjb3JkVmVyc2lvbiA9IHdpbmRvdy5EaXNjb3JkTmF0aXZlICYmIHdpbmRvdy5EaXNjb3JkTmF0aXZlLnJlbW90ZUFwcCAmJiB3aW5kb3cuRGlzY29yZE5hdGl2ZS5yZW1vdGVBcHAuZ2V0VmVyc2lvbiAmJiB3aW5kb3cuRGlzY29yZE5hdGl2ZS5yZW1vdGVBcHAuZ2V0VmVyc2lvbigpIHx8IFwiMC4wLjMwNlwiO1xuZXhwb3J0IGNvbnN0IG1pblN1cHBvcnRlZFZlcnNpb24gPSBcIjAuMy4wXCI7XG5leHBvcnQgY29uc3QgYmJkVmVyc2lvbiA9IFwiMC4zLjRcIjtcbmV4cG9ydCBjb25zdCBiY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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/0globals.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minimumDiscordVersion\", function() { return minimumDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentDiscordVersion\", function() { return currentDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minSupportedVersion\", function() { return minSupportedVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdVersion\", function() { return bbdVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdChangelog\", function() { return bbdChangelog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settings\", function() { return settings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultCookie\", function() { return defaultCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsCookie\", function() { return settingsCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsRPC\", function() { return settingsRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultRPC\", function() { return defaultRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdpluginErrors\", function() { return bdpluginErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemeErrors\", function() { return bdthemeErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdConfig\", function() { return bdConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemes\", function() { return bdthemes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdplugins\", function() { return bdplugins; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pluginCookie\", function() { return pluginCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"themeCookie\", function() { return themeCookie; });\n// var settingsPanel, voiceMode, pluginModule, themeModule, dMode, publicServersModule, mainCore, BDV2;\nconst minimumDiscordVersion = \"0.0.306\";\nconst currentDiscordVersion = window.DiscordNative && window.DiscordNative.remoteApp && window.DiscordNative.remoteApp.getVersion && window.DiscordNative.remoteApp.getVersion() || \"0.0.306\";\nconst minSupportedVersion = \"0.3.0\";\nconst bbdVersion = \"0.3.4\";\nconst bbdChangelog = {\n description: \"LightCord Edition.\",\n changes: [{\n title: \"What's New?\",\n items: [\"**LightCord** is now using BandagedBD. That means all plugins you were using can be used too !\", \"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.\", \"Initialization sequence has once again been changed slightly to hopefully improve loading times.\", \"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote.\"]\n }, {\n title: \"Bug Fixes\",\n type: \"fixed\",\n items: [\"Some fixes related to showing modals in the `BdApi`.\"]\n }]\n};\nconst settings = {\n \"Custom css live update\": {\n id: \"bda-css-0\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"Custom css auto udpate\": {\n id: \"bda-css-1\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"BetterDiscord Blue\": {\n id: \"bda-gs-b\",\n info: \"Replace Discord blue with BD Blue\",\n implemented: false,\n hidden: false,\n cat: \"core\"\n },\n\n /* Core */\n\n /* ====== */\n \"Public Servers\": {\n id: \"bda-gs-1\",\n info: \"Display public servers button\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Minimal Mode\": {\n id: \"bda-gs-2\",\n info: \"Hide elements and reduce the size of elements.\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Mode\": {\n id: \"bda-gs-4\",\n info: \"Only show voice chat\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Hide Channels\": {\n id: \"bda-gs-3\",\n info: \"Hide channels in minimal mode\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Dark Mode\": {\n id: \"bda-gs-5\",\n info: \"Make certain elements dark by default(wip)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Disconnect\": {\n id: \"bda-dc-0\",\n info: \"Disconnect from voice server when closing Discord\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"24 Hour Timestamps\": {\n id: \"bda-gs-6\",\n info: \"Replace 12hr timestamps with proper ones\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Colored Text\": {\n id: \"bda-gs-7\",\n info: \"Make text color the same as role color\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Normalize Classes\": {\n id: \"fork-ps-4\",\n info: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n\n /* Content */\n \"Content Error Modal\": {\n id: \"fork-ps-1\",\n info: \"Shows a modal with plugin/theme errors\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Show Toasts\": {\n id: \"fork-ps-2\",\n info: \"Shows a small notification for important information\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Scroll To Settings\": {\n id: \"fork-ps-3\",\n info: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Automatic Loading\": {\n id: \"fork-ps-5\",\n info: \"Automatically loads, reloads, and unloads plugins and themes\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n\n /* Developer */\n \"Developer Mode\": {\n id: \"bda-gs-8\",\n info: \"Developer Mode Toggle\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"Copy Selector\": {\n id: \"fork-dm-1\",\n info: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"React DevTools\": {\n id: \"reactDevTools\",\n info: \"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.\",\n implemented: true,\n hidden: true,\n cat: \"core\",\n category: \"developer settings\"\n },\n\n /** LightCord */\n \"Disable BetterDiscord\": {\n id: \"bd-disable\",\n info: \"Disable Betterdiscord (plugins, themes, etc).\",\n implemented: false,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Blur Personnal Informations\": {\n id: \"lightcord-6\",\n info: \"Blur sensitive informations like email, payment infos and more.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Calling Ring Beat\": {\n id: \"lightcord-2\",\n info: \"Enable Discord's special calling beat.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Developer Options\": {\n id: \"lightcord-1\",\n info: \"Enable Discord's Internal Developer Options. This allow the \\\"Experiments\\\" tab and the \\\"Developer Options\\\" tab. (must close and reopen settings)\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Ad Block\": {\n id: \"lightcord-4\",\n info: \"Block any BOT that dm you with an invite link. Even in an embed.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Enable Lightcord Servers\": {\n id: \"lightcord-5\",\n info: \"Disabling it erase any informations about you in our servers. But you won't see anything like custom badges.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n\n /** Lightcord Window */\n \"Always-on-Top\": {\n id: \"lightcord-3\",\n info: \"Enable window's Always-on-Top mode, where Lightcord stays on top of other applications.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Window\"\n },\n\n /** RichPresence */\n \"Enable\": {\n id: \"lightcord-presence-1\",\n info: \"Enable RichPresence below.\",\n implemented: true,\n hidden: false,\n cat: \"status\"\n }\n};\nconst defaultCookie = {\n \"bda-gs-1\": true,\n \"bda-gs-2\": false,\n \"bda-gs-3\": false,\n \"bda-gs-4\": false,\n \"bda-gs-5\": true,\n \"bda-gs-6\": false,\n \"bda-gs-7\": false,\n \"bda-gs-8\": true,\n \"bda-es-0\": true,\n \"bda-es-1\": true,\n \"bda-es-2\": true,\n \"bda-es-4\": false,\n \"bda-es-6\": true,\n \"bda-es-7\": true,\n \"bda-gs-b\": false,\n \"bda-es-8\": true,\n \"bda-dc-0\": false,\n \"bda-css-0\": false,\n \"bda-css-1\": false,\n \"bda-es-9\": true,\n \"fork-dm-1\": false,\n \"fork-ps-1\": true,\n \"fork-ps-2\": true,\n \"fork-ps-3\": true,\n \"fork-ps-4\": true,\n \"fork-ps-5\": true,\n \"fork-es-2\": false,\n \"fork-es-3\": true,\n \"fork-wp-1\": false,\n \"fork-wp-2\": false,\n \"fork-beta\": true,\n \"reactDevTools\": false,\n \"lightcord-1\": false,\n \"lightcord-2\": true,\n \"lightcord-presence-1\": false,\n \"lightcord-3\": false,\n \"lightcord-4\": false,\n \"lightcord-5\": true,\n \"lightcord-6\": true\n};\nconst settingsCookie = {};\nconst settingsRPC = {};\nconst defaultRPC = {\n \"name\": \"Lightcord\",\n \"application_id\": \"711416957718757418\",\n \"state\": \"Lightcord Client\",\n \"details\": \"Browsing Discord\",\n \"timestamps.start\": Date.now(),\n \"assets.small\": null,\n \"assets.large\": \"712323821037682791\"\n};\nconst bdpluginErrors = [];\nconst bdthemeErrors = []; // define for backwards compatibility\n\nconst bdConfig = Object.create(BetterDiscordConfig);\nconst bdthemes = {};\nconst bdplugins = {};\nconst pluginCookie = {};\nconst themeCookie = {};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvMGdsb2JhbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjLzBnbG9iYWxzLmpzPzAwZDIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdmFyIHNldHRpbmdzUGFuZWwsIHZvaWNlTW9kZSwgcGx1Z2luTW9kdWxlLCB0aGVtZU1vZHVsZSwgZE1vZGUsIHB1YmxpY1NlcnZlcnNNb2R1bGUsIG1haW5Db3JlLCBCRFYyO1xuZXhwb3J0IGNvbnN0IG1pbmltdW1EaXNjb3JkVmVyc2lvbiA9IFwiMC4wLjMwNlwiO1xuZXhwb3J0IGNvbnN0IGN1cnJlbnREaXNjb3JkVmVyc2lvbiA9IHdpbmRvdy5EaXNjb3JkTmF0aXZlICYmIHdpbmRvdy5EaXNjb3JkTmF0aXZlLnJlbW90ZUFwcCAmJiB3aW5kb3cuRGlzY29yZE5hdGl2ZS5yZW1vdGVBcHAuZ2V0VmVyc2lvbiAmJiB3aW5kb3cuRGlzY29yZE5hdGl2ZS5yZW1vdGVBcHAuZ2V0VmVyc2lvbigpIHx8IFwiMC4wLjMwNlwiO1xuZXhwb3J0IGNvbnN0IG1pblN1cHBvcnRlZFZlcnNpb24gPSBcIjAuMy4wXCI7XG5leHBvcnQgY29uc3QgYmJkVmVyc2lvbiA9IFwiMC4zLjRcIjtcbmV4cG9ydCBjb25zdCBiYmRDaGFuZ2Vsb2cgPSB7XG4gIGRl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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/0globals.js\n"); /***/ }), @@ -155,7 +155,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0gl /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\nconst dispatcher = window.Lightcord.DiscordModules.dispatcher;\nconst ChannelModule = BDModules.get(e => e.default && e.default.getChannel && e.default.hasChannel)[0].default;\nlet relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\nlet DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\nconst blocked = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class AntiBotDM {\n constructor() {\n this.antiDM = this.antiDM.bind(this);\n this.enabled = false;\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n dispatcher.subscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n dispatcher.unsubscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n antiDM(ev) {\n if (!ev.message.author.bot) return;\n if (ev.message.guild_id) return;\n const channel = ChannelModule.getChannel(ev.message.channel_id);\n if (!channel) return; // might be broken\n\n if (channel.type !== 1) return;\n if (blocked[ev.message.author.id]) return; // If the user unblock the bot, Don't block it again.\n\n if (scanMessage(ev.message)) {\n blocked[ev.message.author.id] = true;\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].showToast(`[AdBlock]: Blocked ${ev.message.author.username}#${ev.message.author.discriminator}`, {\n \"type\": \"warning\"\n });\n if (!relationShipModule) relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\n relationShipModule.default.addRelationship(ev.message.author.id, {\n location: \"ContextMenu\"\n }, 2);\n if (!DMModule) DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\n DMModule.default.closePrivateChannel(channel.id, false);\n }\n }\n\n}());\n\nfunction scanMessage(message) {\n if (/(discord\\.gg|discord\\.com\\/invite\\/|discordapp\\.com\\/invite\\/)/g.test(message.content)) return true;\n if (EmbedsContains(message, \"discord.gg/\") || EmbedsContains(message, \"discord.com/invite/\") || EmbedsContains(message, \"discordapp.com/invite/\")) return true;\n return false;\n}\n\nfunction EmbedsContains(message, search) {\n let embeds = message.embeds;\n if (embeds.length === 0) return false;\n return embeds.map(embed => {\n if (embed.type !== \"rich\") return false;\n if ((embed.title || \"\").includes(search)) return true;\n if ((embed.description || \"\").includes(search)) return true;\n if (((embed.footer || \"\") && embed.footer.text || \"\").includes(search)) return true;\n if (embed.fields.map(e => {\n return e.value.includes(search) || e.name.includes(search);\n }).includes(true)) return true;\n return false;\n }).includes(true);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9BbnRpQWRETS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9BbnRpQWRETS5qcz85ODhiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuY29uc3QgZGlzcGF0Y2hlciA9IHdpbmRvdy5MaWdodGNvcmQuRGlzY29yZE1vZHVsZXMuZGlzcGF0Y2hlcjtcbmNvbnN0IENoYW5uZWxNb2R1bGUgPSBCRE1vZHVsZXMuZ2V0KGUgPT4gZS5kZWZhdWx0ICYmIGUuZGVmYXVsdC5nZXRDaGFubmVsICYmIGUuZGVmYXVsdC5oYXNDaGFubmVsKVswXS5kZWZhdWx0O1xubGV0IHJlbGF0aW9uU2hpcE1vZHVsZSA9IEJETW9kdWxlcy5nZXQoZSA9PiBlLmRlZmF1bHQgJiYgZS5kZWZhdWx0LmFkZFJlbGF0aW9uc2hpcClbMF07XG5sZXQgRE1Nb2R1bGUgPSBCRE1vZHVsZXMuZ2V0KGUgPT4gZS5kZWZhdWx0ICYmIGUuZGVmYXVsdC5jbG9zZVByaXZhdGVDaGFubmVsKVswXTtcbmNvbnN0IGJsb2NrZWQgPSB7fTtcbmV4cG9ydCBkZWZhdWx0IG5ldyBjbGFzcyBBbnRpQm90RE0ge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICB0aGlzLmFudGlETSA9IHRoaXMuYW50aURNLmJpbmQodGhpcyk7XG4gICAgdGhpcy5lbmFibGVkID0gZmFsc2U7XG4gIH1cblxu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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/AntiAdDM.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\nconst dispatcher = window.Lightcord.DiscordModules.dispatcher;\nconst ChannelModule = BDModules.get(e => e.default && e.default.getChannel && e.default.hasChannel)[0].default;\nlet relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\nlet DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\nconst blocked = {};\nlet userModule = BDModules.get(e => e.default && e.default.getCurrentUser)[0];\n\nfunction getCurrentUser() {\n if (userModule) return userModule.default.getCurrentUser();\n return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class AntiBotDM {\n constructor() {\n this.antiDM = this.antiDM.bind(this);\n this.enabled = false;\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n dispatcher.subscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n dispatcher.unsubscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n antiDM(ev) {\n if (!ev.message.author.bot) return;\n if (ev.message.author.id === getCurrentUser().id) if (ev.message.guild_id) return;\n const channel = ChannelModule.getChannel(ev.message.channel_id);\n if (!channel) return; // might be broken\n\n if (channel.type !== 1) return;\n if (blocked[ev.message.author.id]) return; // If the user unblock the bot, Don't block it again.\n\n if (scanMessage(ev.message)) {\n blocked[ev.message.author.id] = true;\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].showToast(`[AdBlock]: Blocked ${ev.message.author.username}#${ev.message.author.discriminator}`, {\n \"type\": \"warning\"\n });\n if (!relationShipModule) relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\n relationShipModule.default.addRelationship(ev.message.author.id, {\n location: \"ContextMenu\"\n }, 2);\n if (!DMModule) DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\n DMModule.default.closePrivateChannel(channel.id, false);\n }\n }\n\n}());\n\nfunction scanMessage(message) {\n if (/(discord\\.gg|discord\\.com\\/invite\\/|discordapp\\.com\\/invite\\/)/g.test(message.content)) return true;\n if (EmbedsContains(message, \"discord.gg/\") || EmbedsContains(message, \"discord.com/invite/\") || EmbedsContains(message, \"discordapp.com/invite/\")) return true;\n return false;\n}\n\nfunction EmbedsContains(message, search) {\n let embeds = message.embeds;\n if (embeds.length === 0) return false;\n return embeds.map(embed => {\n if (embed.type !== \"rich\") return false;\n if ((embed.title || \"\").includes(search)) return true;\n if ((embed.description || \"\").includes(search)) return true;\n if (((embed.footer || \"\") && embed.footer.text || \"\").includes(search)) return true;\n if (embed.fields.map(e => {\n return e.value.includes(search) || e.name.includes(search);\n }).includes(true)) return true;\n return false;\n }).includes(true);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9BbnRpQWRETS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9BbnRpQWRETS5qcz85ODhiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuY29uc3QgZGlzcGF0Y2hlciA9IHdpbmRvdy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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/AntiAdDM.js\n"); /***/ }), @@ -195,6 +195,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* BDEvents */\nconst EventEm /***/ }), +/***/ "./src/modules/blurPrivate.js": +/*!************************************!*\ + !*** ./src/modules/blurPrivate.js ***! + \************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/**\r\n * Credits to @hellbound1337 on github for the css\r\n */\n\nlet selectors;\n\nfunction getSelectors() {\n let standardSidebarView = BDModules.get(e => e.standardSidebarView)[0];\n if (!standardSidebarView) return null;\n let defaultClassName = removeDa(standardSidebarView.standardSidebarView);\n let selects = [];\n selects.push(`#app-mount .${defaultClassName} .payment-info .${removeDa(BDModules.get(e => e.description && typeof e.description === \"string\" && e.description.includes(\"formText\"))[0].description)}`);\n selects.push(`#app-mount .${defaultClassName} .${removeDa(BDModules.get(e => e.paymentSourceRow)[0].paymentSourceRow)} .${removeDa(BDModules.get(e => e.subText && e.descriptionWrapper)[0].subText)}`);\n selects.push(`#app-mount .${defaultClassName} .${removeDa(BDModules.get(e => e.userSettingsAccount)[0].userSettingsAccount)} div:nth-child(2)>div:nth-child(2)>.${removeDa(BDModules.get(e => e.viewBody)[0].viewBody)}`);\n return selects;\n}\n\nfunction removeDa(className) {\n if (!className) return className;\n return className.split(\" \").filter(e => !e.startsWith(\"da-\")).join(\" \");\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class BlurPrivate {\n constructor() {\n this.enabled = false;\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n selectors = selectors || getSelectors();\n if (!selectors) console.error(new Error(\"Couldn't find selectors to blur personnal informations.\"));\n _domtools__WEBPACK_IMPORTED_MODULE_0__[\"default\"].addStyle(\"blurPrivate\", `\n${selectors[0]}, ${selectors[1]}, ${selectors[2]} {\n transition: all 150ms cubic-bezier(.55,.085,.68,.53);\n filter: blur(4px);\n opacity: .8;\n}\n\n${selectors[0]}:hover, ${selectors[1]}:hover, ${selectors[2]}:hover {\n transition: all 150ms cubic-bezier(.55,.09,.68,.53);\n filter: none;\n opacity: 1;\n}`);\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n _domtools__WEBPACK_IMPORTED_MODULE_0__[\"default\"].removeStyle(\"blurPrivate\");\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9ibHVyUHJpdmF0ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9ibHVyUHJpdmF0ZS5qcz82YWVlIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxyXG4gKiBDcmVkaXRzIHRvIEBoZWxsYm91bmQxMzM3IG9uIGdpdGh1YiBmb3IgdGhlIGNzc1xyXG4gKi9cbmltcG9ydCBET01Ub29scyBmcm9tIFwiLi9kb210b29sc1wiO1xubGV0IHNlbGVjdG9ycztcblxuZnVuY3Rpb24gZ2V0U2VsZWN0b3JzKCkge1xuICBsZXQgc3RhbmRhcmRTaWRlYmFyVmlldyA9IEJETW9kdWxlcy5nZXQoZSA9PiBlLnN0YW5kYXJkU2lkZWJhclZpZXcpWzBdO1xuICBpZiAo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xuICB9XG5cbiAgZGlzYWJsZSgpIHtcbiAgICBpZiAoIXRoaXMuZW5hYmxlZCkgcmV0dXJuO1xuICAgIHRoaXMuZW5hYmxlZCA9IGZhbHNlO1xuICAgIERPTVRvb2xzLnJlbW92ZVN0eWxlKFwiYmx1clByaXZhdGVcIik7XG4gIH1cblxufSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/blurPrivate.js\n"); + +/***/ }), + /***/ "./src/modules/classNormalizer.js": /*!****************************************!*\ !*** ./src/modules/classNormalizer.js ***! @@ -359,7 +371,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsPanelSidebar */ \"./src/modules/settingsPanelSidebar.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _bdEvents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _coloredText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coloredText */ \"./src/modules/coloredText.js\");\n/* harmony import */ var _24hour__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./24hour */ \"./src/modules/24hour.js\");\n/* harmony import */ var _reactDevTools__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reactDevTools */ \"./src/modules/reactDevTools.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _publicServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./publicServers */ \"./src/modules/publicServers.js\");\n/* harmony import */ var _voiceMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./voiceMode */ \"./src/modules/voiceMode.js\");\n/* harmony import */ var _classNormalizer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _devMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./devMode */ \"./src/modules/devMode.js\");\n/* harmony import */ var _ui_tools__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _ui_scroller__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/sectionedSettingsPanel */ \"./src/ui/sectionedSettingsPanel.js\");\n/* harmony import */ var _ui_settingsPanel__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ui/settingsPanel */ \"./src/ui/settingsPanel.js\");\n/* harmony import */ var _ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/cssEditor */ \"./src/ui/cssEditor.js\");\n/* harmony import */ var _ui_addonlist__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../ui/addonlist */ \"./src/ui/addonlist.jsx\");\n/* harmony import */ var _ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../ui/presenceSettings */ \"./src/ui/presenceSettings.jsx\");\n/* harmony import */ var _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CustomRichPresence */ \"./src/modules/CustomRichPresence.js\");\n/* harmony import */ var _ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../ui/AccountInfos */ \"./src/ui/AccountInfos.jsx\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./AntiAdDM */ \"./src/modules/AntiAdDM.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2_SettingsPanel {\n constructor() {\n this.sideBarOnClick = this.sideBarOnClick.bind(this);\n this.onChange = this.onChange.bind(this);\n this.updateSettings = this.updateSettings.bind(this);\n this.sidebar = new _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.sideBarOnClick); // this.buildPluginProps = this.buildPluginProps.bind(this);\n // this.buildThemeProps = this.buildThemeProps.bind(this);\n\n this.showOriginal = this.showOriginal.bind(this);\n }\n\n get root() {\n const _root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#bd-settingspane-container\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root;\n }\n\n injectRoot() {\n let [classNameLayer, classSidebar] = [BDModules.get(e => e.layer && e.animating)[0].layer.split(\" \")[0], BDModules.get(e => e.standardSidebarView)[0]];\n const sidebar = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + classNameLayer + \" .\" + classSidebar.standardSidebarView.split(\" \")[0] + \", .\" + classNameLayer + \" .ui-standard-sidebar-view\");\n if (!sidebar) return false;\n const root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].createElement(`
`);\n sidebar.append(root);\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].onRemoved(root, () => {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(root);\n });\n return true;\n }\n\n get coreSettings() {\n const settings = this.getSettings(\"core\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get lightcordSettings() {\n const settings = this.getSettings(\"lightcord\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get PresenceSettings() {\n return this.getSettings(\"status\");\n }\n\n get MsgLogSettings() {\n return this.getSettings(\"msglog\");\n }\n\n getSettings(category) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === category && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n sideBarOnClick(id) {\n const contentRegion = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".contentRegion-3nDuYy, .content-region\");\n contentRegion.style.display = \"none\";\n this.root.style.display = \"\";\n\n switch (id) {\n case \"core\":\n this.renderCoreSettings();\n break;\n\n case \"customcss\":\n this.renderCustomCssEditor();\n break;\n\n case \"plugins\":\n case \"themes\":\n this.renderAddonPane(id);\n break;\n\n case \"lightcord\":\n this.renderLightCordSettings();\n break;\n\n case \"status\":\n this.renderPresenceSettings();\n break;\n\n case \"accountinfo\":\n this.renderAccountInfos();\n break;\n }\n }\n\n onClick() {}\n\n onChange(id, checked) {\n this.updateSettings(id, checked);\n }\n\n updateSettings(id, enabled) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id] = enabled;\n\n if (id == \"bda-gs-2\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal\");\n }\n\n if (id == \"bda-gs-3\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal-chan\");\n }\n\n if (id == \"bda-gs-1\") {\n if (enabled) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();else _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].removeButton();\n }\n\n if (id == \"bda-gs-4\") {\n if (enabled) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();else _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].stop();\n }\n\n if (id == \"bda-gs-5\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n }\n\n if (enabled && id == \"bda-gs-6\") _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n\n if (id == \"bda-gs-7\") {\n if (enabled) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();else _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].removeColoredText();\n }\n\n if (id == \"fork-ps-4\") {\n if (enabled) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();else _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].stop();\n }\n\n if (id == \"fork-ps-5\") {\n if (enabled) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n } else {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"theme\");\n }\n }\n\n if (id == \"fork-wp-1\") {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"transparent\", enabled);\n if (enabled) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", null);else _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", \"#2f3136\");\n }\n\n if (id == \"bda-gs-8\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopDebugListener();\n }\n\n if (id == \"fork-dm-1\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopCopySelector();\n }\n\n if (id === \"reactDevTools\") {\n if (enabled) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();else _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].stop();\n }\n\n if (id === \"lightcord-1\") {\n if (enabled) window.Lightcord.Settings.devMode = true;else window.Lightcord.Settings.devMode = false;\n }\n\n if (id === \"lightcord-2\") {\n if (enabled) window.Lightcord.Settings.callRingingBeat = true;else window.Lightcord.Settings.callRingingBeat = false;\n }\n\n if (id === \"lightcord-presence-1\") {\n if (enabled) {\n _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n const settingsStore = BDModules.get(e => e.default && typeof e.default === \"object\" && \"showCurrentGame\" in e.default)[0];\n\n if (settingsStore && !settingsStore.default.showCurrentGame) {\n BDModules.get(e => e.default && e.default.updateRemoteSettings)[0].default.updateRemoteSettings({\n showCurrentGame: true\n });\n }\n } else _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].disable();\n }\n\n if (id === \"lightcord-3\") {\n if (enabled) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);else electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(false);\n }\n\n if (id === \"lightcord-4\") {\n if (enabled) {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n } else {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].disable();\n }\n }\n\n this.saveSettings();\n }\n\n async initializeSettings() {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"].reactDevTools) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-2\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-3\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"]) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-4\"]) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-5\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-7\"]) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-4\"]) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-1\"]) window.Lightcord.Settings.devMode = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-2\"]) window.Lightcord.Settings.callRingingBeat = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-presence-1\"]) _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-3\"]) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-4\"]) _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"]) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-8\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();\n this.saveSettings();\n }\n\n saveSettings() {\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"settings\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"]);\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"rpc\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"]);\n }\n\n loadSettings() {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"settings\"));\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"rpc\"));\n }\n\n showOriginal() {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(this.root);\n this.root.style.display = \"none\";\n _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + BDModules.get(e => e.contentRegion)[0].contentRegion.split(\" \")[0] + \", .content-region\").style.display = \"\";\n }\n\n renderSidebar() {\n const tabs = document.querySelectorAll(\"[class*='side-'] > [class*='item-']\");\n\n for (const element of tabs) {\n element.removeEventListener(\"click\", this.showOriginal);\n element.addEventListener(\"click\", this.showOriginal);\n }\n\n this.sidebar.render();\n }\n\n get coreComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"cspanel\",\n onChange: this.onChange,\n sections: this.coreSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get lightcordComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"lspannel\",\n onChange: this.onChange,\n sections: this.lightcordSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get PresenceComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n key: \"lppannel\",\n onChange: this.onChange,\n settings: this.PresenceSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get AccountInfosComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n key: \"lapannel\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get customCssComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n key: \"csseditor\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n renderCoreSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.coreComponent, root);\n }\n\n renderLightCordSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.lightcordComponent, root);\n }\n\n renderPresenceSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.PresenceComponent, root);\n }\n\n renderAccountInfos() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.AccountInfosComponent, root);\n }\n\n renderCustomCssEditor() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.customCssComponent, root);\n } // renderAddonPane(type) {\n // const root = this.root;\n // if (!root) return Utils.err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n // BDV2.reactDom.render(this.contentComponent(type), root);\n // }\n\n\n renderAddonPane(type) {\n if (!this.root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\"); // I know this shouldn't be here, but when it isn't,\n // React refuses to change the button when going\n // between plugins and themes page... something\n // to debug later.\n\n class ContentList extends _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.Component {\n constructor(props) {\n super(props);\n this.prefix = this.props.type.replace(\"s\", \"\");\n this.onChange = this.onChange.bind(this);\n }\n\n componentDidMount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-unloaded`, this.onChange);\n }\n\n componentWillUnmount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-unloaded`, this.onChange);\n }\n\n onChange() {\n this.props.onChange(this.props.type);\n }\n\n render() {\n return this.props.children;\n }\n\n }\n\n const originalRender = ContentList.prototype.render;\n Object.defineProperty(ContentList.prototype, \"render\", {\n enumerable: false,\n configurable: false,\n set: function () {\n console.warn(\"Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins\");\n },\n get: () => originalRender\n });\n const list = type === \"plugins\" ? Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]) : Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(ContentList, {\n type,\n onChange: this.sideBarOnClick\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_addonlist__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n type,\n list\n })), this.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3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/settingsPanel.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsPanelSidebar */ \"./src/modules/settingsPanelSidebar.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _bdEvents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _coloredText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coloredText */ \"./src/modules/coloredText.js\");\n/* harmony import */ var _24hour__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./24hour */ \"./src/modules/24hour.js\");\n/* harmony import */ var _reactDevTools__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reactDevTools */ \"./src/modules/reactDevTools.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _publicServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./publicServers */ \"./src/modules/publicServers.js\");\n/* harmony import */ var _voiceMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./voiceMode */ \"./src/modules/voiceMode.js\");\n/* harmony import */ var _classNormalizer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _devMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./devMode */ \"./src/modules/devMode.js\");\n/* harmony import */ var _ui_tools__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _ui_scroller__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/sectionedSettingsPanel */ \"./src/ui/sectionedSettingsPanel.js\");\n/* harmony import */ var _ui_settingsPanel__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ui/settingsPanel */ \"./src/ui/settingsPanel.js\");\n/* harmony import */ var _ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/cssEditor */ \"./src/ui/cssEditor.js\");\n/* harmony import */ var _ui_addonlist__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../ui/addonlist */ \"./src/ui/addonlist.jsx\");\n/* harmony import */ var _ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../ui/presenceSettings */ \"./src/ui/presenceSettings.jsx\");\n/* harmony import */ var _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CustomRichPresence */ \"./src/modules/CustomRichPresence.js\");\n/* harmony import */ var _ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../ui/AccountInfos */ \"./src/ui/AccountInfos.jsx\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./AntiAdDM */ \"./src/modules/AntiAdDM.js\");\n/* harmony import */ var _blurPrivate__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./blurPrivate */ \"./src/modules/blurPrivate.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2_SettingsPanel {\n constructor() {\n this.sideBarOnClick = this.sideBarOnClick.bind(this);\n this.onChange = this.onChange.bind(this);\n this.updateSettings = this.updateSettings.bind(this);\n this.sidebar = new _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.sideBarOnClick); // this.buildPluginProps = this.buildPluginProps.bind(this);\n // this.buildThemeProps = this.buildThemeProps.bind(this);\n\n this.showOriginal = this.showOriginal.bind(this);\n }\n\n get root() {\n const _root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#bd-settingspane-container\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root;\n }\n\n injectRoot() {\n let [classNameLayer, classSidebar] = [BDModules.get(e => e.layer && e.animating)[0].layer.split(\" \")[0], BDModules.get(e => e.standardSidebarView)[0]];\n const sidebar = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + classNameLayer + \" .\" + classSidebar.standardSidebarView.split(\" \")[0] + \", .\" + classNameLayer + \" .ui-standard-sidebar-view\");\n if (!sidebar) return false;\n const root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].createElement(`
`);\n sidebar.append(root);\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].onRemoved(root, () => {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(root);\n });\n return true;\n }\n\n get coreSettings() {\n const settings = this.getSettings(\"core\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get lightcordSettings() {\n const settings = this.getSettings(\"lightcord\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get PresenceSettings() {\n return this.getSettings(\"status\");\n }\n\n get MsgLogSettings() {\n return this.getSettings(\"msglog\");\n }\n\n getSettings(category) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === category && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n sideBarOnClick(id) {\n const contentRegion = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".contentRegion-3nDuYy, .content-region\");\n contentRegion.style.display = \"none\";\n this.root.style.display = \"\";\n\n switch (id) {\n case \"core\":\n this.renderCoreSettings();\n break;\n\n case \"customcss\":\n this.renderCustomCssEditor();\n break;\n\n case \"plugins\":\n case \"themes\":\n this.renderAddonPane(id);\n break;\n\n case \"lightcord\":\n this.renderLightCordSettings();\n break;\n\n case \"status\":\n this.renderPresenceSettings();\n break;\n\n case \"accountinfo\":\n this.renderAccountInfos();\n break;\n }\n }\n\n onClick() {}\n\n onChange(id, checked) {\n this.updateSettings(id, checked);\n }\n\n updateSettings(id, enabled) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id] = enabled;\n\n if (id == \"bda-gs-2\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal\");\n }\n\n if (id == \"bda-gs-3\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal-chan\");\n }\n\n if (id == \"bda-gs-1\") {\n if (enabled) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();else _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].removeButton();\n }\n\n if (id == \"bda-gs-4\") {\n if (enabled) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();else _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].stop();\n }\n\n if (id == \"bda-gs-5\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n }\n\n if (enabled && id == \"bda-gs-6\") _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n\n if (id == \"bda-gs-7\") {\n if (enabled) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();else _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].removeColoredText();\n }\n\n if (id == \"fork-ps-4\") {\n if (enabled) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();else _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].stop();\n }\n\n if (id == \"fork-ps-5\") {\n if (enabled) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n } else {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"theme\");\n }\n }\n\n if (id == \"fork-wp-1\") {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"transparent\", enabled);\n if (enabled) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", null);else _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", \"#2f3136\");\n }\n\n if (id == \"bda-gs-8\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopDebugListener();\n }\n\n if (id == \"fork-dm-1\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopCopySelector();\n }\n\n if (id === \"reactDevTools\") {\n if (enabled) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();else _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].stop();\n }\n\n if (id === \"lightcord-1\") {\n if (enabled) window.Lightcord.Settings.devMode = true;else window.Lightcord.Settings.devMode = false;\n }\n\n if (id === \"lightcord-2\") {\n if (enabled) window.Lightcord.Settings.callRingingBeat = true;else window.Lightcord.Settings.callRingingBeat = false;\n }\n\n if (id === \"lightcord-presence-1\") {\n if (enabled) {\n _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n const settingsStore = BDModules.get(e => e.default && typeof e.default === \"object\" && \"showCurrentGame\" in e.default)[0];\n\n if (settingsStore && !settingsStore.default.showCurrentGame) {\n BDModules.get(e => e.default && e.default.updateRemoteSettings)[0].default.updateRemoteSettings({\n showCurrentGame: true\n });\n }\n } else _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].disable();\n }\n\n if (id === \"lightcord-3\") {\n if (enabled) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);else electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(false);\n }\n\n if (id === \"lightcord-4\") {\n if (enabled) {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n } else {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].disable();\n }\n }\n\n if (id === \"lightcord-6\") {\n if (enabled) {\n _blurPrivate__WEBPACK_IMPORTED_MODULE_26__[\"default\"].enable();\n } else {\n _blurPrivate__WEBPACK_IMPORTED_MODULE_26__[\"default\"].disable();\n }\n }\n\n this.saveSettings();\n }\n\n async initializeSettings() {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"].reactDevTools) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-2\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-3\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"]) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-4\"]) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-5\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-7\"]) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-4\"]) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-1\"]) window.Lightcord.Settings.devMode = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-2\"]) window.Lightcord.Settings.callRingingBeat = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-presence-1\"]) _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-3\"]) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-4\"]) _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-6\"]) _blurPrivate__WEBPACK_IMPORTED_MODULE_26__[\"default\"].enable();\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"]) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-8\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();\n this.saveSettings();\n }\n\n saveSettings() {\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"settings\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"]);\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"rpc\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"]);\n }\n\n loadSettings() {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"settings\"));\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"rpc\"));\n }\n\n showOriginal() {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(this.root);\n this.root.style.display = \"none\";\n _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + BDModules.get(e => e.contentRegion)[0].contentRegion.split(\" \")[0] + \", .content-region\").style.display = \"\";\n }\n\n renderSidebar() {\n const tabs = document.querySelectorAll(\"[class*='side-'] > [class*='item-']\");\n\n for (const element of tabs) {\n element.removeEventListener(\"click\", this.showOriginal);\n element.addEventListener(\"click\", this.showOriginal);\n }\n\n this.sidebar.render();\n }\n\n get coreComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"cspanel\",\n onChange: this.onChange,\n sections: this.coreSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get lightcordComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"lspannel\",\n onChange: this.onChange,\n sections: this.lightcordSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get PresenceComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n key: \"lppannel\",\n onChange: this.onChange,\n settings: this.PresenceSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get AccountInfosComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n key: \"lapannel\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get customCssComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n key: \"csseditor\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n renderCoreSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.coreComponent, root);\n }\n\n renderLightCordSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.lightcordComponent, root);\n }\n\n renderPresenceSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.PresenceComponent, root);\n }\n\n renderAccountInfos() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.AccountInfosComponent, root);\n }\n\n renderCustomCssEditor() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.customCssComponent, root);\n } // renderAddonPane(type) {\n // const root = this.root;\n // if (!root) return Utils.err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n // BDV2.reactDom.render(this.contentComponent(type), root);\n // }\n\n\n renderAddonPane(type) {\n if (!this.root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\"); // I know this shouldn't be here, but when it isn't,\n // React refuses to change the button when going\n // between plugins and themes page... something\n // to debug later.\n\n class ContentList extends _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.Component {\n constructor(props) {\n super(props);\n this.prefix = this.props.type.replace(\"s\", \"\");\n this.onChange = this.onChange.bind(this);\n }\n\n componentDidMount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-unloaded`, this.onChange);\n }\n\n componentWillUnmount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-unloaded`, this.onChange);\n }\n\n onChange() {\n this.props.onChange(this.props.type);\n }\n\n render() {\n return this.props.children;\n }\n\n }\n\n const originalRender = ContentList.prototype.render;\n Object.defineProperty(ContentList.prototype, \"render\", {\n enumerable: false,\n configurable: false,\n set: function () {\n console.warn(\"Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins\");\n },\n get: () => originalRender\n });\n const list = type === \"plugins\" ? Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]) : Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(ContentList, {\n type,\n onChange: this.sideBarOnClick\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_addonlist__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n type,\n list\n })), this.root);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQmV0dGVyRGlzY29yZC8uL3NyYy9tb2R1bGVzL3NldHRpbmdzUGFuZWwuanM/NTdiMCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5ncywgc2V0dGluZ3NDb29raWUsIGJkcGx1Z2lucywgYmR0aGVtZXMsIHNldHRpbmdzUlBDIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IFYyX1N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QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/settingsPanel.js\n"); /***/ }), diff --git a/BetterDiscordApp/js/main.min.js b/BetterDiscordApp/js/main.min.js index 71c3b06..688f0c0 100644 --- a/BetterDiscordApp/js/main.min.js +++ b/BetterDiscordApp/js/main.min.js @@ -1,6 +1,6 @@ module.exports=function(e){function t(I){if(l[I])return l[I].exports;var c=l[I]={i:I,l:!1,exports:{}};return e[I].call(c.exports,c,c.exports,t),c.l=!0,c.exports}var l={};return t.m=e,t.c=l,t.d=function(e,l,I){t.o(e,l)||Object.defineProperty(e,l,{enumerable:!0,get:I})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,l){if(1&l&&(e=t(e)),8&l)return e;if(4&l&&"object"==typeof e&&e&&e.__esModule)return e;var I=Object.create(null);if(t.r(I),Object.defineProperty(I,"default",{enumerable:!0,value:e}),2&l&&"string"!=typeof e)for(var c in e)t.d(I,c,function(t){return e[t]}.bind(null,c));return I},t.n=function(e){var l=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(l,"a",l),l},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./src/index.js")}({"./src/0globals.js":/*!*************************!*\ !*** ./src/0globals.js ***! - \*************************/ /*! exports provided: minimumDiscordVersion, currentDiscordVersion, minSupportedVersion, bbdVersion, bbdChangelog, settings, defaultCookie, settingsCookie, settingsRPC, defaultRPC, bdpluginErrors, bdthemeErrors, bdConfig, bdthemes, bdplugins, pluginCookie, themeCookie */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minimumDiscordVersion\", function() { return minimumDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentDiscordVersion\", function() { return currentDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minSupportedVersion\", function() { return minSupportedVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdVersion\", function() { return bbdVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdChangelog\", function() { return bbdChangelog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settings\", function() { return settings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultCookie\", function() { return defaultCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsCookie\", function() { return settingsCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsRPC\", function() { return settingsRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultRPC\", function() { return defaultRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdpluginErrors\", function() { return bdpluginErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemeErrors\", function() { return bdthemeErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdConfig\", function() { return bdConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemes\", function() { return bdthemes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdplugins\", function() { return bdplugins; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pluginCookie\", function() { return pluginCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"themeCookie\", function() { return themeCookie; });\n// var settingsPanel, voiceMode, pluginModule, themeModule, dMode, publicServersModule, mainCore, BDV2;\nconst minimumDiscordVersion = \"0.0.306\";\nconst currentDiscordVersion = window.DiscordNative && window.DiscordNative.remoteApp && window.DiscordNative.remoteApp.getVersion && window.DiscordNative.remoteApp.getVersion() || \"0.0.306\";\nconst minSupportedVersion = \"0.3.0\";\nconst bbdVersion = \"0.3.4\";\nconst bbdChangelog = {\n description: \"LightCord Edition.\",\n changes: [{\n title: \"What's New?\",\n items: [\"**LightCord** is now using BandagedBD. That means all plugins you were using can be used too !\", \"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.\", \"Initialization sequence has once again been changed slightly to hopefully improve loading times.\", \"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote.\"]\n }, {\n title: \"Bug Fixes\",\n type: \"fixed\",\n items: [\"Some fixes related to showing modals in the `BdApi`.\"]\n }]\n};\nconst settings = {\n \"Custom css live update\": {\n id: \"bda-css-0\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"Custom css auto udpate\": {\n id: \"bda-css-1\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"BetterDiscord Blue\": {\n id: \"bda-gs-b\",\n info: \"Replace Discord blue with BD Blue\",\n implemented: false,\n hidden: false,\n cat: \"core\"\n },\n\n /* Core */\n\n /* ====== */\n \"Public Servers\": {\n id: \"bda-gs-1\",\n info: \"Display public servers button\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Minimal Mode\": {\n id: \"bda-gs-2\",\n info: \"Hide elements and reduce the size of elements.\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Mode\": {\n id: \"bda-gs-4\",\n info: \"Only show voice chat\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Hide Channels\": {\n id: \"bda-gs-3\",\n info: \"Hide channels in minimal mode\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Dark Mode\": {\n id: \"bda-gs-5\",\n info: \"Make certain elements dark by default(wip)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Disconnect\": {\n id: \"bda-dc-0\",\n info: \"Disconnect from voice server when closing Discord\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"24 Hour Timestamps\": {\n id: \"bda-gs-6\",\n info: \"Replace 12hr timestamps with proper ones\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Colored Text\": {\n id: \"bda-gs-7\",\n info: \"Make text color the same as role color\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Normalize Classes\": {\n id: \"fork-ps-4\",\n info: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n\n /* Content */\n \"Content Error Modal\": {\n id: \"fork-ps-1\",\n info: \"Shows a modal with plugin/theme errors\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Show Toasts\": {\n id: \"fork-ps-2\",\n info: \"Shows a small notification for important information\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Scroll To Settings\": {\n id: \"fork-ps-3\",\n info: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Automatic Loading\": {\n id: \"fork-ps-5\",\n info: \"Automatically loads, reloads, and unloads plugins and themes\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n\n /* Developer */\n \"Developer Mode\": {\n id: \"bda-gs-8\",\n info: \"Developer Mode Toggle\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"Copy Selector\": {\n id: \"fork-dm-1\",\n info: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"React DevTools\": {\n id: \"reactDevTools\",\n info: \"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.\",\n implemented: true,\n hidden: true,\n cat: \"core\",\n category: \"developer settings\"\n },\n\n /** LightCord */\n \"Disable BetterDiscord\": {\n id: \"bd-disable\",\n info: \"Disable Betterdiscord (plugins, themes, etc).\",\n implemented: false,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Calling Ring Beat\": {\n id: \"lightcord-2\",\n info: \"Enable Discord's special calling beat.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Developer Options\": {\n id: \"lightcord-1\",\n info: \"Enable Discord's Internal Developer Options. This allow the \\\"Experiments\\\" tab and the \\\"Developer Options\\\" tab. (must close and reopen settings)\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Ad Block\": {\n id: \"lightcord-4\",\n info: \"Block any BOT that dm you with an invite link. Even in an embed.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Enable Lightcord Servers\": {\n id: \"lightcord-5\",\n info: \"Disabling it erase any informations about you in our servers. But you won't see anything like custom badges.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n\n /** Lightcord Window */\n \"Always-on-Top\": {\n id: \"lightcord-3\",\n info: \"Enable window's Always-on-Top mode, where Lightcord stays on top of other applications.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Window\"\n },\n\n /** RichPresence */\n \"Enable\": {\n id: \"lightcord-presence-1\",\n info: \"Enable RichPresence below.\",\n implemented: true,\n hidden: false,\n cat: \"status\"\n }\n};\nconst defaultCookie = {\n \"bda-gs-1\": true,\n \"bda-gs-2\": false,\n \"bda-gs-3\": false,\n \"bda-gs-4\": false,\n \"bda-gs-5\": true,\n \"bda-gs-6\": false,\n \"bda-gs-7\": false,\n \"bda-gs-8\": true,\n \"bda-es-0\": true,\n \"bda-es-1\": true,\n \"bda-es-2\": true,\n \"bda-es-4\": false,\n \"bda-es-6\": true,\n \"bda-es-7\": true,\n \"bda-gs-b\": false,\n \"bda-es-8\": true,\n \"bda-dc-0\": false,\n \"bda-css-0\": false,\n \"bda-css-1\": false,\n \"bda-es-9\": true,\n \"fork-dm-1\": false,\n \"fork-ps-1\": true,\n \"fork-ps-2\": true,\n \"fork-ps-3\": true,\n \"fork-ps-4\": true,\n \"fork-ps-5\": true,\n \"fork-es-2\": false,\n \"fork-es-3\": true,\n \"fork-wp-1\": false,\n \"fork-wp-2\": false,\n \"fork-beta\": true,\n \"reactDevTools\": false,\n \"lightcord-1\": false,\n \"lightcord-2\": true,\n \"lightcord-presence-1\": false,\n \"lightcord-3\": false,\n \"lightcord-4\": false,\n \"lightcord-5\": true\n};\nconst settingsCookie = {};\nconst settingsRPC = {};\nconst defaultRPC = {\n \"name\": \"Lightcord\",\n \"application_id\": \"711416957718757418\",\n \"state\": \"Lightcord Client\",\n \"details\": \"Browsing Discord\",\n \"timestamps.start\": Date.now(),\n \"assets.small\": null,\n \"assets.large\": \"712323821037682791\"\n};\nconst bdpluginErrors = [];\nconst bdthemeErrors = []; // define for backwards compatibility\n\nconst bdConfig = Object.create(BetterDiscordConfig);\nconst bdthemes = {};\nconst bdplugins = {};\nconst pluginCookie = {};\nconst themeCookie = {};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvMGdsb2JhbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjLzBnbG9iYWxzLmpzPzAwZDIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdmFyIHNldHRpbmdzUGFuZWwsIHZvaWNlTW9kZSwgcGx1Z2luTW9kdWxlLCB0aGVtZU1vZHVsZSwgZE1vZGUsIHB1YmxpY1NlcnZlcnNNb2R1bGUsIG1haW5Db3JlLCBCRFYyO1xuZXhwb3J0IGNvbnN0IG1pbmltdW1EaXNjb3JkVmVyc2lvbiA9IFwiMC4wLjMwNlwiO1xuZXhwb3J0IGNvbnN0IGN1cnJlbnREaXNjb3JkVmVyc2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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/0globals.js\n")},"./src/index.js":/*!**********************!*\ + \*************************/ /*! exports provided: minimumDiscordVersion, currentDiscordVersion, minSupportedVersion, bbdVersion, bbdChangelog, settings, defaultCookie, settingsCookie, settingsRPC, defaultRPC, bdpluginErrors, bdthemeErrors, bdConfig, bdthemes, bdplugins, pluginCookie, themeCookie */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minimumDiscordVersion\", function() { return minimumDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"currentDiscordVersion\", function() { return currentDiscordVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minSupportedVersion\", function() { return minSupportedVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdVersion\", function() { return bbdVersion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bbdChangelog\", function() { return bbdChangelog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settings\", function() { return settings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultCookie\", function() { return defaultCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsCookie\", function() { return settingsCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"settingsRPC\", function() { return settingsRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultRPC\", function() { return defaultRPC; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdpluginErrors\", function() { return bdpluginErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemeErrors\", function() { return bdthemeErrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdConfig\", function() { return bdConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdthemes\", function() { return bdthemes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bdplugins\", function() { return bdplugins; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pluginCookie\", function() { return pluginCookie; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"themeCookie\", function() { return themeCookie; });\n// var settingsPanel, voiceMode, pluginModule, themeModule, dMode, publicServersModule, mainCore, BDV2;\nconst minimumDiscordVersion = \"0.0.306\";\nconst currentDiscordVersion = window.DiscordNative && window.DiscordNative.remoteApp && window.DiscordNative.remoteApp.getVersion && window.DiscordNative.remoteApp.getVersion() || \"0.0.306\";\nconst minSupportedVersion = \"0.3.0\";\nconst bbdVersion = \"0.3.4\";\nconst bbdChangelog = {\n description: \"LightCord Edition.\",\n changes: [{\n title: \"What's New?\",\n items: [\"**LightCord** is now using BandagedBD. That means all plugins you were using can be used too !\", \"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.\", \"Initialization sequence has once again been changed slightly to hopefully improve loading times.\", \"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote.\"]\n }, {\n title: \"Bug Fixes\",\n type: \"fixed\",\n items: [\"Some fixes related to showing modals in the `BdApi`.\"]\n }]\n};\nconst settings = {\n \"Custom css live update\": {\n id: \"bda-css-0\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"Custom css auto udpate\": {\n id: \"bda-css-1\",\n info: \"\",\n implemented: true,\n hidden: true,\n cat: \"core\"\n },\n \"BetterDiscord Blue\": {\n id: \"bda-gs-b\",\n info: \"Replace Discord blue with BD Blue\",\n implemented: false,\n hidden: false,\n cat: \"core\"\n },\n\n /* Core */\n\n /* ====== */\n \"Public Servers\": {\n id: \"bda-gs-1\",\n info: \"Display public servers button\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Minimal Mode\": {\n id: \"bda-gs-2\",\n info: \"Hide elements and reduce the size of elements.\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Mode\": {\n id: \"bda-gs-4\",\n info: \"Only show voice chat\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Hide Channels\": {\n id: \"bda-gs-3\",\n info: \"Hide channels in minimal mode\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Dark Mode\": {\n id: \"bda-gs-5\",\n info: \"Make certain elements dark by default(wip)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Voice Disconnect\": {\n id: \"bda-dc-0\",\n info: \"Disconnect from voice server when closing Discord\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"24 Hour Timestamps\": {\n id: \"bda-gs-6\",\n info: \"Replace 12hr timestamps with proper ones\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Colored Text\": {\n id: \"bda-gs-7\",\n info: \"Make text color the same as role color\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n \"Normalize Classes\": {\n id: \"fork-ps-4\",\n info: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"modules\"\n },\n\n /* Content */\n \"Content Error Modal\": {\n id: \"fork-ps-1\",\n info: \"Shows a modal with plugin/theme errors\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Show Toasts\": {\n id: \"fork-ps-2\",\n info: \"Shows a small notification for important information\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Scroll To Settings\": {\n id: \"fork-ps-3\",\n info: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n \"Automatic Loading\": {\n id: \"fork-ps-5\",\n info: \"Automatically loads, reloads, and unloads plugins and themes\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"content manager\"\n },\n\n /* Developer */\n \"Developer Mode\": {\n id: \"bda-gs-8\",\n info: \"Developer Mode Toggle\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"Copy Selector\": {\n id: \"fork-dm-1\",\n info: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\",\n implemented: true,\n hidden: false,\n cat: \"core\",\n category: \"developer settings\"\n },\n \"React DevTools\": {\n id: \"reactDevTools\",\n info: \"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.\",\n implemented: true,\n hidden: true,\n cat: \"core\",\n category: \"developer settings\"\n },\n\n /** LightCord */\n \"Disable BetterDiscord\": {\n id: \"bd-disable\",\n info: \"Disable Betterdiscord (plugins, themes, etc).\",\n implemented: false,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Blur Personnal Informations\": {\n id: \"lightcord-6\",\n info: \"Blur sensitive informations like email, payment infos and more.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Calling Ring Beat\": {\n id: \"lightcord-2\",\n info: \"Enable Discord's special calling beat.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Developer Options\": {\n id: \"lightcord-1\",\n info: \"Enable Discord's Internal Developer Options. This allow the \\\"Experiments\\\" tab and the \\\"Developer Options\\\" tab. (must close and reopen settings)\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Ad Block\": {\n id: \"lightcord-4\",\n info: \"Block any BOT that dm you with an invite link. Even in an embed.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n \"Enable Lightcord Servers\": {\n id: \"lightcord-5\",\n info: \"Disabling it erase any informations about you in our servers. But you won't see anything like custom badges.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Lightcord\"\n },\n\n /** Lightcord Window */\n \"Always-on-Top\": {\n id: \"lightcord-3\",\n info: \"Enable window's Always-on-Top mode, where Lightcord stays on top of other applications.\",\n implemented: true,\n hidden: false,\n cat: \"lightcord\",\n category: \"Window\"\n },\n\n /** RichPresence */\n \"Enable\": {\n id: \"lightcord-presence-1\",\n info: \"Enable RichPresence below.\",\n implemented: true,\n hidden: false,\n cat: \"status\"\n }\n};\nconst defaultCookie = {\n \"bda-gs-1\": true,\n \"bda-gs-2\": false,\n \"bda-gs-3\": false,\n \"bda-gs-4\": false,\n \"bda-gs-5\": true,\n \"bda-gs-6\": false,\n \"bda-gs-7\": false,\n \"bda-gs-8\": true,\n \"bda-es-0\": true,\n \"bda-es-1\": true,\n \"bda-es-2\": true,\n \"bda-es-4\": false,\n \"bda-es-6\": true,\n \"bda-es-7\": true,\n \"bda-gs-b\": false,\n \"bda-es-8\": true,\n \"bda-dc-0\": false,\n \"bda-css-0\": false,\n \"bda-css-1\": false,\n \"bda-es-9\": true,\n \"fork-dm-1\": false,\n \"fork-ps-1\": true,\n \"fork-ps-2\": true,\n \"fork-ps-3\": true,\n \"fork-ps-4\": true,\n \"fork-ps-5\": true,\n \"fork-es-2\": false,\n \"fork-es-3\": true,\n \"fork-wp-1\": false,\n \"fork-wp-2\": false,\n \"fork-beta\": true,\n \"reactDevTools\": false,\n \"lightcord-1\": false,\n \"lightcord-2\": true,\n \"lightcord-presence-1\": false,\n \"lightcord-3\": false,\n \"lightcord-4\": false,\n \"lightcord-5\": true,\n \"lightcord-6\": true\n};\nconst settingsCookie = {};\nconst settingsRPC = {};\nconst defaultRPC = {\n \"name\": \"Lightcord\",\n \"application_id\": \"711416957718757418\",\n \"state\": \"Lightcord Client\",\n \"details\": \"Browsing Discord\",\n \"timestamps.start\": Date.now(),\n \"assets.small\": null,\n \"assets.large\": \"712323821037682791\"\n};\nconst bdpluginErrors = [];\nconst bdthemeErrors = []; // define for backwards compatibility\n\nconst bdConfig = Object.create(BetterDiscordConfig);\nconst bdthemes = {};\nconst bdplugins = {};\nconst pluginCookie = {};\nconst themeCookie = {};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvMGdsb2JhbHMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjLzBnbG9iYWxzLmpzPzAwZDIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gdmFyIHNldHRpbmdzUGFuZWwsIHZvaWNlTW9kZSwgcGx1Z2luTW9kdWxlLCB0aGVtZU1vZHVsZSwgZE1vZGUsIHB1Y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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/0globals.js\n")},"./src/index.js":/*!**********************!*\ !*** ./src/index.js ***! \**********************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return CoreWrapper; });\n/* harmony import */ var _localStorageFix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localStorageFix */ \"./src/localStorageFix.js\");\n/* harmony import */ var _loadingIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loadingIcon */ \"./src/loadingIcon.js\");\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./0globals */ \"./src/0globals.js\");\n/* harmony import */ var _modules_bdApi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/bdApi */ \"./src/modules/bdApi.js\");\n/* harmony import */ var _modules_v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _modules_pluginModule__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _modules_themeModule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _modules_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _modules_bdEvents__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _modules_dataStore__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _modules_contentManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _modules_classNormalizer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _modules_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/core */ \"./src/modules/core.js\");\n\n\nObject(_localStorageFix__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\nObject(_loadingIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n\nconst deprecateGlobal = (key, value) => {\n // value = typeof(value) !== \"object\" ? value : new Proxy(value, {\n // get: function(obj, mod) {\n // if (!obj.hasOwnProperty(mod)) return undefined;\n // return obj[mod];\n // },\n // set: function(obj, mod) {\n // if (obj.hasOwnProperty(mod)) return Utils.err(\"Deprecated Global\", \"Trying to overwrite deprecated BD globals\");\n // }\n // });\n Object.defineProperty(window, key, {\n get() {\n _modules_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].warn(\"Deprecated Global\", `\"${key}\" will be removed in future versions. Please only use BdApi.`);\n return value;\n }\n\n });\n};\n\n\nconst globalKeys = Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_2__);\n\nfor (const key of globalKeys) deprecateGlobal(key, _0globals__WEBPACK_IMPORTED_MODULE_2__[key]);\n\n\n\n\n\n\n\n\n\n\n\ndeprecateGlobal(\"BDV2\", _modules_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"]);\ndeprecateGlobal(\"pluginModule\", _modules_pluginModule__WEBPACK_IMPORTED_MODULE_5__[\"default\"]);\ndeprecateGlobal(\"themeModule\", _modules_themeModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\ndeprecateGlobal(\"Utils\", _modules_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"]);\ndeprecateGlobal(\"BDEvents\", _modules_bdEvents__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\ndeprecateGlobal(\"settingsPanel\", _modules_settingsPanel__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\ndeprecateGlobal(\"DataStore\", _modules_dataStore__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\ndeprecateGlobal(\"ContentManager\", _modules_contentManager__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\ndeprecateGlobal(\"ClassNormalizer\", _modules_classNormalizer__WEBPACK_IMPORTED_MODULE_12__[\"default\"]);\nwindow.BdApi = _modules_bdApi__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n\ndeprecateGlobal(\"mainCore\", _modules_core__WEBPACK_IMPORTED_MODULE_13__[\"default\"]);\nclass CoreWrapper {\n constructor(bdConfig) {\n _modules_core__WEBPACK_IMPORTED_MODULE_13__[\"default\"].setConfig(bdConfig);\n }\n\n init() {\n // deprecateGlobal(\"mainCore\", this.mainCore);\n _modules_core__WEBPACK_IMPORTED_MODULE_13__[\"default\"].init();\n }\n\n} // function patchModuleLoad() {\n// const namespace = \"betterdiscord\";\n// const prefix = `${namespace}/`;\n// const Module = require(\"module\");\n// const load = Module._load;\n// // const resolveFilename = Module._resolveFilename;\n// Module._load = function(request) {\n// if (request === namespace || request.startsWith(prefix)) {\n// const requested = request.substr(prefix.length);\n// if (requested == \"api\") return BdApi;\n// }\n// return load.apply(this, arguments);\n// };\n// // Module._resolveFilename = function (request, parent, isMain) {\n// // if (request === \"betterdiscord\" || request.startsWith(\"betterdiscord/\")) {\n// // const contentPath = PluginManager.getPluginPathByModule(parent);\n// // if (contentPath) return request;\n// // }\n// // return resolveFilename.apply(this, arguments);\n// // };\n// return function() {\n// Module._load = load;\n// };\n// }\n// patchModuleLoad();\n// var settingsPanel, voiceMode,, dMode, publicServersModule;\n// var bdConfig = null;\n\n__webpack_require__(/*! request */ \"request\"); // just in cache so plugin can require it too//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaW5kZXguanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjL2luZGV4LmpzP2JmNDUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGxvY2FsU3RvcmFnZUZpeCBmcm9tIFwiLi9sb2NhbFN0b3JhZ2VGaXhcIjtcbmltcG9ydCBsb2FkaW5nSWNvbiBmcm9tIFwiLi9sb2FkaW5nSWNvblwiO1xubG9jYWxTdG9yYWdlRml4KCk7XG5sb2FkaW5nSWNvbigpO1xuXG5jb25zdCBkZXByZWNhdGVHbG9iYWwgPSAoa2V5LCB2YWx1ZSkgPT4ge1xuICAvLyB2YWx1ZSA9IHR5cGVvZih2YWx1ZSkgIT09IFwib2JqZWN0XCIgPyB2YWx1ZSA6IG5ldyBQcm94eSh2YWx1ZSwge1xuICAvLyAgICAgZ2V0OiBmdW5jdGlvbihvYmosIG1vZCkge1xuICAvLyAgICAgICAgIGlmICghb2JqLmhhc093blByb3BlcnR5KG1vZCkpIHJldHVybiB1bmRlZmluZWQ7XG4gIC8vICAgICAgICAgcmV0dXJuIG9ialttb2RdO1xuICAvLyAgICAgfSxcbiAgLy8gICAgIHNldDogZnVuY3Rpb24ob2JqLCBtb2QpIHtcbiAgLy8gICAgICAgICBpZiAob2JqLmhhc093blByb3BlcnR5KG1vZCkpIHJldHVybiBVdGlscy5lcnIoXCJEZXByZ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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/index.js\n")},"./src/loadingIcon.js":/*!****************************!*\ !*** ./src/loadingIcon.js ***! @@ -10,13 +10,15 @@ module.exports=function(e){function t(I){if(l[I])return l[I].exports;var c=l[I]= !*** ./src/modules/24hour.js ***! \*******************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class TFHour {\n inject24Hour() {\n if (this.cancel24Hour) return;\n const twelveHour = new RegExp(`([0-9]{1,2}):([0-9]{1,2})\\\\s(AM|PM)`);\n\n const convert = data => {\n if (!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) return;\n const matched = data.returnValue.match(twelveHour);\n if (!matched || matched.length !== 4) return;\n if (matched[3] === \"AM\") return data.returnValue = data.returnValue.replace(matched[0], `${matched[1] === \"12\" ? \"00\" : matched[1].padStart(2, \"0\")}:${matched[2]}`);\n return data.returnValue = data.returnValue.replace(matched[0], `${matched[1] === \"12\" ? \"12\" : parseInt(matched[1]) + 12}:${matched[2]}`);\n };\n\n const cancelCozy = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].TimeFormatter, \"calendarFormat\", {\n after: convert\n }); // Called in Cozy mode\n\n const cancelCompact = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(_v2__WEBPACK_IMPORTED_MODULE_1__[\"default\"].TimeFormatter, \"dateFormat\", {\n after: convert\n }); // Called in Compact mode\n\n this.cancel24Hour = () => {\n cancelCozy();\n cancelCompact();\n }; // Cancel both\n\n }\n\n remove24Hour() {\n if (this.cancel24Hour) this.cancel24Hour();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy8yNGhvdXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjL21vZHVsZXMvMjRob3VyLmpzPzc4OWYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0dGluZ3NDb29raWUgfSBmcm9tIFwiLi4vMGdsb2JhbHNcIjtcbmltcG9ydCBCRFYyIGZyb20gXCIuL3YyXCI7XG5pbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbHNcIjtcbmV4cG9ydCBkZWZhdWx0IG5ldyBjbGFzcyBURkhvdXIge1xuICBpbmplY3QyNEhvdXIoKSB7XG4gICAgaWYgKHRoaXMuY2FuY2VsMjRIb3VyKSByZXR1cm47XG4gICAgY29uc3QgdHdlbHZlSG91ciA9IG5ldyBSZWdFeHAoYChbMC05XXsxLDJ9KTooWzAtOV17MSwyfSlcXFxccyhBTXxQTSlgKTtcblxuIC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aXMuY2FuY2VsMjRIb3VyID0gKCkgPT4ge1xuICAgICAgY2FuY2VsQ296eSgpO1xuICAgICAgY2FuY2VsQ29tcGFjdCgpO1xuICAgIH07IC8vIENhbmNlbCBib3RoXG5cbiAgfVxuXG4gIHJlbW92ZTI0SG91cigpIHtcbiAgICBpZiAodGhpcy5jYW5jZWwyNEhvdXIpIHRoaXMuY2FuY2VsMjRIb3VyKCk7XG4gIH1cblxufSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/24hour.js\n")},"./src/modules/AntiAdDM.js":/*!*********************************!*\ !*** ./src/modules/AntiAdDM.js ***! - \*********************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\nconst dispatcher = window.Lightcord.DiscordModules.dispatcher;\nconst ChannelModule = BDModules.get(e => e.default && e.default.getChannel && e.default.hasChannel)[0].default;\nlet relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\nlet DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\nconst blocked = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class AntiBotDM {\n constructor() {\n this.antiDM = this.antiDM.bind(this);\n this.enabled = false;\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n dispatcher.subscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n dispatcher.unsubscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n antiDM(ev) {\n if (!ev.message.author.bot) return;\n if (ev.message.guild_id) return;\n const channel = ChannelModule.getChannel(ev.message.channel_id);\n if (!channel) return; // might be broken\n\n if (channel.type !== 1) return;\n if (blocked[ev.message.author.id]) return; // If the user unblock the bot, Don't block it again.\n\n if (scanMessage(ev.message)) {\n blocked[ev.message.author.id] = true;\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].showToast(`[AdBlock]: Blocked ${ev.message.author.username}#${ev.message.author.discriminator}`, {\n \"type\": \"warning\"\n });\n if (!relationShipModule) relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\n relationShipModule.default.addRelationship(ev.message.author.id, {\n location: \"ContextMenu\"\n }, 2);\n if (!DMModule) DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\n DMModule.default.closePrivateChannel(channel.id, false);\n }\n }\n\n}());\n\nfunction scanMessage(message) {\n if (/(discord\\.gg|discord\\.com\\/invite\\/|discordapp\\.com\\/invite\\/)/g.test(message.content)) return true;\n if (EmbedsContains(message, \"discord.gg/\") || EmbedsContains(message, \"discord.com/invite/\") || EmbedsContains(message, \"discordapp.com/invite/\")) return true;\n return false;\n}\n\nfunction EmbedsContains(message, search) {\n let embeds = message.embeds;\n if (embeds.length === 0) return false;\n return embeds.map(embed => {\n if (embed.type !== \"rich\") return false;\n if ((embed.title || \"\").includes(search)) return true;\n if ((embed.description || \"\").includes(search)) return true;\n if (((embed.footer || \"\") && embed.footer.text || \"\").includes(search)) return true;\n if (embed.fields.map(e => {\n return e.value.includes(search) || e.name.includes(search);\n }).includes(true)) return true;\n return false;\n }).includes(true);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/AntiAdDM.js\n")},"./src/modules/CustomRichPresence.js":/*!*******************************************!*\ + \*********************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\nconst dispatcher = window.Lightcord.DiscordModules.dispatcher;\nconst ChannelModule = BDModules.get(e => e.default && e.default.getChannel && e.default.hasChannel)[0].default;\nlet relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\nlet DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\nconst blocked = {};\nlet userModule = BDModules.get(e => e.default && e.default.getCurrentUser)[0];\n\nfunction getCurrentUser() {\n if (userModule) return userModule.default.getCurrentUser();\n return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class AntiBotDM {\n constructor() {\n this.antiDM = this.antiDM.bind(this);\n this.enabled = false;\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n dispatcher.subscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n dispatcher.unsubscribe(\"MESSAGE_CREATE\", this.antiDM);\n }\n\n antiDM(ev) {\n if (!ev.message.author.bot) return;\n if (ev.message.author.id === getCurrentUser().id) if (ev.message.guild_id) return;\n const channel = ChannelModule.getChannel(ev.message.channel_id);\n if (!channel) return; // might be broken\n\n if (channel.type !== 1) return;\n if (blocked[ev.message.author.id]) return; // If the user unblock the bot, Don't block it again.\n\n if (scanMessage(ev.message)) {\n blocked[ev.message.author.id] = true;\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].showToast(`[AdBlock]: Blocked ${ev.message.author.username}#${ev.message.author.discriminator}`, {\n \"type\": \"warning\"\n });\n if (!relationShipModule) relationShipModule = BDModules.get(e => e.default && e.default.addRelationship)[0];\n relationShipModule.default.addRelationship(ev.message.author.id, {\n location: \"ContextMenu\"\n }, 2);\n if (!DMModule) DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0];\n DMModule.default.closePrivateChannel(channel.id, false);\n }\n }\n\n}());\n\nfunction scanMessage(message) {\n if (/(discord\\.gg|discord\\.com\\/invite\\/|discordapp\\.com\\/invite\\/)/g.test(message.content)) return true;\n if (EmbedsContains(message, \"discord.gg/\") || EmbedsContains(message, \"discord.com/invite/\") || EmbedsContains(message, \"discordapp.com/invite/\")) return true;\n return false;\n}\n\nfunction EmbedsContains(message, search) {\n let embeds = message.embeds;\n if (embeds.length === 0) return false;\n return embeds.map(embed => {\n if (embed.type !== \"rich\") return false;\n if ((embed.title || \"\").includes(search)) return true;\n if ((embed.description || \"\").includes(search)) return true;\n if (((embed.footer || \"\") && embed.footer.text || \"\").includes(search)) return true;\n if (embed.fields.map(e => {\n return e.value.includes(search) || e.name.includes(search);\n }).includes(true)) return true;\n return false;\n }).includes(true);\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9BbnRpQWRETS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9BbnRpQWRETS5qcz85ODhiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuY29uc3QgZGlzcGF0Y2hlciA9IHdpbmRvdy5MaWdodGNvcmQuRGlzY29yZE1vZHVsZXMuZGlzcGF0Y2hlcjtcbmNvbnN0IENoYW5uZWxNb2R1bGUgPSBCRE1vZHVsZXMuZ2V0KGUgPT4g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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/AntiAdDM.js\n")},"./src/modules/CustomRichPresence.js":/*!*******************************************!*\ !*** ./src/modules/CustomRichPresence.js ***! \*******************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n\n\n\nconst dispatcher = BDModules.get(m => m.Dispatcher && m.default && m.default.dispatch)[0].default;\nconst ActionTypes = BDModules.get(m => m.ActionTypes)[0].ActionTypes;\nconst socketId = \"lightcord-spoof-socket\";\nconst pid = process.pid;\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class CustomRichPresence {\n constructor() {\n this.enabled = false;\n this.game = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"];\n }\n\n get formatedGame() {\n if (!this.game) return null;\n if (this.enabled === false) return null;\n let game = {\n name: this.game.name || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"defaultRPC\"].name,\n application_id: this.game.application_id || _0globals__WEBPACK_IMPORTED_MODULE_0__[\"defaultRPC\"].application_id,\n details: this.game.details || undefined,\n state: this.game.state || undefined,\n timestamps: this.game[\"timestamps.start\"] ? {\n start: this.game[\"timestamps.start\"]\n } : undefined,\n assets: this.game[\"assets.large\"] ? {\n large_image: this.game[\"assets.large\"],\n small_image: this.game[\"assets.small\"] || undefined\n } : undefined\n };\n return game;\n }\n\n sendGame() {\n dispatcher.dispatch({\n type: ActionTypes.LOCAL_ACTIVITY_UPDATE,\n socketId,\n pid,\n activity: this.formatedGame\n });\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n console.log(\"Enabling custom RichPresence\");\n this.set(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"] || Object.create(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"defaultRPC\"]));\n this.sendGame();\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n console.log(\"Disabling custom RichPresence\");\n this.sendGame();\n }\n\n async fetchAssets(applicationId) {\n let assets = await BDModules.get(e => e.getAssets)[0].getAssets(applicationId);\n\n if (assets.undefined && typeof assets.undefined === \"number\") {\n throw new Error(\"Unknown Application\");\n }\n\n return assets;\n }\n\n set(activity) {\n this.game = activity;\n this.sendGame();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9DdXN0b21SaWNoUHJlc2VuY2UuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9CZXR0ZXJEaXNjb3JkLy4vc3JjL21vZHVsZXMvQ3VzdG9tUmljaFByZXNlbmNlLmpzPzE4MzUiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2V0dGluZ3NDb29raWUsIHNldHRpbmdzUlBDLCBkZWZhdWx0UlBDIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi92MlwiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5jb25zdCBkaXNwYXRjaGVyID0gQkRNb2R1bGVzLmdldChtID0+IG0uRGlzcGF0Y2hlciAmJiBtLmRlZmF1bHQgJiYgbS5kZWZhdWx0LmRpc3BhdGNoKVswXS5kZWZhdWx0O1xuY29uc3QgQWN0aW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NldHMudW5kZWZpbmVkICYmIHR5cGVvZiBhc3NldHMudW5kZWZpbmVkID09PSBcIm51bWJlclwiKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJVbmtub3duIEFwcGxpY2F0aW9uXCIpO1xuICAgIH1cblxuICAgIHJldHVybiBhc3NldHM7XG4gIH1cblxuICBzZXQoYWN0aXZpdHkpIHtcbiAgICB0aGlzLmdhbWUgPSBhY3Rpdml0eTtcbiAgICB0aGlzLnNlbmRHYW1lKCk7XG4gIH1cblxufSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/CustomRichPresence.js\n")},"./src/modules/bdApi.js":/*!******************************!*\ !*** ./src/modules/bdApi.js ***! \******************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ \"./src/modules/core.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _pluginModule__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pluginModule */ \"./src/modules/pluginModule.js\");\n/* harmony import */ var _themeModule__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./themeModule */ \"./src/modules/themeModule.js\");\n/* harmony import */ var _settingsPanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settingsPanel */ \"./src/modules/settingsPanel.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n\n\n\n\n\n\n\n\n\nconst BdApi = {\n get React() {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].React;\n },\n\n get ReactDOM() {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].ReactDom;\n },\n\n get ReactComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].ReactComponent;\n },\n\n get WindowConfigFile() {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].WindowConfigFile;\n },\n\n get settings() {\n return _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"];\n },\n\n get emotes() {\n return {};\n },\n\n // deprecated, deleted all emotes from betterdiscord.\n get screenWidth() {\n return Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n },\n\n get screenHeight() {\n return Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n }\n\n};\n\nBdApi.getAllWindowPreferences = function () {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getAllWindowPreferences();\n};\n\nBdApi.getWindowPreference = function (key) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getWindowPreference(key);\n};\n\nBdApi.setWindowPreference = function (key, value) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setWindowPreference(key, value);\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.injectCSS = function (id, css) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].addStyle(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id), css);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.clearCSS = function (id) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].removeStyle(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id));\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.linkJS = function (id, url) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].addScript(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id), url);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.unlinkJS = function (id) {\n _domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].removeScript(_domtools__WEBPACK_IMPORTED_MODULE_8__[\"default\"].escapeID(id));\n}; //Get another plugin\n//name = name of plugin\n\n\nBdApi.getPlugin = function (name) {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"].hasOwnProperty(name)) {\n return _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"][name].plugin;\n }\n\n return null;\n}; //Get BetterDiscord Core\n\n\nBdApi.getCore = function () {\n _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].warn(\"Deprecation Notice\", `BdApi.getCore() will be removed in future versions.`);\n return _core__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n};\n/**\r\n * Shows a generic but very customizable modal.\r\n * @param {string} title - title of the modal\r\n * @param {string} content - a string of text to display in the modal\r\n */\n\n\nBdApi.alert = function (title, content) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].showConfirmationModal(title, content, {\n cancelText: null\n });\n};\n/**\r\n * Shows a generic but very customizable confirmation modal with optional confirm and cancel callbacks.\r\n * @param {string} title - title of the modal\r\n * @param {(string|ReactElement|Array)} children - a single or mixed array of react elements and strings. Every string is wrapped in Discord's `Markdown` component so strings will show and render properly.\r\n * @param {object} [options] - options to modify the modal\r\n * @param {boolean} [options.danger=false] - whether the main button should be red or not\r\n * @param {string} [options.confirmText=Okay] - text for the confirmation/submit button\r\n * @param {string} [options.cancelText=Cancel] - text for the cancel button\r\n * @param {callable} [options.onConfirm=NOOP] - callback to occur when clicking the submit button\r\n * @param {callable} [options.onCancel=NOOP] - callback to occur when clicking the cancel button\r\n * @param {string} [options.key] - key used to identify the modal. If not provided, one is generated and returned\r\n * @returns {string} - the key used for this modal\r\n */\n\n\nBdApi.showConfirmationModal = function (title, content, options = {}) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].showConfirmationModal(title, content, options);\n}; //Show toast alert\n\n\nBdApi.showToast = function (content, options = {}) {\n _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].showToast(content, options);\n}; // Finds module\n\n\nBdApi.findModule = function (filter) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.find(filter);\n}; // Finds module\n\n\nBdApi.findAllModules = function (filter) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findAll(filter);\n}; // Finds module\n\n\nBdApi.findModuleByProps = function (...props) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findByUniqueProperties(props);\n};\n\nBdApi.findModuleByPrototypes = function (...protos) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findByPrototypes(protos);\n};\n\nBdApi.findModuleByDisplayName = function (name) {\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].WebpackModules.findByDisplayName(name);\n}; // Gets react instance\n\n\nBdApi.getInternalInstance = function (node) {\n if (!(node instanceof window.jQuery) && !(node instanceof Element)) return undefined;\n if (node instanceof jQuery) node = node[0];\n return _v2__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getInternalInstance(node);\n}; // Gets data\n\n\nBdApi.loadData = function (pluginName, key) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getPluginData(pluginName, key);\n};\n\nBdApi.getData = BdApi.loadData; // Sets data\n\nBdApi.saveData = function (pluginName, key, data) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setPluginData(pluginName, key, data);\n};\n\nBdApi.setData = BdApi.saveData; // Deletes data\n\nBdApi.deleteData = function (pluginName, key) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].deletePluginData(pluginName, key);\n}; // Patches other functions\n\n\nBdApi.monkeyPatch = function (what, methodName, options) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].monkeyPatch(what, methodName, options);\n}; // Event when element is removed\n\n\nBdApi.onRemoved = function (node, callback) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].onRemoved(node, callback);\n}; // Wraps function in try..catch\n\n\nBdApi.suppressErrors = function (method, message) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].suppressErrors(method, message);\n}; // Tests for valid JSON\n\n\nBdApi.testJSON = function (data) {\n return _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].testJSON(data);\n};\n\nBdApi.isPluginEnabled = function (name) {\n return !!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"][name];\n};\n\nBdApi.isThemeEnabled = function (name) {\n return !!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"][name];\n};\n\nBdApi.isSettingEnabled = function (id) {\n return !!_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id];\n};\n\nBdApi.enableSetting = function (id) {\n return _settingsPanel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].onChange(id, true);\n};\n\nBdApi.disableSetting = function (id) {\n return _settingsPanel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].onChange(id, false);\n};\n\nBdApi.toggleSetting = function (id) {\n return _settingsPanel__WEBPACK_IMPORTED_MODULE_7__[\"default\"].onChange(id, !_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id]);\n}; // Gets data\n\n\nBdApi.getBDData = function (key) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getBDData(key);\n}; // Sets data\n\n\nBdApi.setBDData = function (key, data) {\n return _dataStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setBDData(key, data);\n};\n\nconst makeAddonAPI = (cookie, list, manager) => new class AddonAPI {\n get folder() {\n return manager.folder;\n }\n\n isEnabled(name) {\n return !!cookie[name];\n }\n\n enable(name) {\n return manager.enable(name);\n }\n\n disable(name) {\n return manager.disable(name);\n }\n\n toggle(name) {\n if (cookie[name]) this.disable(name);else this.enable(name);\n }\n\n reload(name) {\n return manager.reload(name);\n }\n\n get(name) {\n if (list.hasOwnProperty(name)) {\n if (list[name].plugin) return list[name].plugin;\n return list[name];\n }\n\n return null;\n }\n\n getAll() {\n return Object.keys(list).map(k => this.get(k)).filter(a => a);\n }\n\n}();\n\nBdApi.Plugins = makeAddonAPI(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"pluginCookie\"], _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"], _pluginModule__WEBPACK_IMPORTED_MODULE_5__[\"default\"]);\nBdApi.Themes = makeAddonAPI(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"themeCookie\"], _0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"], _themeModule__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BdApi);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9iZEFwaS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9iZEFwaS5qcz9hOWEzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHBsdWdpbkNvb2tpZSwgdGhlbWVDb29raWUsIGJkcGx1Z2lucywgYmR0aGVtZXMsIHNldHRpbmdzQ29va2llLCBzZXR0aW5ncyB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IG1haW5Db3JlIGZyb20gXCIuL2NvcmVcIjtcbmltcG9ydCBVdGlscyBmcm9tIFwiLi91dGlsc1wiO1xuaW1wb3J0IEJEVjIgZnJvbSBcIi4vdjJcIjtcbmltcG9ydCBEYXRhU3RvcmUgZnJvbSBcIi4vZGF0YVN0b3JlXCI7XG5pbXBvcnQgcGx1Z2luTW9kdWxlIGZyb20gXCIuL3BsdWdpbk1vZHVsZVwiO1xuaW1wb3J0IHRoZW1lTW9kdWxlIGZyb20gXCIuL3RoZW1lTW9kdWxlXCI7XG5pbXBvcnQgc2V0dGluZ3NQYW5lbCBmcm9tIFwiLi9zZXR0aW5nc1BhbmVsXCI7XG5pbXBvcnQgRE9NIGZyb20gXCIuL2RvbXRvb2xzXCI7XG5jb25zdCBCZEFwaSA9IHtcbiAgZ2V0IFJlYWN0KCkge1xuICAgIHJldHVybiBCRFYyLlJlYWN0O1xuICB9LFxuXG4gIGdldCBSZWFjdERPTSgpIHtcbiAgICByZXR1cm4gQkRWMi5SZWFjdERvbTtcbiAgfSxcblxuICBnZXQgUmVhY3RDb21wb25lbnQoKSB7XG4gICAgcmV0dXJuIEJEVjIuUmVhY3RDb21wb25lbnQ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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/bdApi.js\n")},"./src/modules/bdEvents.js":/*!*********************************!*\ !*** ./src/modules/bdEvents.js ***! - \*********************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* BDEvents */\nconst EventEmitter = __webpack_require__(/*! events */ \"events\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class BDEvents extends EventEmitter {\n dispatch(eventName, ...args) {\n this.emit(eventName, ...args);\n }\n\n off(eventName, eventAction) {\n this.removeListener(eventName, eventAction);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9iZEV2ZW50cy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9iZEV2ZW50cy5qcz84ZjI1Il0sInNvdXJjZXNDb250ZW50IjpbIi8qIEJERXZlbnRzICovXG5jb25zdCBFdmVudEVtaXR0ZXIgPSByZXF1aXJlKFwiZXZlbnRzXCIpO1xuXG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgQkRFdmVudHMgZXh0ZW5kcyBFdmVudEVtaXR0ZXIge1xuICBkaXNwYXRjaChldmVudE5hbWUsIC4uLmFyZ3MpIHtcbiAgICB0aGlzLmVtaXQoZXZlbnROYW1lLCAuLi5hcmdzKTtcbiAgfVxuXG4gIG9mZihldmVudE5hbWUsIGV2ZW50QWN0aW9uKSB7XG4gICAgdGhpcy5yZW1vdmVMaXN0ZW5lcihldmVudE5hbWUsIGV2ZW50QWN0aW9uKTtcbiAgfVxuXG59KCk7Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/bdEvents.js\n")},"./src/modules/classNormalizer.js":/*!****************************************!*\ + \*********************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* BDEvents */\nconst EventEmitter = __webpack_require__(/*! events */ \"events\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class BDEvents extends EventEmitter {\n dispatch(eventName, ...args) {\n this.emit(eventName, ...args);\n }\n\n off(eventName, eventAction) {\n this.removeListener(eventName, eventAction);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9iZEV2ZW50cy5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9iZEV2ZW50cy5qcz84ZjI1Il0sInNvdXJjZXNDb250ZW50IjpbIi8qIEJERXZlbnRzICovXG5jb25zdCBFdmVudEVtaXR0ZXIgPSByZXF1aXJlKFwiZXZlbnRzXCIpO1xuXG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgQkRFdmVudHMgZXh0ZW5kcyBFdmVudEVtaXR0ZXIge1xuICBkaXNwYXRjaChldmVudE5hbWUsIC4uLmFyZ3MpIHtcbiAgICB0aGlzLmVtaXQoZXZlbnROYW1lLCAuLi5hcmdzKTtcbiAgfVxuXG4gIG9mZihldmVudE5hbWUsIGV2ZW50QWN0aW9uKSB7XG4gICAgdGhpcy5yZW1vdmVMaXN0ZW5lcihldmVudE5hbWUsIGV2ZW50QWN0aW9uKTtcbiAgfVxuXG59KCk7Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/bdEvents.js\n")},"./src/modules/blurPrivate.js":/*!************************************!*\ + !*** ./src/modules/blurPrivate.js ***! + \************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n\nlet selectors;\n\nfunction getSelectors() {\n let standardSidebarView = BDModules.get(e => e.standardSidebarView)[0];\n if (!standardSidebarView) return null;\n let defaultClassName = removeDa(standardSidebarView.standardSidebarView);\n let selects = [];\n selects.push(`#app-mount .${defaultClassName} .payment-info .${removeDa(BDModules.get(e => e.description && typeof e.description === \"string\" && e.description.includes(\"formText\"))[0].description)}`);\n selects.push(`#app-mount .${defaultClassName} .${removeDa(BDModules.get(e => e.paymentSourceRow)[0].paymentSourceRow)} .${removeDa(BDModules.get(e => e.subText && e.descriptionWrapper)[0].subText)}`);\n selects.push(`#app-mount .${defaultClassName} .${removeDa(BDModules.get(e => e.userSettingsAccount)[0].userSettingsAccount)} div:nth-child(2)>div:nth-child(2)>.${removeDa(BDModules.get(e => e.viewBody)[0].viewBody)}`);\n return selects;\n}\n\nfunction removeDa(className) {\n if (!className) return className;\n return className.split(\" \").filter(e => !e.startsWith(\"da-\")).join(\" \");\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class BlurPrivate {\n constructor() {\n this.enabled = false;\n }\n\n enable() {\n if (this.enabled) return;\n this.enabled = true;\n selectors = selectors || getSelectors();\n if (!selectors) console.error(new Error(\"Couldn't find selectors to blur personnal informations.\"));\n _domtools__WEBPACK_IMPORTED_MODULE_0__[\"default\"].addStyle(\"blurPrivate\", `\n${selectors[0]}, ${selectors[1]}, ${selectors[2]} {\n transition: all 150ms cubic-bezier(.55,.085,.68,.53);\n filter: blur(4px);\n opacity: .8;\n}\n\n${selectors[0]}:hover, ${selectors[1]}:hover, ${selectors[2]}:hover {\n transition: all 150ms cubic-bezier(.55,.09,.68,.53);\n filter: none;\n opacity: 1;\n}`);\n }\n\n disable() {\n if (!this.enabled) return;\n this.enabled = false;\n _domtools__WEBPACK_IMPORTED_MODULE_0__[\"default\"].removeStyle(\"blurPrivate\");\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9ibHVyUHJpdmF0ZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9ibHVyUHJpdmF0ZS5qcz82YWVlIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBET01Ub29scyBmcm9tIFwiLi9kb210b29sc1wiO1xubGV0IHNlbGVjdG9ycztcblxuZnVuY3Rpb24gZ2V0U2VsZWN0b3JzKCkge1xuICBsZXQgc3RhbmRhcmRTaWRlYmFyVmlldyA9IEJETW9kdWxlcy5nZXQoZSA9PiBlLnN0YW5kYXJkU2lkZWJhclZpZXcpWzBdO1xuICBpZiAoIXN0YW5kYXJkU2lkZWJhclZpZXcpIHJldHVybiBudWxsO1xuICB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MuZW5hYmxlZCkgcmV0dXJuO1xuICAgIHRoaXMuZW5hYmxlZCA9IGZhbHNlO1xuICAgIERPTVRvb2xzLnJlbW92ZVN0eWxlKFwiYmx1clByaXZhdGVcIik7XG4gIH1cblxufSgpOyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/blurPrivate.js\n")},"./src/modules/classNormalizer.js":/*!****************************************!*\ !*** ./src/modules/classNormalizer.js ***! \****************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _webpackModules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./webpackModules */ \"./src/modules/webpackModules.js\");\n\nconst normalizedPrefix = \"da\";\nconst randClass = new RegExp(`^(?!${normalizedPrefix}-)((?:[A-Za-z]|[0-9]|-)+)-(?:[A-Za-z]|[0-9]|-|_){6}$`);\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class ClassNormalizer {\n stop() {\n if (!this.hasPatched) return;\n this.unpatchClassModules(_webpackModules__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findAll(this.moduleFilter.bind(this)));\n this.revertElement(document.querySelector(\"#app-mount\"));\n this.hasPatched = false;\n }\n\n start() {\n if (this.hasPatched) return;\n this.patchClassModules(_webpackModules__WEBPACK_IMPORTED_MODULE_0__[\"default\"].findAll(this.moduleFilter.bind(this)));\n this.normalizeElement(document.querySelector(\"#app-mount\"));\n this.hasPatched = true;\n this.patchDOMMethods();\n }\n\n patchClassModules(modules) {\n for (const module of modules) {\n this.patchClassModule(normalizedPrefix, module);\n }\n }\n\n unpatchClassModules(modules) {\n for (const module of modules) {\n this.unpatchClassModule(normalizedPrefix, module);\n }\n }\n\n shouldIgnore(value) {\n if (!isNaN(value)) return true;\n if (value.endsWith(\"px\") || value.endsWith(\"ch\") || value.endsWith(\"em\") || value.endsWith(\"ms\")) return true;\n if (value.startsWith(\"layerContainer-\")) return true;\n if (value.startsWith(\"#\") && (value.length == 7 || value.length == 4)) return true;\n if (value.includes(\"calc(\") || value.includes(\"rgba\")) return true;\n return false;\n }\n\n moduleFilter(module) {\n if (typeof module !== \"object\" || Array.isArray(module)) return false;\n if (module.__esModule) return false;\n if (!Object.keys(module).length) return false;\n\n for (const baseClassName in module) {\n const value = module[baseClassName];\n if (typeof value !== \"string\") return false;\n if (this.shouldIgnore(value)) continue;\n if (value.split(\"-\").length === 1) return false;\n if (!randClass.test(value.split(\" \")[0])) return false;\n }\n\n return true;\n }\n\n patchClassModule(componentName, classNames) {\n for (const baseClassName in classNames) {\n const value = classNames[baseClassName];\n if (this.shouldIgnore(value)) continue;\n const classList = value.split(\" \");\n\n for (const normalClass of classList) {\n const match = normalClass.match(randClass);\n if (!match || !match.length || match.length < 2) continue; // Shouldn't ever happen since they passed the moduleFilter, but you never know\n\n const camelCase = match[1].split(\"-\").map((s, i) => i ? s[0].toUpperCase() + s.slice(1) : s).join(\"\");\n classNames[baseClassName] += ` ${componentName}-${camelCase}`;\n }\n }\n }\n\n unpatchClassModule(componentName, classNames) {\n for (const baseClassName in classNames) {\n const value = classNames[baseClassName];\n if (this.shouldIgnore(value)) continue;\n let newString = \"\";\n const classList = value.split(\" \");\n\n for (const normalClass of classList) {\n if (normalClass.startsWith(`${componentName}-`)) continue;\n newString += ` ${normalClass}`;\n }\n\n classNames[baseClassName] = newString.trim();\n }\n }\n\n normalizeElement(element) {\n if (!(element instanceof Element)) return;\n const classes = element.classList;\n\n for (let c = 0, clen = classes.length; c < clen; c++) {\n if (!randClass.test(classes[c])) continue;\n const match = classes[c].match(randClass)[1];\n const newClass = match.split(\"-\").map((s, i) => i ? s[0].toUpperCase() + s.slice(1) : s).join(\"\");\n element.classList.add(`${normalizedPrefix}-${newClass}`);\n }\n\n for (const child of element.children) this.normalizeElement(child);\n }\n\n revertElement(element) {\n if (!(element instanceof Element)) return;\n if (element.children && element.children.length) this.revertElement(element.children[0]);\n if (element.nextElementSibling) this.revertElement(element.nextElementSibling);\n const classes = element.classList;\n const toRemove = [];\n\n for (let c = 0; c < classes.length; c++) {\n if (classes[c].startsWith(`${normalizedPrefix}-`)) toRemove.push(classes[c]);\n }\n\n element.classList.remove(...toRemove);\n }\n\n patchDOMMethods() {\n const contains = DOMTokenList.prototype.contains;\n\n DOMTokenList.prototype.contains = function (token) {\n // const tokens = token.split(\" \");\n return Reflect.apply(contains, this, [token.split(\" \")[0]]); // return tokens.every(t => contains.call(this, t));\n };\n\n const add = DOMTokenList.prototype.add;\n\n DOMTokenList.prototype.add = function (...tokens) {\n for (let t = 0; t < tokens.length; t++) {\n tokens[t] = tokens[t].split(\" \")[0];\n }\n\n return Reflect.apply(add, this, tokens);\n };\n\n const remove = DOMTokenList.prototype.remove;\n\n DOMTokenList.prototype.remove = function (...tokens) {\n for (let t = 0; t < tokens.length; t++) {\n tokens[t] = tokens[t].split(\" \")[0];\n }\n\n return Reflect.apply(remove, this, tokens);\n };\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9jbGFzc05vcm1hbGl6ZXIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s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0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/classNormalizer.js\n")},"./src/modules/coloredText.js":/*!************************************!*\ !*** ./src/modules/coloredText.js ***! @@ -44,7 +46,7 @@ module.exports=function(e){function t(I){if(l[I])return l[I].exports;var c=l[I]= !*** ./src/modules/reactDevTools.js ***! \**************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n\n\n\nconst electron = __webpack_require__(/*! electron */ \"electron\");\n\nconst fs = __webpack_require__(/*! fs */ \"fs\");\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst BrowserWindow = electron.remote.BrowserWindow;\nconst webContents = electron.remote.getCurrentWebContents();\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class reactDevTools {\n constructor() {\n let extensionPath = \"\";\n if (process.platform === \"win32\") extensionPath = path.resolve(process.env.LOCALAPPDATA, \"Google/Chrome/User Data\");else if (process.platform === \"linux\") extensionPath = path.resolve(process.env.HOME, \".config/google-chrome\");else if (process.platform === \"darwin\") extensionPath = path.resolve(process.env.HOME, \"Library/Application Support/Google/Chrome\");else extensionPath = path.resolve(process.env.HOME, \".config/chromium\");\n extensionPath += \"/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/\";\n\n if (fs.existsSync(extensionPath)) {\n const versions = fs.readdirSync(extensionPath);\n extensionPath = path.resolve(extensionPath, versions[versions.length - 1]);\n }\n\n this.extensionPath = extensionPath;\n this.isExtensionInstalled = fs.existsSync(extensionPath);\n this.listener = this.listener.bind(this);\n _0globals__WEBPACK_IMPORTED_MODULE_1__[\"settings\"][\"React DevTools\"].hidden = !this.isExtensionInstalled;\n }\n\n listener() {\n if (!this.isExtensionInstalled) return;\n BrowserWindow.removeDevToolsExtension(\"React Developer Tools\");\n const didInstall = BrowserWindow.addDevToolsExtension(this.extensionPath);\n if (didInstall) _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].log(\"React DevTools\", \"Successfully installed react devtools.\");else _utils__WEBPACK_IMPORTED_MODULE_0__[\"default\"].err(\"React DevTools\", \"Couldn't find react devtools in chrome extensions!\");\n }\n\n start() {\n setImmediate(() => webContents.on(\"devtools-opened\", this.listener));\n if (webContents.isDevToolsOpened()) this.listener();\n }\n\n stop() {\n webContents.removeListener(\"devtools-opened\", this.listener);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9yZWFjdERldlRvb2xzLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQmV0dGVyRGlzY29yZC8uL3NyYy9tb2R1bGVzL3JlYWN0RGV2VG9vbHMuanM/OTdhZiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgVXRpbHMgZnJvbSBcIi4vdXRpbH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y5cIik7ZWxzZSBVdGlscy5lcnIoXCJSZWFjdCBEZXZUb29sc1wiLCBcIkNvdWxkbid0IGZpbmQgcmVhY3QgZGV2dG9vbHMgaW4gY2hyb21lIGV4dGVuc2lvbnMhXCIpO1xuICB9XG5cbiAgc3RhcnQoKSB7XG4gICAgc2V0SW1tZWRpYXRlKCgpID0+IHdlYkNvbnRlbnRzLm9uKFwiZGV2dG9vbHMtb3BlbmVkXCIsIHRoaXMubGlzdGVuZXIpKTtcbiAgICBpZiAod2ViQ29udGVudHMuaXNEZXZUb29sc09wZW5lZCgpKSB0aGlzLmxpc3RlbmVyKCk7XG4gIH1cblxuICBzdG9wKCkge1xuICAgIHdlYkNvbnRlbnRzLnJlbW92ZUxpc3RlbmVyKFwiZGV2dG9vbHMtb3BlbmVkXCIsIHRoaXMubGlzdGVuZXIpO1xuICB9XG5cbn0oKTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/reactDevTools.js\n")},"./src/modules/settingsPanel.js":/*!**************************************!*\ !*** ./src/modules/settingsPanel.js ***! - \**************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsPanelSidebar */ \"./src/modules/settingsPanelSidebar.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _bdEvents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _coloredText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coloredText */ \"./src/modules/coloredText.js\");\n/* harmony import */ var _24hour__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./24hour */ \"./src/modules/24hour.js\");\n/* harmony import */ var _reactDevTools__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reactDevTools */ \"./src/modules/reactDevTools.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _publicServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./publicServers */ \"./src/modules/publicServers.js\");\n/* harmony import */ var _voiceMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./voiceMode */ \"./src/modules/voiceMode.js\");\n/* harmony import */ var _classNormalizer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _devMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./devMode */ \"./src/modules/devMode.js\");\n/* harmony import */ var _ui_tools__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _ui_scroller__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/sectionedSettingsPanel */ \"./src/ui/sectionedSettingsPanel.js\");\n/* harmony import */ var _ui_settingsPanel__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ui/settingsPanel */ \"./src/ui/settingsPanel.js\");\n/* harmony import */ var _ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/cssEditor */ \"./src/ui/cssEditor.js\");\n/* harmony import */ var _ui_addonlist__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../ui/addonlist */ \"./src/ui/addonlist.jsx\");\n/* harmony import */ var _ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../ui/presenceSettings */ \"./src/ui/presenceSettings.jsx\");\n/* harmony import */ var _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CustomRichPresence */ \"./src/modules/CustomRichPresence.js\");\n/* harmony import */ var _ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../ui/AccountInfos */ \"./src/ui/AccountInfos.jsx\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./AntiAdDM */ \"./src/modules/AntiAdDM.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2_SettingsPanel {\n constructor() {\n this.sideBarOnClick = this.sideBarOnClick.bind(this);\n this.onChange = this.onChange.bind(this);\n this.updateSettings = this.updateSettings.bind(this);\n this.sidebar = new _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.sideBarOnClick); // this.buildPluginProps = this.buildPluginProps.bind(this);\n // this.buildThemeProps = this.buildThemeProps.bind(this);\n\n this.showOriginal = this.showOriginal.bind(this);\n }\n\n get root() {\n const _root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#bd-settingspane-container\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root;\n }\n\n injectRoot() {\n let [classNameLayer, classSidebar] = [BDModules.get(e => e.layer && e.animating)[0].layer.split(\" \")[0], BDModules.get(e => e.standardSidebarView)[0]];\n const sidebar = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + classNameLayer + \" .\" + classSidebar.standardSidebarView.split(\" \")[0] + \", .\" + classNameLayer + \" .ui-standard-sidebar-view\");\n if (!sidebar) return false;\n const root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].createElement(`
`);\n sidebar.append(root);\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].onRemoved(root, () => {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(root);\n });\n return true;\n }\n\n get coreSettings() {\n const settings = this.getSettings(\"core\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get lightcordSettings() {\n const settings = this.getSettings(\"lightcord\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get PresenceSettings() {\n return this.getSettings(\"status\");\n }\n\n get MsgLogSettings() {\n return this.getSettings(\"msglog\");\n }\n\n getSettings(category) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === category && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n sideBarOnClick(id) {\n const contentRegion = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".contentRegion-3nDuYy, .content-region\");\n contentRegion.style.display = \"none\";\n this.root.style.display = \"\";\n\n switch (id) {\n case \"core\":\n this.renderCoreSettings();\n break;\n\n case \"customcss\":\n this.renderCustomCssEditor();\n break;\n\n case \"plugins\":\n case \"themes\":\n this.renderAddonPane(id);\n break;\n\n case \"lightcord\":\n this.renderLightCordSettings();\n break;\n\n case \"status\":\n this.renderPresenceSettings();\n break;\n\n case \"accountinfo\":\n this.renderAccountInfos();\n break;\n }\n }\n\n onClick() {}\n\n onChange(id, checked) {\n this.updateSettings(id, checked);\n }\n\n updateSettings(id, enabled) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id] = enabled;\n\n if (id == \"bda-gs-2\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal\");\n }\n\n if (id == \"bda-gs-3\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal-chan\");\n }\n\n if (id == \"bda-gs-1\") {\n if (enabled) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();else _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].removeButton();\n }\n\n if (id == \"bda-gs-4\") {\n if (enabled) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();else _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].stop();\n }\n\n if (id == \"bda-gs-5\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n }\n\n if (enabled && id == \"bda-gs-6\") _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n\n if (id == \"bda-gs-7\") {\n if (enabled) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();else _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].removeColoredText();\n }\n\n if (id == \"fork-ps-4\") {\n if (enabled) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();else _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].stop();\n }\n\n if (id == \"fork-ps-5\") {\n if (enabled) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n } else {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"theme\");\n }\n }\n\n if (id == \"fork-wp-1\") {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"transparent\", enabled);\n if (enabled) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", null);else _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", \"#2f3136\");\n }\n\n if (id == \"bda-gs-8\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopDebugListener();\n }\n\n if (id == \"fork-dm-1\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopCopySelector();\n }\n\n if (id === \"reactDevTools\") {\n if (enabled) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();else _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].stop();\n }\n\n if (id === \"lightcord-1\") {\n if (enabled) window.Lightcord.Settings.devMode = true;else window.Lightcord.Settings.devMode = false;\n }\n\n if (id === \"lightcord-2\") {\n if (enabled) window.Lightcord.Settings.callRingingBeat = true;else window.Lightcord.Settings.callRingingBeat = false;\n }\n\n if (id === \"lightcord-presence-1\") {\n if (enabled) {\n _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n const settingsStore = BDModules.get(e => e.default && typeof e.default === \"object\" && \"showCurrentGame\" in e.default)[0];\n\n if (settingsStore && !settingsStore.default.showCurrentGame) {\n BDModules.get(e => e.default && e.default.updateRemoteSettings)[0].default.updateRemoteSettings({\n showCurrentGame: true\n });\n }\n } else _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].disable();\n }\n\n if (id === \"lightcord-3\") {\n if (enabled) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);else electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(false);\n }\n\n if (id === \"lightcord-4\") {\n if (enabled) {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n } else {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].disable();\n }\n }\n\n this.saveSettings();\n }\n\n async initializeSettings() {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"].reactDevTools) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-2\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-3\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"]) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-4\"]) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-5\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-7\"]) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-4\"]) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-1\"]) window.Lightcord.Settings.devMode = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-2\"]) window.Lightcord.Settings.callRingingBeat = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-presence-1\"]) _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-3\"]) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-4\"]) _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"]) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-8\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();\n this.saveSettings();\n }\n\n saveSettings() {\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"settings\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"]);\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"rpc\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"]);\n }\n\n loadSettings() {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"settings\"));\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"rpc\"));\n }\n\n showOriginal() {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(this.root);\n this.root.style.display = \"none\";\n _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + BDModules.get(e => e.contentRegion)[0].contentRegion.split(\" \")[0] + \", .content-region\").style.display = \"\";\n }\n\n renderSidebar() {\n const tabs = document.querySelectorAll(\"[class*='side-'] > [class*='item-']\");\n\n for (const element of tabs) {\n element.removeEventListener(\"click\", this.showOriginal);\n element.addEventListener(\"click\", this.showOriginal);\n }\n\n this.sidebar.render();\n }\n\n get coreComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"cspanel\",\n onChange: this.onChange,\n sections: this.coreSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get lightcordComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"lspannel\",\n onChange: this.onChange,\n sections: this.lightcordSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get PresenceComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n key: \"lppannel\",\n onChange: this.onChange,\n settings: this.PresenceSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get AccountInfosComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n key: \"lapannel\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get customCssComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n key: \"csseditor\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n renderCoreSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.coreComponent, root);\n }\n\n renderLightCordSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.lightcordComponent, root);\n }\n\n renderPresenceSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.PresenceComponent, root);\n }\n\n renderAccountInfos() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.AccountInfosComponent, root);\n }\n\n renderCustomCssEditor() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.customCssComponent, root);\n } // renderAddonPane(type) {\n // const root = this.root;\n // if (!root) return Utils.err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n // BDV2.reactDom.render(this.contentComponent(type), root);\n // }\n\n\n renderAddonPane(type) {\n if (!this.root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\"); // I know this shouldn't be here, but when it isn't,\n // React refuses to change the button when going\n // between plugins and themes page... something\n // to debug later.\n\n class ContentList extends _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.Component {\n constructor(props) {\n super(props);\n this.prefix = this.props.type.replace(\"s\", \"\");\n this.onChange = this.onChange.bind(this);\n }\n\n componentDidMount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-unloaded`, this.onChange);\n }\n\n componentWillUnmount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-unloaded`, this.onChange);\n }\n\n onChange() {\n this.props.onChange(this.props.type);\n }\n\n render() {\n return this.props.children;\n }\n\n }\n\n const originalRender = ContentList.prototype.render;\n Object.defineProperty(ContentList.prototype, \"render\", {\n enumerable: false,\n configurable: false,\n set: function () {\n console.warn(\"Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins\");\n },\n get: () => originalRender\n });\n const list = type === \"plugins\" ? Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]) : Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(ContentList, {\n type,\n onChange: this.sideBarOnClick\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_addonlist__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n type,\n list\n })), this.root);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQmV0dGVyRGlzY29yZC8uL3NyYy9tb2R1bGVzL3NldHRpbmdzUGFuZWwuanM/NTdiMCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzZXR0aW5ncywgc2V0dGluZ3NDb29raWUsIGJkcGx1Z2lucywgYmR0aGVtZXMsIHNldHRpbmdzUlBDIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5pbXBvcnQgRGF0YVN0b3JlIGZyb20gXCIuL2RhdGFTdG9yZVwiO1xuaW1wb3J0IFYyX1NldHRpbmdzUGFuZWxfU2lkZWJhciBmcm9tIFwiLi9zZXR0aW5nc1BhbmVsU2lkZWJhclwiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi92MlwiO1xuaW1wb3J0IENvbnRlbnRNYW5hZ2VyIGZyb20gXCIuL2NvbnRlbnRNYW5hZ2VyXCI7XG5pbXBvcnQgQkRFdmVudHMgZnJvbSBcIi4vYmRFdmVudHNcIjtcbmltcG9ydCBjb2xvcmVkVGV4dCBmcm9tIFwiLi9jb2xvcmVkVGV4dFwiO1xuaW1wb3J0IHRmSG91ciBmcm9tIFwiLi8yNGhvdXJcIjtcbmltcG9ydCByZWFjdERldlRvb2xzIGZyb20gXCIuL3JlYWN0RGV2VG9vbHNcI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UFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/settingsPanel.js\n")},"./src/modules/settingsPanelSidebar.js":/*!*********************************************!*\ + \**************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _dataStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataStore */ \"./src/modules/dataStore.js\");\n/* harmony import */ var _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsPanelSidebar */ \"./src/modules/settingsPanelSidebar.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _contentManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contentManager */ \"./src/modules/contentManager.js\");\n/* harmony import */ var _bdEvents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./bdEvents */ \"./src/modules/bdEvents.js\");\n/* harmony import */ var _coloredText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coloredText */ \"./src/modules/coloredText.js\");\n/* harmony import */ var _24hour__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./24hour */ \"./src/modules/24hour.js\");\n/* harmony import */ var _reactDevTools__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reactDevTools */ \"./src/modules/reactDevTools.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _publicServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./publicServers */ \"./src/modules/publicServers.js\");\n/* harmony import */ var _voiceMode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./voiceMode */ \"./src/modules/voiceMode.js\");\n/* harmony import */ var _classNormalizer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./classNormalizer */ \"./src/modules/classNormalizer.js\");\n/* harmony import */ var _devMode__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./devMode */ \"./src/modules/devMode.js\");\n/* harmony import */ var _ui_tools__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/tools */ \"./src/ui/tools.js\");\n/* harmony import */ var _ui_scroller__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/scroller */ \"./src/ui/scroller.js\");\n/* harmony import */ var _ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/sectionedSettingsPanel */ \"./src/ui/sectionedSettingsPanel.js\");\n/* harmony import */ var _ui_settingsPanel__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ui/settingsPanel */ \"./src/ui/settingsPanel.js\");\n/* harmony import */ var _ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/cssEditor */ \"./src/ui/cssEditor.js\");\n/* harmony import */ var _ui_addonlist__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../ui/addonlist */ \"./src/ui/addonlist.jsx\");\n/* harmony import */ var _ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../ui/presenceSettings */ \"./src/ui/presenceSettings.jsx\");\n/* harmony import */ var _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CustomRichPresence */ \"./src/modules/CustomRichPresence.js\");\n/* harmony import */ var _ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../ui/AccountInfos */ \"./src/ui/AccountInfos.jsx\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./AntiAdDM */ \"./src/modules/AntiAdDM.js\");\n/* harmony import */ var _blurPrivate__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./blurPrivate */ \"./src/modules/blurPrivate.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2_SettingsPanel {\n constructor() {\n this.sideBarOnClick = this.sideBarOnClick.bind(this);\n this.onChange = this.onChange.bind(this);\n this.updateSettings = this.updateSettings.bind(this);\n this.sidebar = new _settingsPanelSidebar__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.sideBarOnClick); // this.buildPluginProps = this.buildPluginProps.bind(this);\n // this.buildThemeProps = this.buildThemeProps.bind(this);\n\n this.showOriginal = this.showOriginal.bind(this);\n }\n\n get root() {\n const _root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#bd-settingspane-container\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root;\n }\n\n injectRoot() {\n let [classNameLayer, classSidebar] = [BDModules.get(e => e.layer && e.animating)[0].layer.split(\" \")[0], BDModules.get(e => e.standardSidebarView)[0]];\n const sidebar = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + classNameLayer + \" .\" + classSidebar.standardSidebarView.split(\" \")[0] + \", .\" + classNameLayer + \" .ui-standard-sidebar-view\");\n if (!sidebar) return false;\n const root = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].createElement(`
`);\n sidebar.append(root);\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].onRemoved(root, () => {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(root);\n });\n return true;\n }\n\n get coreSettings() {\n const settings = this.getSettings(\"core\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get lightcordSettings() {\n const settings = this.getSettings(\"lightcord\");\n const categories = [...new Set(settings.map(s => s.category))];\n const sections = categories.map(c => {\n return {\n title: c,\n settings: settings.filter(s => s.category == c)\n };\n });\n return sections;\n }\n\n get PresenceSettings() {\n return this.getSettings(\"status\");\n }\n\n get MsgLogSettings() {\n return this.getSettings(\"msglog\");\n }\n\n getSettings(category) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === category && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n sideBarOnClick(id) {\n const contentRegion = _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".contentRegion-3nDuYy, .content-region\");\n contentRegion.style.display = \"none\";\n this.root.style.display = \"\";\n\n switch (id) {\n case \"core\":\n this.renderCoreSettings();\n break;\n\n case \"customcss\":\n this.renderCustomCssEditor();\n break;\n\n case \"plugins\":\n case \"themes\":\n this.renderAddonPane(id);\n break;\n\n case \"lightcord\":\n this.renderLightCordSettings();\n break;\n\n case \"status\":\n this.renderPresenceSettings();\n break;\n\n case \"accountinfo\":\n this.renderAccountInfos();\n break;\n }\n }\n\n onClick() {}\n\n onChange(id, checked) {\n this.updateSettings(id, checked);\n }\n\n updateSettings(id, enabled) {\n _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][id] = enabled;\n\n if (id == \"bda-gs-2\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal\");\n }\n\n if (id == \"bda-gs-3\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(document.body, \"bd-minimal-chan\");\n }\n\n if (id == \"bda-gs-1\") {\n if (enabled) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();else _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].removeButton();\n }\n\n if (id == \"bda-gs-4\") {\n if (enabled) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();else _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].stop();\n }\n\n if (id == \"bda-gs-5\") {\n if (enabled) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");else _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].removeClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n }\n\n if (enabled && id == \"bda-gs-6\") _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n\n if (id == \"bda-gs-7\") {\n if (enabled) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();else _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].removeColoredText();\n }\n\n if (id == \"fork-ps-4\") {\n if (enabled) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();else _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].stop();\n }\n\n if (id == \"fork-ps-5\") {\n if (enabled) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n } else {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].unwatchContent(\"theme\");\n }\n }\n\n if (id == \"fork-wp-1\") {\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"transparent\", enabled);\n if (enabled) _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", null);else _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].setWindowPreference(\"backgroundColor\", \"#2f3136\");\n }\n\n if (id == \"bda-gs-8\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopDebugListener();\n }\n\n if (id == \"fork-dm-1\") {\n if (enabled) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();else _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].stopCopySelector();\n }\n\n if (id === \"reactDevTools\") {\n if (enabled) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();else _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].stop();\n }\n\n if (id === \"lightcord-1\") {\n if (enabled) window.Lightcord.Settings.devMode = true;else window.Lightcord.Settings.devMode = false;\n }\n\n if (id === \"lightcord-2\") {\n if (enabled) window.Lightcord.Settings.callRingingBeat = true;else window.Lightcord.Settings.callRingingBeat = false;\n }\n\n if (id === \"lightcord-presence-1\") {\n if (enabled) {\n _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n const settingsStore = BDModules.get(e => e.default && typeof e.default === \"object\" && \"showCurrentGame\" in e.default)[0];\n\n if (settingsStore && !settingsStore.default.showCurrentGame) {\n BDModules.get(e => e.default && e.default.updateRemoteSettings)[0].default.updateRemoteSettings({\n showCurrentGame: true\n });\n }\n } else _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].disable();\n }\n\n if (id === \"lightcord-3\") {\n if (enabled) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);else electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(false);\n }\n\n if (id === \"lightcord-4\") {\n if (enabled) {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n } else {\n _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].disable();\n }\n }\n\n if (id === \"lightcord-6\") {\n if (enabled) {\n _blurPrivate__WEBPACK_IMPORTED_MODULE_26__[\"default\"].enable();\n } else {\n _blurPrivate__WEBPACK_IMPORTED_MODULE_26__[\"default\"].disable();\n }\n }\n\n this.saveSettings();\n }\n\n async initializeSettings() {\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"].reactDevTools) _reactDevTools__WEBPACK_IMPORTED_MODULE_9__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-2\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-3\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(document.body, \"bd-minimal-chan\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-1\"]) _publicServers__WEBPACK_IMPORTED_MODULE_11__[\"default\"].addButton();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-4\"]) _voiceMode__WEBPACK_IMPORTED_MODULE_12__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-5\"]) _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addClass(_domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\"#app-mount\"), \"bda-dark\");\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-6\"]) _24hour__WEBPACK_IMPORTED_MODULE_8__[\"default\"].inject24Hour();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-7\"]) _coloredText__WEBPACK_IMPORTED_MODULE_7__[\"default\"].injectColoredText();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-4\"]) _classNormalizer__WEBPACK_IMPORTED_MODULE_13__[\"default\"].start();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-1\"]) window.Lightcord.Settings.devMode = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-2\"]) window.Lightcord.Settings.callRingingBeat = true;\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-presence-1\"]) _CustomRichPresence__WEBPACK_IMPORTED_MODULE_22__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-3\"]) electron__WEBPACK_IMPORTED_MODULE_24__[\"remote\"].getCurrentWindow().setAlwaysOnTop(true);\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-4\"]) _AntiAdDM__WEBPACK_IMPORTED_MODULE_25__[\"default\"].enable();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"lightcord-6\"]) _blurPrivate__WEBPACK_IMPORTED_MODULE_26__[\"default\"].enable();\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-ps-5\"]) {\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"plugin\");\n _contentManager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].watchContent(\"theme\");\n }\n\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"bda-gs-8\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startDebugListener();\n if (_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"][\"fork-dm-1\"]) _devMode__WEBPACK_IMPORTED_MODULE_14__[\"default\"].startCopySelector();\n this.saveSettings();\n }\n\n saveSettings() {\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"settings\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"]);\n _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setSettingGroup(\"rpc\", _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"]);\n }\n\n loadSettings() {\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsCookie\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"settings\"));\n Object.assign(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settingsRPC\"], _dataStore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSettingGroup(\"rpc\"));\n }\n\n showOriginal() {\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.unmountComponentAtNode(this.root);\n this.root.style.display = \"none\";\n _domtools__WEBPACK_IMPORTED_MODULE_10__[\"default\"].query(\".\" + BDModules.get(e => e.contentRegion)[0].contentRegion.split(\" \")[0] + \", .content-region\").style.display = \"\";\n }\n\n renderSidebar() {\n const tabs = document.querySelectorAll(\"[class*='side-'] > [class*='item-']\");\n\n for (const element of tabs) {\n element.removeEventListener(\"click\", this.showOriginal);\n element.addEventListener(\"click\", this.showOriginal);\n }\n\n this.sidebar.render();\n }\n\n get coreComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"cspanel\",\n onChange: this.onChange,\n sections: this.coreSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get lightcordComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_sectionedSettingsPanel__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n key: \"lspannel\",\n onChange: this.onChange,\n sections: this.lightcordSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get PresenceComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_presenceSettings__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n key: \"lppannel\",\n onChange: this.onChange,\n settings: this.PresenceSettings\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get AccountInfosComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_AccountInfos__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n key: \"lapannel\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n get customCssComponent() {\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_scroller__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n contentColumn: true,\n fade: true,\n dark: true\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_cssEditor__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n key: \"csseditor\"\n }), _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_tools__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n key: \"tools\"\n }));\n }\n\n renderCoreSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.coreComponent, root);\n }\n\n renderLightCordSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.lightcordComponent, root);\n }\n\n renderPresenceSettings() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.PresenceComponent, root);\n }\n\n renderAccountInfos() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.AccountInfosComponent, root);\n }\n\n renderCustomCssEditor() {\n const root = this.root;\n if (!root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(this.customCssComponent, root);\n } // renderAddonPane(type) {\n // const root = this.root;\n // if (!root) return Utils.err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\");\n // BDV2.reactDom.render(this.contentComponent(type), root);\n // }\n\n\n renderAddonPane(type) {\n if (!this.root) return _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].err(\"SettingsPanel\", \"FAILED TO LOCATE ROOT: .layer-3QrUeG .standardSidebarView-3F1I7i\"); // I know this shouldn't be here, but when it isn't,\n // React refuses to change the button when going\n // between plugins and themes page... something\n // to debug later.\n\n class ContentList extends _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.Component {\n constructor(props) {\n super(props);\n this.prefix = this.props.type.replace(\"s\", \"\");\n this.onChange = this.onChange.bind(this);\n }\n\n componentDidMount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].on(`${this.prefix}-unloaded`, this.onChange);\n }\n\n componentWillUnmount() {\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-reloaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-loaded`, this.onChange);\n _bdEvents__WEBPACK_IMPORTED_MODULE_6__[\"default\"].off(`${this.prefix}-unloaded`, this.onChange);\n }\n\n onChange() {\n this.props.onChange(this.props.type);\n }\n\n render() {\n return this.props.children;\n }\n\n }\n\n const originalRender = ContentList.prototype.render;\n Object.defineProperty(ContentList.prototype, \"render\", {\n enumerable: false,\n configurable: false,\n set: function () {\n console.warn(\"Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins\");\n },\n get: () => originalRender\n });\n const list = type === \"plugins\" ? Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdplugins\"]) : Object.values(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bdthemes\"]);\n return _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].reactDom.render(_v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(ContentList, {\n type,\n onChange: this.sideBarOnClick\n }, _v2__WEBPACK_IMPORTED_MODULE_4__[\"default\"].react.createElement(_ui_addonlist__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n type,\n list\n })), this.root);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQmV0dGVyRGlzY29yZC8uL3NyYy9tb2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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/settingsPanel.js\n")},"./src/modules/settingsPanelSidebar.js":/*!*********************************************!*\ !*** ./src/modules/settingsPanelSidebar.js ***! \*********************************************/ /*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return V2_SettingsPanel_Sidebar; });\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./src/modules/utils.js\");\n/* harmony import */ var _v2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./v2 */ \"./src/modules/v2.js\");\n/* harmony import */ var _domtools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./domtools */ \"./src/modules/domtools.js\");\n/* harmony import */ var _ui_sidebar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/sidebar */ \"./src/ui/sidebar.js\");\n/* harmony import */ var _ui_icons_history__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/icons/history */ \"./src/ui/icons/history.jsx\");\n/* harmony import */ var _ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ui/tooltipWrap */ \"./src/ui/tooltipWrap.js\");\n\n\n\n\n\n\n\nclass V2_SettingsPanel_Sidebar {\n constructor(onClick) {\n this.onClick = onClick;\n }\n\n get items() {\n return [{\n text: \"Lightcord Settings\",\n id: \"lightcord\"\n }, {\n text: \"BetterDiscord Settings\",\n id: \"core\"\n }, {\n text: \"Plugins\",\n id: \"plugins\"\n }, {\n text: \"Themes\",\n id: \"themes\"\n }, {\n text: \"Custom CSS\",\n id: \"customcss\"\n }, {\n text: \"RichPresence\",\n id: \"status\"\n },\n /*{\r\n text: \"Message Logger\", \r\n id: \"msglog\"\r\n }, */\n {\n text: \"Account Info\",\n id: \"accountinfo\"\n }];\n }\n\n get component() {\n //\n const changelogButton = _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_ui_tooltipWrap__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n color: \"black\",\n side: \"top\",\n text: \"Changelog\"\n }, _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"div\", {\n className: \"bd-changelog-button\",\n onClick: () => {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].showChangelogModal(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"bbdChangelog\"]);\n }\n }, _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_ui_icons_history__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n className: \"bd-icon\",\n size: \"16px\"\n })));\n return _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(\"span\", null, _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].react.createElement(_ui_sidebar__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n onClick: this.onClick,\n headerText: \"Bandaged BD\",\n headerButton: changelogButton,\n items: this.items\n }));\n }\n\n get root() {\n const _root = _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].query(\"#bd-settings-sidebar\");\n\n if (!_root) {\n if (!this.injectRoot()) return null;\n return this.root;\n }\n\n return _root;\n }\n\n injectRoot() {\n const tabs = _domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].queryAll(\"[class*='side-'] > [class*='item-']:not([class*=Danger])\");\n const changeLog = tabs[tabs.length - 1];\n if (!changeLog) return false;\n changeLog.parentElement.insertBefore(_domtools__WEBPACK_IMPORTED_MODULE_3__[\"default\"].createElement(`
`), changeLog.previousElementSibling);\n return true;\n }\n\n render() {\n const root = this.root;\n\n if (!root) {\n console.log(\"FAILED TO LOCATE ROOT: [class*='side-'] > [class*='item-']:not([class*=Danger])\");\n return;\n }\n\n _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactDom.render(this.component, root);\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].onRemoved(root, () => {\n _v2__WEBPACK_IMPORTED_MODULE_2__[\"default\"].reactDom.unmountComponentAtNode(root);\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsU2lkZWJhci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0JldHRlckRpc2NvcmQvLi9zcmMvbW9kdWxlcy9zZXR0aW5nc1BhbmVsU2lkZWJhci5qcz85ZTA2Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGJiZENoYW5nZWxvZyB9IGZyb20gXCIuLi8wZ2xvYmFsc1wiO1xuaW1wb3J0IFV0aWxzIGZyb20gXCIuL3V0aWxzXCI7XG5pbXBvcnQgQkRWMiBmcm9tIFwiLi92MlwiO1xuaW1wb3J0IERPTSBmcm9tIFwiLi9kb210b29sc1wiO1xuaW1wb3J0IFNpZGVCYXIgZnJvbSBcIi4uL3VpL3NpZGViYXJcIjtcbmltcG9ydCBIaXN0b3J5IGZyb20gXCIuLi91aS9pY29ucy9oaXN0b3J5XCI7XG5pbXBvcnQgVG9vbHRpcFdyYXAgZnJvbSBcIi4uL3VpL3Rvb2x0aXBXcmFwXCI7XG5leHBvcnQgZGV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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/settingsPanelSidebar.js\n")},"./src/modules/themeModule.js":/*!************************************!*\ !*** ./src/modules/themeModule.js ***! diff --git a/BetterDiscordApp/src/0globals.js b/BetterDiscordApp/src/0globals.js index 9edb999..0eace47 100644 --- a/BetterDiscordApp/src/0globals.js +++ b/BetterDiscordApp/src/0globals.js @@ -55,6 +55,7 @@ export const settings = { /** LightCord */ "Disable BetterDiscord": {id: "bd-disable", info: "Disable Betterdiscord (plugins, themes, etc).", implemented: false, hidden: false, cat: "lightcord", category: "Lightcord"}, + "Blur Personnal Informations":{id: "lightcord-6", info: "Blur sensitive informations like email, payment infos and more.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"}, "Calling Ring Beat": {id: "lightcord-2", info: "Enable Discord's special calling beat.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"}, "Developer Options": {id: "lightcord-1", info: "Enable Discord's Internal Developer Options. This allow the \"Experiments\" tab and the \"Developer Options\" tab. (must close and reopen settings)", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"}, "Ad Block": {id: "lightcord-4", info: "Block any BOT that dm you with an invite link. Even in an embed.", implemented: true, hidden: false, cat: "lightcord", category: "Lightcord"}, @@ -105,7 +106,8 @@ export const defaultCookie = { "lightcord-presence-1": false, "lightcord-3": false, "lightcord-4": false, - "lightcord-5": true + "lightcord-5": true, + "lightcord-6": true }; diff --git a/BetterDiscordApp/src/modules/AntiAdDM.js b/BetterDiscordApp/src/modules/AntiAdDM.js index f6056fc..692ccb8 100644 --- a/BetterDiscordApp/src/modules/AntiAdDM.js +++ b/BetterDiscordApp/src/modules/AntiAdDM.js @@ -7,6 +7,12 @@ let DMModule = BDModules.get(e => e.default && e.default.closePrivateChannel)[0] const blocked = {} +let userModule = BDModules.get(e => e.default && e.default.getCurrentUser)[0] +function getCurrentUser(){ + if(userModule)return userModule.default.getCurrentUser() + return null +} + export default new class AntiBotDM { constructor(){ this.antiDM = this.antiDM.bind(this) @@ -29,6 +35,7 @@ export default new class AntiBotDM { antiDM(ev){ if(!ev.message.author.bot)return + if(ev.message.author.id === getCurrentUser().id) if(ev.message.guild_id)return const channel = ChannelModule.getChannel(ev.message.channel_id) diff --git a/BetterDiscordApp/src/modules/blurPrivate.js b/BetterDiscordApp/src/modules/blurPrivate.js new file mode 100644 index 0000000..fd42681 --- /dev/null +++ b/BetterDiscordApp/src/modules/blurPrivate.js @@ -0,0 +1,53 @@ +/** + * Credits to @hellbound1337 on github for the css + */ + +import DOMTools from "./domtools" + +let selectors +function getSelectors(){ + let standardSidebarView = BDModules.get(e => e.standardSidebarView)[0] + if(!standardSidebarView)return null + let defaultClassName = removeDa(standardSidebarView.standardSidebarView) + let selects = [] + selects.push(`#app-mount .${defaultClassName} .payment-info .${removeDa(BDModules.get(e => e.description && typeof e.description === "string" && e.description.includes("formText"))[0].description)}`) + selects.push(`#app-mount .${defaultClassName} .${removeDa(BDModules.get(e => e.paymentSourceRow)[0].paymentSourceRow)} .${removeDa(BDModules.get(e => e.subText && e.descriptionWrapper)[0].subText)}`) + selects.push(`#app-mount .${defaultClassName} .${removeDa(BDModules.get(e => e.userSettingsAccount)[0].userSettingsAccount)} div:nth-child(2)>div:nth-child(2)>.${removeDa(BDModules.get(e => e.viewBody)[0].viewBody)}`) + return selects +} +function removeDa(className){ + if(!className)return className + return className.split(" ").filter(e => !e.startsWith("da-")).join(" ") +} + +export default new class BlurPrivate { + constructor(){ + this.enabled = false + } + + enable(){ + if(this.enabled)return + this.enabled = true + selectors = selectors || getSelectors() + + if(!selectors)console.error(new Error("Couldn't find selectors to blur personnal informations.")) + DOMTools.addStyle("blurPrivate", ` +${selectors[0]}, ${selectors[1]}, ${selectors[2]} { + transition: all 150ms cubic-bezier(.55,.085,.68,.53); + filter: blur(4px); + opacity: .8; +} + +${selectors[0]}:hover, ${selectors[1]}:hover, ${selectors[2]}:hover { + transition: all 150ms cubic-bezier(.55,.09,.68,.53); + filter: none; + opacity: 1; +}`) + } + + disable(){ + if(!this.enabled)return + this.enabled = false + DOMTools.removeStyle("blurPrivate") + } +} \ No newline at end of file diff --git a/BetterDiscordApp/src/modules/settingsPanel.js b/BetterDiscordApp/src/modules/settingsPanel.js index d03e5bb..ad8c6c3 100644 --- a/BetterDiscordApp/src/modules/settingsPanel.js +++ b/BetterDiscordApp/src/modules/settingsPanel.js @@ -26,6 +26,7 @@ import CustomRichPresence from "./CustomRichPresence"; import V2C_AccountInfos from "../ui/AccountInfos"; import { remote } from "electron"; import AntiAdDM from "./AntiAdDM"; +import blurPrivate from "./blurPrivate"; export default new class V2_SettingsPanel { @@ -236,6 +237,13 @@ export default new class V2_SettingsPanel { AntiAdDM.disable() } } + if (id === "lightcord-6") { + if(enabled){ + blurPrivate.enable() + }else{ + blurPrivate.disable() + } + } this.saveSettings(); } @@ -255,6 +263,7 @@ export default new class V2_SettingsPanel { if (settingsCookie["lightcord-presence-1"]) CustomRichPresence.enable() if (settingsCookie["lightcord-3"]) remote.getCurrentWindow().setAlwaysOnTop(true) if (settingsCookie["lightcord-4"]) AntiAdDM.enable() + if (settingsCookie["lightcord-6"]) blurPrivate.enable() if (settingsCookie["fork-ps-5"]) { ContentManager.watchContent("plugin"); diff --git a/modules/discord_desktop_core/core/app/BetterDiscord/index.js b/modules/discord_desktop_core/core/app/BetterDiscord/index.js index 71e20e9..617316b 100644 --- a/modules/discord_desktop_core/core/app/BetterDiscord/index.js +++ b/modules/discord_desktop_core/core/app/BetterDiscord/index.js @@ -277,10 +277,9 @@ async function privateInit(){ data.user.premium = true data.user.premium_type = 1 data.user.email = data.user.email || uuid()+"@lightcord.xyz" // filler email, not a real one - data.experiments = data.experiments ||[] + data.experiments = data.experiments || [] data.guild_experiments = data.guild_experiments || []; data.connected_accounts = data.connected_accounts || []; - data.user_guild_settings = data.user_guild_settings || []; data.relationships = data.relationships || []; data.notes = data.notes || {}; data.user_feed_settings = data.user_feed_settings || []; @@ -787,7 +786,7 @@ require.extensions[".css"] = (m, filename) => { let content = fs.readFileSync(filename, "binary") let style = document.createElement("style") style.id = btoa(filename) - style.innerText = content + style.innerHTML = content document.head.appendChild(style) m.exports = { id: style.id, diff --git a/modules/discord_desktop_core/core/app/discord_native/remoteApp.js b/modules/discord_desktop_core/core/app/discord_native/remoteApp.js index 58e87e2..a6e5dfd 100644 --- a/modules/discord_desktop_core/core/app/discord_native/remoteApp.js +++ b/modules/discord_desktop_core/core/app/discord_native/remoteApp.js @@ -5,7 +5,8 @@ const moduleUpdater = electron.remote.getGlobal('moduleUpdater'); const remoteApp = electron.remote.app; function getVersion() { - return remoteApp.getVersion(); + // Hardcoding HostVersion so Discord doesn't detect Lightcord by this + return "0.0.306" //remoteApp.getVersion(); } const allowedAppPaths = new Set(['home', 'appData', 'desktop', 'documents', 'downloads']);