`);\n const cmi = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
`);\n cmi.append(modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
${modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Developer.copySelector}
`));\n cmi.addEventListener(\"click\", () => {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DiscordModules\"].ElectronModule.copy(selector);\n cm.style.display = \"none\";\n });\n cmg.append(cmi);\n cm.append(cmg);\n }\n\n setImmediate(attach);\n }\n\n getSelector(element) {\n if (element.id) return `#${element.id}`;\n const rules = this.getRules(element);\n const latestRule = rules[rules.length - 1];\n if (latestRule) return latestRule.selectorText;else if (element.classList.length) return `.${Array.from(element.classList).join(\".\")}`;\n return `.${Array.from(element.parentElement.classList).join(\".\")}`;\n }\n\n getRules(element, css = element.ownerDocument.styleSheets) {\n //if (window.getMatchedCSSRules) return window.getMatchedCSSRules(element);\n const sheets = [...css].filter(s => !s.href || !s.href.includes(\"BetterDiscordApp\"));\n const rules = sheets.map(s => [...(s.cssRules || [])]).flat();\n const elementRules = rules.filter(r => r && r.selectorText && element.matches(r.selectorText) && r.style.length && r.selectorText.split(\", \").length < 8 && !r.selectorText.split(\", \").includes(\"*\"));\n return elementRules;\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2J1aWx0aW5zL2RldmVsb3Blci9jb3B5c2VsZWN0b3IuanM/ODg5ZSJdLCJuYW1lcyI6WyJEZXZlbG9wZXJNb2RlIiwiQnVpbHRpbiIsIm5hbWUiLCJjYXRlZ29yeSIsImlkIiwic2VsZWN0b3JNb2RlSUQiLCJzZWxlY3Rvck1vZGUiLCJnZXQiLCJjb25zdHJ1Y3RvciIsImNvcHlTZWxlY3Rvckxpc3RlbmVyIiwiYmluZCIsImVuYWJsZWQiLCJkb2N1bWVud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YXAuc3R5bGUudG9wID0gY3R4RXZlbnQuY2xpZW50WSArIFwicHhcIjtcclxuICAgICAgICAgICAgICAgIGNtV3JhcC5zdHlsZS5sZWZ0ID0gY3R4RXZlbnQuY2xpZW50WCArIFwicHhcIjtcclxuICAgICAgICAgICAgICAgIGNtV3JhcC5zdHlsZS56SW5kZXggPSBcIjEwMDJcIjtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHJlbW92ZUNNID0gZnVuY3Rpb24ocmVtb3ZlRXZlbnQpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVtb3ZlRXZlbnQua2V5Q29kZSAmJiByZW1vdmVFdmVudC5rZXlDb2RlICE9PSAyNykgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIGNtV3JhcC5yZW1vdmUoKTtcclxuICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgcmVtb3ZlQ00pO1xyXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoXCJjb250ZXh0bWVudVwiLCByZW1vdmVDTSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihcImtleXVwXCIsIHJlbW92ZUNNKTtcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgcmVtb3ZlQ00pO1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcImNvbnRleHRtZW51XCIsIHJlbW92ZUNNKTtcclxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoXCJrZXl1cFwiLCByZW1vdmVDTSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGNvbnN0IGNtZyA9IERP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gICAgIHJldHVybiBlbGVtZW50UnVsZXM7XHJcbiAgICB9XHJcbn07Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/builtins/developer/copyselector.js\n");
/***/ }),
@@ -191,7 +191,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _str
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _structs_builtin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../structs/builtin */ \"./src/structs/builtin.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/modals */ \"./src/ui/modals.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 extends _structs_builtin__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n get name() {\n return \"ReactDevTools\";\n }\n\n get category() {\n return \"developer\";\n }\n\n get id() {\n return \"reactDevTools\";\n }\n\n initialize() {\n super.initialize();\n this.findExtension();\n }\n\n findExtension() {\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 }\n\n enabled() {\n if (!this.isExtensionInstalled) this.findExtension();\n if (!this.isExtensionInstalled) return _ui_modals__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(\"Extension Not Found\", \"Unable to find the React Developer Tools extension on your PC. Please install the extension on your local Chrome installation.\");\n setImmediate(() => webContents.on(\"devtools-opened\", this.listener));\n if (webContents.isDevToolsOpened()) this.listener();\n }\n\n disabled() {\n webContents.removeListener(\"devtools-opened\", this.listener);\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) this.log(\"Successfully installed react devtools.\");else this.error(\"Couldn't find react devtools in chrome extensions!\");\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2J1aWx0aW5zL2RldmVsb3Blci9yZWFjdGRldnRvb2xzLmpzPzc5MzciXSwibmFtZXMiOlsiZWxlY3Ryb24iLCJyZXF1aXJlIiwiZnMiLCJwYXRoIiwiQnJvd3NlcldpbmRvdyIsInJlbW90ZSIsIndlYkNvbnRlbnRzIiwiZ2V0Q3VycmVudFdlYkNvbnRlbnRzIiwiUmVhY3REZXZUb29scyIsIkJ1aWx0aW4iLCJuYW1lIiwiY2F0ZWdvcnkiLCJpZCIsImluaXRpYWxpemUiLCJmaW5kRXh0ZW5zaW9uIiwiZXh0ZW5zaW9uUGF0aCIsInByb2Nlc3MiLCJwbGF0Zm9ybSIsInJlc29sdmUiLCJlbnYiLCJMT0NBTEFQUERBVEEiLCJIT01FIiwiZXhpc3RzU3luYyIsInZlcnNpb25zIiwicmVhZGRpclN5bmMiLCJsZW5ndGgiLCJpc0V4dGVuc2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ZW5zaW9uUGF0aCk7XHJcblxyXG4gICAgICAgIGlmIChkaWRJbnN0YWxsKSB0aGlzLmxvZyhcIlN1Y2Nlc3NmdWxseSBpbnN0YWxsZWQgcmVhY3QgZGV2dG9vbHMuXCIpO1xyXG4gICAgICAgIGVsc2UgdGhpcy5lcnJvcihcIkNvdWxkbid0IGZpbmQgcmVhY3QgZGV2dG9vbHMgaW4gY2hyb21lIGV4dGVuc2lvbnMhXCIpO1xyXG4gICAgfVxyXG59OyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/builtins/developer/reactdevtools.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _structs_builtin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../structs/builtin */ \"./src/structs/builtin.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n\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 extends _structs_builtin__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n get name() {\n return \"ReactDevTools\";\n }\n\n get category() {\n return \"developer\";\n }\n\n get id() {\n return \"reactDevTools\";\n }\n\n initialize() {\n super.initialize();\n this.findExtension();\n }\n\n findExtension() {\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 }\n\n enabled() {\n if (!this.isExtensionInstalled) this.findExtension();\n if (!this.isExtensionInstalled) return _ui_modals__WEBPACK_IMPORTED_MODULE_1__[\"default\"].alert(modules__WEBPACK_IMPORTED_MODULE_2__[\"Strings\"].ReactDevTools.notFound, modules__WEBPACK_IMPORTED_MODULE_2__[\"Strings\"].ReactDevTools.notFoundDetails);\n setImmediate(() => webContents.on(\"devtools-opened\", this.listener));\n if (webContents.isDevToolsOpened()) this.listener();\n }\n\n disabled() {\n webContents.removeListener(\"devtools-opened\", this.listener);\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) this.log(\"Successfully installed react devtools.\");else this.error(\"Couldn't find react devtools in chrome extensions!\");\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2J1aWx0aW5zL2RldmVsb3Blci9yZWFjdGRldnRvb2xzLmpzPzc5MzciXSwibmFtZXMiOlsiZWxlY3Ryb24iLCJyZXF1aXJlIiwiZnMiLCJwYXRoIiwiQnJvd3NlcldpbmRvdyIsInJlbW90ZSIsIndlYkNvbnRlbnRzIiwiZ2V0Q3VycmVudFdlYkNvbnRlbnRzIiwiUmVhY3REZXZUb29scyIsIkJ1aWx0aW4iLCJuYW1lIiwiY2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gICAgfVxyXG5cclxuICAgIGxpc3RlbmVyKCkge1xyXG4gICAgICAgIGlmICghdGhpcy5pc0V4dGVuc2lvbkluc3RhbGxlZCkgcmV0dXJuO1xyXG4gICAgICAgIEJyb3dzZXJXaW5kb3cucmVtb3ZlRGV2VG9vbHNFeHRlbnNpb24oXCJSZWFjdCBEZXZlbG9wZXIgVG9vbHNcIik7XHJcbiAgICAgICAgY29uc3QgZGlkSW5zdGFsbCA9IEJyb3dzZXJXaW5kb3cuYWRkRGV2VG9vbHNFeHRlbnNpb24odGhpcy5leHRlbnNpb25QYXRoKTtcclxuXHJcbiAgICAgICAgaWYgKGRpZEluc3RhbGwpIHRoaXMubG9nKFwiU3VjY2Vzc2Z1bGx5IGluc3RhbGxlZCByZWFjdCBkZXZ0b29scy5cIik7XHJcbiAgICAgICAgZWxzZSB0aGlzLmVycm9yKFwiQ291bGRuJ3QgZmluZCByZWFjdCBkZXZ0b29scyBpbiBjaHJvbWUgZXh0ZW5zaW9ucyFcIik7XHJcbiAgICB9XHJcbn07Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/builtins/developer/reactdevtools.js\n");
/***/ }),
@@ -203,7 +203,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _str
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _structs_builtin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../structs/builtin */ \"./src/structs/builtin.js\");\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _emotes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emotes */ \"./src/builtins/emotes/emotes.js\");\n\n\n\n\nconst headerHTML = `
\n Twitch \n Favourite \n Emojis\n
`;\nconst twitchEmoteHTML = `
`;\nconst favoritesHTML = `
`;\n\nconst makeEmote = (emote, url, options = {}) => {\n const {\n onContextMenu,\n onClick\n } = options;\n const emoteContainer = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
\n
\n
`);\n if (onContextMenu) emoteContainer.addEventListener(\"contextmenu\", onContextMenu);\n emoteContainer.addEventListener(\"click\", onClick);\n return emoteContainer;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class EmoteMenu extends _structs_builtin__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n get name() {\n return \"EmoteMenu\";\n }\n\n get collection() {\n return \"emotes\";\n }\n\n get category() {\n return \"general\";\n }\n\n get id() {\n return \"emoteMenu\";\n }\n\n get hideEmojisID() {\n return \"hideEmojiMenu\";\n }\n\n get hideEmojis() {\n return this.get(this.hideEmojisID);\n }\n\n constructor() {\n super();\n this.lastTab = \"bd-qem-emojis\";\n this.qmeHeader = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(headerHTML);\n\n for (const button of this.qmeHeader.getElementsByTagName(\"button\")) button.addEventListener(\"click\", this.switchMenu.bind(this));\n\n this.teContainer = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(twitchEmoteHTML);\n this.teContainerInner = this.teContainer.querySelector(\".emote-menu-inner\");\n this.faContainer = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(favoritesHTML);\n this.faContainerInner = this.faContainer.querySelector(\".emote-menu-inner\");\n this.observer = new MutationObserver(mutations => {\n for (const mutation of mutations) this.observe(mutation);\n });\n this.enableHideEmojis = this.enableHideEmojis.bind(this);\n this.disableHideEmojis = this.disableHideEmojis.bind(this);\n this.updateTwitchEmotes = this.updateTwitchEmotes.bind(this);\n }\n\n async enabled() {\n return _ui_modals__WEBPACK_IMPORTED_MODULE_2__[\"default\"].alert(\"Emote Menu Broken\", \"Emote Menu is currently broken, it is recommended to disable this until it is fixed.\"); // this.log(\"Starting to observe\");\n // this.observer.observe(document.getElementById(\"app-mount\"), {\n // childList: true,\n // subtree: true\n // });\n // this.hideEmojiCancel = this.registerSetting(this.hideEmojisID, this.enableHideEmojis, this.disableHideEmojis);\n // if (this.hideEmojis) this.enableHideEmojis();\n // if (EmoteModule.emotesLoaded) this.updateTwitchEmotes();\n // this.updateFavorites();\n // Events.on(\"emotes-loaded\", this.updateTwitchEmotes);\n }\n\n disabled() {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"Events\"].off(\"emotes-loaded\", this.updateTwitchEmotes);\n this.observer.disconnect();\n this.disableHideEmojis();\n if (this.hideEmojiCancel) this.hideEmojiCancel();\n }\n\n enableHideEmojis() {\n const picker = document.querySelector(\".emojiPicker-3m1S-j\");\n if (picker) picker.classList.add(\"bd-qme-hidden\");\n }\n\n disableHideEmojis() {\n const picker = document.querySelector(\".emojiPicker-3m1S-j\");\n if (picker) picker.classList.remove(\"bd-qme-hidden\");\n }\n\n insertEmote(emote) {\n const ta = modules__WEBPACK_IMPORTED_MODULE_1__[\"Utilities\"].getTextArea();\n modules__WEBPACK_IMPORTED_MODULE_1__[\"Utilities\"].insertText(ta[0], ta.val().slice(-1) == \" \" ? ta.val() + emote : ta.val() + \" \" + emote);\n }\n\n favContext(e) {\n e.stopPropagation();\n const em = e.target.closest(\".emote-container\").children[0];\n const menu = $(``);\n menu.css({\n top: e.pageY - $(\"#bd-qem-favourite-container\").offset().top,\n left: e.pageX - $(\"#bd-qem-favourite-container\").offset().left\n });\n $(em).parent().append(menu);\n menu.on(\"click\", event => {\n event.preventDefault();\n event.stopPropagation();\n $(em).remove();\n _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].removeFavorite($(em).attr(\"title\"));\n this.updateFavorites();\n $(document).off(\"mousedown.emotemenu\");\n });\n $(document).on(\"mousedown.emotemenu\", function (event) {\n if (event.target.id == \"removemenu\") return;\n $(\"#removemenu\").remove();\n $(document).off(\"mousedown.emotemenu\");\n });\n }\n\n switchMenu(e) {\n let id = typeof e == \"string\" ? e : e.target.id;\n if (id == \"bd-qem-emojis\" && this.hideEmojis) id = \"bd-qem-favourite\";\n const twitch = $(\"#bd-qem-twitch\");\n const fav = $(\"#bd-qem-favourite\");\n const emojis = $(\"#bd-qem-emojis\");\n twitch.removeClass(\"active\");\n fav.removeClass(\"active\");\n emojis.removeClass(\"active\");\n $(\".emojiPicker-3m1S-j\").hide();\n $(\"#bd-qem-favourite-container\").hide();\n $(\"#bd-qem-twitch-container\").hide();\n\n switch (id) {\n case \"bd-qem-twitch\":\n twitch.addClass(\"active\");\n $(\"#bd-qem-twitch-container\").show();\n break;\n\n case \"bd-qem-favourite\":\n fav.addClass(\"active\");\n $(\"#bd-qem-favourite-container\").show();\n break;\n\n case \"bd-qem-emojis\":\n emojis.addClass(\"active\");\n $(\".emojiPicker-3m1S-j\").show();\n $(\".emojiPicker-3m1S-j input\").focus();\n break;\n }\n\n if (id) this.lastTab = id;\n }\n\n observe(mutation) {\n if (!mutation.addedNodes.length || !(mutation.addedNodes[0] instanceof Element)) return;\n const node = mutation.addedNodes[0]; // if (!node.classList.contains(\"popout-2iWAc-\") || node.classList.contains(\"popoutLeft-30WmrD\") || !node.getElementsByClassName(\"emojiPicker-3m1S-j\").length) return;\n\n if (!node.classList.contains(\"layer-v9HyYc\") || !node.getElementsByClassName(\"emojiPicker-3m1S-j\").length || node.querySelector(\".emojiPicker-3m1S-j\").parentElement.classList.contains(\"animatorLeft-1EQxU0\")) return;\n const e = $(node);\n if (this.hideEmojis) e.addClass(\"bd-qme-hidden\");else e.removeClass(\"bd-qme-hidden\");\n e.prepend(this.qmeHeader);\n e.append(this.teContainer);\n e.append(this.faContainer);\n this.switchMenu(this.lastTab);\n }\n\n updateTwitchEmotes() {\n while (this.teContainerInner.firstChild) this.teContainerInner.firstChild.remove();\n\n for (const emote in _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getCategory(\"TwitchGlobal\")) {\n if (!_emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getCategory(\"TwitchGlobal\").hasOwnProperty(emote)) continue;\n const url = _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getUrl(\"TwitchGlobal\", emote);\n const emoteElement = makeEmote(emote, url, {\n onClick: this.insertEmote.bind(this, emote)\n });\n this.teContainerInner.append(emoteElement);\n }\n }\n\n updateFavorites() {\n while (this.faContainerInner.firstChild) this.faContainerInner.firstChild.remove();\n\n for (const emote in _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].favorites) {\n const url = _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].favorites[emote];\n const emoteElement = makeEmote(emote, url, {\n onClick: this.insertEmote.bind(this, emote),\n onContextMenu: this.favContext.bind(this)\n });\n this.faContainerInner.append(emoteElement);\n }\n\n _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].saveFavorites();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2J1aWx0aW5zL2Vtb3Rlcy9lbW90ZW1lbnUuanM/ZjIyZSJdLCJuYW1lcyI6WyJoZWFkZXJIVE1MIiwidHdpdGNoRW1vdGVIVE1MIiwiZmF2b3JpdGVzSFRNTCIsIm1ha2VFbW90ZSIsImVtb3RlIiwidXJsIiwib3B0aW9ucyIsIm9uQ29udGV4dE1lbnUiLCJvbkNsaWNrIiwiZW1vdGVDb250YWluZXIiLCJET00iLCJjcmVhdGVFbGVtZW50IiwiYWRkRXZlbnRMaXN0ZW5lciIsIkVtb3RlTWVudSIsIkJ1aWx0aW4iLCJuYW1lIiwiY29sbGVjdGlvbiIsImNhdGVnb3J5IiwiaWQiLCJoaWRlRW1vamlzSUQiLCJoaWRlRW1vamlzIiwiZ2V0IiwiY29uc3RydWN0b3IiLCJsYXN0VGFiIiwicW1lSGVhZGV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CI+UmVtb3ZlPC9kaXY+YCk7XHJcbiAgICAgICAgbWVudS5jc3Moe1xyXG4gICAgICAgICAgICB0b3A6IGUucGFnZVkgLSAkKFwiI2JkLXFlbS1mYXZvdXJpdGUtY29udGFpbmVyXCIpLm9mZnNldCgpLnRvcCxcclxuICAgICAgICAgICAgbGVmdDogZS5wYWdlWCAtICQoXCIjYmQtcWVtLWZhdm91cml0ZS1jb250YWluZXJcIikub2Zmc2V0KCkubGVmdFxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgICQoZW0pLnBhcmVudCgpLmFwcGVuZChtZW51KTtcclxuICAgICAgICBtZW51Lm9uKFwiY2xpY2tcIiwgKGV2ZW50KSA9PiB7XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpO1xyXG4gICAgICAgICAgICAkKGVtKS5yZW1vdmUoKTtcclxuICAgICAgICAgICAgRW1vdGVNb2R1bGUucmVtb3ZlRmF2b3JpdGUoJChlbSkuYXR0cihcInRpdGxlXCIpKTtcclxuICAgICAgICAgICAgdGhpcy51cGRhdGVGYXZvcml0ZXMoKTtcclxuICAgICAgICAgICAgJChkb2N1bWVudCkub2ZmKFwibW91c2Vkb3duLmVtb3RlbWVudVwiKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICAkKGRvY3VtZW50KS5vbihcIm1vdXNlZG93bi5lbW90ZW1lbnVcIiwgZnVuY3Rpb24oZXZlbnQpIHtcclxuICAgICAgICAgICAgaWYgKGV2ZW50LnRhcmdldC5pZCA9PSBcInJlbW92ZW1lbnVcIikgcmV0dXJuO1xyXG4gICAgICAgICAgICAkKFwiI3JlbW92ZW1lbnVcIikucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICQoZG9jdW1lbnQpLm9mZihcIm1vdXNlZG93bi5lbW90ZW1lbnVcIik7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4g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CB1cmwgPSBFbW90ZU1vZHVsZS5nZXRVcmwoXCJUd2l0Y2hHbG9iYWxcIiwgZW1vdGUpO1xyXG4gICAgICAgICAgICBjb25zdCBlbW90ZUVsZW1lbnQgPSBtYWtlRW1vdGUoZW1vdGUsIHVybCwge29uQ2xpY2s6IHRoaXMuaW5zZXJ0RW1vdGUuYmluZCh0aGlzLCBlbW90ZSl9KTtcclxuICAgICAgICAgICAgdGhpcy50ZUNvbnRhaW5lcklubmVyLmFwcGVuZChlbW90ZUVsZW1lbnQpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICB1cGRhdGVGYXZvcml0ZXMoKSB7XHJcbiAgICAgICAgd2hpbGUgKHRoaXMuZmFDb250YWluZXJJbm5lci5maXJzdENoaWxkKSB0aGlzLmZhQ29udGFpbmVySW5uZXIuZmlyc3RDaGlsZC5yZW1vdmUoKTtcclxuICAgICAgICBmb3IgKGNvbnN0IGVtb3RlIGluIEVtb3RlTW9kdWxlLmZhdm9yaXRlcykge1xyXG4gICAgICAgICAgICBjb25zdCB1cmwgPSBFbW90ZU1vZHVsZS5mYXZvcml0ZXNbZW1vdGVdO1xyXG4gICAgICAgICAgICBjb25zdCBlbW90ZUVsZW1lbnQgPSBtYWtlRW1vdGUoZW1vdGUsIHVybCwge29uQ2xpY2s6IHRoaXMuaW5zZXJ0RW1vdGUuYmluZCh0aGlzLCBlbW90ZSksIG9uQ29udGV4dE1lbnU6IHRoaXMuZmF2Q29udGV4dC5iaW5kKHRoaXMpfSk7XHJcbiAgICAgICAgICAgIHRoaXMuZmFDb250YWluZXJJbm5lci5hcHBlbmQoZW1vdGVFbGVtZW50KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgRW1vdGVNb2R1bGUuc2F2ZUZhdm9yaXRlcygpO1xyXG4gICAgfVxyXG5cclxufTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/builtins/emotes/emotemenu.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _structs_builtin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../structs/builtin */ \"./src/structs/builtin.js\");\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _emotes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emotes */ \"./src/builtins/emotes/emotes.js\");\n\n\n\n\nconst headerHTML = `
\n Twitch \n Favourite \n Emojis\n
`;\nconst twitchEmoteHTML = `
`;\nconst favoritesHTML = `
`;\n\nconst makeEmote = (emote, url, options = {}) => {\n const {\n onContextMenu,\n onClick\n } = options;\n const emoteContainer = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
\n
\n
`);\n if (onContextMenu) emoteContainer.addEventListener(\"contextmenu\", onContextMenu);\n emoteContainer.addEventListener(\"click\", onClick);\n return emoteContainer;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class EmoteMenu extends _structs_builtin__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n get name() {\n return \"EmoteMenu\";\n }\n\n get collection() {\n return \"emotes\";\n }\n\n get category() {\n return \"general\";\n }\n\n get id() {\n return \"emoteMenu\";\n }\n\n get hideEmojisID() {\n return \"hideEmojiMenu\";\n }\n\n get hideEmojis() {\n return this.get(this.hideEmojisID);\n }\n\n constructor() {\n super();\n this.lastTab = \"bd-qem-emojis\";\n this.qmeHeader = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(headerHTML);\n\n for (const button of this.qmeHeader.getElementsByTagName(\"button\")) button.addEventListener(\"click\", this.switchMenu.bind(this));\n\n this.teContainer = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(twitchEmoteHTML);\n this.teContainerInner = this.teContainer.querySelector(\".emote-menu-inner\");\n this.faContainer = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(favoritesHTML);\n this.faContainerInner = this.faContainer.querySelector(\".emote-menu-inner\");\n this.observer = new MutationObserver(mutations => {\n for (const mutation of mutations) this.observe(mutation);\n });\n this.enableHideEmojis = this.enableHideEmojis.bind(this);\n this.disableHideEmojis = this.disableHideEmojis.bind(this);\n this.updateTwitchEmotes = this.updateTwitchEmotes.bind(this);\n }\n\n async enabled() {\n // Temporary measure, so not using Strings/translation\n return _ui_modals__WEBPACK_IMPORTED_MODULE_2__[\"default\"].alert(\"Emote Menu Broken\", \"Emote Menu is currently broken, it is recommended to disable this until it is fixed.\"); // this.log(\"Starting to observe\");\n // this.observer.observe(document.getElementById(\"app-mount\"), {\n // childList: true,\n // subtree: true\n // });\n // this.hideEmojiCancel = this.registerSetting(this.hideEmojisID, this.enableHideEmojis, this.disableHideEmojis);\n // if (this.hideEmojis) this.enableHideEmojis();\n // if (EmoteModule.emotesLoaded) this.updateTwitchEmotes();\n // this.updateFavorites();\n // Events.on(\"emotes-loaded\", this.updateTwitchEmotes);\n }\n\n disabled() {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"Events\"].off(\"emotes-loaded\", this.updateTwitchEmotes);\n this.observer.disconnect();\n this.disableHideEmojis();\n if (this.hideEmojiCancel) this.hideEmojiCancel();\n }\n\n enableHideEmojis() {\n const picker = document.querySelector(\".emojiPicker-3m1S-j\");\n if (picker) picker.classList.add(\"bd-qme-hidden\");\n }\n\n disableHideEmojis() {\n const picker = document.querySelector(\".emojiPicker-3m1S-j\");\n if (picker) picker.classList.remove(\"bd-qme-hidden\");\n }\n\n insertEmote(emote) {\n const ta = modules__WEBPACK_IMPORTED_MODULE_1__[\"Utilities\"].getTextArea();\n modules__WEBPACK_IMPORTED_MODULE_1__[\"Utilities\"].insertText(ta[0], ta.val().slice(-1) == \" \" ? ta.val() + emote : ta.val() + \" \" + emote);\n }\n\n favContext(e) {\n e.stopPropagation();\n const em = e.target.closest(\".emote-container\").children[0];\n const menu = $(``);\n menu.css({\n top: e.pageY - $(\"#bd-qem-favourite-container\").offset().top,\n left: e.pageX - $(\"#bd-qem-favourite-container\").offset().left\n });\n $(em).parent().append(menu);\n menu.on(\"click\", event => {\n event.preventDefault();\n event.stopPropagation();\n $(em).remove();\n _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].removeFavorite($(em).attr(\"title\"));\n this.updateFavorites();\n $(document).off(\"mousedown.emotemenu\");\n });\n $(document).on(\"mousedown.emotemenu\", function (event) {\n if (event.target.id == \"removemenu\") return;\n $(\"#removemenu\").remove();\n $(document).off(\"mousedown.emotemenu\");\n });\n }\n\n switchMenu(e) {\n let id = typeof e == \"string\" ? e : e.target.id;\n if (id == \"bd-qem-emojis\" && this.hideEmojis) id = \"bd-qem-favourite\";\n const twitch = $(\"#bd-qem-twitch\");\n const fav = $(\"#bd-qem-favourite\");\n const emojis = $(\"#bd-qem-emojis\");\n twitch.removeClass(\"active\");\n fav.removeClass(\"active\");\n emojis.removeClass(\"active\");\n $(\".emojiPicker-3m1S-j\").hide();\n $(\"#bd-qem-favourite-container\").hide();\n $(\"#bd-qem-twitch-container\").hide();\n\n switch (id) {\n case \"bd-qem-twitch\":\n twitch.addClass(\"active\");\n $(\"#bd-qem-twitch-container\").show();\n break;\n\n case \"bd-qem-favourite\":\n fav.addClass(\"active\");\n $(\"#bd-qem-favourite-container\").show();\n break;\n\n case \"bd-qem-emojis\":\n emojis.addClass(\"active\");\n $(\".emojiPicker-3m1S-j\").show();\n $(\".emojiPicker-3m1S-j input\").focus();\n break;\n }\n\n if (id) this.lastTab = id;\n }\n\n observe(mutation) {\n if (!mutation.addedNodes.length || !(mutation.addedNodes[0] instanceof Element)) return;\n const node = mutation.addedNodes[0]; // if (!node.classList.contains(\"popout-2iWAc-\") || node.classList.contains(\"popoutLeft-30WmrD\") || !node.getElementsByClassName(\"emojiPicker-3m1S-j\").length) return;\n\n if (!node.classList.contains(\"layer-v9HyYc\") || !node.getElementsByClassName(\"emojiPicker-3m1S-j\").length || node.querySelector(\".emojiPicker-3m1S-j\").parentElement.classList.contains(\"animatorLeft-1EQxU0\")) return;\n const e = $(node);\n if (this.hideEmojis) e.addClass(\"bd-qme-hidden\");else e.removeClass(\"bd-qme-hidden\");\n e.prepend(this.qmeHeader);\n e.append(this.teContainer);\n e.append(this.faContainer);\n this.switchMenu(this.lastTab);\n }\n\n updateTwitchEmotes() {\n while (this.teContainerInner.firstChild) this.teContainerInner.firstChild.remove();\n\n for (const emote in _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getCategory(\"TwitchGlobal\")) {\n if (!_emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getCategory(\"TwitchGlobal\").hasOwnProperty(emote)) continue;\n const url = _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getUrl(\"TwitchGlobal\", emote);\n const emoteElement = makeEmote(emote, url, {\n onClick: this.insertEmote.bind(this, emote)\n });\n this.teContainerInner.append(emoteElement);\n }\n }\n\n updateFavorites() {\n while (this.faContainerInner.firstChild) this.faContainerInner.firstChild.remove();\n\n for (const emote in _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].favorites) {\n const url = _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].favorites[emote];\n const emoteElement = makeEmote(emote, url, {\n onClick: this.insertEmote.bind(this, emote),\n onContextMenu: this.favContext.bind(this)\n });\n this.faContainerInner.append(emoteElement);\n }\n\n _emotes__WEBPACK_IMPORTED_MODULE_3__[\"default\"].saveFavorites();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2J1aWx0aW5zL2Vtb3Rlcy9lbW90ZW1lbnUuanM/ZjIyZSJdLCJuYW1lcyI6WyJoZWFkZXJIVE1MIiwidHdpdGNoRW1vdGVIVE1MIiwiZ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gICAgICAgJChcIiNiZC1xZW0tdHdpdGNoLWNvbnRhaW5lclwiKS5oaWRlKCk7XHJcblxyXG4gICAgICAgIHN3aXRjaCAoaWQpIHtcclxuICAgICAgICAgICAgY2FzZSBcImJkLXFlbS10d2l0Y2hcIjpcclxuICAgICAgICAgICAgICAgIHR3aXRjaC5hZGRDbGFzcyhcImFjdGl2ZVwiKTtcclxuICAgICAgICAgICAgICAgICQoXCIjYmQtcWVtLXR3aXRjaC1jb250YWluZXJcIikuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgXCJiZC1xZW0tZmF2b3VyaXRlXCI6XHJcbiAgICAgICAgICAgICAgICBmYXYuYWRkQ2xhc3MoXCJhY3RpdmVcIik7XHJcbiAgICAgICAgICAgICAgICAkKFwiI2JkLXFlbS1mYXZvdXJpdGUtY29udGFpbmVyXCIpLnNob3coKTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIFwiYmQtcWVtLWVtb2ppc1wiOlxyXG4gICAgICAgICAgICAgICAgZW1vamlzLmFkZENsYXNzKFwiYWN0aXZlXCIpO1xyXG4gICAgICAgICAgICAgICAgJChcIi5lbW9qaVBpY2tlci0zbTFTLWpcIikuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgJChcIi5lbW9qaVBpY2tlci0zbTFTLWogaW5wdXRcIikuZm9jdXMoKTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoaWQpIHRoaXMubGFzdFRhYiA9IGlkO1xyXG4gICAgfVxyXG5cclxuICAgIG9ic2VydmUobXV0YXRpb24pIHtcclxuICAgICAgICBpZiAoIW11dGF0aW9uLmFkZGVkTm9kZXMubGVuZ3RoIHx8ICEobXV0YXRpb24uYWRkZWROb2Rlc1swXSBpbnN0YW5jZW9mIEVsZW1lbnQpKSByZXR1cm47XHJcbiAgICAgICAgY29uc3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iaW5kKHRoaXMsIGVtb3RlKSwgb25Db250ZXh0TWVudTogdGhpcy5mYXZDb250ZXh0LmJpbmQodGhpcyl9KTtcclxuICAgICAgICAgICAgdGhpcy5mYUNvbnRhaW5lcklubmVyLmFwcGVuZChlbW90ZUVsZW1lbnQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBFbW90ZU1vZHVsZS5zYXZlRmF2b3JpdGVzKCk7XHJcbiAgICB9XHJcblxyXG59OyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/builtins/emotes/emotemenu.js\n");
/***/ }),
@@ -347,7 +347,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n Panels: {\n plugins: \"Plugins\",\n themes: \"Themes\",\n customcss: \"Custom CSS\"\n },\n Collections: {\n settings: {\n name: \"Settings\",\n general: {\n name: \"General\",\n emotes: {\n name: \"Emote System\",\n note: \"Enables BD's emote system\"\n },\n publicServers: {\n name: \"Public Servers\",\n note: \"Display public servers button\"\n },\n voiceDisconnect: {\n name: \"Voice Disconnect\",\n note: \"Disconnect from voice server when closing Discord\"\n },\n twentyFourHour: {\n name: \"24-Hour Timestamps\",\n note: \"Hides channels when in minimal mode\"\n },\n classNormalizer: {\n name: \"Normalize Classes\",\n note: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\"\n },\n showToasts: {\n name: \"Show Toasts\",\n note: \"Shows a small notification for important information\"\n }\n },\n appearance: {\n name: \"Appearance\",\n voiceMode: {\n name: \"Voice Mode\",\n note: \"Hides everything that isn't voice chat\"\n },\n minimalMode: {\n name: \"Minimal Mode\",\n note: \"Hide elements and reduce the size of elements\"\n },\n hideChannels: {\n name: \"Hide Channels\",\n note: \"Hides channels when in minimal mode\"\n },\n darkMode: {\n name: \"Dark Mode\",\n note: \"Make certain elements dark by default\"\n },\n coloredText: {\n name: \"Colored Text\",\n note: \"Make text colour the same as role color\"\n }\n },\n addons: {\n name: \"Addon Manager\",\n addonErrors: {\n name: \"Show Addon Errors\",\n note: \"Shows a modal with plugin/theme errors\"\n },\n autoScroll: {\n name: \"Scroll To Settings\",\n note: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\"\n },\n autoReload: {\n name: \"Automatic Loading\",\n note: \"Automatically loads, reloads, and unloads plugins and themes\"\n },\n editAction: {\n name: \"Edit Action\",\n note: \"Where plugins & themes appear when editing\",\n options: {\n detached: \"Detached Window\",\n system: \"System Editor\"\n }\n }\n },\n customcss: {\n name: \"Custom CSS\",\n customcss: {\n name: \"Custom CSS\",\n note: \"Enables the Custom CSS tab\"\n },\n liveUpdate: {\n name: \"Live Update\",\n note: \"Updates the css as you type\"\n },\n startDetached: {\n name: \"Start Detached\",\n note: \"Clicking the Custom CSS tab opens the editor in a separate window\"\n },\n nativeOpen: {\n name: \"Open in Native Editor\",\n note: \"Clicking the Custom CSS tab opens your custom css in your native editor\"\n },\n openAction: {\n name: \"Editor Location\",\n note: \"Where Custom CSS should open by default\",\n options: {\n settings: \"Settings Menu\",\n detached: \"Detached Window\",\n system: \"System Editor\"\n }\n }\n },\n developer: {\n name: \"Developer Settings\",\n debuggerHotkey: {\n name: \"Debugger Hotkey\",\n note: \"Allows activating debugger when pressing F8\"\n },\n copySelector: {\n name: \"Copy Selector\",\n note: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\"\n },\n reactDevTools: {\n name: \"React Developer Tools\",\n note: \"Injects your local installation of React Developer Tools into Discord\"\n }\n },\n window: {\n name: \"Window Preferences\",\n transparency: {\n name: \"Enable Transparency\",\n note: \"Enables the main window to be see-through (requires restart)\"\n },\n frame: {\n name: \"Window Frame\",\n note: \"Adds the native os window frame to the main window\"\n }\n }\n },\n emotes: {\n name: \"Emotes\",\n general: {\n name: \"General\",\n download: {\n name: \"Download Emotes\",\n note: \"Download emotes whenever they are out of date\"\n },\n emoteMenu: {\n name: \"Emote Menu\",\n note: \"Show Twitch/Favourite emotes in emote menu\"\n },\n hideEmojiMenu: {\n name: \"Hide Emoji Menu\",\n note: \"Hides Discord's emoji menu when using emote menu\"\n },\n autoCaps: {\n name: \"Emote Autocapitalization\",\n note: \"Autocapitalize emote commands\"\n },\n showNames: {\n name: \"Show Names\",\n note: \"Show emote names on hover\"\n },\n modifiers: {\n name: \"Show Emote Modifiers\",\n note: \"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)\"\n },\n animateOnHover: {\n name: \"Animate On Hover\",\n note: \"Only animate the emote modifiers on hover\"\n }\n },\n categories: {\n name: \"Categories\",\n twitchglobal: {\n name: \"Twitch Globals\",\n note: \"Show Twitch global emotes\"\n },\n twitchsubscriber: {\n name: \"Twitch Subscribers\",\n note: \"Show Twitch subscriber emotes\"\n },\n frankerfacez: {\n name: \"FrankerFaceZ\",\n note: \"Show emotes from FFZ\"\n },\n bttv: {\n name: \"BetterTTV\",\n note: \"Show emotes from BTTV\"\n }\n }\n }\n },\n Addons: {\n title: \"{{name}} v{{version}} by {{author}}\",\n openFolder: \"Open {{type}} Folder\",\n reload: \"Reload\",\n addonSettings: \"Settings\",\n website: \"Website\",\n source: \"Source\",\n invite: \"Support Server\",\n donate: \"Donate\",\n patreon: \"Patreon\",\n name: \"Name\",\n author: \"Author\",\n version: \"Version\",\n added: \"Date Added\",\n modified: \"Date Modified\",\n search: \"Search {{type}}\",\n editAddon: \"Edit\",\n deleteAddon: \"Delete\",\n confirmDelete: \"Are you sure you want to delete {{name}}?\",\n confirmationText: \"You have unsaved changes to {{name}}. Closing this window will lose all those changes.\",\n enabled: \"{{name}} has been enabled.\",\n disabled: \"{{name}} has been disabled.\",\n unknownAuthor: \"Unknown Author\",\n noDescription: \"Description not provided.\"\n },\n Emotes: {\n loading: \"Loading emotes in the background do not reload.\",\n loaded: \"All emotes successfully loaded.\",\n clearEmotes: \"Clear Emote Data\",\n favoriteAction: \"Favorite!\"\n },\n CustomCSS: {\n confirmationText: \"You have unsaved changes to your Custom CSS. Closing this window will lose all those changes.\",\n update: \"Update\",\n save: \"Save\",\n openNative: \"Open in System Editor\",\n openDetached: \"Detach Window\",\n settings: \"Editor Settings\",\n editorTitle: \"Custom CSS Editor\"\n },\n PublicServers: {\n button: \"public\",\n join: \"Join\",\n joining: \"Joining\",\n joined: \"Joined\",\n loading: \"Loading\",\n loadMore: \"Load More\",\n notConnected: \"Not connected to DiscordServers.com!\",\n search: \"Search\",\n connect: \"Connect\",\n reconnect: \"Reconnect\",\n categories: \"Categories\",\n connection: \"Connected as: {{username}}#{{discriminator}}\",\n results: \"Showing {{start}}-{{end}} of {{total}} results in {{category}}\",\n query: \"for {{query}}\"\n },\n Modals: {\n confirmAction: \"Are You Sure?\",\n okay: \"Okay\",\n cancel: \"Cancel\",\n close: \"Close\",\n name: \"Name\",\n message: \"Message\",\n error: \"Error\",\n addonErrors: \"Addon Errors\",\n restartRequired: \"Restart Required\",\n restartNow: \"Restart Now\",\n restartLater: \"Restart Later\",\n additionalInfo: \"Additional Info\"\n },\n Sorting: {\n sortBy: \"Sort By\",\n order: \"Order\",\n ascending: \"Ascending\",\n descending: \"Descending\"\n },\n WindowPrefs: {\n enabledInfo: \"This option requires a transparent theme in order to work properly. On Windows this may break your aero snapping and maximizing.\\n\\nIn order to take effect, Discord needs to be restarted. Do you want to restart now?\",\n disabledInfo: \"In order to take effect, Discord needs to be restarted. Do you want to restart now?\"\n },\n Startup: {\n notSupported: \"Not Supported\",\n versionMismatch: \"BandagedBD Injector v{{injector}} is not supported by the latest remote (v{{remote}}).\\n\\nPlease download the latest version from [GitHub](https://github.com/rauenzi/BetterDiscordApp/releases/latest)\",\n incompatibleApp: \"BandagedBD does not work with {{app}}. Please uninstall one of them.\",\n updateNow: \"Update Now\",\n maybeLater: \"Maybe Later\",\n updateAvailable: \"Update Available\",\n updateInfo: \"There is an update available for BandagedBD's Injector ({{version}}).\\n\\nYou can either update and restart now, or later.\",\n updateFailed: \"Could Not Update\",\n manualUpdate: \"Unable to update automatically, please download the installer and reinstall normally.\\n\\n[Download Installer](https://github.com/rauenzi/BetterDiscordApp/releases/latest)\"\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2RhdGEvc3RyaW5ncy5qcz9iYzcxIl0sIm5hbWVzIjpbIlBhbmVscyIsInBsdWdpbnMiLCJ0aGVtZXMiLCJjdXN0b21jc3MiLCJDb2xsZWN0aW9ucyIsInNldHRpbmdzIiwibmFtZSIsImdlbmVyYWwiLCJlbW90ZXMiLCJub3RlIiwicHVibGljU2VydmVycyIsInZvaWNlRGlzY29ubmVjdCIsInR3ZW50eUZvdXJIb3VyIiwiY2xhc3NOb3JtYWxpemVyIiwic2hvd1RvYXN0cyIsImFwcGVhcmFuY2UiLCJ2b2ljZU1vZGUiLCJtaW5pbWFsTW9kZSIsImhpZGVDaGFubmVscyIsImRhcmtNb2RlIiwiY29sb3JlZFRleHQiLCJhZGRvbnMiLCJhZGRvbkVycm9ycyIsImF1dG9TY3JvbGwiLCJhdXRvUmVsb2FkIiwiZWRpdEFjdGlvbiIsIm9wdGlvbnMiLCJkZXRhY2hlZCIsInN5c3RlbSIsImxpdmVVcGRhdGUiLCJzdGFydERldGFjaGVkIiwibmF0aXZlT3BlbiIsIm9wZW5BY3Rpb24iLCJkZXZlbG9wZXIiLCJkZWJ1Z2dlckhvdGtleSIsImNvcHlTZWxlY3RvciIsInJlYWN0RGV2VG9vbHMiLCJ3aW5kb3ciLCJ0cmFuc3BhcmVuY3kiLCJmcmFtZSIsImRvd25sb2FkIiwiZW1vdGVNZW51IiwiaGlkZUVtb2ppTWVudSIsImF1dG9DYXBzIiwic2hvd05hbWVzIiwibW9kaWZpZXJzIiwiYW5pbWF0ZU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gbmFtZTogXCJFbW90ZSBTeXN0ZW1cIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkVuYWJsZXMgQkQncyBlbW90ZSBzeXN0ZW1cIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHB1YmxpY1NlcnZlcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIlB1YmxpYyBTZXJ2ZXJzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJEaXNwbGF5IHB1YmxpYyBzZXJ2ZXJzIGJ1dHRvblwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgdm9pY2VEaXNjb25uZWN0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJWb2ljZSBEaXNjb25uZWN0XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJEaXNjb25uZWN0IGZyb20gdm9pY2Ugc2VydmVyIHdoZW4gY2xvc2luZyBEaXNjb3JkXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB0d2VudHlGb3VySG91cjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiMjQtSG91ciBUaW1lc3RhbXBzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJIaWRlcyBjaGFubmVscyB3aGVuIGluIG1pbmltYWwgbW9kZVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgY2xhc3NOb3JtYWxpemVyOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJOb3JtYWxpemUgQ2xhc3Nlc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiQWRkcyBzdGFibGUgY2xhc3NlcyB0byBlbGVtZW50cyB0byBoZWxwIHRoZW1lcy4gKGUuZy4gYWRkcyAuZGEtY2hhbm5lbHMgdG8gLmNoYW5uZWxzLUllMmw2QSlcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNob3dUb2FzdHM6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIlNob3cgVG9hc3RzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJTaG93cyBhIHNtYWxsIG5vdGlmaWNhdGlvbiBmb3IgaW1wb3J0YW50IGluZm9ybWF0aW9uXCJcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYXBwZWFyYW5jZToge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJBcHBlYXJhbmNlXCIsXHJcbiAgICAgICAgICAgICAgICB2b2ljZU1vZGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIlZvaWNlIE1vZGVcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkhpZGVzIGV2ZXJ5dGhpbmcgdGhhdCBpc24ndCB2b2ljZSBjaGF0XCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBtaW5pbWFsTW9kZToge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiTWluaW1hbCBNb2RlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJIaWRlIGVsZW1lbnRzIGFuZCByZWR1Y2UgdGhlIHNpemUgb2YgZWxlbWVudHNcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGhpZGVDaGFubmVsczoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiSGlkZSBDaGFubmVsc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiSGlkZXMgY2hhbm5lbHMgd2hlbiBpbiBtaW5pbWFsIG1vZGVcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGRhcmtNb2RlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJEYXJrIE1vZGVcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIk1ha2UgY2VydGFpbiBlbGVtZW50cyBkYXJrIGJ5IGRlZmF1bHRcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNvbG9yZWRUZXh0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJDb2xvcmVkIFRleHRcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIk1ha2UgdGV4dCBjb2xvdXIgdGhlIHNhbWUgYXMgcm9sZSBjb2xvclwiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGFkZG9uczoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJBZGRvbiBNYW5hZ2VyXCIsXHJcbiAgICAgICAgICAgICAgICBhZGRvbkVycm9yczoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiU2hvdyBBZGRvbiBFcnJvcnNcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIlNob3dzIGEgbW9kYWwgd2l0aCBwbHVnaW4vdGhlbWUgZXJyb3JzXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBhdXRvU2Nyb2xsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJTY3JvbGwgVG8gU2V0dGluZ3NcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkF1dG8tc2Nyb2xscyB0byBhIHBsdWdpbidzIHNldHRpbmdzIHdoZW4gdGhlIGJ1dHRvbiBpcyBjbGlja2VkIChvbmx5IGlmIG91dCBvZiB2aWV3KVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYXV0b1JlbG9hZDoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiQXV0b21hdGljIExvYWRpbmdcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkF1dG9tYXRpY2FsbHkgbG9hZHMsIHJlbG9hZHMsIGFuZCB1bmxvYWRzIHBsdWdpbnMgYW5kIHRoZW1lc1wiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZWRpdEFjdGlvbjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRWRpdCBBY3Rpb25cIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIldoZXJlIHBsdWdpbnMgJiB0aGVtZXMgYXBwZWFyIHdoZW4gZWRpdGluZ1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWNoZWQ6IFwiRGV0YWNoZWQgV2luZG93XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN5c3RlbTogXCJTeXN0ZW0gRWRpdG9yXCJcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGN1c3RvbWNzczoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJDdXN0b20gQ1NTXCIsXHJcbiAgICAgICAgICAgICAgICBjdXN0b21jc3M6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkN1c3RvbSBDU1NcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkVuYWJsZXMgdGhlIEN1c3RvbSBDU1MgdGFiXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBsaXZlVXBkYXRlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJMaXZlIFVwZGF0ZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiVXBkYXRlcyB0aGUgY3NzIGFzIHlvdSB0eXBlXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBzdGFydERldGFjaGVkOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJTdGFydCBEZXRhY2hlZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiQ2xpY2tpbmcgdGhlIEN1c3RvbSBDU1MgdGFiIG9wZW5zIHRoZSBlZGl0b3IgaW4gYSBzZXBhcmF0ZSB3aW5kb3dcIixcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBuYXRpdmVPcGVuOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJPcGVuIGluIE5hdGl2ZSBFZGl0b3JcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkNsaWNraW5nIHRoZSBDdXN0b20gQ1NTIHRhYiBvcGVucyB5b3VyIGN1c3RvbSBjc3MgaW4geW91ciBuYXRpdmUgZWRpdG9yXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBvcGVuQWN0aW9uOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJFZGl0b3IgTG9jYXRpb25cIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIldoZXJlIEN1c3RvbSBDU1Mgc2hvdWxkIG9wZW4gYnkgZGVmYXVsdFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3M6IFwiU2V0dGluZ3MgTWVudVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXRhY2hlZDogXCJEZXRhY2hlZCBXaW5kb3dcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3lzdGVtOiBcIlN5c3RlbSBFZGl0b3JcIlxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZGV2ZWxvcGVyOiB7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiBcIkRldmVsb3BlciBTZXR0aW5nc1wiLFxyXG4gICAgICAgICAgICAgICAgZGVidWdnZXJIb3RrZXk6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkRlYnVnZ2VyIEhvdGtleVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiQWxsb3dzIGFjdGl2YXRpbmcgZGVidWdnZXIgd2hlbiBwcmVzc2luZyBGOFwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgY29weVNlbGVjdG9yOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJDb3B5IFNlbGVjdG9yXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJBZGRzIGEgXFxcIkNvcHkgU2VsZWN0b3JcXFwiIG9wdGlvbiB0byBjb250ZXh0IG1lbnVzIHdoZW4gZGV2ZWxvcGVyIG1vZGUgaXMgYWN0aXZlXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICByZWFjdERldlRvb2xzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJSZWFjdCBEZXZlbG9wZXIgVG9vbHNcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkluamVjdHMgeW91ciBsb2NhbCBpbnN0YWxsYXRpb24gb2YgUmVhY3QgRGV2ZWxvcGVyIFRvb2xzIGludG8gRGlzY29yZFwiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHdpbmRvdzoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJXaW5kb3cgUHJlZmVyZW5jZXNcIixcclxuICAgICAgICAgICAgICAgIHRyYW5zcGFyZW5jeToge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRW5hYmxlIFRyYW5zcGFyZW5jeVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiRW5hYmxlcyB0aGUgbWFpbiB3aW5kb3cgdG8gYmUgc2VlLXRocm91Z2ggKHJlcXVpcmVzIHJlc3RhcnQpXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmcmFtZToge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiV2luZG93IEZyYW1lXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJBZGRzIHRoZSBuYXRpdmUgb3Mgd2luZG93IGZyYW1lIHRvIHRoZSBtYWluIHdpbmRvd1wiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGVtb3Rlczoge1xyXG4gICAgICAgICAgICBuYW1lOiBcIkVtb3Rlc1wiLFxyXG4gICAgICAgICAgICBnZW5lcmFsOiB7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiBcIkdlbmVyYWxcIixcclxuICAgICAgICAgICAgICAgIGRvd25sb2FkOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJEb3dubG9hZCBFbW90ZXNcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkRvd25sb2FkIGVtb3RlcyB3aGVuZXZlciB0aGV5IGFyZSBvdXQgb2YgZGF0ZVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZW1vdGVNZW51OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJFbW90ZSBNZW51XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJTaG93IFR3aXRjaC9GYXZvdXJpdGUgZW1vdGVzIGluIGVtb3RlIG1lbnVcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGhpZGVFbW9qaU1lbnU6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkhpZGUgRW1vamkgTWVudVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiSGlkZXMgRGlzY29yZCdzIGVtb2ppIG1lbnUgd2hlbiB1c2luZyBlbW90ZSBtZW51XCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBhdXRvQ2Fwczoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRW1vdGUgQXV0b2NhcGl0YWxpemF0aW9uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJBdXRvY2FwaXRhbGl6ZSBlbW90ZSBjb21tYW5kc1wiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2hvd05hbWVzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJTaG93IE5hbWVzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJTaG93IGVtb3RlIG5hbWVzIG9uIGhvdmVyXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBtb2RpZmllcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIlNob3cgRW1vdGUgTW9kaWZpZXJzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJFbmFibGUgZW1vdGUgbW9kcyAoZmxpcCwgc3BpbiwgcHVsc2UsIHNwaW4yLCBzcGluMywgMXNwaW4sIDJzcGluLCAzc3BpbiwgdHIsIGJsLCBiciwgc2hha2UsIHNoYWtlMiwgc2hha2UzLCBmbGFwKVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYW5pbWF0ZU9uSG92ZXI6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkFuaW1hdGUgT24gSG92ZXJcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIk9ubHkgYW5pbWF0ZSB0aGUgZW1vdGUgbW9kaWZpZXJzIG9uIGhvdmVyXCJcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY2F0ZWdvcmllczoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJDYXRlZ29yaWVzXCIsXHJcbiAgICAgICAgICAgICAgICB0d2l0Y2hnbG9iYWw6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIlR3aXRjaCBHbG9iYWxzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJTaG93IFR3aXRjaCBnbG9iYWwgZW1vdGVzXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB0d2l0Y2hzdWJzY3JpYmVyOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJUd2l0Y2ggU3Vic2NyaWJlcnNcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIlNob3cgVHdpdGNoIHN1YnNjcmliZXIgZW1vdGVzXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmcmFua2VyZmFjZXo6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkZyYW5rZXJGYWNlWlwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiU2hvdyBlbW90ZXMgZnJvbSBGRlpcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGJ0dHY6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkJldHRlclRUVlwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiU2hvdyBlbW90ZXMgZnJvbSBCVFRWXCJcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0sXHJcbiAgICBBZGRvbnM6IHtcclxuICAgICAgICB0aXRsZTogXCJ7e25hbWV9fSB2e3t2ZXJzaW9ufX0gYnkge3thdXRob3J9fVwiLFxyXG4gICAg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5cXG5bRG93bmxvYWQgSW5zdGFsbGVyXShodHRwczovL2dpdGh1Yi5jb20vcmF1ZW56aS9CZXR0ZXJEaXNjb3JkQXBwL3JlbGVhc2VzL2xhdGVzdClcIlxyXG4gICAgfVxyXG59O1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/data/strings.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n Panels: {\n plugins: \"Plugins\",\n themes: \"Themes\",\n customcss: \"Custom CSS\"\n },\n Collections: {\n settings: {\n name: \"Settings\",\n general: {\n name: \"General\",\n emotes: {\n name: \"Emote System\",\n note: \"Enables BD's emote system\"\n },\n publicServers: {\n name: \"Public Servers\",\n note: \"Display public servers button\"\n },\n voiceDisconnect: {\n name: \"Voice Disconnect\",\n note: \"Disconnect from voice server when closing Discord\"\n },\n twentyFourHour: {\n name: \"24-Hour Timestamps\",\n note: \"Hides channels when in minimal mode\"\n },\n classNormalizer: {\n name: \"Normalize Classes\",\n note: \"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)\"\n },\n showToasts: {\n name: \"Show Toasts\",\n note: \"Shows a small notification for important information\"\n }\n },\n appearance: {\n name: \"Appearance\",\n voiceMode: {\n name: \"Voice Mode\",\n note: \"Hides everything that isn't voice chat\"\n },\n minimalMode: {\n name: \"Minimal Mode\",\n note: \"Hide elements and reduce the size of elements\"\n },\n hideChannels: {\n name: \"Hide Channels\",\n note: \"Hides channels when in minimal mode\"\n },\n darkMode: {\n name: \"Dark Mode\",\n note: \"Make certain elements dark by default\"\n },\n coloredText: {\n name: \"Colored Text\",\n note: \"Make text colour the same as role color\"\n }\n },\n addons: {\n name: \"Addon Manager\",\n addonErrors: {\n name: \"Show Addon Errors\",\n note: \"Shows a modal with plugin/theme errors\"\n },\n autoScroll: {\n name: \"Scroll To Settings\",\n note: \"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)\"\n },\n autoReload: {\n name: \"Automatic Loading\",\n note: \"Automatically loads, reloads, and unloads plugins and themes\"\n },\n editAction: {\n name: \"Edit Action\",\n note: \"Where plugins & themes appear when editing\",\n options: {\n detached: \"Detached Window\",\n system: \"System Editor\"\n }\n }\n },\n customcss: {\n name: \"Custom CSS\",\n customcss: {\n name: \"Custom CSS\",\n note: \"Enables the Custom CSS tab\"\n },\n liveUpdate: {\n name: \"Live Update\",\n note: \"Updates the css as you type\"\n },\n startDetached: {\n name: \"Start Detached\",\n note: \"Clicking the Custom CSS tab opens the editor in a separate window\"\n },\n nativeOpen: {\n name: \"Open in Native Editor\",\n note: \"Clicking the Custom CSS tab opens your custom css in your native editor\"\n },\n openAction: {\n name: \"Editor Location\",\n note: \"Where Custom CSS should open by default\",\n options: {\n settings: \"Settings Menu\",\n detached: \"Detached Window\",\n system: \"System Editor\"\n }\n }\n },\n developer: {\n name: \"Developer Settings\",\n debuggerHotkey: {\n name: \"Debugger Hotkey\",\n note: \"Allows activating debugger when pressing F8\"\n },\n copySelector: {\n name: \"Copy Selector\",\n note: \"Adds a \\\"Copy Selector\\\" option to context menus when developer mode is active\"\n },\n reactDevTools: {\n name: \"React Developer Tools\",\n note: \"Injects your local installation of React Developer Tools into Discord\"\n }\n },\n window: {\n name: \"Window Preferences\",\n transparency: {\n name: \"Enable Transparency\",\n note: \"Enables the main window to be see-through (requires restart)\"\n },\n frame: {\n name: \"Window Frame\",\n note: \"Adds the native os window frame to the main window\"\n }\n }\n },\n emotes: {\n name: \"Emotes\",\n general: {\n name: \"General\",\n download: {\n name: \"Download Emotes\",\n note: \"Download emotes whenever they are out of date\"\n },\n emoteMenu: {\n name: \"Emote Menu\",\n note: \"Show Twitch/Favourite emotes in emote menu\"\n },\n hideEmojiMenu: {\n name: \"Hide Emoji Menu\",\n note: \"Hides Discord's emoji menu when using emote menu\"\n },\n autoCaps: {\n name: \"Emote Autocapitalization\",\n note: \"Autocapitalize emote commands\"\n },\n showNames: {\n name: \"Show Names\",\n note: \"Show emote names on hover\"\n },\n modifiers: {\n name: \"Show Emote Modifiers\",\n note: \"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)\"\n },\n animateOnHover: {\n name: \"Animate On Hover\",\n note: \"Only animate the emote modifiers on hover\"\n }\n },\n categories: {\n name: \"Categories\",\n twitchglobal: {\n name: \"Twitch Globals\",\n note: \"Show Twitch global emotes\"\n },\n twitchsubscriber: {\n name: \"Twitch Subscribers\",\n note: \"Show Twitch subscriber emotes\"\n },\n frankerfacez: {\n name: \"FrankerFaceZ\",\n note: \"Show emotes from FFZ\"\n },\n bttv: {\n name: \"BetterTTV\",\n note: \"Show emotes from BTTV\"\n }\n }\n }\n },\n Addons: {\n title: \"{{name}} v{{version}} by {{author}}\",\n openFolder: \"Open {{type}} Folder\",\n reload: \"Reload\",\n addonSettings: \"Settings\",\n website: \"Website\",\n source: \"Source\",\n invite: \"Support Server\",\n donate: \"Donate\",\n patreon: \"Patreon\",\n name: \"Name\",\n author: \"Author\",\n version: \"Version\",\n added: \"Date Added\",\n modified: \"Date Modified\",\n search: \"Search {{type}}\",\n editAddon: \"Edit\",\n deleteAddon: \"Delete\",\n confirmDelete: \"Are you sure you want to delete {{name}}?\",\n confirmationText: \"You have unsaved changes to {{name}}. Closing this window will lose all those changes.\",\n enabled: \"{{name}} has been enabled.\",\n disabled: \"{{name}} has been disabled.\",\n couldNotEnable: \"{{name}} could not be enabled.\",\n couldNotDisable: \"{{name}} could not be disabled.\",\n couldNotStart: \"{{name}} could not be started.\",\n couldNotStop: \"{{name}} could not be stopped.\",\n methodError: \"{{method}} could not be fired.\",\n unknownAuthor: \"Unknown Author\",\n noDescription: \"Description not provided.\"\n },\n CustomCSS: {\n confirmationText: \"You have unsaved changes to your Custom CSS. Closing this window will lose all those changes.\",\n update: \"Update\",\n save: \"Save\",\n openNative: \"Open in System Editor\",\n openDetached: \"Detach Window\",\n settings: \"Editor Settings\",\n editorTitle: \"Custom CSS Editor\"\n },\n Developer: {\n copySelector: \"Copy Selector\"\n },\n Emotes: {\n loading: \"Loading emotes in the background do not reload.\",\n loaded: \"All emotes successfully loaded.\",\n clearEmotes: \"Clear Emote Data\",\n favoriteAction: \"Favorite!\"\n },\n PublicServers: {\n button: \"public\",\n join: \"Join\",\n joining: \"Joining\",\n joined: \"Joined\",\n loading: \"Loading\",\n loadMore: \"Load More\",\n notConnected: \"Not connected to DiscordServers.com!\",\n search: \"Search\",\n connect: \"Connect\",\n reconnect: \"Reconnect\",\n categories: \"Categories\",\n connection: \"Connected as: {{username}}#{{discriminator}}\",\n results: \"Showing {{start}}-{{end}} of {{total}} results in {{category}}\",\n query: \"for {{query}}\"\n },\n Modals: {\n confirmAction: \"Are You Sure?\",\n okay: \"Okay\",\n cancel: \"Cancel\",\n close: \"Close\",\n name: \"Name\",\n message: \"Message\",\n error: \"Error\",\n addonErrors: \"Addon Errors\",\n restartRequired: \"Restart Required\",\n restartNow: \"Restart Now\",\n restartLater: \"Restart Later\",\n additionalInfo: \"Additional Info\"\n },\n ReactDevTools: {\n notFound: \"Extension Not Found\",\n notFoundDetails: \"Unable to find the React Developer Tools extension on your PC. Please install the extension on your local Chrome installation.\"\n },\n Sorting: {\n sortBy: \"Sort By\",\n order: \"Order\",\n ascending: \"Ascending\",\n descending: \"Descending\"\n },\n Startup: {\n notSupported: \"Not Supported\",\n versionMismatch: \"BandagedBD Injector v{{injector}} is not supported by the latest remote (v{{remote}}).\\n\\nPlease download the latest version from [GitHub](https://github.com/rauenzi/BetterDiscordApp/releases/latest)\",\n incompatibleApp: \"BandagedBD does not work with {{app}}. Please uninstall one of them.\",\n updateNow: \"Update Now\",\n maybeLater: \"Maybe Later\",\n updateAvailable: \"Update Available\",\n updateInfo: \"There is an update available for BandagedBD's Injector ({{version}}).\\n\\nYou can either update and restart now, or later.\",\n updateFailed: \"Could Not Update\",\n manualUpdate: \"Unable to update automatically, please download the installer and reinstall normally.\\n\\n[Download Installer](https://github.com/rauenzi/BetterDiscordApp/releases/latest)\",\n jqueryFailed: \"jQuery Failed To Load\",\n jqueryFailedDetails: \"jQuery could not be loaded, and some plugins may not work properly. Proceed at your own risk.\"\n },\n WindowPrefs: {\n enabledInfo: \"This option requires a transparent theme in order to work properly. On Windows this may break your aero snapping and maximizing.\\n\\nIn order to take effect, Discord needs to be restarted. Do you want to restart now?\",\n disabledInfo: \"In order to take effect, Discord needs to be restarted. Do you want to restart now?\"\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2RhdGEvc3RyaW5ncy5qcz9iYzcxIl0sIm5hbWVzIjpbIlBhbmVscyIsInBsdWdpbnMiLCJ0aGVtZXMiLCJjdXN0b21jc3MiLCJDb2xsZWN0aW9ucyIsInNldHRpbmdzIiwibmFtZSIsImdlbmVyYWwiLCJlbW90ZXMiLCJub3RlIiwicHVibGljU2VydmVycyIsInZvaWNlRGlzY29ubmVjdCIsInR3ZW50eUZvdXJIb3VyIiwiY2xhc3NOb3JtYWxpemVyIiwic2hvd1RvYXN0cyIsImFwcGVhcmFuY2UiLCJ2b2ljZU1vZGUiLCJtaW5pbWFsTW9kZSIsImhpZGVDaGFubmVscyIsImRhcmtNb2RlIiwiY29sb3JlZFRleHQiLCJhZGRvbnMiLCJhZGRvbkVycm9ycyIsImF1dG9TY3JvbGwiLCJhdXRvUmVsb2FkIiwiZWRpdEFjdGlvbiIsIm9wdGlvbnMiLCJkZXRhY2hlZCIsInN5c3RlbSIsImxpdmVVcGRhdGUiLCJzdGFydERldGFjaGVkIiwibmF0aXZlT3BlbiIsIm9wZW5BY3Rpb24iLCJkZXZlbG9wZXIiLCJkZWJ1Z2dlckhvdGtleSIsImNvcHlTZWxlY3RvciIsInJlYWN0RGV2VG9vbHMiLCJ3aW5kb3ciLCJ0cmFuc3BhcmVuY3kiLCJmcmFtZSIsImRv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4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHZvaWNlRGlzY29ubmVjdDoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiVm9pY2UgRGlzY29ubmVjdFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiRGlzY29ubmVjdCBmcm9tIHZvaWNlIHNlcnZlciB3aGVuIGNsb3NpbmcgRGlzY29yZFwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgdHdlbnR5Rm91ckhvdXI6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIjI0LUhvdXIgVGltZXN0YW1wc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiSGlkZXMgY2hhbm5lbHMgd2hlbiBpbiBtaW5pbWFsIG1vZGVcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNsYXNzTm9ybWFsaXplcjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiTm9ybWFsaXplIENsYXNzZXNcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkFkZHMgc3RhYmxlIGNsYXNzZXMgdG8gZWxlbWVudHMgdG8gaGVscCB0aGVtZXMuIChlLmcuIGFkZHMgLmRhLWNoYW5uZWxzIHRvIC5jaGFubmVscy1JZTJsNkEpXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBzaG93VG9hc3RzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJTaG93IFRvYXN0c1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiU2hvd3MgYSBzbWFsbCBub3RpZmljYXRpb24gZm9yIGltcG9ydGFudCBpbmZvcm1hdGlvblwiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGFwcGVhcmFuY2U6IHtcclxuICAgICAgICAgICAgICAgIG5hbWU6IFwiQXBwZWFyYW5jZVwiLFxyXG4gICAgICAgICAgICAgICAgdm9pY2VNb2RlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJWb2ljZSBNb2RlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJIaWRlcyBldmVyeXRoaW5nIHRoYXQgaXNuJ3Qgdm9pY2UgY2hhdFwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbWluaW1hbE1vZGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIk1pbmltYWwgTW9kZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiSGlkZSBlbGVtZW50cyBhbmQgcmVkdWNlIHRoZSBzaXplIG9mIGVsZW1lbnRzXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBoaWRlQ2hhbm5lbHM6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkhpZGUgQ2hhbm5lbHNcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkhpZGVzIGNoYW5uZWxzIHdoZW4gaW4gbWluaW1hbCBtb2RlXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBkYXJrTW9kZToge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRGFyayBNb2RlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJNYWtlIGNlcnRhaW4gZWxlbWVudHMgZGFyayBieSBkZWZhdWx0XCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBjb2xvcmVkVGV4dDoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiQ29sb3JlZCBUZXh0XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJNYWtlIHRleHQgY29sb3VyIHRoZSBzYW1lIGFzIHJvbGUgY29sb3JcIlxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBhZGRvbnM6IHtcclxuICAgICAgICAgICAgICAgIG5hbWU6IFwiQWRkb24gTWFuYWdlclwiLFxyXG4gICAgICAgICAgICAgICAgYWRkb25FcnJvcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIlNob3cgQWRkb24gRXJyb3JzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJTaG93cyBhIG1vZGFsIHdpdGggcGx1Z2luL3RoZW1lIGVycm9yc1wiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYXV0b1Njcm9sbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiU2Nyb2xsIFRvIFNldHRpbmdzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJBdXRvLXNjcm9sbHMgdG8gYSBwbHVnaW4ncyBzZXR0aW5ncyB3aGVuIHRoZSBidXR0b24gaXMgY2xpY2tlZCAob25seSBpZiBvdXQgb2YgdmlldylcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGF1dG9SZWxvYWQ6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkF1dG9tYXRpYyBMb2FkaW5nXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJBdXRvbWF0aWNhbGx5IGxvYWRzLCByZWxvYWRzLCBhbmQgdW5sb2FkcyBwbHVnaW5zIGFuZCB0aGVtZXNcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGVkaXRBY3Rpb246IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkVkaXQgQWN0aW9uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJXaGVyZSBwbHVnaW5zICYgdGhlbWVzIGFwcGVhciB3aGVuIGVkaXRpbmdcIixcclxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRldGFjaGVkOiBcIkRldGFjaGVkIFdpbmRvd1wiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzeXN0ZW06IFwiU3lzdGVtIEVkaXRvclwiXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBjdXN0b21jc3M6IHtcclxuICAgICAgICAgICAgICAgIG5hbWU6IFwiQ3VzdG9tIENTU1wiLFxyXG4gICAgICAgICAgICAgICAgY3VzdG9tY3NzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJDdXN0b20gQ1NTXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJFbmFibGVzIHRoZSBDdXN0b20gQ1NTIHRhYlwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbGl2ZVVwZGF0ZToge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiTGl2ZSBVcGRhdGVcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIlVwZGF0ZXMgdGhlIGNzcyBhcyB5b3UgdHlwZVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc3RhcnREZXRhY2hlZDoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiU3RhcnQgRGV0YWNoZWRcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkNsaWNraW5nIHRoZSBDdXN0b20gQ1NTIHRhYiBvcGVucyB0aGUgZWRpdG9yIGluIGEgc2VwYXJhdGUgd2luZG93XCIsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbmF0aXZlT3Blbjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiT3BlbiBpbiBOYXRpdmUgRWRpdG9yXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJDbGlja2luZyB0aGUgQ3VzdG9tIENTUyB0YWIgb3BlbnMgeW91ciBjdXN0b20gY3NzIGluIHlvdXIgbmF0aXZlIGVkaXRvclwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgb3BlbkFjdGlvbjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRWRpdG9yIExvY2F0aW9uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJXaGVyZSBDdXN0b20gQ1NTIHNob3VsZCBvcGVuIGJ5IGRlZmF1bHRcIixcclxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmdzOiBcIlNldHRpbmdzIE1lbnVcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWNoZWQ6IFwiRGV0YWNoZWQgV2luZG93XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN5c3RlbTogXCJTeXN0ZW0gRWRpdG9yXCJcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGRldmVsb3Blcjoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJEZXZlbG9wZXIgU2V0dGluZ3NcIixcclxuICAgICAgICAgICAgICAgIGRlYnVnZ2VySG90a2V5OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJEZWJ1Z2dlciBIb3RrZXlcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkFsbG93cyBhY3RpdmF0aW5nIGRlYnVnZ2VyIHdoZW4gcHJlc3NpbmcgRjhcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNvcHlTZWxlY3Rvcjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiQ29weSBTZWxlY3RvclwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiQWRkcyBhIFxcXCJDb3B5IFNlbGVjdG9yXFxcIiBvcHRpb24gdG8gY29udGV4dCBtZW51cyB3aGVuIGRldmVsb3BlciBtb2RlIGlzIGFjdGl2ZVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgcmVhY3REZXZUb29sczoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiUmVhY3QgRGV2ZWxvcGVyIFRvb2xzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJJbmplY3RzIHlvdXIgbG9jYWwgaW5zdGFsbGF0aW9uIG9mIFJlYWN0IERldmVsb3BlciBUb29scyBpbnRvIERpc2NvcmRcIlxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB3aW5kb3c6IHtcclxuICAgICAgICAgICAgICAgIG5hbWU6IFwiV2luZG93IFByZWZlcmVuY2VzXCIsXHJcbiAgICAgICAgICAgICAgICB0cmFuc3BhcmVuY3k6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkVuYWJsZSBUcmFuc3BhcmVuY3lcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkVuYWJsZXMgdGhlIG1haW4gd2luZG93IHRvIGJlIHNlZS10aHJvdWdoIChyZXF1aXJlcyByZXN0YXJ0KVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnJhbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIldpbmRvdyBGcmFtZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiQWRkcyB0aGUgbmF0aXZlIG9zIHdpbmRvdyBmcmFtZSB0byB0aGUgbWFpbiB3aW5kb3dcIlxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBlbW90ZXM6IHtcclxuICAgICAgICAgICAgbmFtZTogXCJFbW90ZXNcIixcclxuICAgICAgICAgICAgZ2VuZXJhbDoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJHZW5lcmFsXCIsXHJcbiAgICAgICAgICAgICAgICBkb3dubG9hZDoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRG93bmxvYWQgRW1vdGVzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJEb3dubG9hZCBlbW90ZXMgd2hlbmV2ZXIgdGhleSBhcmUgb3V0IG9mIGRhdGVcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGVtb3RlTWVudToge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiRW1vdGUgTWVudVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiU2hvdyBUd2l0Y2gvRmF2b3VyaXRlIGVtb3RlcyBpbiBlbW90ZSBtZW51XCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBoaWRlRW1vamlNZW51OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJIaWRlIEVtb2ppIE1lbnVcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIkhpZGVzIERpc2NvcmQncyBlbW9qaSBtZW51IHdoZW4gdXNpbmcgZW1vdGUgbWVudVwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYXV0b0NhcHM6IHtcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIkVtb3RlIEF1dG9jYXBpdGFsaXphdGlvblwiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiQXV0b2NhcGl0YWxpemUgZW1vdGUgY29tbWFuZHNcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNob3dOYW1lczoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiU2hvdyBOYW1lc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiU2hvdyBlbW90ZSBuYW1lcyBvbiBob3ZlclwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbW9kaWZpZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJTaG93IEVtb3RlIE1vZGlmaWVyc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiRW5hYmxlIGVtb3RlIG1vZHMgKGZsaXAsIHNwaW4sIHB1bHNlLCBzcGluMiwgc3BpbjMsIDFzcGluLCAyc3BpbiwgM3NwaW4sIHRyLCBibCwgYnIsIHNoYWtlLCBzaGFrZTIsIHNoYWtlMywgZmxhcClcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGFuaW1hdGVPbkhvdmVyOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJBbmltYXRlIE9uIEhvdmVyXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJPbmx5IGFuaW1hdGUgdGhlIGVtb3RlIG1vZGlmaWVycyBvbiBob3ZlclwiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNhdGVnb3JpZXM6IHtcclxuICAgICAgICAgICAgICAgIG5hbWU6IFwiQ2F0ZWdvcmllc1wiLFxyXG4gICAgICAgICAgICAgICAgdHdpdGNoZ2xvYmFsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJUd2l0Y2ggR2xvYmFsc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIG5vdGU6IFwiU2hvdyBUd2l0Y2ggZ2xvYmFsIGVtb3Rlc1wiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgdHdpdGNoc3Vic2NyaWJlcjoge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IFwiVHdpdGNoIFN1YnNjcmliZXJzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbm90ZTogXCJTaG93IFR3aXRjaCBzdWJzY3JpYmVyIGVtb3Rlc1wiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnJhbmtlcmZhY2V6OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJGcmFua2VyRmFjZVpcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIlNob3cgZW1vdGVzIGZyb20gRkZaXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBidHR2OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJCZXR0ZXJUVFZcIixcclxuICAgICAgICAgICAgICAgICAgICBub3RlOiBcIlNob3cgZW1vdGVzIGZyb20gQlRUVlwiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9LFxyXG4gICAgQWRkb25zOiB7XHJcbiAgICAgICAgdGl0bGU6IFwie3tuYW1lfX0gdnt7dmVyc2lvbn19IGJ5IHt7YXV0aG9yfX1cIixcclxuICAgICAgICBvcGVuRm9sZGVyOiBcIk9wZW4ge3t0eXBlfX0gRm9sZGVyXCIsXHJcbiAgICAgICAgcmVsb2FkOiBcIlJlbG9hZFwiLFxyXG4gICAgICAgIGFkZG9uU2V0dGluZ3M6IFwiU2V0dGluZ3NcIixcclxuICAgICAgICB3ZWJzaXRlOiBcIldlYnNpdGVcIixcclxuICAgICAgICBzb3VyY2U6IFwiU291cmNlXCIsXHJcbiAgICAgICAgaW52aXRlOiBcIlN1cHBvcnQgU2VydmVyXCIsXHJcbiAgICAgICAgZG9uYXRlOiBcIkRvbm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0aHViLmNvbS9yYXVlbnppL0JldHRlckRpc2NvcmRBcHAvcmVsZWFzZXMvbGF0ZXN0KVwiLFxyXG4gICAgICAgIGpxdWVyeUZhaWxlZDogXCJqUXVlcnkgRmFpbGVkIFRvIExvYWRcIixcclxuICAgICAgICBqcXVlcnlGYWlsZWREZXRhaWxzOiBcImpRdWVyeSBjb3VsZCBub3QgYmUgbG9hZGVkLCBhbmQgc29tZSBwbHVnaW5zIG1heSBub3Qgd29yayBwcm9wZXJseS4gUHJvY2VlZCBhdCB5b3VyIG93biByaXNrLlwiXHJcbiAgICB9LFxyXG4gICAgV2luZG93UHJlZnM6IHtcclxuICAgICAgICBlbmFibGVkSW5mbzogXCJUaGlzIG9wdGlvbiByZXF1aXJlcyBhIHRyYW5zcGFyZW50IHRoZW1lIGluIG9yZGVyIHRvIHdvcmsgcHJvcGVybHkuIE9uIFdpbmRvd3MgdGhpcyBtYXkgYnJlYWsgeW91ciBhZXJvIHNuYXBwaW5nIGFuZCBtYXhpbWl6aW5nLlxcblxcbkluIG9yZGVyIHRvIHRha2UgZWZmZWN0LCBEaXNjb3JkIG5lZWRzIHRvIGJlIHJlc3RhcnRlZC4gRG8geW91IHdhbnQgdG8gcmVzdGFydCBub3c/XCIsXHJcbiAgICAgICAgZGlzYWJsZWRJbmZvOiBcIkluIG9yZGVyIHRvIHRha2UgZWZmZWN0LCBEaXNjb3JkIG5lZWRzIHRvIGJlIHJlc3RhcnRlZC4gRG8geW91IHdhbnQgdG8gcmVzdGFydCBub3c/XCJcclxuICAgIH1cclxufTtcclxuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/data/strings.js\n");
/***/ }),
@@ -359,7 +359,31 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
/***/ (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 _secure__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./secure */ \"./src/secure.js\");\n/* harmony import */ var _modules_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/core */ \"./src/modules/core.js\");\n/* harmony import */ var _modules_pluginapi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/pluginapi */ \"./src/modules/pluginapi.js\");\n// import {Config} from \"data\";\n\n\n // import PluginManager from \"./modules/pluginmanager\";\n// import ThemeManager from \"./modules/thememanager\";\n// import Events from \"./modules/emitter\";\n// import Settings from \"./modules/settingsmanager\";\n// import DataStore from \"./modules/datastore\";\n// import EmoteModule from \"./builtins/emotes/emotes\";\n// import DomManager from \"./modules/dommanager\";\n// import Utilities from \"./modules/utilities\";\n// import ReactComponents from \"./modules/reactcomponents\";\n// import Strings from \"./modules/strings\";\n// Perform some setup\n\nObject(_secure__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\nconst loadingIcon = document.createElement(\"div\");\nloadingIcon.className = \"bd-loaderv2\";\nloadingIcon.title = \"BandagedBD is loading...\";\ndocument.body.appendChild(loadingIcon); // window.Core = Core;\n\nwindow.BdApi = _modules_pluginapi__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // window.settings = SettingsInfo;\n// window.settingsCookie = SettingsCookie;\n// window.pluginCookie = PluginCookie;\n// window.themeCookie = ThemeCookie;\n// window.pluginModule = PluginManager;\n// window.themeModule = ThemeManager;\n// // window.bdthemes = Themes;\n// // window.bdplugins = Plugins;\n// window.bdEmotes = EmoteModule.Emotes;\n// window.bemotes = EmoteModule.blacklist;\n// // window.bdPluginStorage = bdPluginStorage;\n// window.settingsModule = Settings;\n// window.DataStore = DataStore;\n// window.DomManager = DomManager;\n// window.utils = Utilities;\n// window.Components = ReactComponents;\n// window.BDEvents = Events;\n// window.bdConfig = Config;\n// window.Strings = Strings;\n\nclass CoreWrapper {\n constructor(config) {\n _modules_core__WEBPACK_IMPORTED_MODULE_1__[\"default\"].setConfig(config);\n }\n\n init() {\n _modules_core__WEBPACK_IMPORTED_MODULE_1__[\"default\"].init();\n }\n\n}\n\nfunction patchModuleLoad() {\n const namespace = \"betterdiscord\";\n const prefix = `${namespace}/`;\n\n const Module = __webpack_require__(/*! module */ \"module\");\n\n const load = Module._load; // const resolveFilename = Module._resolveFilename;\n\n Module._load = function (request) {\n if (request === namespace || request.startsWith(prefix)) {\n const requested = request.substr(prefix.length);\n if (requested == \"api\") return _modules_pluginapi__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n }\n\n return load.apply(this, arguments);\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\n\n return function () {\n Module._load = load;\n };\n}\n\npatchModuleLoad(); // var settingsPanel, emoteModule, quickEmoteMenu, voiceMode,, dMode, publicServersModule;\n// var bdConfig = null;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2luZGV4LmpzP2I2MzUiXSwibmFtZXMiOlsic2VjdXJlIiwibG9hZGluZ0ljb24iLCJkb2N1bWVudCIsImNyZWF0ZUVsZW1lbnQiLCJjbGFzc05hbWUiLCJ0aXRsZSIsImJvZHkiLCJhcHBlbmRDaGlsZCIsIndpbmRvdyIsIkJkQXBpIiwiQ29yZVdyYXBwZXIiLCJjb25zdHJ1Y3RvciIsImNvbmZpZyIsIkNvcmUiLCJzZXRDb25maWciLCJpbml0IiwicGF0Y2hNb2R1bGVMb2FkIiwibmFtZXNwYWNlIiwicHJlZml4IiwiTW9kdWxlIiwicmVxdWlyZSIsImxvYWQiLCJfbG9hZCIsInJlcXVlc3QiLCJzdGFydHNXaXRoIiwicmVxdWVzdGVk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aW5NYW5hZ2VyLmdldFBsdWdpblBhdGhCeU1vZHVsZShwYXJlbnQpO1xyXG4gICAgLy8gICAgICAgICBpZiAoY29udGVudFBhdGgpIHJldHVybiByZXF1ZXN0O1xyXG4gICAgLy8gICAgIH1cclxuXHJcbiAgICAvLyAgICAgcmV0dXJuIHJlc29sdmVGaWxlbmFtZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG4gICAgLy8gfTtcclxuXHJcbiAgICByZXR1cm4gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgTW9kdWxlLl9sb2FkID0gbG9hZDtcclxuICAgIH07XHJcbn1cclxuXHJcbnBhdGNoTW9kdWxlTG9hZCgpO1xyXG5cclxuLy8gdmFyIHNldHRpbmdzUGFuZWwsIGVtb3RlTW9kdWxlLCBxdWlja0Vtb3RlTWVudSwgdm9pY2VNb2RlLCwgZE1vZGUsIHB1YmxpY1NlcnZlcnNNb2R1bGU7XHJcbi8vIHZhciBiZENvbmZpZyA9IG51bGw7Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/index.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return CoreWrapper; });\n/* harmony import */ var _secure__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./secure */ \"./src/secure.js\");\n/* harmony import */ var _moduleloader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./moduleloader */ \"./src/moduleloader.js\");\n/* harmony import */ var _modules_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/core */ \"./src/modules/core.js\");\n/* harmony import */ var _modules_pluginapi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/pluginapi */ \"./src/modules/pluginapi.js\");\n/* harmony import */ var _loadingicon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./loadingicon */ \"./src/loadingicon.js\");\n\n\n\n\n // Perform some setup\n\nObject(_secure__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\nObject(_moduleloader__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\nwindow.BdApi = _modules_pluginapi__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; // Add loading icon at the bottom right\n\n_loadingicon__WEBPACK_IMPORTED_MODULE_4__[\"default\"].show(); // Backwards compatibility for now\n\nclass CoreWrapper {\n constructor(config) {\n _modules_core__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setConfig(config);\n }\n\n init() {\n _modules_core__WEBPACK_IMPORTED_MODULE_2__[\"default\"].init();\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2luZGV4LmpzP2I2MzUiXSwibmFtZXMiOlsic2VjdXJlIiwicGF0Y2hNb2R1bGVMb2FkIiwid2luZG93IiwiQmRBcGkiLCJMb2FkaW5nSWNvbiIsInNob3ciLCJDb3JlV3JhcHBlciIsImNvbnN0cnVjdG9yIiwiY29uZmlnIiwiQ29yZSIsInNldENvbmZpZyIsImluaXQiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7Q0FHQTs7QUFDQUEsdURBQU07QUFDTkMsNkRBQWU7QUFDZkMsTUFBTSxDQUFDQyxLQUFQLEdBQWVBLDBEQUFmLEMsQ0FFQTs7QUFDQUMsb0RBQVcsQ0FBQ0MsSUFBWixHLENBRUE7O0FBQ2UsTUFBTUMsV0FBTixDQUFrQjtBQUM3QkMsYUFBVyxDQUFDQyxNQUFELEVBQVM7QUFDaEJDLHlEQUFJLENBQUNDLFNBQUwsQ0FBZUYsTUFBZjtBQUNIOztBQUVERyxNQUFJLEdBQUc7QUFDSEYseURBQUksQ0FBQ0UsSUFBTDtBQUNIOztBQVA0QiIsImZpbGUiOiIuL3NyYy9pbmRleC5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzZWN1cmUgZnJvbSBcIi4vc2VjdXJlXCI7XHJcbmltcG9ydCBwYXRjaE1vZHVsZUxvYWQgZnJvbSBcIi4vbW9kdWxlbG9hZGVyXCI7XHJcbmltcG9ydCBDb3JlIGZyb20gXCIuL21vZHVsZXMvY29yZVwiO1xyXG5pbXBvcnQgQmRBcGkgZnJvbSBcIi4vbW9kdWxlcy9wbHVnaW5hcGlcIjtcclxuaW1wb3J0IExvYWRpbmdJY29uIGZyb20gXCIuL2xvYWRpbmdpY29uXCI7XHJcblxyXG4vLyBQZXJmb3JtIHNvbWUgc2V0dXBcclxuc2VjdXJlKCk7XHJcbnBhdGNoTW9kdWxlTG9hZCgpO1xyXG53aW5kb3cuQmRBcGkgPSBCZEFwaTtcclxuXHJcbi8vIEFkZCBsb2FkaW5nIGljb24gYXQgdGhlIGJvdHRvbSByaWdodFxyXG5Mb2FkaW5nSWNvbi5zaG93KCk7XHJcblxyXG4vLyBCYWNrd2FyZHMgY29tcGF0aWJpbGl0eSBmb3Igbm93XHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIENvcmVXcmFwcGVyIHtcclxuICAgIGNvbnN0cnVjdG9yKGNvbmZpZykge1xyXG4gICAgICAgIENvcmUuc2V0Q29uZmlnKGNvbmZpZyk7XHJcbiAgICB9XHJcblxyXG4gICAgaW5pdCgpIHtcclxuICAgICAgICBDb3JlLmluaXQoKTtcclxuICAgIH1cclxufSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/index.js\n");
+
+/***/ }),
+
+/***/ "./src/loadingicon.js":
+/*!****************************!*\
+ !*** ./src/loadingicon.js ***!
+ \****************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+eval("__webpack_require__.r(__webpack_exports__);\nconst css = `/* BEGIN V2 LOADER */\n/* =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C44NEw4MzQuNDUrMTE2NC44NEM5MjMuOTMyKzExNjQuODQrOTg0LjI0NCsxMjAxLjQ4KzEwMTUuMzkrMTI1MC44N0MxMDc5Ljc4KzEzNTMrMTAxOS40NysxNTA5LjY0KzgzNC40NSsxNTA5LjY0TDEzNS40NSsxNTA5LjY0TDEzNS40NSsxODY0LjU0TDgyNi42NSsxODY0LjU0QzExODIuOTUrMTg2NC41NCsxNDU5LjQ1KzE3MjEuOTQrMTQ2OS4yNSsxMzY4LjU0QzE0NjkuMjUrMTIwNS45NCsxNDI0Ljc1KzEwODQuNDQrMTM0Ni4zNSs5OTkuOTQyQzE0MjQuNzUrOTE1LjU0MisxNDY5LjI1Kzc5NC4wNDIrMTQ2OS4yNSs2MzEuNDQyWiIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMSIvPiAgICA8L2c+PC9zdmc+);\n}\n#bd-loading-icon {\n position: fixed;\n bottom:5px;\n right:5px;\n z-index: 2147483647;\n display: block;\n width: 20px;\n height: 20px;\n background-size: 100% 100%;\n animation: bd-loading-animation 1.5s ease-in-out infinite;\n}\n\n@keyframes bd-loading-animation {\n 0% { opacity: 0.05; }\n 50% { opacity: 0.6; }\n 100% { opacity: 0.05; }\n}\n/* =============== */\n/* END V2 LOADER */`;\nconst iconStyle = document.createElement(\"style\");\niconStyle.textContent = css;\nconst loadingIcon = document.createElement(\"div\");\nloadingIcon.id = \"bd-loading-icon\";\nloadingIcon.className = \"bd-loaderv2\";\nloadingIcon.title = \"BandagedBD is loading...\";\n/* harmony default export */ __webpack_exports__[\"default\"] = (class {\n static show() {\n document.body.appendChild(iconStyle);\n document.body.appendChild(loadingIcon);\n }\n\n static hide() {\n if (iconStyle) iconStyle.remove();\n if (loadingIcon) loadingIcon.remove();\n }\n\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL2xvYW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XMgYmQtbG9hZGluZy1hbmltYXRpb24ge1xyXG4gIDAlIHsgb3BhY2l0eTogMC4wNTsgfVxyXG4gIDUwJSB7IG9wYWNpdHk6IDAuNjsgfVxyXG4gIDEwMCUgeyBvcGFjaXR5OiAwLjA1OyB9XHJcbn1cclxuLyogPT09PT09PT09PT09PT09ICovXHJcbi8qICBFTkQgVjIgTE9BREVSICAqL2A7XHJcblxyXG5jb25zdCBpY29uU3R5bGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwic3R5bGVcIik7XHJcbmljb25TdHlsZS50ZXh0Q29udGVudCA9IGNzcztcclxuXHJcbmNvbnN0IGxvYWRpbmdJY29uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxubG9hZGluZ0ljb24uaWQgPSBcImJkLWxvYWRpbmctaWNvblwiO1xyXG5sb2FkaW5nSWNvbi5jbGFzc05hbWUgPSBcImJkLWxvYWRlcnYyXCI7XHJcbmxvYWRpbmdJY29uLnRpdGxlID0gXCJCYW5kYWdlZEJEIGlzIGxvYWRpbmcuLi5cIjtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIHtcclxuICAgIHN0YXRpYyBzaG93KCkge1xyXG4gICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoaWNvblN0eWxlKTtcclxuICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGxvYWRpbmdJY29uKTtcclxuICAgIH1cclxuXHJcbiAgICBzdGF0aWMgaGlkZSgpIHtcclxuICAgICAgICBpZiAoaWNvblN0eWxlKSBpY29uU3R5bGUucmVtb3ZlKCk7XHJcbiAgICAgICAgaWYgKGxvYWRpbmdJY29uKSBsb2FkaW5nSWNvbi5yZW1vdmUoKTtcclxuICAgIH1cclxufSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/loadingicon.js\n");
+
+/***/ }),
+
+/***/ "./src/moduleloader.js":
+/*!*****************************!*\
+ !*** ./src/moduleloader.js ***!
+ \*****************************/
+/*! exports provided: default */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_pluginapi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/pluginapi */ \"./src/modules/pluginapi.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n const namespace = \"betterdiscord\";\n const prefix = `${namespace}/`;\n\n const Module = __webpack_require__(/*! module */ \"module\");\n\n const load = Module._load;\n\n Module._load = function (request) {\n if (request === namespace || request.startsWith(prefix)) {\n const requested = request.substr(prefix.length);\n if (requested == \"bdapi\") return _modules_pluginapi__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n }\n\n return load.apply(this, arguments);\n };\n\n return function () {\n Module._load = load;\n };\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZWxvYWRlci5qcz9iOWMzIl0sIm5hbWVzIjpbIm5hbWVzcGFjZSIsInByZWZpeCIsIk1vZHVsZSIsInJlcXVpcmUiLCJsb2FkIiwiX2xvYWQiLCJyZXF1ZXN0Iiwic3RhcnRzV2l0aCIsInJlcXVlc3RlZCIsInN1YnN0ciIsImxlbmd0aCIsIkJkQXBpIiwiYXBwbHkiLCJhcmd1bWVudHMiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUVlLDJFQUFXO0FBQ3RCLFFBQU1BLFNBQVMsR0FBRyxlQUFsQjtBQUNBLFFBQU1DLE1BQU0sR0FBSSxHQUFFRCxTQUFVLEdBQTVCOztBQUNBLFFBQU1FLE1BQU0sR0FBR0MsbUJBQU8sQ0FBQyxzQkFBRCxDQUF0Qjs7QUFDQSxRQUFNQyxJQUFJLEdBQUdGLE1BQU0sQ0FBQ0csS0FBcEI7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c3QgcmVxdWVzdGVkID0gcmVxdWVzdC5zdWJzdHIocHJlZml4Lmxlbmd0aCk7XHJcbiAgICAgICAgICAgIGlmIChyZXF1ZXN0ZWQgPT0gXCJiZGFwaVwiKSByZXR1cm4gQmRBcGk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gbG9hZC5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG4gICAgfTtcclxuXHJcbiAgICByZXR1cm4gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgTW9kdWxlLl9sb2FkID0gbG9hZDtcclxuICAgIH07XHJcbn0iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/moduleloader.js\n");
/***/ }),
@@ -371,7 +395,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (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 AddonManager; });\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emitter */ \"./src/modules/emitter.js\");\n/* harmony import */ var _datastore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datastore */ \"./src/modules/datastore.js\");\n/* harmony import */ var _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../structs/addonerror */ \"./src/structs/addonerror.js\");\n/* harmony import */ var _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../structs/metaerror */ \"./src/structs/metaerror.js\");\n/* harmony import */ var _ui_toasts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/toasts */ \"./src/ui/toasts.js\");\n/* harmony import */ var _discordmodules__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./discordmodules */ \"./src/modules/discordmodules.js\");\n/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./strings */ \"./src/modules/strings.js\");\n/* harmony import */ var _ui_misc_addoneditor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/misc/addoneditor */ \"./src/ui/misc/addoneditor.jsx\");\n/* harmony import */ var _ui_floatingwindows__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../ui/floatingwindows */ \"./src/ui/floatingwindows.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nconst React = _discordmodules__WEBPACK_IMPORTED_MODULE_8__[\"default\"].React;\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst fs = __webpack_require__(/*! fs */ \"fs\");\n\nconst Module = __webpack_require__(/*! module */ \"module\").Module;\n\nModule.globalPaths.push(path.resolve(__webpack_require__(/*! electron */ \"electron\").remote.app.getAppPath(), \"node_modules\"));\nconst splitRegex = /[^\\S\\r\\n]*?\\r?(?:\\r\\n|\\n)[^\\S\\r\\n]*?\\*[^\\S\\r\\n]?/;\nconst escapedAtRegex = /^\\\\@/;\n\nconst stripBOM = function (fileContent) {\n if (fileContent.charCodeAt(0) === 0xFEFF) {\n fileContent = fileContent.slice(1);\n }\n\n return fileContent;\n};\n\nclass AddonManager {\n get name() {\n return \"\";\n }\n\n get moduleExtension() {\n return \"\";\n }\n\n get extension() {\n return \"\";\n }\n\n get addonFolder() {\n return \"\";\n }\n\n get language() {\n return \"\";\n }\n\n get prefix() {\n return \"addon\";\n }\n\n get collection() {\n return \"settings\";\n }\n\n get category() {\n return \"addons\";\n }\n\n get id() {\n return \"autoReload\";\n }\n\n emit(event, ...args) {\n return _emitter__WEBPACK_IMPORTED_MODULE_3__[\"default\"].emit(`${this.prefix}-${event}`, ...args);\n }\n\n constructor() {\n this.timeCache = {};\n this.addonList = [];\n this.state = {};\n }\n\n initialize() {\n this.originalRequire = Module._extensions[this.moduleExtension];\n Module._extensions[this.moduleExtension] = this.getAddonRequire();\n _settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].on(this.collection, this.category, this.id, enabled => {\n if (enabled) this.watchAddons();else this.unwatchAddons();\n });\n return this.loadAllAddons();\n } // Subclasses should overload this and modify the addon object as needed to fully load it\n\n\n initializeAddon() {\n return;\n } // Subclasses should overload this and modify the fileContent as needed to require() the file\n\n\n getFileModification(module, fileContent) {\n return fileContent;\n }\n\n startAddon() {\n return;\n }\n\n stopAddon() {\n return;\n }\n\n loadState() {\n const saved = _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getData(`${this.prefix}s`);\n if (!saved) return;\n Object.assign(this.state, saved);\n }\n\n saveState() {\n _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setData(`${this.prefix}s`, this.state);\n }\n\n watchAddons() {\n if (this.watcher) return _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].error(this.name, `Already watching ${this.prefix} addons.`);\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(this.name, `Starting to watch ${this.prefix} addons.`);\n this.watcher = fs.watch(this.addonFolder, {\n persistent: false\n }, async (eventType, filename) => {\n if (!eventType || !filename || !filename.endsWith(this.extension)) return;\n await new Promise(r => setTimeout(r, 100));\n\n try {\n const stats = fs.statSync(path.resolve(this.addonFolder, filename));\n if (!stats.isFile()) return;\n if (!stats || !stats.mtime || !stats.mtime.getTime()) return;\n if (typeof stats.mtime.getTime() !== \"number\") return;\n if (this.timeCache[filename] == stats.mtime.getTime()) return;\n this.timeCache[filename] = stats.mtime.getTime();\n if (eventType == \"rename\") this.loadAddon(filename, true);\n if (eventType == \"change\") this.reloadAddon(filename, true);\n } catch (err) {\n if (err.code !== \"ENOENT\") return;\n delete this.timeCache[filename];\n this.unloadAddon(filename, true);\n }\n });\n }\n\n unwatchAddons() {\n if (!this.watcher) return _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].error(this.name, `Was not watching ${this.prefix} addons.`);\n this.watcher.close();\n delete this.watcher;\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(this.name, `No longer watching ${this.prefix} addons.`);\n }\n\n extractMeta(fileContent) {\n const firstLine = fileContent.split(\"\\n\")[0];\n const hasOldMeta = firstLine.includes(\"//META\");\n if (hasOldMeta) return this.parseOldMeta(fileContent);\n const hasNewMeta = firstLine.includes(\"/**\");\n if (hasNewMeta) return this.parseNewMeta(fileContent);\n throw new _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"META was not found.\");\n }\n\n parseOldMeta(fileContent) {\n const meta = fileContent.split(\"\\n\")[0];\n const metaData = meta.substring(meta.lastIndexOf(\"//META\") + 6, meta.lastIndexOf(\"*//\"));\n const parsed = _utilities__WEBPACK_IMPORTED_MODULE_0__[\"default\"].testJSON(metaData);\n if (!parsed) throw new _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"META could not be parsed.\");\n if (!parsed.name) throw new _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"META missing name data.\");\n parsed.format = \"json\";\n return parsed;\n }\n\n parseNewMeta(fileContent) {\n const block = fileContent.split(\"/**\", 2)[1].split(\"*/\", 1)[0];\n const out = {};\n let field = \"\";\n let accum = \"\";\n\n for (const line of block.split(splitRegex)) {\n if (line.length === 0) continue;\n\n if (line.charAt(0) === \"@\" && line.charAt(1) !== \" \") {\n out[field] = accum;\n const l = line.indexOf(\" \");\n field = line.substr(1, l - 1);\n accum = line.substr(l + 1);\n } else {\n accum += \" \" + line.replace(\"\\\\n\", \"\\n\").replace(escapedAtRegex, \"@\");\n }\n }\n\n out[field] = accum.trim();\n delete out[\"\"];\n out.format = \"jsdoc\";\n return out;\n }\n\n getAddonRequire() {\n const self = this; // const baseFolder = this.addonFolder;\n\n const originalRequire = this.originalRequire;\n return function (module, filename) {\n const possiblePath = path.resolve(self.addonFolder, path.basename(filename));\n if (!fs.existsSync(possiblePath) || filename !== fs.realpathSync(possiblePath)) return Reflect.apply(originalRequire, this, arguments);\n let fileContent = fs.readFileSync(filename, \"utf8\");\n fileContent = stripBOM(fileContent);\n const stats = fs.statSync(filename);\n const meta = self.extractMeta(fileContent);\n if (!meta.author) meta.author = _strings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Addons.unknownAuthor;\n if (!meta.version) meta.version = \"???\";\n if (!meta.description) meta.description = _strings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Addons.noDescription;\n meta.id = meta.name;\n meta.filename = path.basename(filename);\n meta.added = stats.atimeMs;\n meta.modified = stats.mtimeMs;\n meta.size = stats.size;\n fileContent = self.getFileModification(module, fileContent, meta);\n\n module._compile(fileContent, filename);\n };\n } // Subclasses should use the return (if not AddonError) and push to this.addonList\n\n\n loadAddon(filename, shouldToast = false) {\n if (typeof filename === \"undefined\") return;\n\n try {\n require(path.resolve(this.addonFolder, filename));\n } catch (error) {\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__[\"default\"](filename, filename, \"Could not be compiled.\", {\n message: error.message,\n stack: error.stack\n });\n }\n\n const addon = require(path.resolve(this.addonFolder, filename));\n\n if (this.addonList.find(c => c.id == addon.id)) return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__[\"default\"](addon.name, filename, `There is already a plugin with name ${addon.name}`);\n const error = this.initializeAddon(addon);\n if (error) return error;\n this.addonList.push(addon);\n if (shouldToast) _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].success(`${addon.name} v${addon.version} was loaded.`);\n this.emit(\"loaded\", addon.id);\n if (!this.state[addon.id]) return this.state[addon.id] = false;\n return this.startAddon(addon);\n }\n\n unloadAddon(idOrFileOrAddon, shouldToast = true, isReload = false) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n if (!addon) return false;\n if (this.state[addon.id]) isReload ? this.stopAddon(addon) : this.disableAddon(addon);\n delete require.cache[require.resolve(path.resolve(this.addonFolder, addon.filename))];\n this.addonList.splice(this.addonList.indexOf(addon), 1);\n this.emit(\"unloaded\", addon.id);\n if (shouldToast) _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].success(`${addon.name} was unloaded.`);\n return true;\n }\n\n reloadAddon(idOrFileOrAddon, shouldToast = true) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n const didUnload = this.unloadAddon(addon, shouldToast, true);\n if (!didUnload) return didUnload;\n return this.loadAddon(addon.filename, shouldToast);\n }\n\n isLoaded(idOrFile) {\n const addon = this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n if (!addon) return false;\n return true;\n }\n\n isEnabled(idOrFile) {\n const addon = this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n if (!addon) return false;\n return this.state[addon.id];\n }\n\n enableAddon(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n if (this.state[addon.id]) return;\n this.state[addon.id] = true;\n this.startAddon(addon);\n this.saveState();\n }\n\n disableAddon(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n if (!this.state[addon.id]) return;\n this.state[addon.id] = false;\n this.stopAddon(addon);\n this.saveState();\n }\n\n toggleAddon(id) {\n if (this.state[id]) this.disableAddon(id);else this.enableAddon(id);\n }\n\n loadNewAddons() {\n const files = fs.readdirSync(this.addonFolder);\n const removed = this.addonList.filter(t => !files.includes(t.filename)).map(c => c.id);\n const added = files.filter(f => !this.addonList.find(t => t.filename == f) && f.endsWith(this.extension) && fs.statSync(path.resolve(this.addonFolder, f)).isFile());\n return {\n added,\n removed\n };\n }\n\n updateList() {\n const results = this.loadNewAddons();\n\n for (const filename of results.added) this.loadAddon(filename);\n\n for (const name of results.removed) this.unloadAddon(name);\n }\n\n loadAllAddons() {\n this.loadState();\n const errors = [];\n const files = fs.readdirSync(this.addonFolder);\n\n for (const filename of files) {\n if (!fs.statSync(path.resolve(this.addonFolder, filename)).isFile() || !filename.endsWith(this.extension)) continue;\n const addon = this.loadAddon(filename, false);\n if (addon instanceof _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__[\"default\"]) errors.push(addon);\n }\n\n this.saveState();\n if (_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(this.collection, this.category, this.id)) this.watchAddons();\n return errors;\n }\n\n deleteAddon(idOrFileOrAddon) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n return fs.unlinkSync(path.resolve(this.addonFolder, addon.filename));\n }\n\n saveAddon(idOrFileOrAddon, content) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n return fs.writeFileSync(path.resolve(this.addonFolder, addon.filename), content);\n }\n\n editAddon(idOrFileOrAddon, system) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n const fullPath = path.resolve(this.addonFolder, addon.filename);\n if (typeof system == \"undefined\") system = _settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(\"settings\", \"addons\", \"editAction\") == \"system\";\n if (system) return __webpack_require__(/*! electron */ \"electron\").shell.openItem(`${fullPath}`);\n return this.openDetached(addon);\n }\n\n openDetached(addon) {\n const fullPath = path.resolve(this.addonFolder, addon.filename);\n const content = fs.readFileSync(fullPath).toString();\n const editorRef = React.createRef();\n const editor = React.createElement(_ui_misc_addoneditor__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n id: \"bd-floating-editor-\" + addon.name,\n ref: editorRef,\n content: content,\n save: this.saveAddon.bind(this, addon),\n openNative: this.editAddon.bind(this, addon, true),\n language: this.language\n });\n _ui_floatingwindows__WEBPACK_IMPORTED_MODULE_11__[\"default\"].open({\n onClose: () => {\n this.isDetached = false;\n },\n onResize: () => {\n if (!editorRef || !editorRef.current || !editorRef.current.resize) return;\n editorRef.current.resize();\n },\n title: addon.name,\n id: content.id,\n className: \"floating-addon-window\",\n height: 470,\n width: 410,\n center: true,\n resizable: true,\n children: editor,\n confirmClose: () => {\n if (!editorRef || !editorRef.current) return false;\n return editorRef.current.hasUnsavedChanges;\n },\n confirmationText: _strings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Addons.confirmationText.format({\n name: addon.name\n })\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvYWRkb25tYW5hZ2VyLmpzP2NlYTkiXSwibmFtZXMiOlsiUmVhY3QiLCJEaXNjb3JkTW9kdWxlcyIsInBhdGgiLCJyZXF1aXJlIiwiZnMiLCJNb2R1bGUiLCJnbG9iYWxQYXRocyIsInB1c2giLCJyZXNvbHZlIiwicmVtb3RlIiwiYXBwIiwiZ2V0QXBwUGF0aCIsInNwbGl0UmVnZXgiLCJlc2NhcGVkQXRSZWdleCIsInN0cmlwQk9NIiwiZmlsZUNvbnRlbnQiLCJjaGFyQ29kZUF0Iiwic2xpY2UiLCJBZGRvbk1hbmFnZXIiLCJuYW1lIiwibW9kdWxlRXh0ZW5zaW9uIiwiZXh0ZW5zaW9uIiwiYWRkb25Gb2xkZXIiLCJsYW5ndWFnZSIsIn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T0gXCJAXCIgJiYgbGluZS5jaGFyQXQoMSkgIT09IFwiIFwiKSB7XHJcbiAgICAgICAgICAgICAgICBvdXRbZmllbGRdID0gYWNjdW07XHJcbiAgICAgICAgICAgICAgICBjb25zdCBsID0gbGluZS5pbmRleE9mKFwiIFwiKTtcclxuICAgICAgICAgICAgICAgIGZpZWxkID0gbGluZS5zdWJzdHIoMSwgbCAtIDEpO1xyXG4gICAgICAgICAgICAgICAgYWNjdW0gPSBsaW5lLnN1YnN0cihsICsgMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBhY2N1bSArPSBcIiBcIiArIGxpbmUucmVwbGFjZShcIlxcXFxuXCIsIFwiXFxuXCIpLnJlcGxhY2UoZXNjYXBlZEF0UmVnZXgsIFwiQFwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBvdXRbZmllbGRdID0gYWNjdW0udHJpbSgpO1xyXG4gICAgICAgIGRlbGV0ZSBvdXRbXCJcIl07XHJcbiAgICAgICAgb3V0LmZvcm1hdCA9IFwianNkb2NcIjtcclxuICAgICAgICByZXR1cm4gb3V0O1xyXG4gICAgfVxyXG5cclxuICAgIGdldEFkZG9uUmVxdWlyZSgpIHtcclxuICAgICAgICBjb25zdCBzZWxmID0gdGhpcztcclxuICAgICAgICAvLyBjb25zdCBiYXNlRm9sZGVyID0gdGhpcy5hZGRvbkZvbGRlcjtcclxuICAgICAgICBjb25zdCBvcmlnaW5hbFJlcXVpcmUgPSB0aGlzLm9yaWdpbmFsUmVxdWlyZTtcclxuICAgICAgICByZXR1cm4gZnVuY3Rpb24obW9kdWxlLCBmaWxlbmFtZSkge1xyXG4gICAgICAgICAgICBjb25zdCBwb3NzaWJsZVBhdGggPSBwYXRoLnJlc29sdmUoc2VsZi5hZGRvbkZvbGRlciwgcGF0aC5iYXNlbmFtZShmaWxlbmFtZSkpO1xyXG4gICAgICAgICAgICBpZiA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U6IHRoaXMubGFuZ3VhZ2VcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgRmxvYXRpbmdXaW5kb3dzLm9wZW4oe1xyXG4gICAgICAgICAgICBvbkNsb3NlOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmlzRGV0YWNoZWQgPSBmYWxzZTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgb25SZXNpemU6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGlmICghZWRpdG9yUmVmIHx8ICFlZGl0b3JSZWYuY3VycmVudCB8fCAhZWRpdG9yUmVmLmN1cnJlbnQucmVzaXplKSByZXR1cm47XHJcbiAgICAgICAgICAgICAgICBlZGl0b3JSZWYuY3VycmVudC5yZXNpemUoKTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgdGl0bGU6IGFkZG9uLm5hbWUsXHJcbiAgICAgICAgICAgIGlkOiBjb250ZW50LmlkLFxyXG4gICAgICAgICAgICBjbGFzc05hbWU6IFwiZmxvYXRpbmctYWRkb24td2luZG93XCIsXHJcbiAgICAgICAgICAgIGhlaWdodDogNDcwLFxyXG4gICAgICAgICAgICB3aWR0aDogNDEwLFxyXG4gICAgICAgICAgICBjZW50ZXI6IHRydWUsXHJcbiAgICAgICAgICAgIHJlc2l6YWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgY2hpbGRyZW46IGVkaXRvcixcclxuICAgICAgICAgICAgY29uZmlybUNsb3NlOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWVkaXRvclJlZiB8fCAhZWRpdG9yUmVmLmN1cnJlbnQpIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBlZGl0b3JSZWYuY3VycmVudC5oYXNVbnNhdmVkQ2hhbmdlcztcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY29uZmlybWF0aW9uVGV4dDogU3RyaW5ncy5BZGRvbnMuY29uZmlybWF0aW9uVGV4dC5mb3JtYXQoe25hbWU6IGFkZG9uLm5hbWV9KVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG59Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/addonmanager.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return AddonManager; });\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./emitter */ \"./src/modules/emitter.js\");\n/* harmony import */ var _datastore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datastore */ \"./src/modules/datastore.js\");\n/* harmony import */ var _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../structs/addonerror */ \"./src/structs/addonerror.js\");\n/* harmony import */ var _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../structs/metaerror */ \"./src/structs/metaerror.js\");\n/* harmony import */ var _ui_toasts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/toasts */ \"./src/ui/toasts.js\");\n/* harmony import */ var _discordmodules__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./discordmodules */ \"./src/modules/discordmodules.js\");\n/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./strings */ \"./src/modules/strings.js\");\n/* harmony import */ var _ui_misc_addoneditor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/misc/addoneditor */ \"./src/ui/misc/addoneditor.jsx\");\n/* harmony import */ var _ui_floatingwindows__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../ui/floatingwindows */ \"./src/ui/floatingwindows.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nconst React = _discordmodules__WEBPACK_IMPORTED_MODULE_8__[\"default\"].React;\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst fs = __webpack_require__(/*! fs */ \"fs\");\n\nconst Module = __webpack_require__(/*! module */ \"module\").Module;\n\nModule.globalPaths.push(path.resolve(__webpack_require__(/*! electron */ \"electron\").remote.app.getAppPath(), \"node_modules\"));\nconst splitRegex = /[^\\S\\r\\n]*?\\r?(?:\\r\\n|\\n)[^\\S\\r\\n]*?\\*[^\\S\\r\\n]?/;\nconst escapedAtRegex = /^\\\\@/;\n\nconst stripBOM = function (fileContent) {\n if (fileContent.charCodeAt(0) === 0xFEFF) {\n fileContent = fileContent.slice(1);\n }\n\n return fileContent;\n};\n\nclass AddonManager {\n get name() {\n return \"\";\n }\n\n get moduleExtension() {\n return \"\";\n }\n\n get extension() {\n return \"\";\n }\n\n get addonFolder() {\n return \"\";\n }\n\n get language() {\n return \"\";\n }\n\n get prefix() {\n return \"addon\";\n }\n\n get collection() {\n return \"settings\";\n }\n\n get category() {\n return \"addons\";\n }\n\n get id() {\n return \"autoReload\";\n }\n\n emit(event, ...args) {\n return _emitter__WEBPACK_IMPORTED_MODULE_3__[\"default\"].emit(`${this.prefix}-${event}`, ...args);\n }\n\n constructor() {\n this.timeCache = {};\n this.addonList = [];\n this.state = {};\n }\n\n initialize() {\n this.originalRequire = Module._extensions[this.moduleExtension];\n Module._extensions[this.moduleExtension] = this.getAddonRequire();\n _settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].on(this.collection, this.category, this.id, enabled => {\n if (enabled) this.watchAddons();else this.unwatchAddons();\n });\n return this.loadAllAddons();\n } // Subclasses should overload this and modify the addon object as needed to fully load it\n\n\n initializeAddon() {\n return;\n } // Subclasses should overload this and modify the fileContent as needed to require() the file\n\n\n getFileModification(module, fileContent) {\n return fileContent;\n }\n\n startAddon() {\n return;\n }\n\n stopAddon() {\n return;\n }\n\n loadState() {\n const saved = _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getData(`${this.prefix}s`);\n if (!saved) return;\n Object.assign(this.state, saved);\n }\n\n saveState() {\n _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setData(`${this.prefix}s`, this.state);\n }\n\n watchAddons() {\n if (this.watcher) return _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].error(this.name, `Already watching ${this.prefix} addons.`);\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(this.name, `Starting to watch ${this.prefix} addons.`);\n this.watcher = fs.watch(this.addonFolder, {\n persistent: false\n }, async (eventType, filename) => {\n if (!eventType || !filename || !filename.endsWith(this.extension)) return;\n await new Promise(r => setTimeout(r, 100));\n\n try {\n const stats = fs.statSync(path.resolve(this.addonFolder, filename));\n if (!stats.isFile()) return;\n if (!stats || !stats.mtime || !stats.mtime.getTime()) return;\n if (typeof stats.mtime.getTime() !== \"number\") return;\n if (this.timeCache[filename] == stats.mtime.getTime()) return;\n this.timeCache[filename] = stats.mtime.getTime();\n if (eventType == \"rename\") this.loadAddon(filename, true);\n if (eventType == \"change\") this.reloadAddon(filename, true);\n } catch (err) {\n if (err.code !== \"ENOENT\") return;\n delete this.timeCache[filename];\n this.unloadAddon(filename, true);\n }\n });\n }\n\n unwatchAddons() {\n if (!this.watcher) return _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].error(this.name, `Was not watching ${this.prefix} addons.`);\n this.watcher.close();\n delete this.watcher;\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(this.name, `No longer watching ${this.prefix} addons.`);\n }\n\n extractMeta(fileContent) {\n const firstLine = fileContent.split(\"\\n\")[0];\n const hasOldMeta = firstLine.includes(\"//META\");\n if (hasOldMeta) return this.parseOldMeta(fileContent);\n const hasNewMeta = firstLine.includes(\"/**\");\n if (hasNewMeta) return this.parseNewMeta(fileContent);\n throw new _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"META was not found.\");\n }\n\n parseOldMeta(fileContent) {\n const meta = fileContent.split(\"\\n\")[0];\n const metaData = meta.substring(meta.lastIndexOf(\"//META\") + 6, meta.lastIndexOf(\"*//\"));\n const parsed = _utilities__WEBPACK_IMPORTED_MODULE_0__[\"default\"].testJSON(metaData);\n if (!parsed) throw new _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"META could not be parsed.\");\n if (!parsed.name) throw new _structs_metaerror__WEBPACK_IMPORTED_MODULE_6__[\"default\"](\"META missing name data.\");\n parsed.format = \"json\";\n return parsed;\n }\n\n parseNewMeta(fileContent) {\n const block = fileContent.split(\"/**\", 2)[1].split(\"*/\", 1)[0];\n const out = {};\n let field = \"\";\n let accum = \"\";\n\n for (const line of block.split(splitRegex)) {\n if (line.length === 0) continue;\n\n if (line.charAt(0) === \"@\" && line.charAt(1) !== \" \") {\n out[field] = accum;\n const l = line.indexOf(\" \");\n field = line.substr(1, l - 1);\n accum = line.substr(l + 1);\n } else {\n accum += \" \" + line.replace(\"\\\\n\", \"\\n\").replace(escapedAtRegex, \"@\");\n }\n }\n\n out[field] = accum.trim();\n delete out[\"\"];\n out.format = \"jsdoc\";\n return out;\n }\n\n getAddonRequire() {\n const self = this; // const baseFolder = this.addonFolder;\n\n const originalRequire = this.originalRequire;\n return function (module, filename) {\n const possiblePath = path.resolve(self.addonFolder, path.basename(filename));\n if (!fs.existsSync(possiblePath) || filename !== fs.realpathSync(possiblePath)) return Reflect.apply(originalRequire, this, arguments);\n let fileContent = fs.readFileSync(filename, \"utf8\");\n fileContent = stripBOM(fileContent);\n const stats = fs.statSync(filename);\n const meta = self.extractMeta(fileContent);\n if (!meta.author) meta.author = _strings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Addons.unknownAuthor;\n if (!meta.version) meta.version = \"???\";\n if (!meta.description) meta.description = _strings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Addons.noDescription;\n meta.id = meta.name;\n meta.filename = path.basename(filename);\n meta.added = stats.atimeMs;\n meta.modified = stats.mtimeMs;\n meta.size = stats.size;\n fileContent = self.getFileModification(module, fileContent, meta);\n\n module._compile(fileContent, filename);\n };\n } // Subclasses should use the return (if not AddonError) and push to this.addonList\n\n\n loadAddon(filename, shouldToast = false) {\n if (typeof filename === \"undefined\") return;\n\n try {\n require(path.resolve(this.addonFolder, filename));\n } catch (error) {\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__[\"default\"](filename, filename, \"Could not be compiled.\", {\n message: error.message,\n stack: error.stack\n });\n }\n\n const addon = require(path.resolve(this.addonFolder, filename));\n\n if (this.addonList.find(c => c.id == addon.id)) return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__[\"default\"](addon.name, filename, `There is already a plugin with name ${addon.name}`);\n const error = this.initializeAddon(addon);\n if (error) return error;\n this.addonList.push(addon);\n if (shouldToast) _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].success(`${addon.name} v${addon.version} was loaded.`);\n this.emit(\"loaded\", addon.id);\n if (!this.state[addon.id]) return this.state[addon.id] = false;\n return this.startAddon(addon);\n }\n\n unloadAddon(idOrFileOrAddon, shouldToast = true, isReload = false) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n if (!addon) return false;\n if (this.state[addon.id]) isReload ? this.stopAddon(addon) : this.disableAddon(addon);\n delete require.cache[require.resolve(path.resolve(this.addonFolder, addon.filename))];\n this.addonList.splice(this.addonList.indexOf(addon), 1);\n this.emit(\"unloaded\", addon.id);\n if (shouldToast) _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].success(`${addon.name} was unloaded.`);\n return true;\n }\n\n reloadAddon(idOrFileOrAddon, shouldToast = true) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n const didUnload = this.unloadAddon(addon, shouldToast, true);\n if (!didUnload) return didUnload;\n return this.loadAddon(addon.filename, shouldToast);\n }\n\n isLoaded(idOrFile) {\n const addon = this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n if (!addon) return false;\n return true;\n }\n\n isEnabled(idOrFile) {\n const addon = this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n if (!addon) return false;\n return this.state[addon.id];\n }\n\n getAddon(idOrFile) {\n return this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n }\n\n enableAddon(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n if (this.state[addon.id]) return;\n this.state[addon.id] = true;\n this.startAddon(addon);\n this.saveState();\n }\n\n disableAddon(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n if (!this.state[addon.id]) return;\n this.state[addon.id] = false;\n this.stopAddon(addon);\n this.saveState();\n }\n\n toggleAddon(id) {\n if (this.state[id]) this.disableAddon(id);else this.enableAddon(id);\n }\n\n loadNewAddons() {\n const files = fs.readdirSync(this.addonFolder);\n const removed = this.addonList.filter(t => !files.includes(t.filename)).map(c => c.id);\n const added = files.filter(f => !this.addonList.find(t => t.filename == f) && f.endsWith(this.extension) && fs.statSync(path.resolve(this.addonFolder, f)).isFile());\n return {\n added,\n removed\n };\n }\n\n updateList() {\n const results = this.loadNewAddons();\n\n for (const filename of results.added) this.loadAddon(filename);\n\n for (const name of results.removed) this.unloadAddon(name);\n }\n\n loadAllAddons() {\n this.loadState();\n const errors = [];\n const files = fs.readdirSync(this.addonFolder);\n\n for (const filename of files) {\n if (!fs.statSync(path.resolve(this.addonFolder, filename)).isFile() || !filename.endsWith(this.extension)) continue;\n const addon = this.loadAddon(filename, false);\n if (addon instanceof _structs_addonerror__WEBPACK_IMPORTED_MODULE_5__[\"default\"]) errors.push(addon);\n }\n\n this.saveState();\n if (_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(this.collection, this.category, this.id)) this.watchAddons();\n return errors;\n }\n\n deleteAddon(idOrFileOrAddon) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n return fs.unlinkSync(path.resolve(this.addonFolder, addon.filename));\n }\n\n saveAddon(idOrFileOrAddon, content) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n return fs.writeFileSync(path.resolve(this.addonFolder, addon.filename), content);\n }\n\n editAddon(idOrFileOrAddon, system) {\n const addon = typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n const fullPath = path.resolve(this.addonFolder, addon.filename);\n if (typeof system == \"undefined\") system = _settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(\"settings\", \"addons\", \"editAction\") == \"system\";\n if (system) return __webpack_require__(/*! electron */ \"electron\").shell.openItem(`${fullPath}`);\n return this.openDetached(addon);\n }\n\n openDetached(addon) {\n const fullPath = path.resolve(this.addonFolder, addon.filename);\n const content = fs.readFileSync(fullPath).toString();\n const editorRef = React.createRef();\n const editor = React.createElement(_ui_misc_addoneditor__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n id: \"bd-floating-editor-\" + addon.name,\n ref: editorRef,\n content: content,\n save: this.saveAddon.bind(this, addon),\n openNative: this.editAddon.bind(this, addon, true),\n language: this.language\n });\n _ui_floatingwindows__WEBPACK_IMPORTED_MODULE_11__[\"default\"].open({\n onClose: () => {\n this.isDetached = false;\n },\n onResize: () => {\n if (!editorRef || !editorRef.current || !editorRef.current.resize) return;\n editorRef.current.resize();\n },\n title: addon.name,\n id: content.id,\n className: \"floating-addon-window\",\n height: 470,\n width: 410,\n center: true,\n resizable: true,\n children: editor,\n confirmClose: () => {\n if (!editorRef || !editorRef.current) return false;\n return editorRef.current.hasUnsavedChanges;\n },\n confirmationText: _strings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Addons.confirmationText.format({\n name: addon.name\n })\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvYWRkb25tYW5hZ2VyLmpzP2NlYTkiXSwibmFtZXMiOlsiUmVhY3QiLCJEaXNjb3JkTW9kdWxlcyIsInBhdGgiLCJyZXF1aXJlIiwiZnMiLCJNb2R1bGUiLCJnbG9iYWxQYXRocyIsInB1c2giLCJyZXNvbHZlIiwicmVtb3RlIiwiYXBwIiwiZ2V0QXBwUGF0aCIsInNwbGl0UmVnZXgiLCJlc2NhcGVkQXRSZWdleCIsInN0cmlwQk9NIiwiZmlsZUNvbnRlbnQiLCJjaGFyQ29kZUF0Iiwic2xpY2UiLCJBZGRvbk1hbmFnZXIiLCJuYW1lIiwibW9kdWxlRXh0ZW5zaW9uIiwiZXh0ZW5zaW9uIiwiYWRkb25Gb2xkZXIiLCJsYW5ndWFnZSIsInByZWZpeCIsImNvbGxlY3Rpb24iLCJjYXRlZ29yeSIsImlkIiwiZW1pdCIsImV2ZW50IiwiYXJncyIsIkV2ZW50cyIsImNvbnN0cnVjdG9yIiwidGltZUNhY2hlIiwiYWRkb25MaXN0Iiwic3RhdGUiLCJpbml0aWFsaXplIiwib3JpZ2luYWxSZXF1aXJlIiwiX2V4dGVuc2lvbnMiLCJnZXRBZGRvblJlcXVpcmUiLCJTZXR0aW5ncyIsIm9uIiwiZW5hYmxlZCIsIndhdGNoQWRkb25zIiwid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c2UociA9PiBzZXRUaW1lb3V0KHIsIDEwMCkpO1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgY29uc3Qgc3RhdHMgPSBmcy5zdGF0U3luYyhwYXRoLnJlc29sdmUodGhpcy5hZGRvbkZvbGRlciwgZmlsZW5hbWUpKTtcclxuICAgICAgICAgICAgICAgIGlmICghc3RhdHMuaXNGaWxlKCkpIHJldHVybjtcclxuICAgICAgICAgICAgICAgIGlmICghc3RhdHMgfHwgIXN0YXRzLm10aW1lIHx8ICFzdGF0cy5tdGltZS5nZXRUaW1lKCkpIHJldHVybjtcclxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yoc3RhdHMubXRpbWUuZ2V0VGltZSgpKSAhPT0gXCJudW1iZXJcIikgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudGltZUNhY2hlW2ZpbGVuYW1lXSA9PSBzdGF0cy5tdGltZS5nZXRUaW1lKCkpIHJldHVybjtcclxuICAgICAgICAgICAgICAgIHRoaXMudGltZUNhY2hlW2ZpbGVuYW1lXSA9IHN0YXRzLm10aW1lLmdldFRpbWUoKTtcclxuICAgICAgICAgICAgICAgIGlmIChldmVudFR5cGUgPT0gXCJyZW5hbWVcIikgdGhpcy5sb2FkQWRkb24oZmlsZW5hbWUsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50VHlwZSA9PSBcImNoYW5nZVwiKSB0aGlzLnJlbG9hZEFkZG9uKGZpbGVuYW1lLCB0cnVlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjYXRjaCAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyLmNvZGUgIT09IFwiRU5PRU5UXCIpIHJldHVybjtcclxuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnRpbWVDYWNoZVtmaWxlbmFtZV07XHJcbiAgICAgICAgICAgICAgICB0aGlzLnVubG9hZEFkZG9uKGZpbGVu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iB0aGlzLmxhbmd1YWdlXHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIEZsb2F0aW5nV2luZG93cy5vcGVuKHtcclxuICAgICAgICAgICAgb25DbG9zZTogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5pc0RldGFjaGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG9uUmVzaXplOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWVkaXRvclJlZiB8fCAhZWRpdG9yUmVmLmN1cnJlbnQgfHwgIWVkaXRvclJlZi5jdXJyZW50LnJlc2l6ZSkgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgZWRpdG9yUmVmLmN1cnJlbnQucmVzaXplKCk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHRpdGxlOiBhZGRvbi5uYW1lLFxyXG4gICAgICAgICAgICBpZDogY29udGVudC5pZCxcclxuICAgICAgICAgICAgY2xhc3NOYW1lOiBcImZsb2F0aW5nLWFkZG9uLXdpbmRvd1wiLFxyXG4gICAgICAgICAgICBoZWlnaHQ6IDQ3MCxcclxuICAgICAgICAgICAgd2lkdGg6IDQxMCxcclxuICAgICAgICAgICAgY2VudGVyOiB0cnVlLFxyXG4gICAgICAgICAgICByZXNpemFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIGNoaWxkcmVuOiBlZGl0b3IsXHJcbiAgICAgICAgICAgIGNvbmZpcm1DbG9zZTogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFlZGl0b3JSZWYgfHwgIWVkaXRvclJlZi5jdXJyZW50KSByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZWRpdG9yUmVmLmN1cnJlbnQuaGFzVW5zYXZlZENoYW5nZXM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNvbmZpcm1hdGlvblRleHQ6IFN0cmluZ3MuQWRkb25zLmNvbmZpcm1hdGlvblRleHQuZm9ybWF0KHtuYW1lOiBhZGRvbi5uYW1lfSlcclxuICAgICAgICB9KTtcclxuICAgIH1cclxufSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/addonmanager.js\n");
/***/ }),
@@ -395,7 +419,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var data
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _localemanager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localemanager */ \"./src/modules/localemanager.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var _dommanager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dommanager */ \"./src/modules/dommanager.js\");\n/* harmony import */ var _pluginmanager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluginmanager */ \"./src/modules/pluginmanager.js\");\n/* harmony import */ var _thememanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./thememanager */ \"./src/modules/thememanager.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var builtins__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! builtins */ \"./src/builtins/builtins.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _reactcomponents__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reactcomponents */ \"./src/modules/reactcomponents.js\");\n/* harmony import */ var _datastore__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./datastore */ \"./src/modules/datastore.js\");\n/* harmony import */ var _discordmodules__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./discordmodules */ \"./src/modules/discordmodules.js\");\n/* harmony import */ var _componentpatcher__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./componentpatcher */ \"./src/modules/componentpatcher.js\");\n/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./strings */ \"./src/modules/strings.js\");\n\n\n // import EmoteModule from \"./emotes\";\n// import QuickEmoteMenu from \"../builtins/emotemenu\";\n\n\n\n\n\n\n\n\n\n\n\n\nconst GuildClasses = _discordmodules__WEBPACK_IMPORTED_MODULE_11__[\"default\"].GuildClasses;\n\nfunction Core() {}\n\nCore.prototype.setConfig = function (config) {\n Object.assign(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"], config);\n};\n\nCore.prototype.init = async function () {\n _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].initialize();\n await _localemanager__WEBPACK_IMPORTED_MODULE_0__[\"default\"].initialize();\n\n if (data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].version < data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].minSupportedVersion) {\n return _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.notSupported, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.versionMismatch.format({\n injector: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].version,\n remote: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].bbdVersion\n }));\n }\n\n if (window.ED) {\n return _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.notSupported, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.incompatibleApp.format({\n app: \"EnhancedDiscord\"\n }));\n }\n\n if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes(\"Patched\")) {\n return _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.notSupported, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.incompatibleApp.format({\n app: \"Powercord\"\n }));\n }\n\n const latestLocalVersion = data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].updater ? data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].updater.LatestVersion : data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].latestVersion;\n\n if (latestLocalVersion > data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].version) {\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showConfirmationModal(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateAvailable, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateInfo.format({\n version: latestLocalVersion\n }), {\n confirmText: _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateNow,\n cancelText: _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.maybeLater,\n onConfirm: async () => {\n const onUpdateFailed = () => {\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateFailed, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.manualUpdate);\n };\n\n try {\n const didUpdate = await this.updateInjector();\n if (!didUpdate) return onUpdateFailed();\n\n const app = __webpack_require__(/*! electron */ \"electron\").remote.app;\n\n app.relaunch();\n app.exit();\n } catch (err) {\n onUpdateFailed();\n }\n }\n });\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing Settings\");\n _settingsmanager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].initialize();\n _dommanager__WEBPACK_IMPORTED_MODULE_3__[\"default\"].initialize();\n await this.waitForGuilds();\n _reactcomponents__WEBPACK_IMPORTED_MODULE_9__[\"default\"].initialize();\n _componentpatcher__WEBPACK_IMPORTED_MODULE_12__[\"default\"].initialize();\n\n for (const module in builtins__WEBPACK_IMPORTED_MODULE_7__) builtins__WEBPACK_IMPORTED_MODULE_7__[module].initialize();\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Plugins\");\n const pluginErrors = _pluginmanager__WEBPACK_IMPORTED_MODULE_4__[\"default\"].initialize();\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Themes\");\n const themeErrors = _thememanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].initialize();\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Removing Loading Icon\");\n document.getElementsByClassName(\"bd-loaderv2\")[0].remove(); // Show loading errors\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Collecting Startup Errors\");\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showAddonErrors({\n plugins: pluginErrors,\n themes: themeErrors\n });\n const previousVersion = _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getBDData(\"version\");\n\n if (data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].bbdVersion > previousVersion) {\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showChangelogModal(data__WEBPACK_IMPORTED_MODULE_2__[\"Changelog\"]);\n _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].setBDData(\"version\", data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].bbdVersion);\n }\n};\n\nCore.prototype.waitForGuilds = function () {\n let timesChecked = 0;\n return new Promise(resolve => {\n const checkForGuilds = function () {\n timesChecked++;\n if (document.readyState != \"complete\") setTimeout(checkForGuilds, 100);\n const wrapper = GuildClasses.wrapper.split(\" \")[0];\n const guild = GuildClasses.listItem.split(\" \")[0];\n const blob = GuildClasses.blobContainer.split(\" \")[0];\n if (document.querySelectorAll(`.${wrapper} .${guild} .${blob}`).length > 0) return resolve(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].deferLoaded = true);else if (timesChecked >= 50) return resolve(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].deferLoaded = true);\n setTimeout(checkForGuilds, 100);\n };\n\n checkForGuilds();\n });\n};\n\nCore.prototype.updateInjector = async function () {\n const injectionPath = _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].injectionPath;\n if (!injectionPath) return false;\n\n const fs = __webpack_require__(/*! fs */ \"fs\");\n\n const path = __webpack_require__(/*! path */ \"path\");\n\n const rmrf = __webpack_require__(/*! rimraf */ \"rimraf\");\n\n const yauzl = __webpack_require__(/*! yauzl */ \"yauzl\");\n\n const mkdirp = __webpack_require__(/*! mkdirp */ \"mkdirp\");\n\n const request = __webpack_require__(/*! request */ \"request\");\n\n const parentPath = path.resolve(injectionPath, \"..\");\n const folderName = path.basename(injectionPath);\n const zipLink = \"https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip\";\n const savedZip = path.resolve(parentPath, \"injector.zip\");\n const extractedFolder = path.resolve(parentPath, \"BetterDiscordApp-injector\"); // Download the injector zip file\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Downloading \" + zipLink);\n let success = await new Promise(resolve => {\n request.get({\n url: zipLink,\n encoding: null\n }, async (error, response, body) => {\n if (error || response.statusCode !== 200) return resolve(false); // Save a backup in case someone has their own copy\n\n const alreadyExists = await new Promise(res => fs.exists(savedZip, res));\n if (alreadyExists) await new Promise(res => fs.rename(savedZip, `${savedZip}.bak${Math.round(performance.now())}`, res));\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Writing \" + savedZip);\n fs.writeFile(savedZip, body, err => resolve(!err));\n });\n });\n if (!success) return success; // Check and delete rename extraction\n\n const alreadyExists = await new Promise(res => fs.exists(extractedFolder, res));\n if (alreadyExists) await new Promise(res => fs.rename(extractedFolder, `${extractedFolder}.bak${Math.round(performance.now())}`, res)); // Unzip the downloaded zip file\n\n const zipfile = await new Promise(r => yauzl.open(savedZip, {\n lazyEntries: true\n }, (err, zip) => r(zip)));\n zipfile.on(\"entry\", function (entry) {\n // Skip directories, they are handled with mkdirp\n if (entry.fileName.endsWith(\"/\")) return zipfile.readEntry();\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Extracting \" + entry.fileName); // Make any needed parent directories\n\n const fullPath = path.resolve(parentPath, entry.fileName);\n mkdirp.sync(path.dirname(fullPath));\n zipfile.openReadStream(entry, function (err, readStream) {\n if (err) return success = false;\n readStream.on(\"end\", function () {\n zipfile.readEntry();\n }); // Go to next file after this\n\n readStream.pipe(fs.createWriteStream(fullPath));\n });\n });\n zipfile.readEntry(); // Start reading\n // Wait for the final file to finish\n\n await new Promise(resolve => zipfile.once(\"end\", resolve)); // Save a backup in case something goes wrong during final step\n\n const backupFolder = path.resolve(parentPath, `${folderName}.bak${Math.round(performance.now())}`);\n await new Promise(resolve => fs.rename(injectionPath, backupFolder, resolve)); // Rename the extracted folder to what it should be\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", `Renaming ${path.basename(extractedFolder)} to ${folderName}`);\n success = await new Promise(resolve => fs.rename(extractedFolder, injectionPath, err => resolve(!err)));\n\n if (!success) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].err(\"InjectorUpdate\", \"Failed to rename the final directory\");\n return success;\n } // If rename had issues, delete what we tried to rename and restore backup\n\n\n if (!success) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].err(\"InjectorUpdate\", \"Something went wrong... restoring backups.\");\n await new Promise(resolve => rmrf(extractedFolder, resolve));\n await new Promise(resolve => fs.rename(backupFolder, injectionPath, resolve));\n return success;\n } // If we've gotten to this point, everything should have gone smoothly.\n // Cleanup the backup folder then remove the zip\n\n\n await new Promise(resolve => rmrf(backupFolder, resolve));\n await new Promise(resolve => fs.unlink(savedZip, resolve));\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Injector Updated!\");\n return success;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new Core());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvY29yZS5qcz9iNmRlIl0sIm5hbWVzIjpbIkd1aWxkQ2xhc3NlcyIsIkRpc2NvcmRNb2R1bGVzIiwiQ29yZSIsInByb3RvdHlwZSIsInNldENvbmZpZyIsImNvbmZpZyIsIk9iamVjdCIsImFzc2lnbiIsIkNvbmZpZyIsImluaXQiLCJEYXRhU3RvcmUiLCJpbml0aWFsaXplIiwiTG9jYWxlTWFuYWdlciIsInZlcnNpb24iLCJtaW5TdXBwb3J0ZWRWZXJzaW9uIiwiTW9kYWxzIiwiYWxlcnQiLCJTdHJpbmdzIiwiU3RhcnR1cCIsIm5vdFN1cHBvcnRlZCIsInZlcnNpb25NaXNtYXRjaCIsImZvcm1hdCIsImluamVjdG9yIiwicmVtb3RlIiwiYmJkVmVyc2lvbiIsIndpbmRvdyIsIkVEIiwiaW5jb21wYXRpYmxlQXBwIiwiYXBwIiwiV2ViU29ja2V0IiwibmFtZSIsImluY2x1ZGVzIiwibGF0ZXN0TG9jYWxWZXJzaW9uIiwidXBkYXRlciIsIkxhdGVzdFZlcnNpb24iLCJsYXRlc3RWZXJzaW9uIiwic2hvd0NvbmZpcm1hdGlvbk1vZGFsIiwidXBkYXRlQXZhaWxhYmxlIiwidXBkYXRlSW5mbyIsImNvbmZpcm1UZXh0IiwidXBkYXRlTm93IiwiY2FuY2VsVGV4dCIsIm1heWJlTGF0ZXI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AgICAgICAgTW9kYWxzLnNob3dDb25maXJtYXRpb25Nb2RhbChTdHJpbmdzLlN0YXJ0dXAudXBkYXRlQXZhaWxhYmxlLCBTdHJpbmdzLlN0YXJ0dXAudXBkYXRlSW5mby5mb3JtYXQoe3ZlcnNpb246IGxhdGVzdExvY2FsVmVyc2lvbn0pLCB7XHJcbiAgICAgICAgICAgIGNvbmZpcm1UZXh0OiBTdHJpbmdzLlN0YXJ0dXAudXBkYXRlTm93LFxyXG4gICAgICAgICAgICBjYW5jZWxUZXh0OiBTdHJpbmdzLlN0YXJ0dXAubWF5YmVMYXRlcixcclxuICAgICAgICAgICAgb25Db25maXJtOiBhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBvblVwZGF0ZUZhaWxlZCA9ICgpID0+IHtNb2RhbHMuYWxlcnQoU3RyaW5ncy5TdGFydHVwLnVwZGF0ZUZhaWxlZCwgU3RyaW5ncy5TdGFydHVwLm1hbnVhbFVwZGF0ZSk7fTtcclxuICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGlkVXBkYXRlID0gYXdhaXQgdGhpcy51cGRhdGVJbmplY3RvcigpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghZGlkVXBkYXRlKSByZXR1cm4gb25VcGRhdGVGYWlsZWQoKTtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBhcHAgPSByZXF1aXJlKFwiZWxlY3Ryb25cIikucmVtb3RlLmFwcDtcclxuICAgICAgICAgICAgICAgICAgICBhcHAucmVsYXVuY2goKTtcclxuICAgICAgICAgICAgICAgICAgICBhcHAuZXhpdCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY2F0Y2ggKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIG9uVXBkYXRlRmFpbGVkKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB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1cHMuXCIpO1xyXG4gICAgICAgIGF3YWl0IG5ldyBQcm9taXNlKHJlc29sdmUgPT4gcm1yZihleHRyYWN0ZWRGb2xkZXIsIHJlc29sdmUpKTtcclxuICAgICAgICBhd2FpdCBuZXcgUHJvbWlzZShyZXNvbHZlID0+IGZzLnJlbmFtZShiYWNrdXBGb2xkZXIsIGluamVjdGlvblBhdGgsIHJlc29sdmUpKTtcclxuICAgICAgICByZXR1cm4gc3VjY2VzcztcclxuICAgIH1cclxuXHJcbiAgICAvLyBJZiB3ZSd2ZSBnb3R0ZW4gdG8gdGhpcyBwb2ludCwgZXZlcnl0aGluZyBzaG91bGQgaGF2ZSBnb25lIHNtb290aGx5LlxyXG4gICAgLy8gQ2xlYW51cCB0aGUgYmFja3VwIGZvbGRlciB0aGVuIHJlbW92ZSB0aGUgemlwXHJcbiAgICBhd2FpdCBuZXcgUHJvbWlzZShyZXNvbHZlID0+IHJtcmYoYmFja3VwRm9sZGVyLCByZXNvbHZlKSk7XHJcbiAgICBhd2FpdCBuZXcgUHJvbWlzZShyZXNvbHZlID0+IGZzLnVubGluayhzYXZlZFppcCwgcmVzb2x2ZSkpO1xyXG5cclxuICAgIExvZ2dlci5sb2coXCJJbmplY3RvclVwZGF0ZVwiLCBcIkluamVjdG9yIFVwZGF0ZWQhXCIpO1xyXG4gICAgcmV0dXJuIHN1Y2Nlc3M7XHJcbn07XHJcblxyXG5leHBvcnQgZGVmYXVsdCBuZXcgQ29yZSgpOyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/core.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _localemanager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./localemanager */ \"./src/modules/localemanager.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var _dommanager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dommanager */ \"./src/modules/dommanager.js\");\n/* harmony import */ var _pluginmanager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluginmanager */ \"./src/modules/pluginmanager.js\");\n/* harmony import */ var _thememanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./thememanager */ \"./src/modules/thememanager.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var builtins__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! builtins */ \"./src/builtins/builtins.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _reactcomponents__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./reactcomponents */ \"./src/modules/reactcomponents.js\");\n/* harmony import */ var _datastore__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./datastore */ \"./src/modules/datastore.js\");\n/* harmony import */ var _discordmodules__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./discordmodules */ \"./src/modules/discordmodules.js\");\n/* harmony import */ var _componentpatcher__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./componentpatcher */ \"./src/modules/componentpatcher.js\");\n/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./strings */ \"./src/modules/strings.js\");\n/* harmony import */ var _loadingicon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../loadingicon */ \"./src/loadingicon.js\");\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n\n\n // import EmoteModule from \"./emotes\";\n// import QuickEmoteMenu from \"../builtins/emotemenu\";\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst {\n ipcRenderer\n} = __webpack_require__(/*! electron */ \"electron\");\n\nconst GuildClasses = _discordmodules__WEBPACK_IMPORTED_MODULE_11__[\"default\"].GuildClasses;\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class Core {\n constructor() {\n ipcRenderer.invoke(\"bd-config\", \"get\").then(injectorConfig => {\n if (this.hasStarted) return;\n Object.assign(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"], injectorConfig);\n this.init();\n });\n }\n\n get dependencies() {\n return [{\n name: \"jquery\",\n type: \"script\",\n url: \"//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js\",\n backup: \"//cdn.jsdelivr.net/gh/jquery/jquery@2.0.0/jquery.min.js\",\n local: null\n }, {\n name: \"bd-stylesheet\",\n type: \"style\",\n url: \"//cdn.staticaly.com/gh/{{repo}}/BetterDiscordApp/{{hash}}/css/main{{minified}}.css\",\n backup: \"//rauenzi.github.io/BetterDiscordApp/css/main{{minified}}.css\",\n local: \"{{localServer}}/BetterDiscordApp/css/main.css\"\n }];\n }\n\n setConfig(config) {\n if (this.hasStarted) return;\n Object.assign(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"], config);\n }\n\n async init() {\n if (this.hasStarted) return;\n this.hasStarted = true; // Load dependencies asynchronously if they don't exist\n\n let dependencyPromise = new Promise(r => r());\n if (!window.$ || !window.jQuery) dependencyPromise = this.loadDependencies();\n _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].initialize();\n await _localemanager__WEBPACK_IMPORTED_MODULE_0__[\"default\"].initialize();\n if (data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].version < data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].minSupportedVersion) return _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.notSupported, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.versionMismatch.format({\n injector: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].version,\n remote: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].bbdVersion\n }));\n if (window.ED) return _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.notSupported, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.incompatibleApp.format({\n app: \"EnhancedDiscord\"\n }));\n if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes(\"Patched\")) return _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.notSupported, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.incompatibleApp.format({\n app: \"Powercord\"\n }));\n const latestLocalVersion = data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].updater ? data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].updater.LatestVersion : data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].latestVersion;\n\n if (latestLocalVersion > data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].version) {\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showConfirmationModal(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateAvailable, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateInfo.format({\n version: latestLocalVersion\n }), {\n confirmText: _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateNow,\n cancelText: _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.maybeLater,\n onConfirm: async () => {\n const onUpdateFailed = () => {\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.updateFailed, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.manualUpdate);\n };\n\n try {\n const didUpdate = await this.updateInjector();\n if (!didUpdate) return onUpdateFailed();\n\n const app = __webpack_require__(/*! electron */ \"electron\").remote.app;\n\n app.relaunch();\n app.exit();\n } catch (err) {\n onUpdateFailed();\n }\n }\n });\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Initializing Settings\");\n _settingsmanager__WEBPACK_IMPORTED_MODULE_6__[\"default\"].initialize(); // DOMManager.initialize();\n\n await this.waitForGuilds();\n _reactcomponents__WEBPACK_IMPORTED_MODULE_9__[\"default\"].initialize();\n _componentpatcher__WEBPACK_IMPORTED_MODULE_12__[\"default\"].initialize();\n\n for (const module in builtins__WEBPACK_IMPORTED_MODULE_7__) builtins__WEBPACK_IMPORTED_MODULE_7__[module].initialize();\n\n await dependencyPromise;\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Plugins\");\n const pluginErrors = _pluginmanager__WEBPACK_IMPORTED_MODULE_4__[\"default\"].initialize();\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Loading Themes\");\n const themeErrors = _thememanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].initialize();\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Removing Loading Icon\");\n _loadingicon__WEBPACK_IMPORTED_MODULE_14__[\"default\"].hide(); // Show loading errors\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"Startup\", \"Collecting Startup Errors\");\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showAddonErrors({\n plugins: pluginErrors,\n themes: themeErrors\n });\n const previousVersion = _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].getBDData(\"version\");\n\n if (data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].bbdVersion > previousVersion) {\n _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showChangelogModal(data__WEBPACK_IMPORTED_MODULE_2__[\"Changelog\"]);\n _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].setBDData(\"version\", data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].bbdVersion);\n }\n }\n\n waitForGuilds() {\n let timesChecked = 0;\n return new Promise(resolve => {\n const checkForGuilds = function () {\n timesChecked++;\n if (document.readyState != \"complete\") setTimeout(checkForGuilds, 100);\n const wrapper = GuildClasses.wrapper.split(\" \")[0];\n const guild = GuildClasses.listItem.split(\" \")[0];\n const blob = GuildClasses.blobContainer.split(\" \")[0];\n if (document.querySelectorAll(`.${wrapper} .${guild} .${blob}`).length > 0) return resolve(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].deferLoaded = true);else if (timesChecked >= 50) return resolve(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].deferLoaded = true);\n setTimeout(checkForGuilds, 100);\n };\n\n checkForGuilds();\n });\n }\n\n async loadDependencies() {\n for (const data of this.dependencies) {\n const url = _utilities__WEBPACK_IMPORTED_MODULE_15__[\"default\"].formatString(data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].local && data.local != null ? data.local : data.url, {\n repo: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].repo,\n hash: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].hash,\n minified: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].minified ? \".min\" : \"\",\n localServer: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].localServer\n });\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(`Startup`, `Loading Resource (${url})`);\n const injector = (data.type == \"script\" ? _dommanager__WEBPACK_IMPORTED_MODULE_3__[\"default\"].injectScript : _dommanager__WEBPACK_IMPORTED_MODULE_3__[\"default\"].linkStyle).bind(_dommanager__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n\n try {\n await injector(data.name, url);\n } catch (err) {\n const backup = _utilities__WEBPACK_IMPORTED_MODULE_15__[\"default\"].formatString(data.backup, {\n minified: data__WEBPACK_IMPORTED_MODULE_2__[\"Config\"].minified ? \".min\" : \"\"\n });\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(`Startup`, `Could not load ${url}. Using backup ${backup}`, err);\n\n try {\n await injector(data.name, backup);\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(`Startup`, `Could not load ${url}. Using backup ${backup}`, err);\n if (data.name === \"jquery\") _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].alert(_strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.jqueryFailed, _strings__WEBPACK_IMPORTED_MODULE_13__[\"default\"].Startup.jqueryFailedDetails);\n }\n }\n }\n }\n\n async updateInjector() {\n const injectionPath = _datastore__WEBPACK_IMPORTED_MODULE_10__[\"default\"].injectionPath;\n if (!injectionPath) return false;\n\n const fs = __webpack_require__(/*! fs */ \"fs\");\n\n const path = __webpack_require__(/*! path */ \"path\");\n\n const rmrf = __webpack_require__(/*! rimraf */ \"rimraf\");\n\n const yauzl = __webpack_require__(/*! yauzl */ \"yauzl\");\n\n const mkdirp = __webpack_require__(/*! mkdirp */ \"mkdirp\");\n\n const request = __webpack_require__(/*! request */ \"request\");\n\n const parentPath = path.resolve(injectionPath, \"..\");\n const folderName = path.basename(injectionPath);\n const zipLink = \"https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip\";\n const savedZip = path.resolve(parentPath, \"injector.zip\");\n const extractedFolder = path.resolve(parentPath, \"BetterDiscordApp-injector\"); // Download the injector zip file\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Downloading \" + zipLink);\n let success = await new Promise(resolve => {\n request.get({\n url: zipLink,\n encoding: null\n }, async (error, response, body) => {\n if (error || response.statusCode !== 200) return resolve(false); // Save a backup in case someone has their own copy\n\n const alreadyExists = await new Promise(res => fs.exists(savedZip, res));\n if (alreadyExists) await new Promise(res => fs.rename(savedZip, `${savedZip}.bak${Math.round(performance.now())}`, res));\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Writing \" + savedZip);\n fs.writeFile(savedZip, body, err => resolve(!err));\n });\n });\n if (!success) return success; // Check and delete rename extraction\n\n const alreadyExists = await new Promise(res => fs.exists(extractedFolder, res));\n if (alreadyExists) await new Promise(res => fs.rename(extractedFolder, `${extractedFolder}.bak${Math.round(performance.now())}`, res)); // Unzip the downloaded zip file\n\n const zipfile = await new Promise(r => yauzl.open(savedZip, {\n lazyEntries: true\n }, (err, zip) => r(zip)));\n zipfile.on(\"entry\", function (entry) {\n // Skip directories, they are handled with mkdirp\n if (entry.fileName.endsWith(\"/\")) return zipfile.readEntry();\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Extracting \" + entry.fileName); // Make any needed parent directories\n\n const fullPath = path.resolve(parentPath, entry.fileName);\n mkdirp.sync(path.dirname(fullPath));\n zipfile.openReadStream(entry, function (err, readStream) {\n if (err) return success = false;\n readStream.on(\"end\", function () {\n zipfile.readEntry();\n }); // Go to next file after this\n\n readStream.pipe(fs.createWriteStream(fullPath));\n });\n });\n zipfile.readEntry(); // Start reading\n // Wait for the final file to finish\n\n await new Promise(resolve => zipfile.once(\"end\", resolve)); // Save a backup in case something goes wrong during final step\n\n const backupFolder = path.resolve(parentPath, `${folderName}.bak${Math.round(performance.now())}`);\n await new Promise(resolve => fs.rename(injectionPath, backupFolder, resolve)); // Rename the extracted folder to what it should be\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", `Renaming ${path.basename(extractedFolder)} to ${folderName}`);\n success = await new Promise(resolve => fs.rename(extractedFolder, injectionPath, err => resolve(!err)));\n\n if (!success) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].err(\"InjectorUpdate\", \"Failed to rename the final directory\");\n return success;\n } // If rename had issues, delete what we tried to rename and restore backup\n\n\n if (!success) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].err(\"InjectorUpdate\", \"Something went wrong... restoring backups.\");\n await new Promise(resolve => rmrf(extractedFolder, resolve));\n await new Promise(resolve => fs.rename(backupFolder, injectionPath, resolve));\n return success;\n } // If we've gotten to this point, everything should have gone smoothly.\n // Cleanup the backup folder then remove the zip\n\n\n await new Promise(resolve => rmrf(backupFolder, resolve));\n await new Promise(resolve => fs.unlink(savedZip, resolve));\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].log(\"InjectorUpdate\", \"Injector Updated!\");\n return success;\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvY29yZS5qcz9iNmRlIl0sIm5hbWVzIjpbImlwY1JlbmRlcmVyIiwicmVxdWlyZSIsIkd1aWxkQ2xhc3NlcyIsIkRpc2NvcmRNb2R1bGVzIiwiQ29yZSIsImNvbnN0cnVjdG9yIiwiaW52b2tlIiwidGhlbiIsImluamVjdG9yQ29uZmlnIiwiaGFzU3RhcnRlZCIsIk9iamVjdCIsImFzc2lnbiIsIkNvbmZpZyIsImluaXQiLCJkZXBlbmRlbmNpZXMiLCJuYW1lIiwidHlwZSIsInVybCIsImJhY2t1cCIsImxvY2FsIiwic2V0Q29uZmlnIiwiY29uZmlnIiwiZGVwZW5kZW5jeVByb21pc2UiLCJQcm9taXNlIiwiciIsIndpbmRvdyIsIiQiLCJqUXVlcnkiLCJsb2FkRGVwZW5kZW5jaWVzIiwiRGF0YVN0b3JlIiwiaW5pdGlhbGl6ZSIsIkxvY2FsZU1hbmFnZXIiLCJ2ZXJzaW9uIiwibWluU3VwcG9ydGVkVmVyc2lvbiIsIk1vZGFscyIsImFsZXJ0IiwiU3RyaW5ncyIsIlN0YXJ0dXAiLCJub3RTdXBwb3J0ZWQiLCJ2ZXJzaW9uTWlz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uICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihDb25maWcsIGluamVjdG9yQ29uZmlnKTtcclxuICAgICAgICAgICAgdGhpcy5pbml0KCk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0IGRlcGVuZGVuY2llcygpIHtcclxuICAgICAgICByZXR1cm4gW1xyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiBcImpxdWVyeVwiLFxyXG4gICAgICAgICAgICAgICAgdHlwZTogXCJzY3JpcHRcIixcclxuICAgICAgICAgICAgICAgIHVybDogXCIvL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8yLjAuMC9qcXVlcnkubWluLmpzXCIsXHJcbiAgICAgICAgICAgICAgICBiYWNrdXA6IFwiLy9jZG4uanNkZWxpdnIubmV0L2doL2pxdWVyeS9qcXVlcnlAMi4wLjAvanF1ZXJ5Lm1pbi5qc1wiLFxyXG4gICAgICAgICAgICAgICAgbG9jYWw6IG51bGxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogXCJiZC1zdHlsZXNoZWV0XCIsXHJcbiAgICAgICAgICAgICAgICB0eXBlOiBcInN0eWxlXCIsXHJcbiAgICAgICAgICAgICAgICB1cmw6IFwiLy9jZG4uc3RhdGljYWx5LmNvbS9naC97e3JlcG99fS9CZXR0ZXJEaXNjb3JkQXBwL3t7aGFzaH19L2Nzcy9tYWlue3ttaW5pZmllZH19LmNzc1wiLFxyXG4gICAgICAgICAgICAgICAgYmFja3VwOiBcIi8vcmF1ZW56aS5naXRodWIuaW8vQmV0dGVyRGlzY29yZEFwcC9jc3MvbWFpbnt7bWluaWZpZWR9fS5jc3NcIixcclxuICAgICAgICAgICAgICAgIGxvY2FsOiBcInt7bG9jYWxTZXJ2ZXJ9fS9CZXR0ZXJEaXNjb3JkQXBwL2Nzcy9tYWluLmNzc1wiXHJcbiA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bGVydChTdHJpbmdzLlN0YXJ0dXAudXBkYXRlRmFpbGVkLCBTdHJpbmdzLlN0YXJ0dXAubWFudWFsVXBkYXRlKTsgfTtcclxuICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkaWRVcGRhdGUgPSBhd2FpdCB0aGlzLnVwZGF0ZUluamVjdG9yKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZGlkVXBkYXRlKSByZXR1cm4gb25VcGRhdGVGYWlsZWQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYXBwID0gcmVxdWlyZShcImVsZWN0cm9uXCIpLnJlbW90ZS5hcHA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcC5yZWxhdW5jaCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhcHAuZXhpdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uVXBkYXRlRmFpbGVkKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG5cclxuICAgICAgICBMb2dnZXIubG9nKFwiU3RhcnR1cFwiLCBcIkluaXRpYWxpemluZyBTZXR0aW5nc1wiKTtcclxuICAgICAgICBTZXR0aW5ncy5pbml0aWFsaXplKCk7XHJcblxyXG4gICAgICAgIC8vIERPTU1hbmFnZXIuaW5pdGlhbGl6ZSgpO1xyXG4gICAgICAgIGF3YWl0IHRoaXMud2FpdEZvckd1aWxkcygpO1xyXG4gICAgICAgIFJlYWN0Q29tcG9uZW50cy5pbml0aWFsaXplKCk7XHJcbiAgICAgICAgQ29tcG9uZW50UGF0Y2hlci5pbml0aWFsaXplKCk7XHJcbiAgICAgICAgZm9yIChjb25zdC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cnNpb25cIiwgQ29uZmlnLmJiZFZlcnNpb24pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICB3YWl0Rm9yR3VpbGRzKCkge1xyXG4gICAgICAgIGxldCB0aW1lc0NoZWNrZWQgPSAwO1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShyZXNvbHZlID0+IHtcclxuICAgICAgICAgICAgY29uc3QgY2hlY2tGb3JHdWlsZHMgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB0aW1lc0NoZWNrZWQrKztcclxuICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5yZWFkeVN0YXRlICE9IFwiY29tcGxldGVcIikgc2V0VGltZW91dChjaGVja0Zvckd1aWxkcywgMTAwKTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHdyYXBwZXIgPSBHdWlsZENsYXNzZXMud3JhcHBlci5zcGxpdChcIiBcIilbMF07XHJcbiAgICAgICAgICAgICAgICBjb25zdCBndWlsZCA9IEd1aWxkQ2xhc3Nlcy5saXN0SXRlbS5zcGxpdChcIiBcIilbMF07XHJcbiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0gR3VpbGRDbGFzc2VzLmJsb2JDb250YWluZXIuc3BsaXQoXCIgXCIpWzBdO1xyXG4gICAgICAgICAgICAgICAgaWYgKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoYC4ke3dyYXBwZXJ9IC4ke2d1aWxkfSAuJHtibG9ifWApLmxlbmd0aCA+IDApIHJldHVybiByZXNvbHZlKENvbmZpZy5kZWZlckxvYWRlZCA9IHRydWUpO1xyXG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodGltZXNDaGVja2VkID49IDUwKSByZXR1cm4gcmVzb2x2ZShDb25maWcuZGVmZXJMb2FkZWQgPSB0cnVlKTtcclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2hlY2tGb3JHdWlsZHMsIDEwMCk7XHJcbiAgICAgICAgICAgI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IubG9nKFwiSW5qZWN0b3JVcGRhdGVcIiwgXCJJbmplY3RvciBVcGRhdGVkIVwiKTtcclxuICAgICAgICByZXR1cm4gc3VjY2VzcztcclxuICAgIH1cclxufTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/core.js\n");
/***/ }),
@@ -431,7 +455,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 export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DOMManager; });\nclass DOMManager {\n static get bdHead() {\n return this.getElement(\"bd-head\");\n }\n\n static get bdBody() {\n return this.getElement(\"bd-body\");\n }\n\n static get bdScripts() {\n return this.getElement(\"bd-scripts\");\n }\n\n static get bdStyles() {\n return this.getElement(\"bd-styles\");\n }\n\n static get bdThemes() {\n return this.getElement(\"bd-themes\");\n }\n\n static get bdCustomCSS() {\n return this.getElement(\"#customcss\");\n } // static get bdTooltips() { return this.getElement(\"bd-tooltips\") || this.createElement(\"bd-tooltips\").appendTo(this.bdBody); }\n // static get bdModals() { return this.getElement(\"bd-modals\") || this.createElement(\"bd-modals\").appendTo(this.bdBody); }\n // static get bdToasts() { return this.getElement(\"bd-toasts\") || this.createElement(\"bd-toasts\").appendTo(this.bdBody); }\n\n\n static initialize() {\n this.createElement(\"bd-head\", {\n target: document.head\n });\n this.createElement(\"bd-body\", {\n target: document.body\n });\n this.createElement(\"bd-scripts\", {\n target: this.bdHead\n });\n this.createElement(\"bd-styles\", {\n target: this.bdHead\n });\n this.createElement(\"bd-themes\", {\n target: this.bdHead\n });\n this.createElement(\"style\", {\n id: \"customcss\",\n target: this.bdHead\n });\n }\n\n static escapeID(id) {\n return id.replace(/^[^a-z]+|[^\\w-]+/gi, \"-\");\n }\n\n static getElement(e, baseElement = document) {\n if (e instanceof Node) return e;\n return baseElement.querySelector(e);\n }\n\n static createElement(tag, options = {}) {\n const {\n className,\n id,\n target\n } = options;\n const element = document.createElement(tag);\n if (className) element.className = className;\n if (id) element.id = id;\n if (target) this.getElement(target).append(element);\n return element;\n }\n\n static removeStyle(id) {\n id = this.escapeID(id);\n const exists = this.getElement(`#${id}`, this.bdStyles);\n if (exists) exists.remove();\n }\n\n static injectStyle(id, css) {\n id = this.escapeID(id);\n const style = this.getElement(`#${id}`, this.bdStyles) || this.createElement(\"style\", {\n id\n });\n style.textContent = css;\n this.bdStyles.append(style);\n }\n\n static removeTheme(id) {\n id = this.escapeID(id);\n const exists = this.getElement(`#${id}`, this.bdThemes);\n if (exists) exists.remove();\n }\n\n static injectTheme(id, css) {\n id = this.escapeID(id);\n const style = this.getElement(`#${id}`, this.bdThemes) || this.createElement(\"style\", {\n id\n });\n style.textContent = css;\n this.bdThemes.append(style);\n }\n\n static updateCustomCSS(css) {\n this.bdCustomCSS.textContent = css;\n }\n\n static removeScript(id) {\n id = this.escapeID(id);\n const exists = this.getElement(`#${id}`, this.bdScripts);\n if (exists) exists.remove();\n }\n\n static injectScript(id, url) {\n id = this.escapeID(id);\n return new Promise(resolve => {\n const script = this.getElement(`#${id}`, this.bdScripts) || this.createElement(\"script\", {\n id\n });\n script.src = url;\n script.onload = resolve;\n this.bdScripts.append(script);\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvZG9tbWFuYWdlci5qcz9jZDVjIl0sIm5hbWVzIjpbIkRPTU1hbmFnZXIiLCJiZEhlYWQiLCJnZXRFbGVtZW50IiwiYmRCb2R5IiwiYmRTY3JpcHRzIiwiYmRTdHlsZXMiLCJiZFRoZW1lcyIsImJkQ3VzdG9tQ1NTIiwiaW5pdGlhbGl6ZSIsImNyZWF0ZUVsZW1lbnQiLCJ0YXJnZXQiLCJkb2N1bWVudCIsImhlYWQ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cclxufSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/dommanager.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return DOMManager; });\nclass DOMManager {\n static get bdHead() {\n return this.getElement(\"bd-head\");\n }\n\n static get bdBody() {\n return this.getElement(\"bd-body\");\n }\n\n static get bdScripts() {\n return this.getElement(\"bd-scripts\");\n }\n\n static get bdStyles() {\n return this.getElement(\"bd-styles\");\n }\n\n static get bdThemes() {\n return this.getElement(\"bd-themes\");\n }\n\n static get bdCustomCSS() {\n return this.getElement(\"#customcss\");\n } // static get bdTooltips() { return this.getElement(\"bd-tooltips\") || this.createElement(\"bd-tooltips\").appendTo(this.bdBody); }\n // static get bdModals() { return this.getElement(\"bd-modals\") || this.createElement(\"bd-modals\").appendTo(this.bdBody); }\n // static get bdToasts() { return this.getElement(\"bd-toasts\") || this.createElement(\"bd-toasts\").appendTo(this.bdBody); }\n // static initialize() {\n // this.createElement(\"bd-head\", {target: document.head});\n // this.createElement(\"bd-body\", {target: document.body});\n // this.createElement(\"bd-scripts\", {target: this.bdHead});\n // this.createElement(\"bd-styles\", {target: this.bdHead});\n // this.createElement(\"bd-themes\", {target: this.bdHead});\n // this.createElement(\"style\", {id: \"customcss\", target: this.bdHead});\n // }\n\n\n static escapeID(id) {\n return id.replace(/^[^a-z]+|[^\\w-]+/gi, \"-\");\n }\n\n static getElement(e, baseElement = document) {\n if (e instanceof Node) return e;\n return baseElement.querySelector(e);\n }\n\n static createElement(tag, options = {}) {\n const {\n className,\n id,\n target\n } = options;\n const element = document.createElement(tag);\n if (className) element.className = className;\n if (id) element.id = id;\n if (target) this.getElement(target).append(element);\n return element;\n }\n\n static removeStyle(id) {\n id = this.escapeID(id);\n const exists = this.getElement(`#${id}`, this.bdStyles);\n if (exists) exists.remove();\n }\n\n static injectStyle(id, css) {\n id = this.escapeID(id);\n const style = this.getElement(`#${id}`, this.bdStyles) || this.createElement(\"style\", {\n id\n });\n style.textContent = css;\n this.bdStyles.append(style);\n }\n\n static unlinkStyle(id) {\n return this.removeStyle(id);\n }\n\n static linkStyle(id, url) {\n id = this.escapeID(id);\n return new Promise(resolve => {\n const link = this.getElement(`#${id}`, this.bdStyles) || this.createElement(\"link\", {\n id\n });\n link.rel = \"stylesheet\";\n link.href = url;\n link.onload = resolve;\n this.bdStyles.append(link);\n });\n }\n\n static removeTheme(id) {\n id = this.escapeID(id);\n const exists = this.getElement(`#${id}`, this.bdThemes);\n if (exists) exists.remove();\n }\n\n static injectTheme(id, css) {\n id = this.escapeID(id);\n const style = this.getElement(`#${id}`, this.bdThemes) || this.createElement(\"style\", {\n id\n });\n style.textContent = css;\n this.bdThemes.append(style);\n }\n\n static updateCustomCSS(css) {\n this.bdCustomCSS.textContent = css;\n }\n\n static removeScript(id) {\n id = this.escapeID(id);\n const exists = this.getElement(`#${id}`, this.bdScripts);\n if (exists) exists.remove();\n }\n\n static injectScript(id, url) {\n id = this.escapeID(id);\n return new Promise(resolve => {\n const script = this.getElement(`#${id}`, this.bdScripts) || this.createElement(\"script\", {\n id\n });\n script.src = url;\n script.onload = resolve;\n this.bdScripts.append(script);\n });\n }\n\n}\nDOMManager.createElement(\"bd-head\", {\n target: document.head\n});\nDOMManager.createElement(\"bd-body\", {\n target: document.body\n});\nDOMManager.createElement(\"bd-scripts\", {\n target: DOMManager.bdHead\n});\nDOMManager.createElement(\"bd-styles\", {\n target: DOMManager.bdHead\n});\nDOMManager.createElement(\"bd-themes\", {\n target: DOMManager.bdHead\n});\nDOMManager.createElement(\"style\", {\n id: \"customcss\",\n target: DOMManager.bdHead\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvZG9tbWFuYWdlci5qcz9jZDVjIl0sIm5hbWVzIjpbIkRPTU1h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tZXNcIiwge3RhcmdldDogRE9NTWFuYWdlci5iZEhlYWR9KTtcclxuRE9NTWFuYWdlci5jcmVhdGVFbGVtZW50KFwic3R5bGVcIiwge2lkOiBcImN1c3RvbWNzc1wiLCB0YXJnZXQ6IERPTU1hbmFnZXIuYmRIZWFkfSk7Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/dommanager.js\n");
/***/ }),
@@ -515,7 +539,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n/* harmony import */ var _webpackmodules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./webpackmodules */ \"./src/modules/webpackmodules.js\");\n/* harmony import */ var _discordmodules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./discordmodules */ \"./src/modules/discordmodules.js\");\n/* harmony import */ var _datastore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datastore */ \"./src/modules/datastore.js\");\n/* harmony import */ var _dommanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dommanager */ \"./src/modules/dommanager.js\");\n/* harmony import */ var _ui_toasts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ui/toasts */ \"./src/ui/toasts.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _pluginmanager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pluginmanager */ \"./src/modules/pluginmanager.js\");\n/* harmony import */ var _thememanager__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./thememanager */ \"./src/modules/thememanager.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nconst BdApi = {\n get React() {\n return _discordmodules__WEBPACK_IMPORTED_MODULE_3__[\"default\"].React;\n },\n\n get ReactDOM() {\n return _discordmodules__WEBPACK_IMPORTED_MODULE_3__[\"default\"].ReactDOM;\n },\n\n get WindowConfigFile() {\n return \"\";\n },\n\n get settings() {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].collections;\n },\n\n get emotes() {\n return {};\n },\n\n get version() {\n return data__WEBPACK_IMPORTED_MODULE_0__[\"Config\"].version;\n }\n\n};\n\nBdApi.getAllWindowPreferences = function () {\n return _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getData(\"windowprefs\") || {};\n};\n\nBdApi.getWindowPreference = function (key) {\n return this.getAllWindowPreferences()[key];\n};\n\nBdApi.setWindowPreference = function (key, value) {\n const prefs = this.getAllWindowPreferences();\n prefs[key] = value;\n return _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setData(\"windowprefs\", prefs);\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.injectCSS = function (id, css) {\n _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].injectStyle(id, css);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.clearCSS = function (id) {\n _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].removeStyle(id);\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.linkJS = function (id, url) {\n return _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].injectScript(id, url);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.unlinkJS = function (id) {\n _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].removeScript(id);\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 _ui_modals__WEBPACK_IMPORTED_MODULE_7__[\"default\"].alert(title, content);\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. Everything is wrapped in Discord's `TextElement` 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 */\n\n\nBdApi.showConfirmationModal = function (title, content, options = {}) {\n return _ui_modals__WEBPACK_IMPORTED_MODULE_7__[\"default\"].showConfirmationModal(title, content, options);\n};\n/**\r\n * This shows a toast similar to android towards the bottom of the screen.\r\n *\r\n * @param {string} content The string to show in the toast.\r\n * @param {object} options Options object. Optional parameter.\r\n * @param {string} [options.type=\"\"] Changes the type of the toast stylistically and semantically. Choices: \"\", \"info\", \"success\", \"danger\"/\"error\", \"warning\"/\"warn\". Default: \"\"\r\n * @param {boolean} [options.icon=true] Determines whether the icon should show corresponding to the type. A toast without type will always have no icon. Default: true\r\n * @param {number} [options.timeout=3000] Adjusts the time (in ms) the toast should be shown for before disappearing automatically. Default: 3000\r\n * @param {boolean} [options.forceShow=false] Whether to force showing the toast and ignore the bd setting\r\n */\n\n\nBdApi.showToast = function (content, options = {}) {\n _ui_toasts__WEBPACK_IMPORTED_MODULE_6__[\"default\"].show(content, options);\n}; // Finds module\n\n\nBdApi.findModule = function (filter) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getModule(filter);\n}; // Finds module\n\n\nBdApi.findAllModules = function (filter) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getModule(filter, false);\n}; // Finds module\n\n\nBdApi.findModuleByProps = function (...props) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getByProps(...props);\n};\n\nBdApi.findModuleByPrototypes = function (...protos) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getByPrototypes(...protos);\n};\n\nBdApi.findModuleByDisplayName = function (name) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getByDisplayName(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 _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getReactInstance(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 const {\n before,\n after,\n instead,\n once = false,\n silent = false,\n force = false\n } = options;\n const displayName = options.displayName || what.displayName || what.name || what.constructor.displayName || what.constructor.name;\n if (!silent) console.log(\"patch\", methodName, \"of\", displayName); // eslint-disable-line no-console\n\n if (!what[methodName]) {\n if (force) what[methodName] = function () {};else return console.error(methodName, \"does not exist for\", displayName); // eslint-disable-line no-console\n }\n\n const origMethod = what[methodName];\n\n const cancel = () => {\n if (!silent) console.log(\"unpatch\", methodName, \"of\", displayName); // eslint-disable-line no-console\n\n what[methodName] = origMethod;\n };\n\n what[methodName] = function () {\n const data = {\n thisObject: this,\n methodArguments: arguments,\n cancelPatch: cancel,\n originalMethod: origMethod,\n callOriginalMethod: () => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)\n };\n\n if (instead) {\n const tempRet = _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(instead, \"`instead` callback of \" + what[methodName].displayName)(data);\n if (tempRet !== undefined) data.returnValue = tempRet;\n } else {\n if (before) _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(before, \"`before` callback of \" + what[methodName].displayName)(data);\n data.callOriginalMethod();\n if (after) _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(after, \"`after` callback of \" + what[methodName].displayName)(data);\n }\n\n if (once) cancel();\n return data.returnValue;\n };\n\n what[methodName].__monkeyPatched = true;\n if (!what[methodName].__originalMethod) what[methodName].__originalMethod = origMethod;\n what[methodName].displayName = \"patched \" + (what[methodName].displayName || methodName);\n return cancel;\n}; // Event when element is removed\n\n\nBdApi.onRemoved = function (node, callback) {\n return _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].onRemoved(node, callback);\n}; // Wraps function in try..catch\n\n\nBdApi.suppressErrors = function (method, message) {\n return _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(method, message);\n}; // Tests for valid JSON\n\n\nBdApi.testJSON = function (data) {\n return _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].testJSON(data);\n}; //Get another plugin\n//name = name of plugin\n\n\nBdApi.getPlugin = function (name) {\n _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].warn(\"BdApi\", \"getPlugin is deprecated. Please make use of the addon api (BdApi.Plugins)\");\n return _pluginmanager__WEBPACK_IMPORTED_MODULE_8__[\"default\"].addonList.find(a => a.name == name);\n};\n\nBdApi.isPluginEnabled = function (name) {\n _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].warn(\"BdApi\", \"isPluginEnabled is deprecated. Please make use of the addon api (BdApi.Plugins)\");\n const plugin = this.getPlugin(name);\n if (!plugin) return false;\n return _pluginmanager__WEBPACK_IMPORTED_MODULE_8__[\"default\"].isEnabled(plugin.id);\n};\n\nBdApi.isThemeEnabled = function (name) {\n _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].warn(\"BdApi\", \"isThemeEnabled is deprecated. Please make use of the addon api (BdApi.Themes)\");\n const theme = _thememanager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].addonList.find(a => a.name == name);\n if (!theme) return false;\n return _thememanager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].isEnabled(theme.id);\n};\n\nBdApi.isSettingEnabled = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].get(collection, category, id);\n};\n\nBdApi.enableSetting = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].set(collection, category, id, true);\n};\n\nBdApi.disableSetting = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].set(collection, category, id, false);\n};\n\nBdApi.toggleSetting = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].set(collection, category, id, !_settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].get(collection, category, 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 = manager => new class AddonAPI {\n get folder() {\n return manager.addonFolder;\n }\n\n isEnabled(idOrFile) {\n return manager.isEnabled(idOrFile);\n }\n\n enable(idOrAddon) {\n return manager.enableAddon(idOrAddon);\n }\n\n disable(idOrAddon) {\n return manager.disableAddon(idOrAddon);\n }\n\n toggle(idOrAddon) {\n return manager.toggleAddon(idOrAddon);\n }\n\n reload(idOrFileOrAddon) {\n return manager.reloadAddon(idOrFileOrAddon);\n }\n\n get(idOrFile) {\n return manager.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n }\n\n getAll() {\n return manager.addonList;\n }\n\n}();\n\nBdApi.Plugins = makeAddonAPI(_pluginmanager__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\nBdApi.Themes = makeAddonAPI(_thememanager__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\nObject.freeze(BdApi);\nObject.freeze(BdApi.Plugins);\nObject.freeze(BdApi.Themes);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BdApi);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvcGx1Z2luYXBpLmpzPzZhOTMiXSwibmFtZXMiOlsiQmRBcGkiLCJSZWFjdCIsIkRpc2NvcmRNb2R1bGVzIiwiUmVhY3RET00iLCJXaW5kb3dDb25maWdGaWxlIiwic2V0dGluZ3MiLCJTZXR0aW5ncyIsImNvbGxlY3Rpb25zIiwiZW1vdGVzIiwidmVyc2lvbiIsIkNvbmZpZyIsImdldEFsbFdpbmRvd1ByZWZlcmVuY2VzIiwiRGF0YVN0b3JlIiwiZ2V0RGF0YSIsImdldFdpbmRvd1ByZWZlcmVuY2UiLCJrZXkiLCJzZXRXaW5kb3dQcmVmZXJlbmNlIiwidmFsdWUiLCJwcmVmcyIsInNldERhdGEiLCJpbmplY3RDU1MiLCJpZCIsImNzcyIsIkRPTU1hbmFnZXIiLCJpbmplY3RTdHlsZSIsImNsZWFyQ1NTIiwicmVtb3ZlU3R5b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js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n/* harmony import */ var _webpackmodules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./webpackmodules */ \"./src/modules/webpackmodules.js\");\n/* harmony import */ var _discordmodules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./discordmodules */ \"./src/modules/discordmodules.js\");\n/* harmony import */ var _datastore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./datastore */ \"./src/modules/datastore.js\");\n/* harmony import */ var _dommanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dommanager */ \"./src/modules/dommanager.js\");\n/* harmony import */ var _ui_toasts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ui/toasts */ \"./src/ui/toasts.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _pluginmanager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pluginmanager */ \"./src/modules/pluginmanager.js\");\n/* harmony import */ var _thememanager__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./thememanager */ \"./src/modules/thememanager.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _patcher__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./patcher */ \"./src/modules/patcher.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst BdApi = {\n get React() {\n return _discordmodules__WEBPACK_IMPORTED_MODULE_3__[\"default\"].React;\n },\n\n get ReactDOM() {\n return _discordmodules__WEBPACK_IMPORTED_MODULE_3__[\"default\"].ReactDOM;\n },\n\n get WindowConfigFile() {\n return \"\";\n },\n\n get settings() {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].collections;\n },\n\n get emotes() {\n return {};\n },\n\n get version() {\n return data__WEBPACK_IMPORTED_MODULE_0__[\"Config\"].version;\n }\n\n};\n\nBdApi.getAllWindowPreferences = function () {\n return _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getData(\"windowprefs\") || {};\n};\n\nBdApi.getWindowPreference = function (key) {\n return this.getAllWindowPreferences()[key];\n};\n\nBdApi.setWindowPreference = function (key, value) {\n const prefs = this.getAllWindowPreferences();\n prefs[key] = value;\n return _datastore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].setData(\"windowprefs\", prefs);\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.injectCSS = function (id, css) {\n _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].injectStyle(id, css);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.clearCSS = function (id) {\n _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].removeStyle(id);\n}; //Inject CSS to document head\n//id = id of element\n//css = custom css\n\n\nBdApi.linkJS = function (id, url) {\n return _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].injectScript(id, url);\n}; //Clear css/remove any element\n//id = id of element\n\n\nBdApi.unlinkJS = function (id) {\n _dommanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].removeScript(id);\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 _ui_modals__WEBPACK_IMPORTED_MODULE_7__[\"default\"].alert(title, content);\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. Everything is wrapped in Discord's `TextElement` 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 */\n\n\nBdApi.showConfirmationModal = function (title, content, options = {}) {\n return _ui_modals__WEBPACK_IMPORTED_MODULE_7__[\"default\"].showConfirmationModal(title, content, options);\n};\n/**\r\n * This shows a toast similar to android towards the bottom of the screen.\r\n *\r\n * @param {string} content The string to show in the toast.\r\n * @param {object} options Options object. Optional parameter.\r\n * @param {string} [options.type=\"\"] Changes the type of the toast stylistically and semantically. Choices: \"\", \"info\", \"success\", \"danger\"/\"error\", \"warning\"/\"warn\". Default: \"\"\r\n * @param {boolean} [options.icon=true] Determines whether the icon should show corresponding to the type. A toast without type will always have no icon. Default: true\r\n * @param {number} [options.timeout=3000] Adjusts the time (in ms) the toast should be shown for before disappearing automatically. Default: 3000\r\n * @param {boolean} [options.forceShow=false] Whether to force showing the toast and ignore the bd setting\r\n */\n\n\nBdApi.showToast = function (content, options = {}) {\n _ui_toasts__WEBPACK_IMPORTED_MODULE_6__[\"default\"].show(content, options);\n}; // Finds module\n\n\nBdApi.findModule = function (filter) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getModule(filter);\n}; // Finds module\n\n\nBdApi.findAllModules = function (filter) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getModule(filter, false);\n}; // Finds module\n\n\nBdApi.findModuleByProps = function (...props) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getByProps(...props);\n};\n\nBdApi.findModuleByPrototypes = function (...protos) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getByPrototypes(...protos);\n};\n\nBdApi.findModuleByDisplayName = function (name) {\n return _webpackmodules__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getByDisplayName(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 _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getReactInstance(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// BdApi.monkeyPatch = function(what, methodName, options) {\n// const {before, after, instead, once = false, silent = false, force = false} = options;\n// const displayName = options.displayName || what.displayName || what.name || what.constructor.displayName || what.constructor.name;\n// if (!silent) console.log(\"patch\", methodName, \"of\", displayName); // eslint-disable-line no-console\n// if (!what[methodName]) {\n// if (force) what[methodName] = function() {};\n// else return console.error(methodName, \"does not exist for\", displayName); // eslint-disable-line no-console\n// }\n// const origMethod = what[methodName];\n// const cancel = () => {\n// if (!silent) console.log(\"unpatch\", methodName, \"of\", displayName); // eslint-disable-line no-console\n// what[methodName] = origMethod;\n// };\n// what[methodName] = function() {\n// const data = {\n// thisObject: this,\n// methodArguments: arguments,\n// cancelPatch: cancel,\n// originalMethod: origMethod,\n// callOriginalMethod: () => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)\n// };\n// if (instead) {\n// const tempRet = Utilities.suppressErrors(instead, \"`instead` callback of \" + what[methodName].displayName)(data);\n// if (tempRet !== undefined) data.returnValue = tempRet;\n// }\n// else {\n// if (before) Utilities.suppressErrors(before, \"`before` callback of \" + what[methodName].displayName)(data);\n// data.callOriginalMethod();\n// if (after) Utilities.suppressErrors(after, \"`after` callback of \" + what[methodName].displayName)(data);\n// }\n// if (once) cancel();\n// return data.returnValue;\n// };\n// what[methodName].__monkeyPatched = true;\n// if (!what[methodName].__originalMethod) what[methodName].__originalMethod = origMethod;\n// what[methodName].displayName = \"patched \" + (what[methodName].displayName || methodName);\n// return cancel;\n// };\n\n\nBdApi.monkeyPatch = function (what, methodName, options) {\n const {\n before,\n after,\n instead,\n once = false\n } = options;\n const patchType = before ? \"before\" : after ? \"after\" : instead ? \"instead\" : \"\";\n if (!patchType) return _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].err(\"BdApi\", \"Must provide one of: after, before, instead\");\n const originalMethod = what[methodName];\n const data = {\n originalMethod: originalMethod,\n callOriginalMethod: () => data.originalMethod.apply(data.thisObject, data.methodArguments)\n };\n data.cancelPatch = _patcher__WEBPACK_IMPORTED_MODULE_12__[\"default\"][patchType](\"BdApi\", what, methodName, (thisObject, args, returnValue) => {\n data.thisObject = thisObject;\n data.methodArguments = args;\n data.returnValue = returnValue;\n\n try {\n Reflect.apply(options[patchType], null, [data]);\n if (once) data.cancelPatch();\n } catch (err) {// Logger.err(\"monkeyPatch\", `Error in the ${patchType} of ${methodName}`);\n }\n });\n}; // Event when element is removed\n\n\nBdApi.onRemoved = function (node, callback) {\n return _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].onRemoved(node, callback);\n}; // Wraps function in try..catch\n\n\nBdApi.suppressErrors = function (method, message) {\n return _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].suppressErrors(method, message);\n}; // Tests for valid JSON\n\n\nBdApi.testJSON = function (data) {\n return _utilities__WEBPACK_IMPORTED_MODULE_1__[\"default\"].testJSON(data);\n}; //Get another plugin\n//name = name of plugin\n\n\nBdApi.getPlugin = function (name) {\n _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].warn(\"BdApi\", \"getPlugin is deprecated. Please make use of the addon api (BdApi.Plugins)\");\n return _pluginmanager__WEBPACK_IMPORTED_MODULE_8__[\"default\"].addonList.find(a => a.name == name);\n};\n\nBdApi.isPluginEnabled = function (name) {\n _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].warn(\"BdApi\", \"isPluginEnabled is deprecated. Please make use of the addon api (BdApi.Plugins)\");\n const plugin = this.getPlugin(name);\n if (!plugin) return false;\n return _pluginmanager__WEBPACK_IMPORTED_MODULE_8__[\"default\"].isEnabled(plugin.id);\n};\n\nBdApi.isThemeEnabled = function (name) {\n _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].warn(\"BdApi\", \"isThemeEnabled is deprecated. Please make use of the addon api (BdApi.Themes)\");\n const theme = _thememanager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].addonList.find(a => a.name == name);\n if (!theme) return false;\n return _thememanager__WEBPACK_IMPORTED_MODULE_9__[\"default\"].isEnabled(theme.id);\n};\n\nBdApi.isSettingEnabled = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].get(collection, category, id);\n};\n\nBdApi.enableSetting = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].set(collection, category, id, true);\n};\n\nBdApi.disableSetting = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].set(collection, category, id, false);\n};\n\nBdApi.toggleSetting = function (collection, category, id) {\n return _settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].set(collection, category, id, !_settingsmanager__WEBPACK_IMPORTED_MODULE_10__[\"default\"].get(collection, category, 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 = manager => new class AddonAPI {\n get folder() {\n return manager.addonFolder;\n }\n\n isEnabled(idOrFile) {\n return manager.isEnabled(idOrFile);\n }\n\n enable(idOrAddon) {\n return manager.enableAddon(idOrAddon);\n }\n\n disable(idOrAddon) {\n return manager.disableAddon(idOrAddon);\n }\n\n toggle(idOrAddon) {\n return manager.toggleAddon(idOrAddon);\n }\n\n reload(idOrFileOrAddon) {\n return manager.reloadAddon(idOrFileOrAddon);\n }\n\n get(idOrFile) {\n return manager.getAddon(idOrFile);\n }\n\n getAll() {\n return manager.addonList.map(a => manager.getAddon(a.id));\n }\n\n}();\n\nBdApi.Plugins = makeAddonAPI(_pluginmanager__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\nBdApi.Themes = makeAddonAPI(_thememanager__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\nBdApi.Patcher = {\n patch: (caller, moduleToPatch, functionName, callback, options = {}) => {\n if (typeof caller !== \"string\") return _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].err(\"BdApi.Patcher\", \"Parameter 0 of patch must be a string representing the caller\");\n if (options.type !== \"before\" && options.type !== \"instead\" && options.type !== \"after\") return _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].err(\"BdApi.Patcher\", \"options.type must be one of: before, instead, after\");\n return _patcher__WEBPACK_IMPORTED_MODULE_12__[\"default\"].pushChildPatch(caller, moduleToPatch, functionName, callback, options);\n },\n before: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {\n type: \"before\"\n })),\n instead: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {\n type: \"instead\"\n })),\n after: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {\n type: \"after\"\n })),\n unpatchAll: caller => {\n if (typeof caller !== \"string\") return _logger__WEBPACK_IMPORTED_MODULE_11__[\"default\"].err(\"BdApi.Patcher\", \"Parameter 0 of unpatchAll must be a string representing the caller\");\n return _patcher__WEBPACK_IMPORTED_MODULE_12__[\"default\"].unpatchAll(caller);\n }\n};\nObject.freeze(BdApi);\nObject.freeze(BdApi.Plugins);\nObject.freeze(BdApi.Themes);\nObject.freeze(BdApi.Patcher);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BdApi);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvcGx1Z2luYXBpLmpzPzZhOTMiXSwibmFtZXMiOlsiQmRBcGkiLCJSZWFjdCIsIkRpc2NvcmRNb2R1bGVzIiwiUmVhY3RET00iLCJXaW5kb3dDb25maWdGaWxlIiwic2V0dGluZ3MiLCJTZXR0aW5ncyIsImNvbGxlY3Rpb25zIiwiZW1vdGVzIiwidmVyc2lvbiIsIkNvbmZpZyIsImdldEFsbFdpbmRvd1ByZWZlcmVuY2VzIiwiRGF0YVN0b3JlIiwiZ2V0RGF0YSIsImdldFdpbmRvd1ByZWZlcmVuY2UiLCJrZXkiLCJzZXRXaW5kb3dQcmVmZXJlbmNlIiwidmFsdWUiLCJwcmVmcyIsInNldERhdGEiLCJpbmplY3RDU1MiLCJpZCIsImNzcyIsIkRPTU1hbmFnZXIiLCJpbmplY3RTdHlsZSIsImNsZWFyQ1NTIiwicmVtb3ZlU3R5bGUiLCJsaW5rSlMiLCJ1cmwiLCJpbmplY3RTY3JpcHQiLCJ1bmxpbmtKUyIsInJlbW92ZVNjcmlwdCIsImFsZXJ0IiwidGl0bGUiLCJjb250ZW50IiwiTW9kYWxzIiwic2hvd0NvbmZpcm1hdGlvbk1vZ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2hlci5wYXRjaChjYWxsZXIsIG1vZHVsZVRvUGF0Y2gsIGZ1bmN0aW9uTmFtZSwgY2FsbGJhY2ssIE9iamVjdC5hc3NpZ24ob3B0aW9ucywge3R5cGU6IFwiaW5zdGVhZFwifSkpLFxyXG4gICAgYWZ0ZXI6IChjYWxsZXIsIG1vZHVsZVRvUGF0Y2gsIGZ1bmN0aW9uTmFtZSwgY2FsbGJhY2ssIG9wdGlvbnMgPSB7fSkgPT4gQmRBcGkuUGF0Y2hlci5wYXRjaChjYWxsZXIsIG1vZHVsZVRvUGF0Y2gsIGZ1bmN0aW9uTmFtZSwgY2FsbGJhY2ssIE9iamVjdC5hc3NpZ24ob3B0aW9ucywge3R5cGU6IFwiYWZ0ZXJcIn0pKSxcclxuICAgIHVucGF0Y2hBbGw6IChjYWxsZXIpID0+IHtcclxuICAgICAgICBpZiAodHlwZW9mKGNhbGxlcikgIT09IFwic3RyaW5nXCIpIHJldHVybiBMb2dnZXIuZXJyKFwiQmRBcGkuUGF0Y2hlclwiLCBcIlBhcmFtZXRlciAwIG9mIHVucGF0Y2hBbGwgbXVzdCBiZSBhIHN0cmluZyByZXByZXNlbnRpbmcgdGhlIGNhbGxlclwiKTtcclxuICAgICAgICByZXR1cm4gUGF0Y2hlci51bnBhdGNoQWxsKGNhbGxlcik7XHJcbiAgICB9XHJcbn07XHJcblxyXG5PYmplY3QuZnJlZXplKEJkQXBpKTtcclxuT2JqZWN0LmZyZWV6ZShCZEFwaS5QbHVnaW5zKTtcclxuT2JqZWN0LmZyZWV6ZShCZEFwaS5UaGVtZXMpO1xyXG5PYmplY3QuZnJlZXplKEJkQXBpLlBhdGNoZXIpO1xyXG5cclxuZXhwb3J0IGRlZmF1bHQgQmRBcGk7Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/modules/pluginapi.js\n");
/***/ }),
@@ -527,7 +551,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var data
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _addonmanager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addonmanager */ \"./src/modules/addonmanager.js\");\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n/* harmony import */ var _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../structs/addonerror */ \"./src/structs/addonerror.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./strings */ \"./src/modules/strings.js\");\n/* harmony import */ var _ui_toasts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/toasts */ \"./src/ui/toasts.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _ui_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/settings */ \"./src/ui/settings.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst electronRemote = __webpack_require__(/*! electron */ \"electron\").remote;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class PluginManager extends _addonmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"] {\n get name() {\n return \"PluginManager\";\n }\n\n get moduleExtension() {\n return \".js\";\n }\n\n get extension() {\n return \".plugin.js\";\n }\n\n get addonFolder() {\n return path.resolve(data__WEBPACK_IMPORTED_MODULE_0__[\"Config\"].dataPath, \"plugins\");\n }\n\n get prefix() {\n return \"plugin\";\n }\n\n get language() {\n return \"javascript\";\n }\n\n constructor() {\n super();\n this.onSwitch = this.onSwitch.bind(this);\n this.observer = new MutationObserver(mutations => {\n for (let i = 0, mlen = mutations.length; i < mlen; i++) {\n this.onMutation(mutations[i]);\n }\n });\n }\n\n initialize() {\n const errors = super.initialize();\n this.setupFunctions();\n _settingsmanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].registerPanel(\"plugins\", _strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Panels.plugins, {\n element: () => _ui_settings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].getAddonPanel(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Panels.plugins, this.addonList, this.state, {\n folder: this.addonFolder,\n onChange: this.togglePlugin.bind(this),\n reload: this.reloadPlugin.bind(this),\n refreshList: this.updatePluginList.bind(this),\n saveAddon: this.saveAddon.bind(this),\n editAddon: this.editAddon.bind(this),\n deleteAddon: this.deleteAddon.bind(this),\n prefix: this.prefix\n })\n });\n return errors;\n }\n /* Aliases */\n\n\n updatePluginList() {\n return this.updateList();\n }\n\n loadAllPlugins() {\n return this.loadAllAddons();\n }\n\n enablePlugin(idOrAddon) {\n return this.enableAddon(idOrAddon);\n }\n\n disablePlugin(idOrAddon) {\n return this.disableAddon(idOrAddon);\n }\n\n togglePlugin(id) {\n return this.toggleAddon(id);\n }\n\n unloadPlugin(idOrFileOrAddon) {\n return this.unloadAddon(idOrFileOrAddon);\n }\n\n loadPlugin(filename) {\n const error = this.loadAddon(filename);\n if (error) _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showAddonErrors({\n themes: [error]\n });\n }\n\n reloadPlugin(idOrFileOrAddon) {\n const error = this.reloadAddon(idOrFileOrAddon);\n if (error) _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showAddonErrors({\n plugins: [error]\n });\n return typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n }\n /* Overrides */\n\n\n initializeAddon(addon) {\n if (!addon.type) return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"Plugin had no exports\", {\n message: \"Plugin had no exports or no name property.\",\n stack: \"\"\n });\n\n try {\n const thePlugin = new addon.type();\n addon.plugin = thePlugin;\n addon.name = thePlugin.getName() || addon.name;\n addon.author = thePlugin.getAuthor() || addon.author || \"No author\";\n addon.description = thePlugin.getDescription() || addon.description || \"No description\";\n addon.version = thePlugin.getVersion() || addon.version || \"No version\";\n\n try {\n if (typeof addon.plugin.load == \"function\") addon.plugin.load();\n } catch (error) {\n this.state[addon.id] = false;\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"load() could not be fired.\", {\n message: error.message,\n stack: error.stack\n });\n }\n } catch (error) {\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"Could not be constructed.\", {\n message: error.message,\n stack: error.stack\n });\n }\n }\n\n getFileModification(module, fileContent, meta) {\n module._compile(fileContent, module.filename);\n\n const didExport = !_utilities__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isEmpty(module.exports);\n\n if (didExport) {\n meta.type = module.exports;\n module.exports = meta;\n return \"\";\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].warn(this.name, `${meta.name}, please start assigning module.exports`);\n fileContent += `\\nmodule.exports = ${JSON.stringify(meta)};\\nmodule.exports.type = ${meta.exports || meta.name};`;\n return fileContent;\n }\n\n startAddon(id) {\n return this.startPlugin(id);\n }\n\n stopAddon(id) {\n return this.stopPlugin(id);\n }\n\n startPlugin(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n const plugin = addon.plugin;\n\n try {\n plugin.start();\n this.emit(\"started\", addon.id);\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].show(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.enabled.format({\n name: addon.name,\n version: addon.version\n }));\n } catch (err) {\n this.state[addon.id] = false;\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(`${addon.name} v${addon.version} could not be started.`);\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, addon.name + \" could not be started.\", err);\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"start() could not be fired.\", {\n message: err.message,\n stack: err.stack\n });\n }\n }\n\n stopPlugin(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n const plugin = addon.plugin;\n\n try {\n plugin.stop();\n this.emit(\"stopped\", addon.id);\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].show(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.disabled.format({\n name: addon.name,\n version: addon.version\n }));\n } catch (err) {\n this.state[addon.id] = false;\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(`${addon.name} v${addon.version} could not be stopped.`);\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, addon.name + \" could not be stopped.\", err);\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"stop() could not be fired.\", {\n message: err.message,\n stack: err.stack\n });\n }\n }\n\n setupFunctions() {\n electronRemote.getCurrentWebContents().on(\"did-navigate-in-page\", this.onSwitch.bind(this));\n this.observer.observe(document, {\n childList: true,\n subtree: true\n });\n }\n\n onSwitch() {\n this.emit(\"page-switch\");\n\n for (let i = 0; i < this.addonList.length; i++) {\n const plugin = this.addonList[i].plugin;\n if (!this.state[this.addonList[i].id]) continue;\n\n if (typeof plugin.onSwitch === \"function\") {\n try {\n plugin.onSwitch();\n } catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, \"Unable to fire onSwitch for \" + this.addonList[i].name + \".\", err);\n }\n }\n }\n }\n\n onMutation(mutation) {\n for (let i = 0; i < this.addonList.length; i++) {\n const plugin = this.addonList[i].plugin;\n if (!this.state[this.addonList[i].id]) continue;\n\n if (typeof plugin.observer === \"function\") {\n try {\n plugin.observer(mutation);\n } catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, \"Unable to fire observer for \" + this.addonList[i].name + \".\", err);\n }\n }\n }\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvcGx1Z2lubWFuYWdlci5qcz9kMTczIl0sIm5hbWVzIjpbInBhdGgiLCJyZXF1aXJlIiwiZWxlY3Ryb25SZW1vdGUiLCJyZW1vdGUiLCJQbHVnaW5NYW5hZ2VyIiwiQWRkb25NYW5hZ2VyIiwibmFtZSIsIm1vZHVsZUV4dGVuc2lvbiIsImV4dGVuc2lvbiIsImFkZG9uRm9sZGVyIiwicmVzb2x2ZSIsIkNvbmZpZyIsImRhdGFQYXRoIiwicHJlZml4IiwibGFuZ3VhZ2UiLCJjb25zdHJ1Y3RvciIsIm9uU3dpdGNoIiwiYmluZCIsIm9ic2VydmVyIiwiTXV0YXRpb25PYnNlcnZlciIsIm11dGF0aW9ucyIsImkiLCJtbGVuIiwibGVuZ3RoIiwib25NdXRhdGlvbiIsImluaXRpYWxpemUiLCJlcnJvcnMiLCJzZXR1cEZ1bmN0aW9ucyIsIlNldHRpbmdzIiwicmVnaXN0ZXJQYW5lbCIsIlN0cmluZ3MiLCJQYW5lbHMiLCJwbHVnaW5zIiwiZWxlbWVudCIsIlN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3IgKGxldCBpID0gMDsgaSA8IHRoaXMuYWRkb25MaXN0Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHBsdWdpbiA9IHRoaXMuYWRkb25MaXN0W2ldLnBsdWdpbjtcclxuICAgICAgICAgICAgaWYgKCF0aGlzLnN0YXRlW3RoaXMuYWRkb25MaXN0W2ldLmlkXSkgY29udGludWU7XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgcGx1Z2luLm9ic2VydmVyID09PSBcImZ1bmN0aW9uXCIpIHtcclxuICAgICAgICAgICAgICAgIHRyeSB7IHBsdWdpbi5vYnNlcnZlcihtdXRhdGlvbik7IH1cclxuICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsgTG9nZ2VyLnN0YWNrdHJhY2UodGhpcy5uYW1lLCBcIlVuYWJsZSB0byBmaXJlIG9ic2VydmVyIGZvciBcIiArIHRoaXMuYWRkb25MaXN0W2ldLm5hbWUgKyBcIi5cIiwgZXJyKTsgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59OyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/pluginmanager.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _addonmanager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addonmanager */ \"./src/modules/addonmanager.js\");\n/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utilities */ \"./src/modules/utilities.js\");\n/* harmony import */ var _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../structs/addonerror */ \"./src/structs/addonerror.js\");\n/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./strings */ \"./src/modules/strings.js\");\n/* harmony import */ var _ui_toasts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/toasts */ \"./src/ui/toasts.js\");\n/* harmony import */ var _ui_modals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/modals */ \"./src/ui/modals.js\");\n/* harmony import */ var _ui_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/settings */ \"./src/ui/settings.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst path = __webpack_require__(/*! path */ \"path\");\n\nconst electronRemote = __webpack_require__(/*! electron */ \"electron\").remote;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class PluginManager extends _addonmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"] {\n get name() {\n return \"PluginManager\";\n }\n\n get moduleExtension() {\n return \".js\";\n }\n\n get extension() {\n return \".plugin.js\";\n }\n\n get addonFolder() {\n return path.resolve(data__WEBPACK_IMPORTED_MODULE_0__[\"Config\"].dataPath, \"plugins\");\n }\n\n get prefix() {\n return \"plugin\";\n }\n\n get language() {\n return \"javascript\";\n }\n\n constructor() {\n super();\n this.onSwitch = this.onSwitch.bind(this);\n this.observer = new MutationObserver(mutations => {\n for (let i = 0, mlen = mutations.length; i < mlen; i++) {\n this.onMutation(mutations[i]);\n }\n });\n }\n\n initialize() {\n const errors = super.initialize();\n this.setupFunctions();\n _settingsmanager__WEBPACK_IMPORTED_MODULE_5__[\"default\"].registerPanel(\"plugins\", _strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Panels.plugins, {\n element: () => _ui_settings__WEBPACK_IMPORTED_MODULE_9__[\"default\"].getAddonPanel(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Panels.plugins, this.addonList, this.state, {\n folder: this.addonFolder,\n onChange: this.togglePlugin.bind(this),\n reload: this.reloadPlugin.bind(this),\n refreshList: this.updatePluginList.bind(this),\n saveAddon: this.saveAddon.bind(this),\n editAddon: this.editAddon.bind(this),\n deleteAddon: this.deleteAddon.bind(this),\n prefix: this.prefix\n })\n });\n return errors;\n }\n /* Aliases */\n\n\n updatePluginList() {\n return this.updateList();\n }\n\n loadAllPlugins() {\n return this.loadAllAddons();\n }\n\n enablePlugin(idOrAddon) {\n return this.enableAddon(idOrAddon);\n }\n\n disablePlugin(idOrAddon) {\n return this.disableAddon(idOrAddon);\n }\n\n togglePlugin(id) {\n return this.toggleAddon(id);\n }\n\n unloadPlugin(idOrFileOrAddon) {\n return this.unloadAddon(idOrFileOrAddon);\n }\n\n loadPlugin(filename) {\n const error = this.loadAddon(filename);\n if (error) _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showAddonErrors({\n themes: [error]\n });\n }\n\n reloadPlugin(idOrFileOrAddon) {\n const error = this.reloadAddon(idOrFileOrAddon);\n if (error) _ui_modals__WEBPACK_IMPORTED_MODULE_8__[\"default\"].showAddonErrors({\n plugins: [error]\n });\n return typeof idOrFileOrAddon == \"string\" ? this.addonList.find(c => c.id == idOrFileOrAddon || c.filename == idOrFileOrAddon) : idOrFileOrAddon;\n }\n /* Overrides */\n\n\n initializeAddon(addon) {\n if (!addon.type) return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"Plugin had no exports\", {\n message: \"Plugin had no exports or no name property.\",\n stack: \"\"\n });\n\n try {\n const thePlugin = new addon.type();\n addon.plugin = thePlugin;\n addon.name = thePlugin.getName() || addon.name;\n addon.author = thePlugin.getAuthor() || addon.author || \"No author\";\n addon.description = thePlugin.getDescription() || addon.description || \"No description\";\n addon.version = thePlugin.getVersion() || addon.version || \"No version\";\n\n try {\n if (typeof addon.plugin.load == \"function\") addon.plugin.load();\n } catch (error) {\n this.state[addon.id] = false;\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"load() could not be fired.\", {\n message: error.message,\n stack: error.stack\n });\n }\n } catch (error) {\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, \"Could not be constructed.\", {\n message: error.message,\n stack: error.stack\n });\n }\n }\n\n getFileModification(module, fileContent, meta) {\n module._compile(fileContent, module.filename);\n\n const didExport = !_utilities__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isEmpty(module.exports);\n\n if (didExport) {\n meta.type = module.exports;\n module.exports = meta;\n return \"\";\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].warn(this.name, `${meta.name}, please start assigning module.exports`);\n fileContent += `\\nmodule.exports = ${JSON.stringify(meta)};\\nmodule.exports.type = ${meta.exports || meta.name};`;\n return fileContent;\n }\n\n startAddon(id) {\n return this.startPlugin(id);\n }\n\n stopAddon(id) {\n return this.stopPlugin(id);\n }\n\n getAddon(id) {\n return this.getPlugin(id);\n }\n\n startPlugin(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n const plugin = addon.plugin;\n\n try {\n plugin.start();\n } catch (err) {\n this.state[addon.id] = false;\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.couldNotStart.format({\n name: addon.name,\n version: addon.version\n }));\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, addon.name + \" could not be started.\", err);\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, _strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.enabled.format({\n method: \"start()\"\n }), {\n message: err.message,\n stack: err.stack\n });\n }\n\n this.emit(\"started\", addon.id);\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].show(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.enabled.format({\n name: addon.name,\n version: addon.version\n }));\n }\n\n stopPlugin(idOrAddon) {\n const addon = typeof idOrAddon == \"string\" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;\n if (!addon) return;\n const plugin = addon.plugin;\n\n try {\n plugin.stop();\n } catch (err) {\n this.state[addon.id] = false;\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.couldNotStop.format({\n name: addon.name,\n version: addon.version\n }));\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, addon.name + \" could not be stopped.\", err);\n return new _structs_addonerror__WEBPACK_IMPORTED_MODULE_4__[\"default\"](addon.name, addon.filename, _strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.enabled.format({\n method: \"stop()\"\n }), {\n message: err.message,\n stack: err.stack\n });\n }\n\n this.emit(\"stopped\", addon.id);\n _ui_toasts__WEBPACK_IMPORTED_MODULE_7__[\"default\"].show(_strings__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Addons.disabled.format({\n name: addon.name,\n version: addon.version\n }));\n }\n\n getPlugin(idOrFile) {\n const addon = this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);\n if (!addon) return;\n return addon.plugin;\n }\n\n setupFunctions() {\n electronRemote.getCurrentWebContents().on(\"did-navigate-in-page\", this.onSwitch.bind(this));\n this.observer.observe(document, {\n childList: true,\n subtree: true\n });\n }\n\n onSwitch() {\n this.emit(\"page-switch\");\n\n for (let i = 0; i < this.addonList.length; i++) {\n const plugin = this.addonList[i].plugin;\n if (!this.state[this.addonList[i].id]) continue;\n\n if (typeof plugin.onSwitch === \"function\") {\n try {\n plugin.onSwitch();\n } catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, \"Unable to fire onSwitch for \" + this.addonList[i].name + \".\", err);\n }\n }\n }\n }\n\n onMutation(mutation) {\n for (let i = 0; i < this.addonList.length; i++) {\n const plugin = this.addonList[i].plugin;\n if (!this.state[this.addonList[i].id]) continue;\n\n if (typeof plugin.observer === \"function\") {\n try {\n plugin.observer(mutation);\n } catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stacktrace(this.name, \"Unable to fire observer for \" + this.addonList[i].name + \".\", err);\n }\n }\n }\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL21vZHVsZXMvcGx1Z2lubWFuYWdlci5qcz9kMTczIl0sIm5hbWVzIjpbInBhdGgiLCJyZXF1aXJlIiwiZWxlY3Ryb25SZW1vdGUiLCJyZW1vdGUiLCJQbHVnaW5NYW5hZ2VyIiwiQWRkb25NYW5hZ2VyIiwibmFtZSIsIm1vZHVsZUV4dGVuc2lvbiIsImV4dGVuc2lvbiIsImFkZG9uRm9sZGVyIiwicmVzb2x2ZSIsIkNvbmZpZyIsImRhdGFQYXRoIiwicHJlZml4IiwibGFuZ3VhZ2UiLCJjb25zdHJ1Y3RvciIsIm9uU3dpdGNoIiwiYmluZCIsIm9ic2VydmVyIiwiTXV0YXRpb25PYnNlcnZlciIsIm11dGF0aW9ucyIsImkiLCJtbGVuIiwibGVuZ3RoIiwib25NdXRhdGlvbiIsImluaXRpYWxpemUiLCJlcnJvcnMiLCJzZXR1cEZ1bmN0aW9ucyIsIlNldHRpbmdzIiwicmVnaXN0ZXJQYW5lbCIsIlN0cmluZ3MiLCJQYW5lbHMiLCJwbHVnaW5zIiwiZWxlbWVudCIsIlNldHRpbmdzUmVuZGVyZXIiLCJnZXRBZGRvblBhbmVsIiwiYWRkb25MaXN0Iiwic3RhdGUiLCJmb2xkZXIiLCJvbkNoYW5nZSIsInRvZ2dsZVBsdWdpbiIsInJlbG9hZCIsInJlbG9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yKTsgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIG9uTXV0YXRpb24obXV0YXRpb24pIHtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuYWRkb25MaXN0Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHBsdWdpbiA9IHRoaXMuYWRkb25MaXN0W2ldLnBsdWdpbjtcclxuICAgICAgICAgICAgaWYgKCF0aGlzLnN0YXRlW3RoaXMuYWRkb25MaXN0W2ldLmlkXSkgY29udGludWU7XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgcGx1Z2luLm9ic2VydmVyID09PSBcImZ1bmN0aW9uXCIpIHtcclxuICAgICAgICAgICAgICAgIHRyeSB7IHBsdWdpbi5vYnNlcnZlcihtdXRhdGlvbik7IH1cclxuICAgICAgICAgICAgICAgIGNhdGNoIChlcnIpIHsgTG9nZ2VyLnN0YWNrdHJhY2UodGhpcy5uYW1lLCBcIlVuYWJsZSB0byBmaXJlIG9ic2VydmVyIGZvciBcIiArIHRoaXMuYWRkb25MaXN0W2ldLm5hbWUgKyBcIi5cIiwgZXJyKTsgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59OyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/pluginmanager.js\n");
/***/ }),
@@ -635,7 +659,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (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 BuiltinModule; });\n/* harmony import */ var _modules_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _modules_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/emitter */ \"./src/modules/emitter.js\");\n/* harmony import */ var _modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _modules_patcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/patcher */ \"./src/modules/patcher.js\");\n\n\n\n\nclass BuiltinModule {\n get name() {\n return \"Unnamed Builtin\";\n }\n\n get collection() {\n return \"settings\";\n }\n\n get category() {\n return \"general\";\n }\n\n get id() {\n return \"None\";\n }\n\n async initialize() {\n if (_modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(this.collection, this.category, this.id)) await this.enable();\n _modules_emitter__WEBPACK_IMPORTED_MODULE_1__[\"default\"].on(\"setting-updated\", (collection, category, id, enabled) => {\n if (collection != this.collection || category !== this.category || id !== this.id) return;\n if (enabled) this.enable();else this.disable();\n });\n this.initialized = true;\n }\n\n registerSetting(collection, category, id, onEnable, onDisable) {\n if (arguments.length == 4) {\n collection = this.collection;\n category = arguments[0];\n id = arguments[1];\n onEnable = arguments[2];\n onDisable = arguments[3];\n } else if (arguments.length == 3) {\n collection = this.collection;\n category = this.category;\n id = arguments[0];\n onEnable = arguments[1];\n onDisable = arguments[2];\n }\n\n return _modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].on(collection, category, id, value => {\n if (value) onEnable();else onDisable();\n });\n }\n\n get(collection, category, id) {\n if (arguments.length == 2) {\n collection = this.collection;\n category = arguments[0];\n id = arguments[1];\n } else if (arguments.length == 1) {\n collection = this.collection;\n category = this.category;\n id = arguments[0];\n }\n\n return _modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(collection, category, id);\n }\n\n async enable() {\n this.log(\"Enabled\");\n await this.enabled();\n }\n\n async disable() {\n this.log(\"Disabled\");\n await this.disabled();\n }\n\n async enabled() {}\n\n async disabled() {}\n\n log(...message) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].log(this.name, ...message);\n }\n\n warn(...message) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].warn(this.name, ...message);\n }\n\n error(...message) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].err(this.name, ...message);\n }\n\n stacktrace(message, error) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].stacktrace(this.name, message, error);\n }\n\n before(object, func, callback) {\n return _modules_patcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"].before(this.name, object, func, callback);\n }\n\n after(object, func, callback) {\n return _modules_patcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"].after(this.name, object, func, callback);\n }\n\n unpatchAll() {\n return _modules_patcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"].unpatchAll(this.name);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3N0cnVjdHMvYnVpbHRpbi5qcz85NTYyIl0sIm5hbWVzIjpbIkJ1aWx0aW5Nb2R1bGUiLCJuYW1lIiwiY29sbGVjdGlvbiIsImNhdGVnb3J5IiwiaWQiLCJpbml0aWFsaXplIiwiU2V0dGluZ3MiLCJnZXQiLCJlbmFibGUiLCJFdmVudHMiLCJvbiIsImVuYWJsZWQiLCJkaXNhYmxlIiwiaW5pdGlhbGl6ZWQiLCJyZWdpc3RlclNldHRpbmciLCJvbkVuYWJsZSIsIm9uRGlzYWJsZSIsImFyZ3VtZW50cyIsImxlbmd0aCIsInZhbHVlIiwibG9nIiwiZGlzYWJsZWQiLCJtZXNzYWdlIiwiTG9nZ2VyIiwid2FybiIsImVycm9yIiwiZXJyIiwic3RhY2t0cmFjZSIsImJlZm9yZSIsIm9iamVjdCIsImZ1bmMiLCJjYWxsYmFjayIsIlBhdGNoZXIiLCJhZnRlciIsInVucGF0Y2h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ICAgICAgICAgICBpZCA9IGFyZ3VtZW50c1sxXTtcclxuICAgICAgICAgICAgb25FbmFibGUgPSBhcmd1bWVudHNbMl07XHJcbiAgICAgICAgICAgIG9uRGlzYWJsZSA9IGFyZ3VtZW50c1szXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAzKSB7XHJcbiAgICAgICAgICAgIGNvbGxlY3Rpb24gPSB0aGlzLmNvbGxlY3Rpb247XHJcbiAgICAgICAgICAgIGNhdGVnb3J5ID0gdGhpcy5jYXRlZ29yeTtcclxuICAgICAgICAgICAgaWQgPSBhcmd1bWVudHNbMF07XHJcbiAgICAgICAgICAgIG9uRW5hYmxlID0gYXJndW1lbnRzWzFdO1xyXG4gICAgICAgICAgICBvbkRpc2FibGUgPSBhcmd1bWVudHNbMl07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBTZXR0aW5ncy5vbihjb2xsZWN0aW9uLCBjYXRlZ29yeSwgaWQsICh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICBpZiAodmFsdWUpIG9uRW5hYmxlKCk7XHJcbiAgICAgICAgICAgIGVsc2Ugb25EaXNhYmxlKCk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0KGNvbGxlY3Rpb24sIGNhdGVnb3J5LCBpZCkge1xyXG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09IDIpIHtcclxuICAgICAgICAgICAgY29sbGVjdGlvbiA9IHRoaXMuY29sbGVjdGlvbjtcclxuICAgICAgICAgICAgY2F0ZWdvcnkgPSBhcmd1bWVudHNbMF07XHJcbiAgICAgICAgICAgIGlkID0gYXJndW1lbnRzWzFdO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIGlmIChhcmd1bWVudHMubGVuZ3RoID09IDEpIHtcclxuICAgICAgICAgICAgY29sbGVjdGlvbiA9IHRoaXMuY29sbGVjdGlvbjt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ICAgcmV0dXJuIFBhdGNoZXIuYmVmb3JlKHRoaXMubmFtZSwgb2JqZWN0LCBmdW5jLCBjYWxsYmFjayk7XHJcbiAgICB9XHJcblxyXG4gICAgYWZ0ZXIob2JqZWN0LCBmdW5jLCBjYWxsYmFjaykge1xyXG4gICAgICAgIHJldHVybiBQYXRjaGVyLmFmdGVyKHRoaXMubmFtZSwgb2JqZWN0LCBmdW5jLCBjYWxsYmFjayk7XHJcbiAgICB9XHJcblxyXG4gICAgdW5wYXRjaEFsbCgpIHtcclxuICAgICAgICByZXR1cm4gUGF0Y2hlci51bnBhdGNoQWxsKHRoaXMubmFtZSk7XHJcbiAgICB9XHJcbn0iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/structs/builtin.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return BuiltinModule; });\n/* harmony import */ var _modules_logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/logger */ \"./src/modules/logger.js\");\n/* harmony import */ var _modules_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modules/emitter */ \"./src/modules/emitter.js\");\n/* harmony import */ var _modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modules/settingsmanager */ \"./src/modules/settingsmanager.js\");\n/* harmony import */ var _modules_patcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modules/patcher */ \"./src/modules/patcher.js\");\n\n\n\n\nclass BuiltinModule {\n get name() {\n return \"Unnamed Builtin\";\n }\n\n get collection() {\n return \"settings\";\n }\n\n get category() {\n return \"general\";\n }\n\n get id() {\n return \"None\";\n }\n\n async initialize() {\n if (_modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(this.collection, this.category, this.id)) await this.enable();\n _modules_emitter__WEBPACK_IMPORTED_MODULE_1__[\"default\"].on(\"setting-updated\", (collection, category, id, enabled) => {\n if (collection != this.collection || category !== this.category || id !== this.id) return;\n if (enabled) this.enable();else this.disable();\n });\n this.initialized = true;\n }\n\n registerSetting(collection, category, id, onEnable, onDisable) {\n if (arguments.length == 4) {\n collection = this.collection;\n category = arguments[0];\n id = arguments[1];\n onEnable = arguments[2];\n onDisable = arguments[3];\n } else if (arguments.length == 3) {\n collection = this.collection;\n category = this.category;\n id = arguments[0];\n onEnable = arguments[1];\n onDisable = arguments[2];\n }\n\n return _modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].on(collection, category, id, value => {\n if (value) onEnable();else onDisable();\n });\n }\n\n get(collection, category, id) {\n if (arguments.length == 2) {\n collection = this.collection;\n category = arguments[0];\n id = arguments[1];\n } else if (arguments.length == 1) {\n collection = this.collection;\n category = this.category;\n id = arguments[0];\n }\n\n return _modules_settingsmanager__WEBPACK_IMPORTED_MODULE_2__[\"default\"].get(collection, category, id);\n }\n\n async enable() {\n this.log(\"Enabled\");\n\n try {\n await this.enabled();\n } catch (e) {\n this.stacktrace(\"Could not be enabled\", e);\n }\n }\n\n async disable() {\n this.log(\"Disabled\");\n\n try {\n await this.disabled();\n } catch (e) {\n this.stacktrace(\"Could not be disabled\", e);\n }\n }\n\n async enabled() {}\n\n async disabled() {}\n\n log(...message) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].log(this.name, ...message);\n }\n\n warn(...message) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].warn(this.name, ...message);\n }\n\n error(...message) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].err(this.name, ...message);\n }\n\n stacktrace(message, error) {\n _modules_logger__WEBPACK_IMPORTED_MODULE_0__[\"default\"].stacktrace(this.name, message, error);\n }\n\n before(object, func, callback) {\n return _modules_patcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"].before(this.name, object, func, callback);\n }\n\n after(object, func, callback) {\n return _modules_patcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"].after(this.name, object, func, callback);\n }\n\n unpatchAll() {\n return _modules_patcher__WEBPACK_IMPORTED_MODULE_3__[\"default\"].unpatchAll(this.name);\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3N0cnVjdHMvYnVpbHRpbi5qcz85NTYyIl0sIm5hbWVzIjpbIkJ1aWx0aW5Nb2R1bGUiLCJuYW1lIiwiY29sbGVjdGlvbiIsImNhdGVnb3J5IiwiaWQiLCJpbml0aWFsaXplIiwiU2V0dGluZ3MiLCJnZXQiLCJlbmFibGUiLCJFdmVudHMiLCJvbiIsImVuYWJsZWQiLCJkaXNhYmxlIiwiaW5pdGlhbGl6ZWQiLCJyZWdpc3RlclNldHRpbmciLCJvbkVuYWJsZSIsIm9uRGlzYWJsZSIsImFyZ3VtZW50cyIsImxlbmd0aCIsInZhbHVlIiwibG9nIiwiZSIsInN0YWNrdHJhY2UiLCJkaXNhYmxlZCIsIm1lc3NhZ2UiLCJMb2dnZXIiLCJ3YXJuIiwiZXJyb3IiLCJlcnIiLCJiZWZvcmUiLCJvYmplY3QiLCJmdW5jIiwiY2FsbGJhY2siLCJQYXRjaGVyIiwiYWZ0ZXIiLCJ1bnBhdGNoQWxsIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUVlLE1BQU1BLGFBQU4sQ0FBb0I7QUFFL0IsTUFBSUMsSUFBSixHQUFXO0FBQUMsV0FBTyxpQkFBUDtBQUEwQjs7QUFDdEMsTUFBSUMsVUFBSixHQUFpQjtBQUFDLFdBQU8sVUFBUDtBQUFtQjs7QUFDckMsTUFBSUMsUUFBSixHQUFlO0FBQUMsV0FBTyxTQUFQO0FBQWtCOztBQUNsQyxNQUFJQyxFQUFKLEdBQVM7QUF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lbnRzWzJdO1xyXG4gICAgICAgICAgICBvbkRpc2FibGUgPSBhcmd1bWVudHNbM107XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT0gMykge1xyXG4gICAgICAgICAgICBjb2xsZWN0aW9uID0gdGhpcy5jb2xsZWN0aW9uO1xyXG4gICAgICAgICAgICBjYXRlZ29yeSA9IHRoaXMuY2F0ZWdvcnk7XHJcbiAgICAgICAgICAgIGlkID0gYXJndW1lbnRzWzBdO1xyXG4gICAgICAgICAgICBvbkVuYWJsZSA9IGFyZ3VtZW50c1sxXTtcclxuICAgICAgICAgICAgb25EaXNhYmxlID0gYXJndW1lbnRzWzJdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gU2V0dGluZ3Mub24oY29sbGVjdGlvbiwgY2F0ZWdvcnksIGlkLCAodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgaWYgKHZhbHVlKSBvbkVuYWJsZSgpO1xyXG4gICAgICAgICAgICBlbHNlIG9uRGlzYWJsZSgpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGdldChjb2xsZWN0aW9uLCBjYXRlZ29yeSwgaWQpIHtcclxuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAyKSB7XHJcbiAgICAgICAgICAgIGNvbGxlY3Rpb24gPSB0aGlzLmNvbGxlY3Rpb247XHJcbiAgICAgICAgICAgIGNhdGVnb3J5ID0gYXJndW1lbnRzWzBdO1xyXG4gICAgICAgICAgICBpZCA9IGFyZ3VtZW50c1sxXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7XHJcbiAgICAgICAgICAgIGNvbGxlY3Rpb24gPSB0aGlzLmNvbGxlY3Rpb247XHJcbiAgICAgICAgICAgIGNhdGVnb3J5ID0gdGhpcy5jYXRlZ29yeTtcclxuICAgICAgICAgIC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AgICAgTG9nZ2VyLnN0YWNrdHJhY2UodGhpcy5uYW1lLCBtZXNzYWdlLCBlcnJvcik7XHJcbiAgICB9XHJcblxyXG4gICAgYmVmb3JlKG9iamVjdCwgZnVuYywgY2FsbGJhY2spIHtcclxuICAgICAgICByZXR1cm4gUGF0Y2hlci5iZWZvcmUodGhpcy5uYW1lLCBvYmplY3QsIGZ1bmMsIGNhbGxiYWNrKTtcclxuICAgIH1cclxuXHJcbiAgICBhZnRlcihvYmplY3QsIGZ1bmMsIGNhbGxiYWNrKSB7XHJcbiAgICAgICAgcmV0dXJuIFBhdGNoZXIuYWZ0ZXIodGhpcy5uYW1lLCBvYmplY3QsIGZ1bmMsIGNhbGxiYWNrKTtcclxuICAgIH1cclxuXHJcbiAgICB1bnBhdGNoQWxsKCkge1xyXG4gICAgICAgIHJldHVybiBQYXRjaGVyLnVucGF0Y2hBbGwodGhpcy5uYW1lKTtcclxuICAgIH1cclxufSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/structs/builtin.js\n");
/***/ }),
@@ -947,7 +971,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (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 Modals; });\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _structs_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../structs/string */ \"./src/structs/string.js\");\n\n\n\nclass Modals {\n static get shouldShowAddonErrors() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"Settings\"].get(\"settings\", \"addons\", \"addonErrors\");\n }\n\n static get ModalActions() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"openModal\", \"updateModal\");\n }\n\n static get ModalStack() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n }\n\n static get AlertModal() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByPrototypes(\"handleCancel\", \"handleSubmit\", \"handleMinorConfirm\");\n }\n\n static get TextElement() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"Sizes\", \"Weights\");\n }\n\n static get ConfirmationModal() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].findByDisplayName(\"ConfirmModal\");\n }\n\n static get Markdown() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].findByDisplayName(\"Markdown\");\n }\n\n static default(title, content) {\n const modal = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(``);\n modal.querySelector(\".footer button\").addEventListener(\"click\", () => {\n modal.classList.add(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.querySelector(\".bd-backdrop\").addEventListener(\"click\", () => {\n modal.classList.add(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n document.querySelector(\"#app-mount\").append(modal);\n }\n\n static alert(title, content) {\n this.showConfirmationModal(title, content);\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. Everything 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\n static showConfirmationModal(title, content, options = {}) {\n const Markdown = this.Markdown;\n const ConfirmationModal = this.ConfirmationModal;\n const ModalActions = this.ModalActions;\n if (content instanceof _structs_string__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) content = content.toString();\n if (!this.ModalActions || !this.ConfirmationModal || !this.Markdown) return this.default(title, content);\n\n const emptyFunction = () => {};\n\n const {\n onConfirm = emptyFunction,\n onCancel = emptyFunction,\n confirmText = modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Modals.okay,\n cancelText = modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Modals.cancel,\n danger = false,\n key = undefined\n } = options;\n if (!Array.isArray(content)) content = [content];\n content = content.map(c => typeof c === \"string\" ? modules__WEBPACK_IMPORTED_MODULE_1__[\"React\"].createElement(Markdown, null, c) : c);\n return ModalActions.openModal(props => {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"React\"].createElement(ConfirmationModal, Object.assign({\n header: title,\n red: danger,\n confirmText: confirmText,\n cancelText: cancelText,\n onConfirm: onConfirm,\n onCancel: onCancel\n }, props), content);\n }, {\n modalKey: key\n });\n }\n\n static showAddonErrors({\n plugins: pluginErrors = [],\n themes: themeErrors = []\n }) {\n if (!pluginErrors || !themeErrors || !this.shouldShowAddonErrors) return;\n if (!pluginErrors.length && !themeErrors.length) return;\n const modal = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`\n
\n
\n
\n \n
\n
\n
\n
${modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Panels.plugins}
\n
${modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Panels.themes}
\n
\n
\n \n
\n
\n \n
\n
\n
`);\n\n const generateTab = function (errors) {\n const container = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(``);\n\n for (const err of errors) {\n const error = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
\n
${err.name ? err.name : err.file}
\n
${err.message}
\n
\n
`);\n container.append(error);\n\n if (err.error) {\n error.querySelectorAll(\"a\").forEach(el => el.addEventListener(\"click\", e => {\n e.preventDefault();\n modules__WEBPACK_IMPORTED_MODULE_1__[\"Logger\"].stacktrace(\"AddonError\", `Error details for ${err.name ? err.name : err.file}.`, err.error);\n }));\n }\n }\n\n return container;\n };\n\n const tabs = [generateTab(pluginErrors), generateTab(themeErrors)];\n modal.querySelectorAll(\".tab-bar-item\").forEach(el => el.addEventListener(\"click\", e => {\n e.preventDefault();\n const selected = modal.querySelector(\".tab-bar-item.selected\");\n if (selected) modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].removeClass(selected, \"selected\");\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].addClass(e.target, \"selected\");\n const scroller = modal.querySelector(\".scroller\");\n scroller.innerHTML = \"\";\n scroller.append(tabs[modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].index(e.target)]);\n }));\n modal.querySelector(\".footer button\").addEventListener(\"click\", () => {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.querySelector(\".bd-backdrop\").addEventListener(\"click\", () => {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].query(\"#app-mount\").append(modal);\n if (pluginErrors.length) modal.querySelector(\".tab-bar-item\").click();else modal.querySelectorAll(\".tab-bar-item\")[1].click();\n }\n\n static showChangelogModal(options = {}) {\n const ModalStack = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const ChangelogClasses = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"fixed\", \"improved\");\n const TextElement = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].findByDisplayName(\"Text\");\n const FlexChild = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"Child\");\n const Titles = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"Tags\", \"default\");\n const Changelog = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getModule(m => m.defaultProps && m.defaultProps.selectable == false);\n const MarkdownParser = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"defaultRules\", \"parse\");\n if (!Changelog || !ModalStack || !ChangelogClasses || !TextElement || !FlexChild || !Titles || !MarkdownParser) return modules__WEBPACK_IMPORTED_MODULE_1__[\"Logger\"].warn(\"Modals\", \"showChangelogModal missing modules\");\n const {\n image = \"https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5\",\n description = \"\",\n changes = [],\n title = \"BandagedBD\",\n subtitle = `v${data__WEBPACK_IMPORTED_MODULE_0__[\"Config\"].bbdVersion}`,\n footer\n } = options;\n const ce = modules__WEBPACK_IMPORTED_MODULE_1__[\"React\"].createElement;\n const changelogItems = [ce(\"img\", {\n src: image\n })];\n if (description) changelogItems.push(ce(\"p\", null, MarkdownParser.parse(description)));\n\n for (let c = 0; c < changes.length; c++) {\n const entry = changes[c];\n const type = ChangelogClasses[entry.type] ? ChangelogClasses[entry.type] : ChangelogClasses.added;\n const margin = c == 0 ? ChangelogClasses.marginTop : \"\";\n changelogItems.push(ce(\"h1\", {\n className: `${type} ${margin}`\n }, entry.title));\n const list = ce(\"ul\", null, entry.items.map(i => ce(\"li\", null, MarkdownParser.parse(i))));\n changelogItems.push(list);\n }\n\n const renderHeader = function () {\n return ce(FlexChild.Child, {\n grow: 1,\n shrink: 1\n }, ce(Titles.default, {\n tag: Titles.Tags.H4\n }, title), ce(TextElement, {\n size: TextElement.Sizes.SMALL,\n color: TextElement.Colors.STANDARD,\n className: ChangelogClasses.date\n }, subtitle));\n };\n\n const renderFooter = () => {\n const Anchor = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getModule(m => m.displayName == \"Anchor\");\n const AnchorClasses = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"anchorUnderlineOnHover\") || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n\n const joinSupportServer = click => {\n click.preventDefault();\n click.stopPropagation();\n ModalStack.pop();\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DiscordModules\"].InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n };\n\n const supportLink = Anchor ? ce(Anchor, {\n onClick: joinSupportServer\n }, \"Join our Discord Server.\") : ce(\"a\", {\n className: `${AnchorClasses.anchor} ${AnchorClasses.anchorUnderlineOnHover}`,\n onClick: joinSupportServer\n }, \"Join our Discord Server.\");\n const defaultFooter = ce(TextElement, {\n size: TextElement.Sizes.SMALL,\n color: TextElement.Colors.STANDARD\n }, \"Need support? \", supportLink);\n return ce(FlexChild.Child, {\n grow: 1,\n shrink: 1\n }, footer ? footer : defaultFooter);\n };\n\n return ModalStack.push(Changelog, {\n className: ChangelogClasses.container,\n selectable: true,\n onScroll: _ => _,\n onClose: _ => _,\n renderHeader: renderHeader,\n renderFooter: renderFooter,\n children: changelogItems\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL21vZGFscy5qcz8zYWIyIl0sIm5hbWVzIjpbIk1vZGFscyIsInNob3VsZFNob3dBZGRvbkVycm9ycyIsIlNldHRpbmdzIiwiZ2V0IiwiTW9kYWxBY3Rpb25zIiwiV2VicGFja01vZHVsZXMiLCJnZXRC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AgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsIG1vZGFsLTFVR2RuUlwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiZC1tb2RhbC1pbm5lciBpbm5lci0xSmVHVmNcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhlYWRlciBoZWFkZXItMVJfQWpGXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGl0bGVcIj4ke3RpdGxlfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsLWJvZHlcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzY3JvbGxlci13cmFwIGZhZGVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtjb250ZW50fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZm9vdGVyIGZvb3Rlci0yeWZDZ1ggZm9vdGVyLTNyRFdkQyBmb290ZXItMmdMMXBwXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImJkLWJ1dHRvblwiPiR7U3RyaW5ncy5Nb2RhbHMub2theX08L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgIC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lZmluZWR9ID0gb3B0aW9ucztcclxuICAgICAgICBcclxuICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkoY29udGVudCkpIGNvbnRlbnQgPSBbY29udGVudF07XHJcbiAgICAgICAgY29udGVudCA9IGNvbnRlbnQubWFwKGMgPT4gdHlwZW9mKGMpID09PSBcInN0cmluZ1wiID8gUmVhY3QuY3JlYXRlRWxlbWVudChNYXJrZG93biwgbnVsbCwgYykgOiBjKTtcclxuXHJcbiAgICAgICAgcmV0dXJuIE1vZGFsQWN0aW9ucy5vcGVuTW9kYWwocHJvcHMgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChDb25maXJtYXRpb25Nb2RhbCwgT2JqZWN0LmFzc2lnbih7XHJcbiAgICAgICAgICAgICAgICBoZWFkZXI6IHRpdGxlLFxyXG4gICAgICAgICAgICAgICAgcmVkOiBkYW5nZXIsXHJcbiAgICAgICAgICAgICAgICBjb25maXJtVGV4dDogY29uZmlybVRleHQsXHJcbiAgICAgICAgICAgICAgICBjYW5jZWxUZXh0OiBjYW5jZWxUZXh0LFxyXG4gICAgICAgICAgICAgICAgb25Db25maXJtOiBvbkNvbmZpcm0sXHJcbiAgICAgICAgICAgICAgICBvbkNhbmNlbDogb25DYW5jZWxcclxuICAgICAgICAgICAgfSwgcHJvcHMpLCBjb250ZW50KTtcclxuICAgICAgICB9LCB7bW9kYWxLZXk6IGtleX0pO1xyXG4gICAgfVxyXG5cclxuICAgIHN0YXRpYyBzaG93QWRkb25FcnJvcnMoe3BsdWdpbnM6IHBsdWdpbkVycm9ycyA9IFtdLCB0aGVtZXM6IHRoZW1lRXJyb3JzID0gW119KSB7XHJcbiAgICAgICAgaWYgKCFwbHVnaW5FcnJvcnMgfHwgIXRoZW1lRXJyb3JzIHx8ICF0aGlzLnNob3VsZFNob3dBZGRvbkVycm9ycykgcmV0dXJuO1xyXG4gICAgICAgIGlmICghcGx1Z2luRXJyb3JzLmxlbmd0aCAmJiAhdGhlbWVFcnJvcnMubGVuZ3RoKSByZXR1cm47XHJcbiAgICAgICAgY29uc3QgbW9kYWwgPSBET00uY3JlYXRlRWxlbWVudChgPGRpdiBjbGFzcz1cImJkLW1vZGFsLXdyYXBwZXIgdGhlbWUtZGFya1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYmQtYmFja2Ryb3AgYmFja2Ryb3AtMXdybUtCXCI+PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiZC1tb2RhbCBiZC1jb250ZW50LW1vZGFsIG1vZGFsLTFVR2RuUlwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsLWlubmVyIGlubmVyLTFKZUdWY1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJoZWFkZXIgaGVhZGVyLTFSX0FqRlwiPjxkaXYgY2xhc3M9XCJ0aXRsZVwiPiR7U3RyaW5ncy5Nb2RhbHMuYWRkb25FcnJvcnN9PC9kaXY+PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsLWJvZHlcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYi1iYXItY29udGFpbmVyXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFiLWJhciBUT1BcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFiLWJhci1pdGVtXCI+JHtTdHJpbmdzLlBhbmVscy5wbHVnaW5zfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyLWl0ZW1cIj4ke1N0cmluZ3MuUGFuZWxzLnRoZW1lc308L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWhlYWRlclwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tbmFtZVwiPiR7U3RyaW5ncy5Nb2RhbHMubmFtZX08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLW1lc3NhZ2VcIj4ke1N0cmluZ3MuTW9kYWxzLm1lc3NhZ2V9PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1lcnJvclwiPiR7U3RyaW5ncy5Nb2RhbHMuZXJyb3J9PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXItd3JhcCBmYWRlXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXJcIj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZvb3RlciBmb290ZXItMnlmQ2dYIGZvb3Rlci0zckRXZEMgZm9vdGVyLTJnTDFwcFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImJkLWJ1dHRvblwiPiR7U3RyaW5ncy5Nb2RhbHMub2theX08L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gKTtcclxuXHJcbiAgICAgICAgY29uc3QgZ2VuZXJhdGVUYWIgPSBmdW5jdGlvbihlcnJvcnMpIHtcclxuICAgICAgICAgICAgY29uc3QgY29udGFpbmVyID0gRE9NLmNyZWF0ZUVsZW1lbnQoYDxkaXYgY2xhc3M9XCJlcnJvcnNcIj5gKTtcclxuICAgICAgICAgICAgZm9yIChjb25zdCBlcnIgb2YgZXJyb3JzKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBlcnJvciA9IERPTS5jcmVhdGVFbGVtZW50KGA8ZGl2IGNsYXNzPVwiZXJyb3JcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tbmFtZVwiPiR7ZXJyLm5hbWUgPyBlcnIubmFtZSA6IGVyci5maWxlfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1tZXNzYWdlXCI+JHtlcnIubWVzc2FnZX08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tZXJyb3JcIj48YSBjbGFzcz1cImVycm9yLWxpbmtcIiBocmVmPVwiXCI+JHtlcnIuZXJyb3IgPyBlcnIuZXJyb3IubWVzc2FnZSA6IFwiXCJ9PC9hPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PmApO1xyXG4gICAgICAgICAgICAgICAgY29udGFpbmVyLmFwcGVuZChlcnJvcik7XHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IucXVlcnlTZWxlY3RvckFsbChcImFcIikuZm9yRWFjaChlbCA9PiBlbC5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgKGUpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBMb2dnZXIuc3RhY2t0cmFjZShcIkFkZG9uRXJyb3JcIiwgYEVycm9yIGRldGFpbHMgZm9yICR7ZXJyLm5hbWUgPyBlcnIubmFtZSA6IGVyci5maWxlfS5gLCBlcnIuZXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gY29udGFpbmVyO1xyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGNvbnN0IHRhYnMgPSBbZ2VuZXJhdGVUYWIocGx1Z2luRXJyb3JzKSwgZ2VuZXJhdGVUYWIodGhlbWVFcnJvcnMpXTtcclxuXHJcbiAgICAgICAgbW9kYWwucXVlcnlTZWxlY3RvckFsbChcIi50YWItYmFyLWl0ZW1cIikuZm9yRWFjaChlbCA9PiBlbC5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgKGUpID0+IHtcclxuICAg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s6IGpvaW5TdXBwb3J0U2VydmVyfSwgXCJKb2luIG91ciBEaXNjb3JkIFNlcnZlci5cIik7XHJcbiAgICAgICAgICAgIGNvbnN0IGRlZmF1bHRGb290ZXIgPSBjZShUZXh0RWxlbWVudCwge3NpemU6IFRleHRFbGVtZW50LlNpemVzLlNNQUxMLCBjb2xvcjogVGV4dEVsZW1lbnQuQ29sb3JzLlNUQU5EQVJEfSwgXCJOZWVkIHN1cHBvcnQ/IFwiLCBzdXBwb3J0TGluayk7XHJcbiAgICAgICAgICAgIHJldHVybiBjZShGbGV4Q2hpbGQuQ2hpbGQsIHtncm93OiAxLCBzaHJpbms6IDF9LCBmb290ZXIgPyBmb290ZXIgOiBkZWZhdWx0Rm9vdGVyKTtcclxuICAgICAgICB9O1xyXG4gICAgXHJcbiAgICAgICAgcmV0dXJuIE1vZGFsU3RhY2sucHVzaChDaGFuZ2Vsb2csIHtcclxuICAgICAgICAgICAgY2xhc3NOYW1lOiBDaGFuZ2Vsb2dDbGFzc2VzLmNvbnRhaW5lcixcclxuICAgICAgICAgICAgc2VsZWN0YWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgb25TY3JvbGw6IF8gPT4gXyxcclxuICAgICAgICAgICAgb25DbG9zZTogXyA9PiBfLFxyXG4gICAgICAgICAgICByZW5kZXJIZWFkZXI6IHJlbmRlckhlYWRlcixcclxuICAgICAgICAgICAgcmVuZGVyRm9vdGVyOiByZW5kZXJGb290ZXIsXHJcbiAgICAgICAgICAgIGNoaWxkcmVuOiBjaGFuZ2Vsb2dJdGVtc1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG59Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/ui/modals.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Modals; });\n/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ \"./src/data/data.js\");\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _structs_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../structs/string */ \"./src/structs/string.js\");\n\n\n\nclass Modals {\n static get shouldShowAddonErrors() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"Settings\"].get(\"settings\", \"addons\", \"addonErrors\");\n }\n\n static get ModalActions() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"openModal\", \"updateModal\");\n }\n\n static get ModalStack() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n }\n\n static get AlertModal() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByPrototypes(\"handleCancel\", \"handleSubmit\", \"handleMinorConfirm\");\n }\n\n static get TextElement() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"Sizes\", \"Weights\");\n }\n\n static get ConfirmationModal() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].findByDisplayName(\"ConfirmModal\");\n }\n\n static get Markdown() {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].findByDisplayName(\"Markdown\");\n }\n\n static default(title, content) {\n const modal = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
`);\n modal.querySelector(\".footer button\").addEventListener(\"click\", () => {\n modal.classList.add(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.querySelector(\".bd-backdrop\").addEventListener(\"click\", () => {\n modal.classList.add(\"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n document.querySelector(\"#app-mount\").append(modal);\n }\n\n static alert(title, content) {\n this.showConfirmationModal(title, content, {\n cancelText: \"\"\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. Everything 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\n static showConfirmationModal(title, content, options = {}) {\n const Markdown = this.Markdown;\n const ConfirmationModal = this.ConfirmationModal;\n const ModalActions = this.ModalActions;\n if (content instanceof _structs_string__WEBPACK_IMPORTED_MODULE_2__[\"default\"]) content = content.toString();\n if (!this.ModalActions || !this.ConfirmationModal || !this.Markdown) return this.default(title, content);\n\n const emptyFunction = () => {};\n\n const {\n onConfirm = emptyFunction,\n onCancel = emptyFunction,\n confirmText = modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Modals.okay,\n cancelText = modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Modals.cancel,\n danger = false,\n key = undefined\n } = options;\n if (!Array.isArray(content)) content = [content];\n content = content.map(c => typeof c === \"string\" ? modules__WEBPACK_IMPORTED_MODULE_1__[\"React\"].createElement(Markdown, null, c) : c);\n return ModalActions.openModal(props => {\n return modules__WEBPACK_IMPORTED_MODULE_1__[\"React\"].createElement(ConfirmationModal, Object.assign({\n header: title,\n red: danger,\n confirmText: confirmText,\n cancelText: cancelText,\n onConfirm: onConfirm,\n onCancel: onCancel\n }, props), content);\n }, {\n modalKey: key\n });\n }\n\n static showAddonErrors({\n plugins: pluginErrors = [],\n themes: themeErrors = []\n }) {\n if (!pluginErrors || !themeErrors || !this.shouldShowAddonErrors) return;\n if (!pluginErrors.length && !themeErrors.length) return;\n const modal = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`\n
\n
\n
\n \n
\n
\n
\n
${modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Panels.plugins}
\n
${modules__WEBPACK_IMPORTED_MODULE_1__[\"Strings\"].Panels.themes}
\n
\n
\n \n
\n
\n \n
\n
\n
`);\n\n const generateTab = function (errors) {\n const container = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(``);\n\n for (const err of errors) {\n const error = modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].createElement(`
\n
${err.name ? err.name : err.file}
\n
${err.message}
\n
\n
`);\n container.append(error);\n\n if (err.error) {\n error.querySelectorAll(\"a\").forEach(el => el.addEventListener(\"click\", e => {\n e.preventDefault();\n modules__WEBPACK_IMPORTED_MODULE_1__[\"Logger\"].stacktrace(\"AddonError\", `Error details for ${err.name ? err.name : err.file}.`, err.error);\n }));\n }\n }\n\n return container;\n };\n\n const tabs = [generateTab(pluginErrors), generateTab(themeErrors)];\n modal.querySelectorAll(\".tab-bar-item\").forEach(el => el.addEventListener(\"click\", e => {\n e.preventDefault();\n const selected = modal.querySelector(\".tab-bar-item.selected\");\n if (selected) modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].removeClass(selected, \"selected\");\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].addClass(e.target, \"selected\");\n const scroller = modal.querySelector(\".scroller\");\n scroller.innerHTML = \"\";\n scroller.append(tabs[modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].index(e.target)]);\n }));\n modal.querySelector(\".footer button\").addEventListener(\"click\", () => {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modal.querySelector(\".bd-backdrop\").addEventListener(\"click\", () => {\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].addClass(modal, \"closing\");\n setTimeout(() => {\n modal.remove();\n }, 300);\n });\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DOM\"].query(\"#app-mount\").append(modal);\n if (pluginErrors.length) modal.querySelector(\".tab-bar-item\").click();else modal.querySelectorAll(\".tab-bar-item\")[1].click();\n }\n\n static showChangelogModal(options = {}) {\n const ModalStack = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"push\", \"update\", \"pop\", \"popWithKey\");\n const ChangelogClasses = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"fixed\", \"improved\");\n const TextElement = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].findByDisplayName(\"Text\");\n const FlexChild = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"Child\");\n const Titles = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"Tags\", \"default\");\n const Changelog = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getModule(m => m.defaultProps && m.defaultProps.selectable == false);\n const MarkdownParser = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"defaultRules\", \"parse\");\n if (!Changelog || !ModalStack || !ChangelogClasses || !TextElement || !FlexChild || !Titles || !MarkdownParser) return modules__WEBPACK_IMPORTED_MODULE_1__[\"Logger\"].warn(\"Modals\", \"showChangelogModal missing modules\");\n const {\n image = \"https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5\",\n description = \"\",\n changes = [],\n title = \"BandagedBD\",\n subtitle = `v${data__WEBPACK_IMPORTED_MODULE_0__[\"Config\"].bbdVersion}`,\n footer\n } = options;\n const ce = modules__WEBPACK_IMPORTED_MODULE_1__[\"React\"].createElement;\n const changelogItems = [ce(\"img\", {\n src: image\n })];\n if (description) changelogItems.push(ce(\"p\", null, MarkdownParser.parse(description)));\n\n for (let c = 0; c < changes.length; c++) {\n const entry = changes[c];\n const type = ChangelogClasses[entry.type] ? ChangelogClasses[entry.type] : ChangelogClasses.added;\n const margin = c == 0 ? ChangelogClasses.marginTop : \"\";\n changelogItems.push(ce(\"h1\", {\n className: `${type} ${margin}`\n }, entry.title));\n const list = ce(\"ul\", null, entry.items.map(i => ce(\"li\", null, MarkdownParser.parse(i))));\n changelogItems.push(list);\n }\n\n const renderHeader = function () {\n return ce(FlexChild.Child, {\n grow: 1,\n shrink: 1\n }, ce(Titles.default, {\n tag: Titles.Tags.H4\n }, title), ce(TextElement, {\n size: TextElement.Sizes.SMALL,\n color: TextElement.Colors.STANDARD,\n className: ChangelogClasses.date\n }, subtitle));\n };\n\n const renderFooter = () => {\n const Anchor = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getModule(m => m.displayName == \"Anchor\");\n const AnchorClasses = modules__WEBPACK_IMPORTED_MODULE_1__[\"WebpackModules\"].getByProps(\"anchorUnderlineOnHover\") || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n\n const joinSupportServer = click => {\n click.preventDefault();\n click.stopPropagation();\n ModalStack.pop();\n modules__WEBPACK_IMPORTED_MODULE_1__[\"DiscordModules\"].InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n };\n\n const supportLink = Anchor ? ce(Anchor, {\n onClick: joinSupportServer\n }, \"Join our Discord Server.\") : ce(\"a\", {\n className: `${AnchorClasses.anchor} ${AnchorClasses.anchorUnderlineOnHover}`,\n onClick: joinSupportServer\n }, \"Join our Discord Server.\");\n const defaultFooter = ce(TextElement, {\n size: TextElement.Sizes.SMALL,\n color: TextElement.Colors.STANDARD\n }, \"Need support? \", supportLink);\n return ce(FlexChild.Child, {\n grow: 1,\n shrink: 1\n }, footer ? footer : defaultFooter);\n };\n\n return ModalStack.push(Changelog, {\n className: ChangelogClasses.container,\n selectable: true,\n onScroll: _ => _,\n onClose: _ => _,\n renderHeader: renderHeader,\n renderFooter: renderFooter,\n children: changelogItems\n });\n }\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL21vZGFscy5qcz8zYWIyIl0sIm5hbWVzIjpbIk1vZGFscyIsInNob3VsZFNob3dBZGRvbkVycm9ycyIsIlNldHRpbmdzIiwiZ2V0IiwiTW9kYWxBY3Rpb25zIiwiV2VicGFja01vZHVsZXMiLCJnZXRCeVByb3BzIiwiTW9kYWxTdGFjayIsIkFsZXJ0TW9kYWwiLCJnZXRCeVByb3RvdHlwZXMiLCJUZXh0RWxlbWVudCIsIkNvbmZpcm1hdGlvbk1vZGFsIiwiZmluZEJ5RGlzcGxheU5hbWUiLCJNYXJrZG93biIsImRlZmF1bHQiLCJ0aXRsZSIsImNvbnRlbnQiLCJtb2RhbCIsIkRPTSIsImNyZWF0ZUVsZW1lbnQiLCJTdHJpbmdzIiwib2theSIsInF1ZXJ5U2VsZWN0b3IiLCJhZGRFdmVudExpc3RlbmVyIiwiY2xhc3NMaXN0IiwiYWRkIiwic2V0VGltZW91dCIsInJlbW92ZSIsImRvY3VtZW50IiwiYXBwZW5kIiwiYWxlcnQiLCJzaG93Q29uZmlybWF0aW9uTW9kYWwiLCJjYW5jZWxUZXh0Iiwib3B0aW9ucyIsIkZvcm1hdHRhYmxlU3RyaW5nIiwidG9TdHJpbmciLCJlbXB0eUZ1bmN0aW9uIiwib25Db25maXJtIiwib25DYW5jZWwiLCJjb25maXJtVGV4dCIsImNhbmNlbCIsImRhbmdlciIsImtleSIsInVuZGVmaW5lZCIsIkFycmF5IiwiaXNBcnJheSIsIm1hcCIsImMiLCJSZWFjdCIsIm9wZW5Nb2RhbCIsInByb3BzIiwiT2JqZWN0IiwiYXNzaWduIiwiaGVhZGVyIiwicmVkIiwibW9kYWxLZXkiLCJzaG93QWRkb25FcnJvcnMiLCJwbHVnaW5zIiwicGx1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dlYnBhY2tNb2R1bGVzLmZpbmRCeURpc3BsYXlOYW1lKFwiTWFya2Rvd25cIik7fVxyXG5cclxuICAgIHN0YXRpYyBkZWZhdWx0KHRpdGxlLCBjb250ZW50KSB7XHJcbiAgICAgICAgY29uc3QgbW9kYWwgPSBET00uY3JlYXRlRWxlbWVudChgPGRpdiBjbGFzcz1cImJkLW1vZGFsLXdyYXBwZXIgdGhlbWUtZGFya1wiPlxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLWJhY2tkcm9wIGJhY2tkcm9wLTF3cm1LQlwiPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsIG1vZGFsLTFVR2RuUlwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiZC1tb2RhbC1pbm5lciBpbm5lci0xSmVHVmNcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImhlYWRlciBoZWFkZXItMVJfQWpGXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGl0bGVcIj4ke3RpdGxlfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImJkLW1vZGFsLWJvZHlcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzY3JvbGxlci13cmFwIGZhZGVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2Nyb2xsZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtjb250ZW50fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgIC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Ym9keVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFiLWJhci1jb250YWluZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyIFRPUFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWItYmFyLWl0ZW1cIj4ke1N0cmluZ3MuUGFuZWxzLnBsdWdpbnN9PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYi1iYXItaXRlbVwiPiR7U3RyaW5ncy5QYW5lbHMudGhlbWVzfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtaGVhZGVyXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1uYW1lXCI+JHtTdHJpbmdzLk1vZGFscy5uYW1lfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRhYmxlLWNvbHVtbiBjb2x1bW4tbWVzc2FnZVwiPiR7U3RyaW5ncy5Nb2RhbHMubWVzc2FnZX08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLWVycm9yXCI+JHtTdHJpbmdzLk1vZGFscy5lcnJvcn08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzY3JvbGxlci13cmFwIGZhZGVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJzY3JvbGxlclwiPlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZm9vdGVyIGZvb3Rlci0yeWZDZ1ggZm9vdGVyLTNyRFdkQyBmb290ZXItMmdMMXBwXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIGNsYXNzPVwiYmQtYnV0dG9uXCI+JHtTdHJpbmdzLk1vZGFscy5va2F5fTwvYnV0dG9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PmApO1xyXG5cclxuICAgICAgICBjb25zdCBnZW5lcmF0ZVRhYiA9IGZ1bmN0aW9uKGVycm9ycykge1xyXG4gICAgICAgICAgICBjb25zdCBjb250YWluZXIgPSBET00uY3JlYXRlRWxlbWVudChgPGRpdiBjbGFzcz1cImVycm9yc1wiPmApO1xyXG4gICAgICAgICAgICBmb3IgKGNvbnN0IGVyciBvZiBlcnJvcnMpIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gRE9NLmNyZWF0ZUVsZW1lbnQoYDxkaXYgY2xhc3M9XCJlcnJvclwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1uYW1lXCI+JHtlcnIubmFtZSA/IGVyci5uYW1lIDogZXJyLmZpbGV9PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0YWJsZS1jb2x1bW4gY29sdW1uLW1lc3NhZ2VcIj4ke2Vyci5tZXNzYWdlfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidGFibGUtY29sdW1uIGNvbHVtbi1lcnJvclwiPjxhIGNsYXNzPVwiZXJyb3ItbGlua1wiIGhyZWY9XCJcIj4ke2Vyci5lcnJvciA/IGVyci5lcnJvci5tZXNzYWdlIDogXCJcIn08L2E+PC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+YCk7XHJcbiAgICAgICAgICAgICAgICBjb250YWluZXIuYXBwZW5kKGVycm9yKTtcclxuICAgICAgICAgICAgICAgIGlmIChlcnIuZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJvci5xdWVyeVNlbGVjdG9yQWxsKFwiYVwiKS5mb3JFYWNoKGVsID0+IGVsLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExvZ2dlci5zdGFja3RyYWNlKFwiQWRkb25FcnJvclwiLCBgRXJyb3IgZGV0YWlscyBmb3IgJHtlcnIubmFtZSA/IGVyci5uYW1lIDogZXJyLmZpbGV9LmAsIGVyci5lcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgIC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cjogcmVuZGVySGVhZGVyLFxyXG4gICAgICAgICAgICByZW5kZXJGb290ZXI6IHJlbmRlckZvb3RlcixcclxuICAgICAgICAgICAgY2hpbGRyZW46IGNoYW5nZWxvZ0l0ZW1zXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbn0iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/modals.js\n");
/***/ }),
@@ -983,7 +1007,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _settings_addonlist__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings/addonlist */ \"./src/ui/settings/addonlist.jsx\");\n/* harmony import */ var _settings_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings/group */ \"./src/ui/settings/group.jsx\");\n/* harmony import */ var _settings_title__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./settings/title */ \"./src/ui/settings/title.jsx\");\n/* harmony import */ var _settings_sidebarheader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings/sidebarheader */ \"./src/ui/settings/sidebarheader.jsx\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class SettingsRenderer {\n constructor() {\n this.patchSections();\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].on(\"strings-updated\", this.forceUpdate);\n }\n\n onChange(onChange) {\n return (collection, category, id) => {\n const before = modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].collections.length + modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].panels.length;\n onChange(collection, category, id);\n const after = modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].collections.length + modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].panels.length;\n if (before != after) setTimeout(this.forceUpdate.bind(this), 50);\n };\n }\n\n buildSettingsPanel(title, config, state, onChange, button = null) {\n config.forEach(section => {\n section.settings.forEach(item => item.value = state[section.id][item.id]);\n });\n return this.getSettingsPanel(title, config, this.onChange(onChange), button);\n }\n\n getSettingsPanel(title, groups, onChange, button = null) {\n return [modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_settings_title__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n text: title,\n button: button\n }), groups.map(section => {\n return modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_settings_group__WEBPACK_IMPORTED_MODULE_2__[\"default\"], Object.assign({}, section, {\n onChange\n }));\n })];\n }\n\n getAddonPanel(title, addonList, addonState, options = {}) {\n return modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_settings_addonlist__WEBPACK_IMPORTED_MODULE_1__[\"default\"], Object.assign({}, {\n title: title,\n addonList: addonList,\n addonState: addonState\n }, options));\n }\n\n async patchSections() {\n const UserSettings = await modules__WEBPACK_IMPORTED_MODULE_0__[\"ReactComponents\"].get(\"UserSettings\", m => m.prototype && m.prototype.generateSections);\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Patcher\"].after(\"SettingsManager\", UserSettings.prototype, \"render\", thisObject => {\n thisObject._reactInternalFiber.return.return.return.return.return.return.return.memoizedProps.id = \"user-settings\";\n });\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Patcher\"].after(\"SettingsManager\", UserSettings.prototype, \"generateSections\", (thisObject, args, returnValue) => {\n let location = returnValue.findIndex(s => s.section.toLowerCase() == \"linux\") + 1;\n\n const insert = section => {\n returnValue.splice(location, 0, section);\n location++;\n };\n\n insert({\n section: \"DIVIDER\"\n }); // Header\n\n insert({\n section: \"CUSTOM\",\n element: _settings_sidebarheader__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n });\n\n for (const collection of modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].collections) {\n if (collection.disabled) continue;\n insert({\n section: collection.name,\n label: collection.name,\n element: () => this.buildSettingsPanel(collection.name, collection.settings, modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].state[collection.id], modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].onSettingChange.bind(modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"], collection.id), collection.button ? collection.button : null)\n });\n }\n\n for (const panel of modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].panels.sort((a, b) => a.order > b.order)) {\n if (panel.clickListener) panel.onClick = event => panel.clickListener(thisObject, event, returnValue);\n insert(panel);\n } // insert({section: \"CUSTOM\", element: Attribution});\n\n });\n this.forceUpdate();\n }\n\n forceUpdate() {\n const viewClass = modules__WEBPACK_IMPORTED_MODULE_0__[\"WebpackModules\"].getByProps(\"standardSidebarView\").standardSidebarView.split(\" \")[0];\n const node = document.querySelector(`.${viewClass}`);\n if (!node) return;\n const stateNode = modules__WEBPACK_IMPORTED_MODULE_0__[\"Utilities\"].findInReactTree(modules__WEBPACK_IMPORTED_MODULE_0__[\"Utilities\"].getReactInstance(node), m => m && m.generateSections, {\n walkable: [\"return\", \"stateNode\"]\n });\n if (stateNode) stateNode.forceUpdate();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3NldHRpbmdzLmpzPzc2YmUiXSwibmFtZXMiOlsiU2V0dGluZ3NSZW5kZXJlciIsImNvbnN0cnVjdG9yIiwicGF0Y2hTZWN0aW9ucyIsIkV2ZW50cyIsIm9uIiwiZm9yY2VVcGRhdGUiLCJvbkNoYW5nZSIsImNvbGxlY3Rpb24iLCJjYXRlZ29yeSIsImlkIiwiYmVmb3JlIiwiU2V0dGluZ3MiLCJjb2xsZWN0aW9ucyIsImxlbmd0aCIsInBhbmVscyIsImFmdGVyI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dlckNhc2UoKSA9PSBcImxpbnV4XCIpICsgMTtcclxuICAgICAgICAgICAgY29uc3QgaW5zZXJ0ID0gKHNlY3Rpb24pID0+IHtcclxuICAgICAgICAgICAgICAgIHJldHVyblZhbHVlLnNwbGljZShsb2NhdGlvbiwgMCwgc2VjdGlvbik7XHJcbiAgICAgICAgICAgICAgICBsb2NhdGlvbisrO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBpbnNlcnQoe3NlY3Rpb246IFwiRElWSURFUlwifSk7XHJcbiAgICAgICAgICAgIC8vIEhlYWRlclxyXG4gICAgICAgICAgICBpbnNlcnQoe3NlY3Rpb246IFwiQ1VTVE9NXCIsIGVsZW1lbnQ6IEhlYWRlcn0pO1xyXG4gICAgICAgICAgICBmb3IgKGNvbnN0IGNvbGxlY3Rpb24gb2YgU2V0dGluZ3MuY29sbGVjdGlvbnMpIHtcclxuICAgICAgICAgICAgICAgIGlmIChjb2xsZWN0aW9uLmRpc2FibGVkKSBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGluc2VydCh7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VjdGlvbjogY29sbGVjdGlvbi5uYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBjb2xsZWN0aW9uLm5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudDogKCkgPT4gdGhpcy5idWlsZFNldHRpbmdzUGFuZWwoY29sbGVjdGlvbi5uYW1lLCBjb2xsZWN0aW9uLnNldHRpbmdzLCBTZXR0aW5ncy5zdGF0ZVtjb2xsZWN0aW9uLmlkXSwgU2V0dGluZ3Mub25TZXR0aW5nQ2hhbmdlLmJpbmQoU2V0dGluZ3MsIGNvbGxlY3Rpb24uaWQpLCBjb2xsZWN0aW9uLmJ1dHRvbiA/IGNvbGxlY3Rpb24uYnV0dG9uIDogbnVsbClcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgI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cGRhdGUoKTtcclxuICAgIH1cclxufTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/settings.js\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _settings_addonlist__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings/addonlist */ \"./src/ui/settings/addonlist.jsx\");\n/* harmony import */ var _settings_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings/group */ \"./src/ui/settings/group.jsx\");\n/* harmony import */ var _settings_title__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./settings/title */ \"./src/ui/settings/title.jsx\");\n/* harmony import */ var _settings_sidebarheader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings/sidebarheader */ \"./src/ui/settings/sidebarheader.jsx\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class SettingsRenderer {\n constructor() {\n this.patchSections();\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].on(\"strings-updated\", this.forceUpdate);\n }\n\n onDrawerToggle(collection, group, state) {\n const drawerStates = modules__WEBPACK_IMPORTED_MODULE_0__[\"DataStore\"].getBDData(\"drawerStates\") || {};\n if (!drawerStates[collection]) drawerStates[collection] = {};\n drawerStates[collection][group] = state;\n modules__WEBPACK_IMPORTED_MODULE_0__[\"DataStore\"].setBDData(\"drawerStates\", drawerStates);\n }\n\n getDrawerState(collection, group, defaultValue) {\n const drawerStates = modules__WEBPACK_IMPORTED_MODULE_0__[\"DataStore\"].getBDData(\"drawerStates\") || {};\n if (!drawerStates[collection]) return defaultValue;\n if (!drawerStates[collection].hasOwnProperty(group)) return defaultValue;\n return drawerStates[collection][group];\n }\n\n onChange(onChange) {\n return (collection, category, id) => {\n const before = modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].collections.length + modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].panels.length;\n onChange(collection, category, id);\n const after = modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].collections.length + modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].panels.length;\n if (before != after) setTimeout(this.forceUpdate.bind(this), 50);\n };\n }\n\n buildSettingsPanel(id, title, config, state, onChange, button = null) {\n config.forEach(section => {\n section.settings.forEach(item => item.value = state[section.id][item.id]);\n });\n return this.getSettingsPanel(id, title, config, this.onChange(onChange), button);\n }\n\n getSettingsPanel(id, title, groups, onChange, button = null) {\n return [modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_settings_title__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n text: title,\n button: button\n }), groups.map(section => {\n return modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_settings_group__WEBPACK_IMPORTED_MODULE_2__[\"default\"], Object.assign({}, section, {\n onChange: onChange,\n onDrawerToggle: state => this.onDrawerToggle(id, section.id, state),\n shown: this.getDrawerState(id, section.id, section.hasOwnProperty(\"shown\") ? section.shown : true)\n }));\n })];\n }\n\n getAddonPanel(title, addonList, addonState, options = {}) {\n return modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_settings_addonlist__WEBPACK_IMPORTED_MODULE_1__[\"default\"], Object.assign({}, {\n title: title,\n addonList: addonList,\n addonState: addonState\n }, options));\n }\n\n async patchSections() {\n const UserSettings = await modules__WEBPACK_IMPORTED_MODULE_0__[\"ReactComponents\"].get(\"UserSettings\", m => m.prototype && m.prototype.generateSections);\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Patcher\"].after(\"SettingsManager\", UserSettings.prototype, \"render\", thisObject => {\n thisObject._reactInternalFiber.return.return.return.return.return.return.return.memoizedProps.id = \"user-settings\";\n });\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Patcher\"].after(\"SettingsManager\", UserSettings.prototype, \"generateSections\", (thisObject, args, returnValue) => {\n let location = returnValue.findIndex(s => s.section.toLowerCase() == \"linux\") + 1;\n\n const insert = section => {\n returnValue.splice(location, 0, section);\n location++;\n };\n\n insert({\n section: \"DIVIDER\"\n }); // Header\n\n insert({\n section: \"CUSTOM\",\n element: _settings_sidebarheader__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n });\n\n for (const collection of modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].collections) {\n if (collection.disabled) continue;\n insert({\n section: collection.name,\n label: collection.name,\n element: () => this.buildSettingsPanel(collection.id, collection.name, collection.settings, modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].state[collection.id], modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].onSettingChange.bind(modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"], collection.id), collection.button ? collection.button : null)\n });\n }\n\n for (const panel of modules__WEBPACK_IMPORTED_MODULE_0__[\"Settings\"].panels.sort((a, b) => a.order > b.order)) {\n if (panel.clickListener) panel.onClick = event => panel.clickListener(thisObject, event, returnValue);\n insert(panel);\n }\n });\n this.forceUpdate();\n }\n\n forceUpdate() {\n const viewClass = modules__WEBPACK_IMPORTED_MODULE_0__[\"WebpackModules\"].getByProps(\"standardSidebarView\").standardSidebarView.split(\" \")[0];\n const node = document.querySelector(`.${viewClass}`);\n if (!node) return;\n const stateNode = modules__WEBPACK_IMPORTED_MODULE_0__[\"Utilities\"].findInReactTree(modules__WEBPACK_IMPORTED_MODULE_0__[\"Utilities\"].getReactInstance(node), m => m && m.generateSections, {\n walkable: [\"return\", \"stateNode\"]\n });\n if (stateNode) stateNode.forceUpdate();\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3NldHRpbmdzLmpzPzc2YmUiXSwibmFtZXMiOlsiU2V0dGluZ3NSZW5kZXJlciIsImNvbnN0cnVjdG9yI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hpcy5mb3JjZVVwZGF0ZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIGZvcmNlVXBkYXRlKCkge1xyXG4gICAgICAgIGNvbnN0IHZpZXdDbGFzcyA9IFdlYnBhY2tNb2R1bGVzLmdldEJ5UHJvcHMoXCJzdGFuZGFyZFNpZGViYXJWaWV3XCIpLnN0YW5kYXJkU2lkZWJhclZpZXcuc3BsaXQoXCIgXCIpWzBdO1xyXG4gICAgICAgIGNvbnN0IG5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGAuJHt2aWV3Q2xhc3N9YCk7XHJcbiAgICAgICAgaWYgKCFub2RlKSByZXR1cm47XHJcbiAgICAgICAgY29uc3Qgc3RhdGVOb2RlID0gVXRpbGl0aWVzLmZpbmRJblJlYWN0VHJlZShVdGlsaXRpZXMuZ2V0UmVhY3RJbnN0YW5jZShub2RlKSwgbSA9PiBtICYmIG0uZ2VuZXJhdGVTZWN0aW9ucywge3dhbGthYmxlOiBbXCJyZXR1cm5cIiwgXCJzdGF0ZU5vZGVcIl19KTtcclxuICAgICAgICBpZiAoc3RhdGVOb2RlKSBzdGF0ZU5vZGUuZm9yY2VVcGRhdGUoKTtcclxuICAgIH1cclxufTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/settings.js\n");
/***/ }),
@@ -1079,7 +1103,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
/***/ (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 Group; });\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _title__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./title */ \"./src/ui/settings/title.jsx\");\n/* harmony import */ var _divider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./divider */ \"./src/ui/settings/divider.jsx\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/settings/components/switch.jsx\");\n/* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/dropdown */ \"./src/ui/settings/components/dropdown.jsx\");\n/* harmony import */ var _components_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/item */ \"./src/ui/settings/components/item.jsx\");\n\n\n\n\n\n\nconst baseClassName = \"bd-settings-group\";\nclass Group extends modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].Component {\n constructor(props) {\n super(props);\n\n if (this.props.button && this.props.collapsible) {\n const original = this.props.button.onClick;\n\n this.props.button.onClick = event => {\n event.stopPropagation();\n original(...arguments);\n };\n }\n\n if (!this.props.hasOwnProperty(\"shown\")) this.props.shown = true;\n this.container = modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createRef();\n this.state = {\n collapsed: this.props.collapsible && !this.props.shown\n };\n this.onChange = this.onChange.bind(this);\n this.toggleCollapse = this.toggleCollapse.bind(this);\n }\n\n toggleCollapse() {\n const container = this.container.current;\n const timeout = this.state.collapsed ? 300 : 1;\n container.style.setProperty(\"height\", container.scrollHeight + \"px\");\n container.classList.add(\"animating\");\n this.setState({\n collapsed: !this.state.collapsed\n }, () => setTimeout(() => {\n container.style.setProperty(\"height\", \"\");\n container.classList.remove(\"animating\");\n }, timeout));\n }\n\n onChange(id, value) {\n if (!this.props.onChange) return;\n if (this.props.id) this.props.onChange(this.props.id, id, value);else this.props.onChange(id, value);\n this.forceUpdate();\n }\n\n render() {\n const {\n settings\n } = this.props;\n const collapseClass = this.props.collapsible ? `collapsible ${this.state.collapsed ? \"collapsed\" : \"expanded\"}` : \"\";\n const groupClass = `${baseClassName} ${collapseClass}`;\n return /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(\"div\", {\n className: groupClass\n }, /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_title__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n text: this.props.name,\n collapsible: this.props.collapsible,\n onClick: this.toggleCollapse,\n button: this.props.button,\n isGroup: true\n }), /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(\"div\", {\n className: \"bd-settings-container\",\n ref: this.container\n }, settings.filter(s => !s.hidden).map(setting => {\n let component = null;\n if (setting.type == \"dropdown\") component = /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n disabled: setting.disabled,\n id: setting.id,\n options: setting.options,\n value: setting.value,\n onChange: this.onChange.bind(this, setting.id)\n });\n if (setting.type == \"switch\") component = /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_components_switch__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n disabled: setting.disabled,\n id: setting.id,\n checked: setting.value,\n onChange: this.onChange.bind(this, setting.id)\n });\n if (!component) return null;\n return /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_components_item__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n id: setting.id,\n key: setting.id,\n name: setting.name,\n note: setting.note\n }, component);\n })), this.props.showDivider && /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_divider__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null));\n }\n\n}\nconst originalRender = Group.prototype.render;\nObject.defineProperty(Group.prototype, \"render\", {\n enumerable: false,\n configurable: false,\n set: function () {\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Logger\"].warn(\"Group\", \"Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins\");\n },\n get: () => originalRender\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json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ICAgICAgICAgICB0aGlzLnByb3BzLmJ1dHRvbi5vbkNsaWNrID0gKGV2ZW50KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICAgICAgICAgIG9yaWdpbmFsKC4uLmFyZ3VtZW50cyk7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoIXRoaXMucHJvcHMuaGFzT3duUHJvcGVydHkoXCJzaG93blwiKSkgdGhpcy5wcm9wcy5zaG93biA9IHRydWU7XHJcblxyXG4gICAgICAgIHRoaXMuY29udGFpbmVyID0gUmVhY3QuY3JlYXRlUmVmKCk7XHJcbiAgICAgICAgdGhpcy5zdGF0ZSA9IHtcclxuICAgICAgICAgICAgY29sbGFwc2VkOiB0aGlzLnByb3BzLmNvbGxhcHNpYmxlICYmICF0aGlzLnByb3BzLnNob3duXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgdGhpcy5vbkNoYW5nZSA9IHRoaXMub25DaGFuZ2UuYmluZCh0aGlzKTtcclxuICAgICAgICB0aGlzLnRvZ2dsZUNvbGxhcHNlID0gdGhpcy50b2dnbGVDb2xsYXBzZS5iaW5kKHRoaXMpO1xyXG4gICAgfVxyXG5cclxuICAgIHRvZ2dsZUNvbGxhcHNlKCkge1xyXG4gICAgICAgIGNvbnN0IGNvbnRhaW5lciA9IHRoaXMuY29udGFpbmVyLmN1cnJlbnQ7XHJcbiAgICAgICAgY29uc3QgdGltZW91dCA9IHRoaXMuc3RhdGUuY29sbGFwc2VkID8gMzAwIDogMTtcclxuICAgICAgICBjb250YWluZXIuc3R5bGUuc2V0UHJvcGVydHkoXCJoZWlnaHRcIiwgY29udGFpbmVyLnNjcm9sbEhlaWdodCArIFwicHhcIik7XHJcbiAgICAgICAgY29udGFpbmVyLmNsYXNzTGlzdC5hZGQoXCJhbmltYXRpbmdcIik7XHJcbiAgICAgICAgdGhpcy5zZXRTdGF0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ICAgICAgICAgICAgICAgICByZXR1cm4gPEl0ZW0gaWQ9e3NldHRpbmcuaWR9IGtleT17c2V0dGluZy5pZH0gbmFtZT17c2V0dGluZy5uYW1lfSBub3RlPXtzZXR0aW5nLm5vdGV9Pntjb21wb25lbnR9PC9JdGVtPjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSl9XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMuc2hvd0RpdmlkZXIgJiYgPERpdmlkZXIgLz59XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj47XHJcbiAgICB9XHJcbn1cclxuXHJcbmNvbnN0IG9yaWdpbmFsUmVuZGVyID0gR3JvdXAucHJvdG90eXBlLnJlbmRlcjtcclxuT2JqZWN0LmRlZmluZVByb3BlcnR5KEdyb3VwLnByb3RvdHlwZSwgXCJyZW5kZXJcIiwge1xyXG4gICAgZW51bWVyYWJsZTogZmFsc2UsXHJcbiAgICBjb25maWd1cmFibGU6IGZhbHNlLFxyXG4gICAgc2V0OiBmdW5jdGlvbigpIHtMb2dnZXIud2FybihcIkdyb3VwXCIsIFwiQWRkb24gcG9saWN5IGZvciBwbHVnaW5zICM1IGh0dHBzOi8vZ2l0aHViLmNvbS9yYXVlbnppL0JldHRlckRpc2NvcmRBcHAvd2lraS9BZGRvbi1Qb2xpY2llcyNwbHVnaW5zXCIpO30sXHJcbiAgICBnZXQ6ICgpID0+IG9yaWdpbmFsUmVuZGVyXHJcbn0pOyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/ui/settings/group.jsx\n");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return Group; });\n/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ \"./src/modules/modules.js\");\n/* harmony import */ var _title__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./title */ \"./src/ui/settings/title.jsx\");\n/* harmony import */ var _divider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./divider */ \"./src/ui/settings/divider.jsx\");\n/* harmony import */ var _components_switch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/switch */ \"./src/ui/settings/components/switch.jsx\");\n/* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/dropdown */ \"./src/ui/settings/components/dropdown.jsx\");\n/* harmony import */ var _components_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/item */ \"./src/ui/settings/components/item.jsx\");\n\n\n\n\n\n\nconst baseClassName = \"bd-settings-group\";\nclass Group extends modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].Component {\n constructor(props) {\n super(props);\n\n if (this.props.button && this.props.collapsible) {\n const original = this.props.button.onClick;\n\n this.props.button.onClick = event => {\n event.stopPropagation();\n original(...arguments);\n };\n }\n\n if (!this.props.hasOwnProperty(\"shown\")) this.props.shown = true;\n this.container = modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createRef();\n this.state = {\n collapsed: this.props.collapsible && !this.props.shown\n };\n this.onChange = this.onChange.bind(this);\n this.toggleCollapse = this.toggleCollapse.bind(this);\n }\n\n toggleCollapse() {\n const container = this.container.current;\n const timeout = this.state.collapsed ? 300 : 1;\n container.style.setProperty(\"height\", container.scrollHeight + \"px\");\n container.classList.add(\"animating\");\n this.setState({\n collapsed: !this.state.collapsed\n }, () => setTimeout(() => {\n container.style.setProperty(\"height\", \"\");\n container.classList.remove(\"animating\");\n }, timeout));\n if (this.props.onDrawerToggle) this.props.onDrawerToggle(this.state.collapsed);\n }\n\n onChange(id, value) {\n if (!this.props.onChange) return;\n if (this.props.id) this.props.onChange(this.props.id, id, value);else this.props.onChange(id, value);\n this.forceUpdate();\n }\n\n render() {\n const {\n settings\n } = this.props;\n const collapseClass = this.props.collapsible ? `collapsible ${this.state.collapsed ? \"collapsed\" : \"expanded\"}` : \"\";\n const groupClass = `${baseClassName} ${collapseClass}`;\n return /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(\"div\", {\n className: groupClass\n }, /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_title__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n text: this.props.name,\n collapsible: this.props.collapsible,\n onClick: this.toggleCollapse,\n button: this.props.button,\n isGroup: true\n }), /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(\"div\", {\n className: \"bd-settings-container\",\n ref: this.container\n }, settings.filter(s => !s.hidden).map(setting => {\n let component = null;\n if (setting.type == \"dropdown\") component = /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_components_dropdown__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n disabled: setting.disabled,\n id: setting.id,\n options: setting.options,\n value: setting.value,\n onChange: this.onChange.bind(this, setting.id)\n });\n if (setting.type == \"switch\") component = /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_components_switch__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n disabled: setting.disabled,\n id: setting.id,\n checked: setting.value,\n onChange: this.onChange.bind(this, setting.id)\n });\n if (!component) return null;\n return /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_components_item__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n id: setting.id,\n key: setting.id,\n name: setting.name,\n note: setting.note\n }, component);\n })), this.props.showDivider && /*#__PURE__*/modules__WEBPACK_IMPORTED_MODULE_0__[\"React\"].createElement(_divider__WEBPACK_IMPORTED_MODULE_2__[\"default\"], null));\n }\n\n}\nconst originalRender = Group.prototype.render;\nObject.defineProperty(Group.prototype, \"render\", {\n enumerable: false,\n configurable: false,\n set: function () {\n modules__WEBPACK_IMPORTED_MODULE_0__[\"Logger\"].warn(\"Group\", \"Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins\");\n },\n get: () => originalRender\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9Db3JlLy4vc3JjL3VpL3NldHRpbmdzL2dyb3VwLmpzeD8xYjcyIl0sIm5hbWVzIjpbImJhc2VDbGFzc05hbWUiLCJHcm91cCIsIlJlYWN0IiwiQ29tcG9uZW50IiwiY29uc3RydWN0b3IiLCJwcm9wcyIsImJ1dHRvbiIsImNvbGxhcHNpYmxlIiwib3JpZ2luYWwiLCJvbkNsaWNrIiwiZXZlbnQiLCJzdG9wUHJvcGFnYXRpb24iLCJhcmd1bWVudHMiLCJoYXNPd25Qcm9wZXJ0eSIsInNob3duIiwiY29udGFpbmVyIiwiY3JlYXRlUmVmIiwic3RhdGUiLCJjb2xsYXBzZWQiLCJvbkNoYW5nZSIsImJpbmQiLCJ0b2dnbGVDb2xsYXBzZSIsImN1cnJlbnQiLCJ0aW1lb3V0Iiwic3R5bGUiLCJzZXRQcm9wZXJ0eSIsInNjcm9sbEhlaWdodCIsImNsYXNzTGlzdCIsImFkZCIsInNldFN0YXRlIiwic2V0VGltZW91dCIsInJlbW92ZSIsIm9uRHJhd2VyVG9nZ2xlIiwiaWQiLCJ2YWx1ZSIsImZvcmNlVXBkYXRlIiwicmVuZGVyIiwic2V0dGluZ3MiLCJjb2xsYXBzZUNsYXNzIiwiZ3JvdXBDbGFzcyIsIm5hbWUiLCJmaWx0ZXIiLCJzIiwiaGlkZGVuIiwibWFwIiwic2V0dGluZyIsImNvbXBvbmVudCIsInR5cGUiLCJkaXNhYmxlZCIsIm9wdGlvbnMiLCJub3RlIiwic2hvd0RpdmlkZXIiLCJvcmlnaW5hbFJlbmRlciIsInByb3RvdHlwZSIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYW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odHRwczovL2dpdGh1Yi5jb20vcmF1ZW56aS9CZXR0ZXJEaXNjb3JkQXBwL3dpa2kvQWRkb24tUG9saWNpZXMjcGx1Z2luc1wiKTt9LFxyXG4gICAgZ2V0OiAoKSA9PiBvcmlnaW5hbFJlbmRlclxyXG59KTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/ui/settings/group.jsx\n");
/***/ }),
diff --git a/js/main.min.js b/js/main.min.js
index 8c6aac6a..16d4ade2 100644
--- a/js/main.min.js
+++ b/js/main.min.js
@@ -1 +1 @@
-var Core=function(e){var t={};function s(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(n,i,function(t){return e[t]}.bind(null,i));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=9)}([function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("request")},function(e,t){e.exports=require("module")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("rimraf")},function(e,t){e.exports=require("yauzl")},function(e,t){e.exports=require("mkdirp")},function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return ts}));var n={};s.r(n),s.d(n,"CustomCSS",(function(){return it})),s.d(n,"WindowPrefs",(function(){return ot})),s.d(n,"TwentyFourHour",(function(){return rt})),s.d(n,"ClassNormalizer",(function(){return lt})),s.d(n,"PublicServers",(function(){return yt})),s.d(n,"VoiceDisconnect",(function(){return vt})),s.d(n,"ColoredText",(function(){return Ct})),s.d(n,"DarkMode",(function(){return St})),s.d(n,"MinimalMode",(function(){return Et})),s.d(n,"VoiceMode",(function(){return Pt})),s.d(n,"EmoteModule",(function(){return Tt})),s.d(n,"EmoteMenu",(function(){return Ft})),s.d(n,"CopySelector",(function(){return Ot})),s.d(n,"Debugger",(function(){return It})),s.d(n,"ReactDevTools",(function(){return _t}));var i={Panels:{plugins:"Plugins",themes:"Themes",customcss:"Custom CSS"},Collections:{settings:{name:"Settings",general:{name:"General",emotes:{name:"Emote System",note:"Enables BD's emote system"},publicServers:{name:"Public Servers",note:"Display public servers button"},voiceDisconnect:{name:"Voice Disconnect",note:"Disconnect from voice server when closing Discord"},twentyFourHour:{name:"24-Hour Timestamps",note:"Hides channels when in minimal mode"},classNormalizer:{name:"Normalize Classes",note:"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)"},showToasts:{name:"Show Toasts",note:"Shows a small notification for important information"}},appearance:{name:"Appearance",voiceMode:{name:"Voice Mode",note:"Hides everything that isn't voice chat"},minimalMode:{name:"Minimal Mode",note:"Hide elements and reduce the size of elements"},hideChannels:{name:"Hide Channels",note:"Hides channels when in minimal mode"},darkMode:{name:"Dark Mode",note:"Make certain elements dark by default"},coloredText:{name:"Colored Text",note:"Make text colour the same as role color"}},addons:{name:"Addon Manager",addonErrors:{name:"Show Addon Errors",note:"Shows a modal with plugin/theme errors"},autoScroll:{name:"Scroll To Settings",note:"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)"},autoReload:{name:"Automatic Loading",note:"Automatically loads, reloads, and unloads plugins and themes"},editAction:{name:"Edit Action",note:"Where plugins & themes appear when editing",options:{detached:"Detached Window",system:"System Editor"}}},customcss:{name:"Custom CSS",customcss:{name:"Custom CSS",note:"Enables the Custom CSS tab"},liveUpdate:{name:"Live Update",note:"Updates the css as you type"},startDetached:{name:"Start Detached",note:"Clicking the Custom CSS tab opens the editor in a separate window"},nativeOpen:{name:"Open in Native Editor",note:"Clicking the Custom CSS tab opens your custom css in your native editor"},openAction:{name:"Editor Location",note:"Where Custom CSS should open by default",options:{settings:"Settings Menu",detached:"Detached Window",system:"System Editor"}}},developer:{name:"Developer Settings",debuggerHotkey:{name:"Debugger Hotkey",note:"Allows activating debugger when pressing F8"},copySelector:{name:"Copy Selector",note:'Adds a "Copy Selector" option to context menus when developer mode is active'},reactDevTools:{name:"React Developer Tools",note:"Injects your local installation of React Developer Tools into Discord"}},window:{name:"Window Preferences",transparency:{name:"Enable Transparency",note:"Enables the main window to be see-through (requires restart)"},frame:{name:"Window Frame",note:"Adds the native os window frame to the main window"}}},emotes:{name:"Emotes",general:{name:"General",download:{name:"Download Emotes",note:"Download emotes whenever they are out of date"},emoteMenu:{name:"Emote Menu",note:"Show Twitch/Favourite emotes in emote menu"},hideEmojiMenu:{name:"Hide Emoji Menu",note:"Hides Discord's emoji menu when using emote menu"},autoCaps:{name:"Emote Autocapitalization",note:"Autocapitalize emote commands"},showNames:{name:"Show Names",note:"Show emote names on hover"},modifiers:{name:"Show Emote Modifiers",note:"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)"},animateOnHover:{name:"Animate On Hover",note:"Only animate the emote modifiers on hover"}},categories:{name:"Categories",twitchglobal:{name:"Twitch Globals",note:"Show Twitch global emotes"},twitchsubscriber:{name:"Twitch Subscribers",note:"Show Twitch subscriber emotes"},frankerfacez:{name:"FrankerFaceZ",note:"Show emotes from FFZ"},bttv:{name:"BetterTTV",note:"Show emotes from BTTV"}}}},Addons:{title:"{{name}} v{{version}} by {{author}}",openFolder:"Open {{type}} Folder",reload:"Reload",addonSettings:"Settings",website:"Website",source:"Source",invite:"Support Server",donate:"Donate",patreon:"Patreon",name:"Name",author:"Author",version:"Version",added:"Date Added",modified:"Date Modified",search:"Search {{type}}",editAddon:"Edit",deleteAddon:"Delete",confirmDelete:"Are you sure you want to delete {{name}}?",confirmationText:"You have unsaved changes to {{name}}. Closing this window will lose all those changes.",enabled:"{{name}} has been enabled.",disabled:"{{name}} has been disabled.",unknownAuthor:"Unknown Author",noDescription:"Description not provided."},Emotes:{loading:"Loading emotes in the background do not reload.",loaded:"All emotes successfully loaded.",clearEmotes:"Clear Emote Data",favoriteAction:"Favorite!"},CustomCSS:{confirmationText:"You have unsaved changes to your Custom CSS. Closing this window will lose all those changes.",update:"Update",save:"Save",openNative:"Open in System Editor",openDetached:"Detach Window",settings:"Editor Settings",editorTitle:"Custom CSS Editor"},PublicServers:{button:"public",join:"Join",joining:"Joining",joined:"Joined",loading:"Loading",loadMore:"Load More",notConnected:"Not connected to DiscordServers.com!",search:"Search",connect:"Connect",reconnect:"Reconnect",categories:"Categories",connection:"Connected as: {{username}}#{{discriminator}}",results:"Showing {{start}}-{{end}} of {{total}} results in {{category}}",query:"for {{query}}"},Modals:{confirmAction:"Are You Sure?",okay:"Okay",cancel:"Cancel",close:"Close",name:"Name",message:"Message",error:"Error",addonErrors:"Addon Errors",restartRequired:"Restart Required",restartNow:"Restart Now",restartLater:"Restart Later",additionalInfo:"Additional Info"},Sorting:{sortBy:"Sort By",order:"Order",ascending:"Ascending",descending:"Descending"},WindowPrefs:{enabledInfo:"This option requires a transparent theme in order to work properly. On Windows this may break your aero snapping and maximizing.\n\nIn order to take effect, Discord needs to be restarted. Do you want to restart now?",disabledInfo:"In order to take effect, Discord needs to be restarted. Do you want to restart now?"},Startup:{notSupported:"Not Supported",versionMismatch:"BandagedBD Injector v{{injector}} is not supported by the latest remote (v{{remote}}).\n\nPlease download the latest version from [GitHub](https://github.com/rauenzi/BetterDiscordApp/releases/latest)",incompatibleApp:"BandagedBD does not work with {{app}}. Please uninstall one of them.",updateNow:"Update Now",maybeLater:"Maybe Later",updateAvailable:"Update Available",updateInfo:"There is an update available for BandagedBD's Injector ({{version}}).\n\nYou can either update and restart now, or later.",updateFailed:"Could Not Update",manualUpdate:"Unable to update automatically, please download the installer and reinstall normally.\n\n[Download Installer](https://github.com/rauenzi/BetterDiscordApp/releases/latest)"}},o={local:!1,localServer:"//localhost:8080",minified:!0,version:"0.3.0",branch:"master",repo:"rauenzi",minSupportedVersion:"0.3.0",bbdVersion:"1.0.0"},r=[{type:"category",id:"general",name:"General",collapsible:!0,settings:[{type:"switch",id:"download",value:!0},{type:"switch",id:"emoteMenu",value:!0},{type:"switch",id:"hideEmojiMenu",value:!1,enableWith:"emoteMenu"},{type:"switch",id:"showNames",value:!0},{type:"switch",id:"modifiers",value:!0},{type:"switch",id:"animateOnHover",value:!1}]},{type:"category",id:"categories",name:"Categories",collapsible:!0,settings:[{type:"switch",id:"twitchglobal",value:!0},{type:"switch",id:"twitchsubscriber",value:!1},{type:"switch",id:"frankerfacez",value:!0},{type:"switch",id:"bttv",value:!0}]}],a=[{type:"category",id:"general",collapsible:!0,settings:[{type:"switch",id:"emotes",value:!0},{type:"switch",id:"publicServers",value:!0},{type:"switch",id:"voiceDisconnect",value:!1},{type:"switch",id:"twentyFourHour",value:!1},{type:"switch",id:"classNormalizer",value:!0},{type:"switch",id:"showToasts",value:!0}]},{type:"category",id:"appearance",collapsible:!0,settings:[{type:"switch",id:"voiceMode",value:!1},{type:"switch",id:"minimalMode",value:!1},{type:"switch",id:"hideChannels",value:!1,enableWith:"minimalMode"},{type:"switch",id:"darkMode",value:!0},{type:"switch",id:"coloredText",value:!1}]},{type:"category",id:"addons",collapsible:!0,shown:!1,settings:[{type:"switch",id:"addonErrors",value:!0},{type:"switch",id:"autoScroll",value:!0},{type:"switch",id:"autoReload",value:!0},{type:"dropdown",id:"editAction",value:"detached",options:[{value:"detached"},{value:"system"}]}]},{type:"category",id:"customcss",collapsible:!0,shown:!1,settings:[{type:"switch",id:"customcss",value:!0},{type:"switch",id:"liveUpdate",value:!1},{type:"dropdown",id:"openAction",value:"settings",options:[{value:"settings"},{value:"detached"},{value:"system"}]}]},{type:"category",id:"developer",collapsible:!0,shown:!1,settings:[{type:"switch",id:"debuggerHotkey",value:!1},{type:"switch",id:"copySelector",value:!1},{type:"switch",id:"reactDevTools",value:!1}]},{type:"category",id:"window",collapsible:!0,shown:!1,settings:[{type:"switch",id:"transparency",value:!1},{type:"switch",id:"frame",value:!1,hidden:!0}]}],l={description:"Don't be shocked, this modal is supposed to be here.",changes:[{title:"What's New?",items:["**BandagedBD will now keep you updated with changelogs!** I will try to only show a changelog when there's more than a tiny or internal change.","**Twitter (@BandagedBD)** I created a Twitter to try and provide support and such for those without access to the server. https://Twitter.com/BandagedBD"]},{title:"Fixes",type:"fixed",items:["**Colored Text** option should work again.","**Emotes** should show up in chat.","Fixed a bug where BBD attempted to patch the TabBar module incorrectly. (Thanks, DevilBro)"]},{title:"Minor Stuff",type:"improved",items:["**Colour->Color.** Swapped to using English-US spelling by default to be consistent, and to potentially be prepared for localization.","**Versions simplified.** The BandagedBD version now integrates into Discord's at the bottom-left of settings instead of randomly being a part of the setting list."]}]};const d={err:"error",error:"error",dbg:"debug",debug:"debug",log:"log",warn:"warn",info:"info"};class c{static stacktrace(e,t,s){console.error(`%c[${e}]%c ${t}\n\n%c`,"color: #3a71c1; font-weight: 700;","color: red; font-weight: 700;","color: red;",s)}static err(e,...t){c._log(e,t,"error")}static warn(e,...t){c._log(e,t,"warn")}static info(e,...t){c._log(e,t,"info")}static debug(e,...t){c._log(e,t,"debug")}static log(e,...t){c._log(e,t)}static _log(e,t,s="log"){s=c.parseType(s),Array.isArray(t)||(t=[t]),console[s](`%c[BandagedBD]%c [${e}]%c`,"color: #3E82E5; font-weight: 700;","color: #3a71c1;","",...t)}static parseType(e){return d.hasOwnProperty(e)?d[e]:"log"}}class h{static escapeID(e){return e.replace(/^[^a-z]+|[^\w-]+/gi,"-")}static addStyle(e,t){document.head.append(h.createElement(``))}static removeStyle(e){const t=document.getElementById(e);t&&t.remove()}static addScript(e,t){return new Promise(s=>{const n=document.createElement("script");n.id=e,n.src=t,n.type="text/javascript",n.onload=s,document.head.append(n)})}static removeScript(e){e=this.escapeID(e);const t=document.getElementById(e);t&&t.remove()}static animate({timing:e=(e=>e),update:t,duration:s}){const n=performance.now();requestAnimationFrame((function i(o){let r=(o-n)/s;r>1&&(r=1);const a=e(r);t(a),r<1&&requestAnimationFrame(i)}))}static Q(e){const t=this.parseHTML(e);return(t instanceof NodeList?Array.from(t).some(e=>1===e.nodeType):1===t.nodeType)?t:this.query(e)}static query(e,t){return t||(t=document),t.querySelector(e)}static queryAll(e,t){return t||(t=document),t.querySelectorAll(e)}static parseHTML(e,t=!1){const s=document.createElement("template");s.innerHTML=e;const n=s.content.cloneNode(!0);return t?n:n.childNodes.length>1?n.childNodes:n.childNodes[0]}static createElement(e,t=!1){return this.parseHTML(e,t)}static escapeHTML(e){const t=document.createTextNode(""),s=document.createElement("span");return s.append(t),t.nodeValue=e,s.innerHTML}static addClass(e,...t){t=t.flat().filter(e=>e);for(let e=0;e
e),e.classList.add(...t),e}static removeClass(e,...t){for(let e=0;ee),e.classList.remove(...t),e}static toggleClass(e,t,s){return t=t.toString().split(" ").filter(e=>e),void 0!==s?t.forEach(t=>e.classList.toggle(t,s)):t.forEach(t=>e.classList.toggle(t)),e}static hasClass(e,t){return t.toString().split(" ").filter(e=>e).every(t=>e.classList.contains(t))}static replaceClass(e,t,s){return e.classList.replace(t,s),e}static appendTo(e,t){return"string"==typeof t&&(t=this.query(t)),t?(t.append(e),e):null}static prependTo(e,t){return"string"==typeof t&&(t=this.query(t)),t?(t.prepend(e),e):null}static insertAfter(e,t){return t.parentNode.insertBefore(e,t.nextSibling),e}static after(e,t){return e.parentNode.insertBefore(t,e.nextSibling),e}static next(e,t=""){return t?e.querySelector("+ "+t):e.nextElementSibling}static nextAll(e){return e.querySelectorAll("~ *")}static nextUntil(e,t){const s=[];for(;e.nextElementSibling&&!e.nextElementSibling.matches(t);)s.push(e=e.nextElementSibling);return s}static previous(e,t=""){const s=e.previousElementSibling;return t?s&&s.matches(t)?s:null:s}static previousAll(e){const t=[];for(;e.previousElementSibling;)t.push(e=e.previousElementSibling);return t}static previousUntil(e,t){const s=[];for(;e.previousElementSibling&&!e.previousElementSibling.matches(t);)s.push(e=e.previousElementSibling);return s}static indexInParent(e){const t=e.parentNode.childNodes;let s=0;for(let n=0;n "+t)}static findChildren(e,t){return e.querySelectorAll(":scope > "+t)}static parents(e,t=""){const s=[];if(t)for(;e.parentElement&&e.parentElement.closest(t);)s.push(e=e.parentElement.closest(t));else for(;e.parentElement;)s.push(e=e.parentElement);return s}static parentsUntil(e,t){const s=[];for(;e.parentElement&&!e.parentElement.matches(t);)s.push(e=e.parentElement);return s}static siblings(e,t="*"){return Array.from(e.parentElement.children).filter(s=>s!=e&&s.matches(t))}static css(e,t,s){return void 0===s?global.getComputedStyle(e)[t]:(e.style[t]=s,e)}static width(e,t){return void 0===t?parseInt(getComputedStyle(e).width):(e.style.width=t,e)}static height(e,t){return void 0===t?parseInt(getComputedStyle(e).height):(e.style.height=t,e)}static text(e,t){return void 0===t?e.textContent:e.textContent=t}static innerWidth(e){return e.clientWidth}static innerHeight(e){return e.clientHeight}static outerWidth(e){return e.offsetWidth}static outerHeight(e){return e.offsetHeight}static offset(e){return e.getBoundingClientRect()}static get listeners(){return this._listeners||(this._listeners={})}static on(e,t,s,n){const[i,o]=t.split("."),r=s&&n;n||(n=s);const a=r?function(e){e.target.matches(s)&&n(e)}:n;e.addEventListener(i,a);const l=()=>{e.removeEventListener(i,a)};if(o){this.listeners[o]||(this.listeners[o]=[]);const t=()=>{l(),this.listeners[o].splice(this.listeners[o].findIndex(t=>t.event==i&&t.element==e),1)};return this.listeners[o].push({event:i,element:e,cancel:t}),t}return l}static once(e,t,s,n){const[i,o]=t.split("."),r=s&&n;n||(n=s);const a=r?function(t){t.target.matches(s)&&(n(t),e.removeEventListener(i,a))}:function(t){n(t),e.removeEventListener(i,a)};e.addEventListener(i,a);const l=()=>{e.removeEventListener(i,a)};if(o){this.listeners[o]||(this.listeners[o]=[]);const t=()=>{l(),this.listeners[o].splice(this.listeners[o].findIndex(t=>t.event==i&&t.element==e),1)};return this.listeners[o].push({event:i,element:e,cancel:t}),t}return l}static __offAll(e,t){const[s,n]=e.split(".");let i=e=>e.event==s,o=e=>e;t&&(i=e=>e.event==s&&e.element==t,o=e=>e.element==t);const r=this.listeners[n]||[],a=s?r.filter(i):r.filter(o);for(let e=0;e{this.observer.unsubscribe(n),t()};return this.observer.subscribe(n,t=>{const n=Array.from(s?t.addedNodes:t.removedNodes),i=n.indexOf(e)>-1,o=n.some(t=>t.contains(e));return i||o}),e}static onMount(e,t){return this.onMountChange(e,t)}static onUnmount(e,t){return this.onMountChange(e,t,!1)}static onAdded(e,t){return this.onMount(e,t)}static onRemoved(e,t){return this.onUnmount(e,t,!1)}static wrap(e){const t=this.parseHTML('
');for(let s=0;s1?n.childNodes:n.childNodes[0]}static getTextArea(){return h.query(".channelTextArea-1LDbYG textarea")}static insertText(e,t){e.focus(),e.selectionStart=0,e.selectionEnd=e.value.length,document.execCommand("insertText",!1,t)}static escape(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}static testJSON(e){try{return JSON.parse(e)}catch(e){return!1}}static suppressErrors(e,t){return(...s)=>{try{return e(...s)}catch(e){c.stacktrace("SuppressedError","Error occurred in "+t,e)}}}static onRemoved(e,t){const s=new MutationObserver(n=>{for(let i=0;i-1,l=r.some(t=>t.contains(e));(a||l)&&(s.disconnect(),t())}});s.observe(document.body,{subtree:!0,childList:!0})}static isEmpty(e){if(null==e||null==e||""==e)return!0;if("object"!=typeof e)return!1;if(Array.isArray(e))return 0==e.length;for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}static memoizeObject(e){const t=new Proxy(e,{get:function(e,t){if(e.hasOwnProperty(t)){if(Object.getOwnPropertyDescriptor(e,t).get){const s=e[t];delete e[t],e[t]=s}return e[t]}},set:function(e,t,s){return e.hasOwnProperty(t)?c.error("MemoizedObject","Trying to overwrite existing property"):(e[t]=s,e[t])}});return Object.defineProperty(t,"hasOwnProperty",{value:function(e){return void 0!==this[e]}}),t}static extend(e,...t){for(let s=0;se.startsWith("__reactInternalInstance"))]||null}static getOwnerInstance(e,{include:t,exclude:s=["Popout","Tooltip","Scroller","BackgroundFlash"],filter:n=(e=>e)}={}){if(void 0===e)return;const i=void 0===t,o=i?s:t;function r(e){const t=function(e){const t=e.type;return t&&(t.displayName||t.name)||null}(e);return null!==t&&!!(o.includes(t)^i)}let a=this.getReactInstance(e);for(a=a&&a.return;null!==a;a=a.return){if(null===a)continue;const e=a.stateNode;if(null!==a&&!(e instanceof HTMLElement)&&r(a)&&n(e))return e}return null}}class p{static byProperties(e,t=(e=>e)){return s=>{const n=t(s);return!!n&&e.every(e=>void 0!==n[e])}}static byPrototypeFields(e,t=(e=>e)){return s=>{const n=t(s);return!!n&&(!!n.prototype&&e.every(e=>void 0!==n.prototype[e]))}}static byCode(e,t=(e=>e)){return s=>{const n=t(s);return!!n&&-1!==n.toString([]).search(e)}}static byString(...e){return t=>{const s=t.toString([]);for(const t of e)if(!s.includes(t))return!1;return!0}}static byDisplayName(e){return t=>t&&t.displayName===e}static combine(...e){return t=>e.every(e=>e(t))}}const m=e=>{if(e.remove&&e.set&&e.clear&&e.get&&!e.sort)return null;if(!e.getToken&&!e.getEmail&&!e.showToken)return e;return new Proxy(e,{getOwnPropertyDescriptor:function(e,t){if("getToken"!==t&&"getEmail"!==t&&"showToken"!==t)return Object.getOwnPropertyDescriptor(e,t)},get:function(e,t){return"getToken"==t?()=>"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa":"getEmail"==t?()=>"puppet11112@gmail.com":"showToken"==t?()=>!0:e[t]}})};class g{static find(e,t=!0){return this.getModule(e,t)}static findAll(e){return this.getModule(e,!1)}static findByUniqueProperties(e,t=!0){return t?this.getByProps(...e):this.getAllByProps(...e)}static findByDisplayName(e){return this.getByDisplayName(e)}static getModule(e,t=!0){const s=this.getAllModules(),n=[];for(const i in s){if(!s.hasOwnProperty(i))continue;const o=s[i],{exports:r}=o;let a=null;if(r&&(r.__esModule&&r.default&&e(r.default)&&(a=r.default),e(r)&&(a=r),a)){if(t)return m(a);n.push(m(a))}}return t||0==n.length?void 0:n}static getModules(e){return this.getModule(e,!1)}static getByDisplayName(e){return this.getModule(p.byDisplayName(e),!0)}static getByRegex(e,t=!0){return this.getModule(p.byCode(e),t)}static getByPrototypes(...e){return this.getModule(p.byPrototypeFields(e),!0)}static getAllByPrototypes(...e){return this.getModule(p.byPrototypeFields(e),!1)}static getByProps(...e){return this.getModule(p.byProperties(e),!0)}static getAllByProps(...e){return this.getModule(p.byProperties(e),!1)}static getByString(...e){return this.getModule(p.byString(...e),!0)}static getAllByString(...e){return this.getModule(p.byString(...e),!1)}static get require(){if(this._require)return this._require;const e="bbd-webpackmodules",t="function"==typeof window.webpackJsonp?window.webpackJsonp([],{[e]:(e,t,s)=>t.default=s},[e]).default:window.webpackJsonp.push([[],{[e]:(e,t,s)=>e.exports=s},[[e]]]);return delete t.m[e],delete t.c[e],this._require=t}static getAllModules(){return this.require.c}}var f=u.memoizeObject({get React(){return g.getByProps("createElement","cloneElement")},get ReactDOM(){return g.getByProps("render","findDOMNode")},get Flux(){return g.getByProps("connectStores")},get Events(){return g.getByPrototypes("setMaxListeners","emit")},get GuildStore(){return g.getByProps("getGuild")},get SortedGuildStore(){return g.getByProps("getSortedGuilds")},get SelectedGuildStore(){return g.getByProps("getLastSelectedGuildId")},get GuildSync(){return g.getByProps("getSyncedGuilds")},get GuildInfo(){return g.getByProps("getAcronym")},get GuildChannelsStore(){return g.getByProps("getChannels","getDefaultChannel")},get GuildMemberStore(){return g.getByProps("getMember")},get MemberCountStore(){return g.getByProps("getMemberCounts")},get GuildEmojiStore(){return g.getByProps("getEmojis")},get GuildActions(){return g.getByProps("markGuildAsRead")},get GuildPermissions(){return g.getByProps("getGuildPermissions")},get ChannelStore(){return g.getByProps("getChannels","getDMFromUserId")},get SelectedChannelStore(){return g.getByProps("getLastSelectedChannelId")},get ChannelActions(){return g.getByProps("selectChannel")},get PrivateChannelActions(){return g.getByProps("openPrivateChannel")},get ChannelSelector(){return g.getByProps("selectGuild","selectChannel")},get UserInfoStore(){return g.getByProps("getToken")},get UserSettingsStore(){return g.getByProps("guildPositions")},get AccountManager(){return g.getByProps("register","login")},get UserSettingsUpdater(){return g.getByProps("updateRemoteSettings")},get OnlineWatcher(){return g.getByProps("isOnline")},get CurrentUserIdle(){return g.getByProps("getIdleTime")},get RelationshipStore(){return g.getByProps("isBlocked","getFriendIDs")},get RelationshipManager(){return g.getByProps("addRelationship")},get MentionStore(){return g.getByProps("getMentions")},get UserStore(){return g.getByProps("getCurrentUser")},get UserStatusStore(){return g.getByProps("getStatus","getState")},get UserTypingStore(){return g.getByProps("isTyping")},get UserActivityStore(){return g.getByProps("getActivity")},get UserNameResolver(){return g.getByProps("getName")},get UserNoteStore(){return g.getByProps("getNote")},get UserNoteActions(){return g.getByProps("updateNote")},get EmojiInfo(){return g.getByProps("isEmojiDisabled")},get EmojiUtils(){return g.getByProps("getGuildEmoji")},get EmojiStore(){return g.getByProps("getByCategory","EMOJI_NAME_RE")},get InviteStore(){return g.getByProps("getInvites")},get InviteResolver(){return g.getByProps("findInvite")},get InviteActions(){return g.getByProps("acceptInvite")},get DiscordConstants(){return g.getByProps("Permissions","ActivityTypes","StatusTypes")},get DiscordPermissions(){return g.getByProps("Permissions","ActivityTypes","StatusTypes").Permissions},get PermissionUtils(){return g.getByProps("getHighestRole")},get ColorConverter(){return g.getByProps("hex2int")},get ColorShader(){return g.getByProps("darken")},get TinyColor(){return g.getByPrototypes("toRgb")},get ClassResolver(){return g.getByProps("getClass")},get ButtonData(){return g.getByProps("ButtonSizes")},get IconNames(){return g.getByProps("IconNames")},get NavigationUtils(){return g.getByProps("transitionTo","replaceWith","getHistory")},get MessageStore(){return g.getByProps("getMessages")},get MessageActions(){return g.getByProps("jumpToMessage","_sendMessage")},get MessageQueue(){return g.getByProps("enqueue")},get MessageParser(){return g.getByProps("createMessage","parse","unparse")},get hljs(){return g.getByProps("highlight","highlightBlock")},get SimpleMarkdown(){return g.getByProps("parseBlock","parseInline","defaultOutput")},get ExperimentStore(){return g.getByProps("getExperimentOverrides")},get ExperimentsManager(){return g.getByProps("isDeveloper")},get CurrentExperiment(){return g.getByProps("getExperimentId")},get ImageResolver(){return g.getByProps("getUserAvatarURL","getGuildIconURL")},get ImageUtils(){return g.getByProps("getSizedImageSrc")},get AvatarDefaults(){return g.getByProps("getUserAvatarURL","DEFAULT_AVATARS")},get WindowInfo(){return g.getByProps("isFocused","windowSize")},get TagInfo(){return g.getByProps("VALID_TAG_NAMES")},get DOMInfo(){return g.getByProps("canUseDOM")},get LocaleManager(){return g.getByProps("setLocale")},get Moment(){return g.getByProps("parseZone")},get LocationManager(){return g.getByProps("createLocation")},get Timestamps(){return g.getByProps("fromTimestamp")},get TimeFormatter(){return g.getByProps("dateFormat")},get Strings(){return g.getByProps("Messages").Messages},get StringFormats(){return g.getByProps("a","z")},get StringUtils(){return g.getByProps("toASCII")},get URLParser(){return g.getByProps("Url","parse")},get ExtraURLs(){return g.getByProps("getArticleURL")},get DNDActions(){return g.getByProps("beginDrag")},get DNDSources(){return g.getByProps("addTarget")},get DNDObjects(){return g.getByProps("DragSource")},get MediaDeviceInfo(){return g.getByProps("Codecs","SUPPORTED_BROWSERS")},get MediaInfo(){return g.getByProps("getOutputVolume")},get MediaEngineInfo(){return g.getByProps("MediaEngineFeatures")},get VoiceInfo(){return g.getByProps("EchoCancellation")},get VideoStream(){return g.getByProps("getVideoStream")},get SoundModule(){return g.getByProps("playSound")},get ElectronModule(){return g.getByProps("setBadge")},get Dispatcher(){return g.getByProps("dirtyDispatch")},get PathUtils(){return g.getByProps("hasBasename")},get NotificationModule(){return g.getByProps("showNotification")},get RouterModule(){return g.getByProps("Router")},get APIModule(){return g.getByProps("getAPIBaseURL")},get AnalyticEvents(){return g.getByProps("AnalyticEventConfigs")},get KeyGenerator(){return g.getByRegex(/"binary"/)},get Buffers(){return g.getByProps("Buffer","kMaxLength")},get DeviceStore(){return g.getByProps("getDevices")},get SoftwareInfo(){return g.getByProps("os")},get CurrentContext(){return g.getByProps("setTagsContext")},get GuildClasses(){const e=g.getByProps("wrapper","unreadMentionsBar"),t=g.getByProps("guildsError","selected"),s=g.getByProps("blobContainer");return Object.assign({},e,t,s)},get LayerStack(){return g.getByProps("pushLayer")}});const b=s(5);var y=new class extends b{constructor(){super(),this.setMaxListeners(20)}dispatch(e,...t){this.emit(e,...t)}};const v=s(2),w=s(1),C=DiscordNative.globals?DiscordNative.globals.releaseChannel:DiscordNative.app?DiscordNative.app.getReleaseChannel():"stable";var S=new class{constructor(){this.data={misc:{}},this.pluginData={},this.cacheData={}}initialize(){v.existsSync(this.baseFolder)||v.mkdirSync(this.baseFolder),v.existsSync(this.dataFolder)||v.mkdirSync(this.dataFolder),v.existsSync(this.localeFolder)||v.mkdirSync(this.localeFolder),v.existsSync(this.emoteFolder)||v.mkdirSync(this.emoteFolder),v.existsSync(this.cacheFile)||v.writeFileSync(this.cacheFile,JSON.stringify({})),v.existsSync(this.customCSS)||v.writeFileSync(this.customCSS,"");const e=v.readdirSync(this.dataFolder).filter(e=>!v.statSync(w.resolve(this.dataFolder,e)).isDirectory()&&e.endsWith(".json"));for(const t of e)this.data[t.split(".")[0]]=require(w.resolve(this.dataFolder,t));this.cacheData=u.testJSON(v.readFileSync(this.cacheFile).toString())||{}}get injectionPath(){if(this._injectionPath)return this._injectionPath;const e=s(0).remote.app,t=e.getAppPath(),n=e.getPath("userData"),i=w.resolve(n,e.getVersion(),"modules","discord_desktop_core","injector"),o=w.resolve(t,"..","app"),r=v.existsSync(o)?o:v.existsSync(i)?i:null;return this._injectionPath=r||null}get customCSS(){return this._customCSS||(this._customCSS=w.resolve(this.dataFolder,"custom.css"))}get baseFolder(){return this._baseFolder||(this._baseFolder=w.resolve(o.dataPath,"data"))}get dataFolder(){return this._dataFolder||(this._dataFolder=w.resolve(this.baseFolder,""+C))}get localeFolder(){return this._localeFolder||(this._localeFolder=w.resolve(this.baseFolder,"locales"))}get emoteFolder(){return this._emoteFolder||(this._emoteFolder=w.resolve(this.baseFolder,"emotes"))}get cacheFile(){return this._cacheFile||(this._cacheFile=w.resolve(this.baseFolder,".cache"))}getPluginFile(e){return w.resolve(o.dataPath,"plugins",e+".config.json")}_getFile(e){return"settings"==e||"plugins"==e||"themes"==e||"window"==e?w.resolve(this.dataFolder,e+".json"):w.resolve(this.dataFolder,"misc.json")}getBDData(e){return this.data.misc[e]||""}setBDData(e,t){this.data.misc[e]=t,v.writeFileSync(w.resolve(this.dataFolder,"misc.json"),JSON.stringify(this.data.misc,null,4))}getLocale(e){const t=w.resolve(this.localeFolder,e+".json");return v.existsSync(t)?u.testJSON(v.readFileSync(t).toString()):null}saveLocale(e,t){v.writeFileSync(w.resolve(this.localeFolder,e+".json"),JSON.stringify(t,null,4))}getCacheHash(e,t){return this.cacheData[e]&&v.existsSync(w.resolve(this.baseFolder,e,t+".json"))&&this.cacheData[e][t]||""}setCacheHash(e,t,s){this.cacheData[e]||(this.cacheData[e]={}),this.cacheData[e][t]=s,v.writeFileSync(this.cacheFile,JSON.stringify(this.cacheData))}invalidateCache(e,t){this.cacheData[e]&&(delete this.cacheData[e][t],v.writeFileSync(this.cacheFile,JSON.stringify(this.cacheData)))}emotesExist(e){return v.existsSync(w.resolve(this.emoteFolder,e+".json"))}getEmoteData(e){const t=w.resolve(this.emoteFolder,e+".json");return v.existsSync(t)?u.testJSON(v.readFileSync(t).toString()):null}saveEmoteData(e,t){v.writeFileSync(w.resolve(this.emoteFolder,e+".json"),JSON.stringify(t))}getData(e){return this.data[e]||""}setData(e,t){this.data[e]=t,v.writeFileSync(w.resolve(this.dataFolder,e+".json"),JSON.stringify(t,null,4))}loadCustomCSS(){return v.readFileSync(this.customCSS).toString()}saveCustomCSS(e){return v.writeFileSync(this.customCSS,e)}getPluginData(e,t){return void 0!==this.pluginData[e]?this.pluginData[e][t]||void 0:v.existsSync(this.getPluginFile(e))?(this.pluginData[e]=JSON.parse(v.readFileSync(this.getPluginFile(e))),this.pluginData[e][t]||void 0):void 0}setPluginData(e,t,s){void 0!==s&&(void 0===this.pluginData[e]&&(this.pluginData[e]={}),this.pluginData[e][t]=s,v.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4)))}deletePluginData(e,t){void 0===this.pluginData[e]&&(this.pluginData[e]={}),delete this.pluginData[e][t],v.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4))}};const E=s(3),{Dispatcher:P,DiscordConstants:x,UserSettingsStore:k}=f;var A=new class{get discordLocale(){return k.locale.split("-")[0]}get defaultLocale(){return"en"}constructor(){this.locale="",this.strings={}}async initialize(){await this.setLocale(this.discordLocale),P.subscribe(x.ActionTypes.USER_SETTINGS_UPDATE,({settings:e})=>{const t=e.locale;t&&t!=this.locale&&this.setLocale(t.split("-")[0])})}async setLocale(e){let t;if(e!=this.defaultLocale){if(t=await this.getLocaleStrings(e),!t)return this.setLocale(this.defaultLocale)}else t=i;this.locale=e,u.extend(this.strings,t),y.emit("strings-updated")}async getLocaleStrings(e){const t=S.getCacheHash("locales",e);if(!t)return await this.downloadLocale(e);const s=await this.downloadLocale(e,t);return s||S.getLocale(e)}downloadLocale(e,t=""){return new Promise(s=>{const n={url:u.repoUrl(`data/locales/${e}.json`),timeout:2e3,json:!0};t&&(n.headers={"If-None-Match":t}),E.get(n,(t,n,i)=>{if(t||200!==n.statusCode)return s(null);S.saveLocale(e,i),S.setCacheHash("locales",e,n.headers.etag),s(i)})})}};class D{static get bdHead(){return this.getElement("bd-head")}static get bdBody(){return this.getElement("bd-body")}static get bdScripts(){return this.getElement("bd-scripts")}static get bdStyles(){return this.getElement("bd-styles")}static get bdThemes(){return this.getElement("bd-themes")}static get bdCustomCSS(){return this.getElement("#customcss")}static initialize(){this.createElement("bd-head",{target:document.head}),this.createElement("bd-body",{target:document.body}),this.createElement("bd-scripts",{target:this.bdHead}),this.createElement("bd-styles",{target:this.bdHead}),this.createElement("bd-themes",{target:this.bdHead}),this.createElement("style",{id:"customcss",target:this.bdHead})}static escapeID(e){return e.replace(/^[^a-z]+|[^\w-]+/gi,"-")}static getElement(e,t=document){return e instanceof Node?e:t.querySelector(e)}static createElement(e,t={}){const{className:s,id:n,target:i}=t,o=document.createElement(e);return s&&(o.className=s),n&&(o.id=n),i&&this.getElement(i).append(o),o}static removeStyle(e){e=this.escapeID(e);const t=this.getElement("#"+e,this.bdStyles);t&&t.remove()}static injectStyle(e,t){e=this.escapeID(e);const s=this.getElement("#"+e,this.bdStyles)||this.createElement("style",{id:e});s.textContent=t,this.bdStyles.append(s)}static removeTheme(e){e=this.escapeID(e);const t=this.getElement("#"+e,this.bdThemes);t&&t.remove()}static injectTheme(e,t){e=this.escapeID(e);const s=this.getElement("#"+e,this.bdThemes)||this.createElement("style",{id:e});s.textContent=t,this.bdThemes.append(s)}static updateCustomCSS(e){this.bdCustomCSS.textContent=e}static removeScript(e){e=this.escapeID(e);const t=this.getElement("#"+e,this.bdScripts);t&&t.remove()}static injectScript(e,t){return e=this.escapeID(e),new Promise(s=>{const n=this.getElement("#"+e,this.bdScripts)||this.createElement("script",{id:e});n.src=t,n.onload=s,this.bdScripts.append(n)})}}class M extends String{format(e){return u.formatString(this,e)}}var N=new Proxy(A.strings,{get:function(e,t){return e.hasOwnProperty(t)?new Proxy(e[t],{get:function(e,t){return"string"==typeof e[t]?new M(e[t]):e[t]}}):new Proxy({},{get:function(){return`String group "${t}" not found.`}})}}),L=new class{constructor(){this.state={},this.collections=[],this.panels=[],this.updateStrings=this.updateStrings.bind(this)}initialize(){this.registerCollection("settings","Settings",a),y.on("strings-updated",this.updateStrings)}registerCollection(e,t,s,n=null){if(this.collections.find(t=>t.id==e))return c.error("Settings","Already have a collection with id "+e);this.collections.push({type:"collection",id:e,name:t,settings:s,button:n}),this.setupCollection(e),this.loadCollection(e),this.updateStrings()}removeCollection(e){const t=this.collections.findIndex(t=>t.id==e);if(!t<0)return c.error("Settings","No collection with id "+e);this.collections.splice(t,1)}registerPanel(e,t,s){if(this.panels.find(t=>t.id==e))return c.error("Settings","Already have a panel with id "+e);const{element:n,onClick:i,order:o=1}=s,r={id:e,order:o,label:t,section:e};i&&(r.clickListener=i),n&&(r.element=n instanceof f.React.Component?()=>f.React.createElement(n,{}):"function"==typeof n?n:()=>n),this.panels.push(r)}removePanel(e){const t=this.panels.findIndex(t=>t.id==e);if(!t<0)return c.error("Settings","No collection with id "+e);this.panels.splice(t,1)}getPath(e,t="",s=""){return{collection:3==e.length?e[0]:t,category:3==e.length?e[1]:2==e.length?e[0]:s,setting:e[e.length-1]}}setupCollection(e){const t=this.collections.find(t=>t.id==e);if(!t)return;const s=t.settings;this.state[t.id]||(this.state[t.id]={});for(let e=0;e{const e=this.state[o.collection][o.category][o.setting];return s.enableWith?!e:e}})}}}}saveSettings(){for(const e in this.state)this.saveCollection(e)}loadSettings(){for(const e in this.state)this.loadCollection(e)}saveCollection(e){S.setData(e,this.state[e])}loadCollection(e){const t=S.getData(e);if(!t)return this.saveCollection(e);for(const s in this.state[e]){t[s]||Object.assign(t,{[s]:this.state[e][s]});for(const n in this.state[e][s]){if(null==t[s][n])continue;const i=this.getSetting(e,s,n);if("switch"==i.type&&(this.state[e][s][n]=t[s][n]),"dropdown"==i.type){i.options.some(e=>e.value==t[s][n])&&(this.state[e][s][n]=t[s][n])}}}this.saveCollection(e)}onSettingChange(e,t,s,n){this.state[e][t][s]=n,y.dispatch("setting-updated",e,t,s,n),this.saveCollection(e)}getSetting(e,t,s){return 2==arguments.length?this.collections[0].find(e=>e.id==arguments[0]).settings.find(e=>e.id==arguments[1]):this.collections.find(t=>t.id==e).settings.find(e=>e.id==t).settings.find(e=>e.id==s)}get(e,t,s){return 2==arguments.length&&(s=t,t=e,e="settings"),!(!this.state[e]||!this.state[e][t])&&this.state[e][t][s]}set(e,t,s,n){return 3==arguments.length&&(n=s,s=t,t=e,e="settings"),this.onSettingChange(e,t,s,n)}on(e,t,s,n){const i=(i,o,r,a)=>{i===e&&o===t&&r===s&&n(a)};return y.on("setting-updated",i),()=>{y.off("setting-updated",i)}}updateStrings(){for(let e=0;e"before"===e.type))try{t.callback(this,arguments)}catch(s){c.err("Patcher",`Could not fire before callback of ${e.functionName} for ${t.caller}`,s)}const s=e.children.filter(e=>"instead"===e.type);if(s.length)for(const n of s)try{const s=n.callback(this,arguments,e.originalFunction.bind(this));void 0!==s&&(t=s)}catch(t){c.err("Patcher",`Could not fire instead callback of ${e.functionName} for ${n.caller}`,t)}else t=e.originalFunction.apply(this,arguments);for(const s of e.children.filter(e=>"after"===e.type))try{const e=s.callback(this,arguments,t);void 0!==e&&(t=e)}catch(t){c.err("Patcher",`Could not fire after callback of ${e.functionName} for ${s.caller}`,t)}return t}}static rePatch(e){e.proxyFunction=e.module[e.functionName]=this.makeOverride(e)}static makePatch(e,t,s){const n={name:s,module:e,functionName:t,originalFunction:e[t],proxyFunction:null,revert:()=>{n.module[n.functionName]=n.originalFunction,n.proxyFunction=null,n.children=[]},counter:0,children:[]};return n.proxyFunction=e[t]=this.makeOverride(n),this.patches.push(n),n}static before(e,t,s,n,i={}){return this.pushChildPatch(e,t,s,n,Object.assign(i,{type:"before"}))}static after(e,t,s,n,i={}){return this.pushChildPatch(e,t,s,n,Object.assign(i,{type:"after"}))}static instead(e,t,s,n,i={}){return this.pushChildPatch(e,t,s,n,Object.assign(i,{type:"instead"}))}static pushChildPatch(e,t,s,n,i={}){const{type:o="after",forcePatch:r=!0}=i,a=this.resolveModule(t);if(!a)return null;if(!a[s]&&r&&(a[s]=function(){}),!(a[s]instanceof Function))return null;"string"==typeof t&&(i.displayName=t);const l=`${i.displayName||a.displayName||a.name||a.constructor.displayName||a.constructor.name}.${s}`,d=this.patches.find(e=>e.module==a&&e.functionName==s)||this.makePatch(a,s,l);d.proxyFunction||this.rePatch(d);const c={caller:e,type:o,id:d.counter,callback:n,unpatch:()=>{if(d.children.splice(d.children.findIndex(e=>e.id===c.id&&e.type===o),1),d.children.length<=0){const e=this.patches.findIndex(e=>e.module==a&&e.functionName==s);this.patches[e].revert(),this.patches.splice(e,1)}}};return d.children.push(c),d.counter++,c.unpatch}}const F=f.React,O={},I=new Set,z=new Set;var R=new class{get named(){return O}get unknown(){return I}get listeners(){return z}constructor(){j.after("ReactComponents",F,"createElement",(e,t,s)=>{this.walkRenderTree(s)}),j.instead("ReactComponents",F.Component.prototype,"componentWillMount",e=>{this.addComponent(e.constructor)}),j.instead("ReactComponents",F.Component.prototype,"UNSAFE_componentWillMount",e=>{this.addComponent(e.constructor)}),j.instead("ReactComponents",F.PureComponent.prototype,"componentWillMount",e=>{this.addComponent(e.constructor)}),j.instead("ReactComponents",F.PureComponent.prototype,"UNSAFE_componentWillMount",e=>{this.addComponent(e.constructor)})}initialize(){this.walkReactTree(document.querySelector("#app-mount")._reactRootContainer._internalRoot.current)}get(e,t){return new Promise(s=>{if(O[e])return s(O[e]);if(z.add({name:e,filter:t,resolve:s}),t)for(const s of I)t(s)&&(s.displayName=e,I.delete(s),this.addNamedComponent(s))})}addNamedComponent(e){const t=e.displayName;if(!O[t]){O[t]=e;for(const s of z)s.name===t&&(s.resolve(e),z.delete(s))}}addUnknownComponent(e){if(!I.has(e)){for(const t of z)t.filter&&t.filter(e)&&(e.displayName=t.name,this.addNamedComponent(e));e.displayName||I.add(e)}}addComponent(e){return e.displayName?this.addNamedComponent(e):this.addUnknownComponent(e)}walkRenderTree(e){if(e){if("function"==typeof e.type&&this.addComponent(e.type),Array.isArray(e))for(const t of e)this.walkRenderTree(t);e.props&&e.props.children&&this.walkRenderTree(e.props.children)}}walkReactTree(e){e&&("function"==typeof e.type&&this.addComponent(e.type),e.child&&this.walkReactTree(e.child),e.sibling&&this.walkReactTree(e.sibling))}};const H=f.React,q=f.ReactDOM,U=g.getByProps("sidebar","hasNotice").sidebar.split(" ")[0],_=g.getByProps("membersWrap").membersWrap.split(" ")[0];class W{static get shouldShowToasts(){return L.get("settings","general","showToasts")}static async success(e,t={}){return this.show(e,Object.assign(t,{type:"success"}))}static async info(e,t={}){return this.show(e,Object.assign(t,{type:"info"}))}static async warning(e,t={}){return this.show(e,Object.assign(t,{type:"warning"}))}static async error(e,t={}){return this.show(e,Object.assign(t,{type:"error"}))}static async default(e,t={}){return this.show(e,Object.assign(t,{type:""}))}static show(e,t={}){const{type:s="",icon:n=!0,timeout:i=3e3,forceShow:o=!1}=t;if(!this.shouldShowToasts&&!o)return;this.ensureContainer();const r=document.createElement("div");r.classList.add("bd-toast"),s&&r.classList.add("toast-"+s),s&&n&&r.classList.add("icon"),r.innerText=e,document.querySelector(".bd-toasts").appendChild(r),setTimeout(()=>{r.classList.add("closing"),setTimeout(()=>{r.remove(),document.querySelectorAll(".bd-toasts .bd-toast").length||document.querySelector(".bd-toasts").remove()},300)},i)}static ensureContainer(){if(document.querySelector(".bd-toasts"))return;const e=document.querySelector(`.${U} + div`),t=e.querySelector("."+_),s=e?e.querySelector("form"):null,n=e?e.getBoundingClientRect().left:310,i=t?t.getBoundingClientRect().left:0,o=i?i-e.getBoundingClientRect().left:e.offsetWidth,r=s?s.offsetHeight:80,a=document.createElement("div");a.classList.add("bd-toasts"),a.style.setProperty("left",n+"px"),a.style.setProperty("width",o+"px"),a.style.setProperty("bottom",r+"px"),D.bdBody.appendChild(a)}}class G extends H.Component{constructor(e){super(e),this.onClick=this.onClick.bind(this),this.state={checked:this.props.checked||!1}}render(){return H.createElement("div",{className:"checkbox-item"},H.createElement("div",{className:"checkbox-label label-JWQiNe da-label"},this.props.text),H.createElement("div",{className:"checkbox-wrapper checkbox-3kaeSU da-checkbox checkbox-3EVISJ da-checkbox",onClick:this.onClick},H.createElement("div",{className:"checkbox-inner checkboxInner-3yjcPe da-checkboxInner"},H.createElement("input",{className:"checkbox checkboxElement-1qV33p da-checkboxElement",checked:this.state.checked,type:"checkbox"}),H.createElement("span",null)),H.createElement("span",null)))}onClick(){this.props.onChange(!this.state.checked),this.setState({checked:!this.state.checked})}}function V(){return(V=Object.assign||function(e){for(var t=1;t{for(const s of e){if(!(s.addedNodes.length&&s.addedNodes[0]instanceof Element))continue;const e=s.addedNodes[0];e.parentElement===document.body&&e.querySelector("#ace_settingsmenu")&&(e.id="ace_settingsmenu_container",t.disconnect())}});t.observe(document.body,{childList:!0})};const t=this.props.theme==Z.defaultProps.theme?this.props.theme.split("-")[1]:this.props.theme;this.editor.setTheme("ace/theme/"+t),this.editor.session.setMode("ace/mode/"+this.props.language),this.editor.setShowPrintMargin(!1),this.editor.setFontSize(this.props.fontSize),this.editor.on("change",this.onChange)}componentWillUnmount(){this.editor.destroy()}get value(){return this.editor.session.getValue()}set value(e){this.editor.setValue(e)}onChange(){this.props.onChange&&this.props.onChange(this.value)}showSettings(){return this.editor.keyBinding.$defaultHandler.commands.showSettingsMenu.exec(this.editor)}resize(){return this.editor.resize()}buildControl(e){return"checkbox"==e.type?this.makeCheckbox(e):this.makeButton(e)}makeCheckbox(e){return H.createElement(G,{text:e.label,onChange:e.onChange,checked:e.checked})}makeButton(e){return H.createElement(J,{color:"black",position:"top",text:e.tooltip},t=>H.createElement("button",V({},t,{className:"btn btn-primary",onClick:t=>{e.onClick(t,this.value)}}),e.label))}render(){this.editor&&this.editor.resize&&this.editor.resize();const e=this.props.controls.filter(e=>"right"!=e.side).map(this.buildControl.bind(this)),t=this.props.controls.filter(e=>"right"==e.side).map(this.buildControl.bind(this));return H.createElement("div",{id:"bd-editor-panel",className:this.props.theme},H.createElement("div",{id:"bd-editor-controls"},H.createElement("div",{className:"controls-section controls-left"},e),H.createElement("div",{className:"controls-section controls-right"},t)),H.createElement("div",{className:"editor-wrapper"},H.createElement("div",{id:this.props.id,className:"editor "+this.props.theme},this.props.value)))}}class K extends H.Component{render(){const e=this.props.size||"24px";return H.createElement("svg",{viewBox:"0 0 24 24",style:{width:e,height:e}},H.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),H.createElement("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm2 16H5V5h11.17L19 7.83V19zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zM6 6h9v4H6z"}))}}class Q extends H.Component{render(){const e=this.props.size||"24px";return H.createElement("svg",{viewBox:"0 0 24 24",fill:"#FFFFFF",style:{width:e,height:e},onClick:this.props.onClick},H.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),H.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}}class ee extends H.Component{render(){const e=this.props.size||"20px";return H.createElement("svg",{viewBox:"0 0 20 20",style:{width:e,height:e}},H.createElement("path",{fill:"none",d:"M0 0h20v20H0V0z"}),H.createElement("path",{d:"M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}))}}class te extends H.Component{constructor(e){super(e),this.hasUnsavedChanges=!1,this.onChange=this.onChange.bind(this),this.save=this.save.bind(this),this.openNative=this.openNative.bind(this),this.update=this.update.bind(this),this.controls=[{label:H.createElement(K,{size:"18px"}),tooltip:N.CustomCSS.save,onClick:this.save},{label:H.createElement(Q,{size:"18px"}),tooltip:N.CustomCSS.openNative,onClick:this.openNative},{label:H.createElement(ee,{size:"18px"}),tooltip:N.CustomCSS.settings,onClick:"showSettings"}]}update(){this.forceUpdate()}updateEditor(e){this.editor&&(this.editor.value=e)}get value(){return this.editor.session.getValue()}set value(e){this.editor.setValue(e)}showSettings(){return this.editor.keyBinding.$defaultHandler.commands.showSettingsMenu.exec(this.editor)}resize(){return this.editor.resize()}setEditorRef(e){this.editor=e,this.props.editorRef&&void 0!==this.props.editorRef.current?this.props.editorRef.current=e:this.props.editorRef&&(this.props.editorRef=e)}render(){return H.createElement(Z,{ref:this.setEditorRef.bind(this),language:this.props.language,id:this.props.id||"bd-addon-editor",controls:this.controls,value:this.props.content,onChange:this.onChange})}onChange(){this.hasUnsavedChanges=!0}save(e,t){this.hasUnsavedChanges=!1,this.props.save&&this.props.save(t)}openNative(){this.props.openNative&&this.props.openNative()}}class se{static get width(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)}static get height(){return Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}class ne extends H.Component{render(){return H.createElement("svg",{viewBox:"0 0 12 12",style:{width:"18px",height:"18px"}},H.createElement("g",{className:"background",fill:"none",fillRule:"evenodd"},H.createElement("path",{d:"M0 0h12v12H0"}),H.createElement("path",{className:"fill",fill:"#dcddde",d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6"})))}}class ie extends H.Component{render(){const e=this.props.size||"24px";return H.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e},onClick:this.props.onClick},H.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),H.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))}}class oe{static get shouldShowAddonErrors(){return L.get("settings","addons","addonErrors")}static get ModalActions(){return g.getByProps("openModal","updateModal")}static get ModalStack(){return g.getByProps("push","update","pop","popWithKey")}static get AlertModal(){return g.getByPrototypes("handleCancel","handleSubmit","handleMinorConfirm")}static get TextElement(){return g.getByProps("Sizes","Weights")}static get ConfirmationModal(){return g.findByDisplayName("ConfirmModal")}static get Markdown(){return g.findByDisplayName("Markdown")}static default(e,t){const s=h.createElement(``);s.querySelector(".footer button").addEventListener("click",()=>{s.classList.add("closing"),setTimeout(()=>{s.remove()},300)}),s.querySelector(".bd-backdrop").addEventListener("click",()=>{s.classList.add("closing"),setTimeout(()=>{s.remove()},300)}),document.querySelector("#app-mount").append(s)}static alert(e,t){this.showConfirmationModal(e,t)}static showConfirmationModal(e,t,s={}){const n=this.Markdown,i=this.ConfirmationModal,o=this.ModalActions;if(t instanceof M&&(t=t.toString()),!this.ModalActions||!this.ConfirmationModal||!this.Markdown)return this.default(e,t);const r=()=>{},{onConfirm:a=r,onCancel:l=r,confirmText:d=N.Modals.okay,cancelText:c=N.Modals.cancel,danger:h=!1,key:u}=s;return Array.isArray(t)||(t=[t]),t=t.map(e=>"string"==typeof e?H.createElement(n,null,e):e),o.openModal(s=>H.createElement(i,Object.assign({header:e,red:h,confirmText:d,cancelText:c,onConfirm:a,onCancel:l},s),t),{modalKey:u})}static showAddonErrors({plugins:e=[],themes:t=[]}){if(!e||!t||!this.shouldShowAddonErrors)return;if(!e.length&&!t.length)return;const s=h.createElement(`\n
\n
\n
\n \n
\n
\n
\n
${N.Panels.plugins}
\n
${N.Panels.themes}
\n
\n
\n \n
\n
\n \n
\n
\n
`),n=function(e){const t=h.createElement('');for(const s of e){const e=h.createElement(`
\n
${s.name?s.name:s.file}
\n
${s.message}
\n
\n
`);t.append(e),s.error&&e.querySelectorAll("a").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),c.stacktrace("AddonError",`Error details for ${s.name?s.name:s.file}.`,s.error)}))}return t},i=[n(e),n(t)];s.querySelectorAll(".tab-bar-item").forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=s.querySelector(".tab-bar-item.selected");t&&h.removeClass(t,"selected"),h.addClass(e.target,"selected");const n=s.querySelector(".scroller");n.innerHTML="",n.append(i[h.index(e.target)])})),s.querySelector(".footer button").addEventListener("click",()=>{h.addClass(s,"closing"),setTimeout(()=>{s.remove()},300)}),s.querySelector(".bd-backdrop").addEventListener("click",()=>{h.addClass(s,"closing"),setTimeout(()=>{s.remove()},300)}),h.query("#app-mount").append(s),e.length?s.querySelector(".tab-bar-item").click():s.querySelectorAll(".tab-bar-item")[1].click()}static showChangelogModal(e={}){const t=g.getByProps("push","update","pop","popWithKey"),s=g.getByProps("fixed","improved"),n=g.findByDisplayName("Text"),i=g.getByProps("Child"),r=g.getByProps("Tags","default"),a=g.getModule(e=>e.defaultProps&&0==e.defaultProps.selectable),l=g.getByProps("defaultRules","parse");if(!(a&&t&&s&&n&&i&&r&&l))return c.warn("Modals","showChangelogModal missing modules");const{image:d="https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",description:h="",changes:u=[],title:p="BandagedBD",subtitle:m="v"+o.bbdVersion,footer:b}=e,y=H.createElement,v=[y("img",{src:d})];h&&v.push(y("p",null,l.parse(h)));for(let e=0;e
y("li",null,l.parse(e))));v.push(o)}return t.push(a,{className:s.container,selectable:!0,onScroll:e=>e,onClose:e=>e,renderHeader:function(){return y(i.Child,{grow:1,shrink:1},y(r.default,{tag:r.Tags.H4},p),y(n,{size:n.Sizes.SMALL,color:n.Colors.STANDARD,className:s.date},m))},renderFooter:()=>{const e=g.getModule(e=>"Anchor"==e.displayName),s=g.getByProps("anchorUnderlineOnHover")||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"},o=e=>{e.preventDefault(),e.stopPropagation(),t.pop(),f.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j")},r=e?y(e,{onClick:o},"Join our Discord Server."):y("a",{className:`${s.anchor} ${s.anchorUnderlineOnHover}`,onClick:o},"Join our Discord Server."),a=y(n,{size:n.Sizes.SMALL,color:n.Colors.STANDARD},"Need support? ",r);return y(i.Child,{grow:1,shrink:1},b||a)},children:v})}}class re extends H.Component{constructor(e){super(e),this.state={modalOpen:!1},this.offX=0,this.offY=0,this.maxX=this.props.maxX||se.width,this.maxY=this.props.maxY||se.height,this.minX=this.props.minX||0,this.minY=this.props.minY||0,this.titlebar=H.createRef(),this.window=H.createRef(),this.close=this.close.bind(this),this.maximize=this.maximize.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDragStop=this.onDragStop.bind(this),this.onResizeStart=this.onResizeStart.bind(this)}componentDidMount(){this.window.current.addEventListener("mousedown",this.onResizeStart,!1),this.titlebar.current.addEventListener("mousedown",this.onDragStart,!1),document.addEventListener("mouseup",this.onDragStop,!1)}onResizeStart(){this.currentWidth=this.window.current.offsetWidth,this.currentHeight=this.window.current.offsetHeight}onDragStop(){document.removeEventListener("mousemove",this.onDrag,!0);const e=this.window.current.offsetWidth,t=this.window.current.offsetHeight;if(e!=this.currentWidth||t!=this.currentHeight){this.props.onResize&&this.props.onResize();const s=parseInt(this.window.current.style.left),n=parseInt(this.window.current.style.top);s+e>=this.maxX&&(this.window.current.style.width=this.maxX-s+"px"),n+t>=this.maxY&&(this.window.current.style.height=this.maxY-n+"px")}this.currentWidth=e,this.currentHeight=t}onDragStart(e){const t=this.window.current;this.offY=e.clientY-parseInt(t.offsetTop),this.offX=e.clientX-parseInt(t.offsetLeft),document.addEventListener("mousemove",this.onDrag,!0)}onDrag(e){const t=this.window.current;let s=e.clientY-this.offY;s<=this.minY&&(s=this.minY),s+this.currentHeight>=this.maxY&&(s=this.maxY-this.currentHeight);let n=e.clientX-this.offX;n<=this.minX&&(n=this.minX),n+this.currentWidth>=this.maxX&&(n=this.maxX-this.currentWidth),t.style.top=s+"px",t.style.left=n+"px"}componentWillUnmount(){this.titlebar.current.removeEventListener("mousedown",this.onDragStart,!1),document.removeEventListener("mouseup",this.onDragStop,!1)}render(){const e=this.props.center?se.height/2-this.props.height/2:this.props.top,t=this.props.center?se.width/2-this.props.width/2:this.props.left,s=`floating-window${" "+this.props.className||""}${this.props.resizable?" resizable":""}${this.state.modalOpen?" modal-open":""}`,n={height:this.props.height,width:this.props.width,left:t||0,top:e||0};return H.createElement("div",{id:this.props.id,className:s,ref:this.window,style:n},H.createElement("div",{className:"floating-window-titlebar",ref:this.titlebar},H.createElement("span",{className:"title"},this.props.title),H.createElement("div",{className:"floating-window-buttons"},H.createElement("div",{className:"button maximize-button",onClick:this.maximize},H.createElement(ie,{size:"18px"})),H.createElement("div",{className:"button close-button",onClick:this.close},H.createElement(ne,null)))),H.createElement("div",{className:"floating-window-content"},this.props.children))}maximize(){this.window.current.style.width="100%",this.window.current.style.height="100%",this.props.onResize&&this.props.onResize();const e=this.window.current.offsetWidth,t=this.window.current.offsetHeight,s=parseInt(this.window.current.style.left)+e;parseInt(this.window.current.style.top)+t>this.maxY&&(this.window.current.style.top=this.maxY-t+"px"),s>this.maxX&&(this.window.current.style.left=this.maxX-e+"px");const n=parseInt(this.window.current.style.left),i=parseInt(this.window.current.style.top);if(i{oe.showConfirmationModal(N.Modals.confirmAction,this.props.confirmationText,{danger:!0,confirmText:N.Modals.close,onConfirm:()=>{e(!0)},onCancel:()=>{e(!1)}})})}}function ae(){return(ae=Object.assign||function(e){for(var t=1;t div[class*="app-"]');return e?e.offsetTop:0}render(){return this.state.windows.map(e=>H.createElement(re,ae({},e,{close:this.close.bind(this,e.id),minY:this.minY}),e.children))}open(e){this.setState({windows:[...this.state.windows,e]})}close(e){this.setState({windows:this.state.windows.filter(t=>(t.id==e&&t.onClose&&t.onClose(),t.id!=e))})}static get id(){return"floating-windows"}static get root(){if(this._root)return this._root;const e=document.createElement("div");return e.id=this.id,document.body.append(e),this._root=e}}var de=le;class ce{static initialize(){const e=H.createRef(),t=H.createElement(de,{ref:e}),s=H.createElement(g.getByProps("AppReferencePositionLayer").AppLayerProvider().props.layerContext.Provider,{value:[document.querySelector("#app-mount > .layerContainer-yqaFcK")]},t),n=h.createElement('');D.bdBody.append(n),q.render(s,n),this.ref=e}static open(e){return this.ref||this.initialize(),this.ref.current.open(e)}}const he=f.React,ue=s(1),pe=s(2),me=s(4).Module;me.globalPaths.push(ue.resolve(s(0).remote.app.getAppPath(),"node_modules"));const ge=/[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,fe=/^\\@/,be=function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e};class ye{get name(){return""}get moduleExtension(){return""}get extension(){return""}get addonFolder(){return""}get language(){return""}get prefix(){return"addon"}get collection(){return"settings"}get category(){return"addons"}get id(){return"autoReload"}emit(e,...t){return y.emit(`${this.prefix}-${e}`,...t)}constructor(){this.timeCache={},this.addonList=[],this.state={}}initialize(){return this.originalRequire=me._extensions[this.moduleExtension],me._extensions[this.moduleExtension]=this.getAddonRequire(),L.on(this.collection,this.category,this.id,e=>{e?this.watchAddons():this.unwatchAddons()}),this.loadAllAddons()}initializeAddon(){}getFileModification(e,t){return t}startAddon(){}stopAddon(){}loadState(){const e=S.getData(this.prefix+"s");e&&Object.assign(this.state,e)}saveState(){S.setData(this.prefix+"s",this.state)}watchAddons(){if(this.watcher)return c.error(this.name,`Already watching ${this.prefix} addons.`);c.log(this.name,`Starting to watch ${this.prefix} addons.`),this.watcher=pe.watch(this.addonFolder,{persistent:!1},async(e,t)=>{if(e&&t&&t.endsWith(this.extension)){await new Promise(e=>setTimeout(e,100));try{const s=pe.statSync(ue.resolve(this.addonFolder,t));if(!s.isFile())return;if(!s||!s.mtime||!s.mtime.getTime())return;if("number"!=typeof s.mtime.getTime())return;if(this.timeCache[t]==s.mtime.getTime())return;this.timeCache[t]=s.mtime.getTime(),"rename"==e&&this.loadAddon(t,!0),"change"==e&&this.reloadAddon(t,!0)}catch(e){if("ENOENT"!==e.code)return;delete this.timeCache[t],this.unloadAddon(t,!0)}}})}unwatchAddons(){if(!this.watcher)return c.error(this.name,`Was not watching ${this.prefix} addons.`);this.watcher.close(),delete this.watcher,c.log(this.name,`No longer watching ${this.prefix} addons.`)}extractMeta(e){const t=e.split("\n")[0];if(t.includes("//META"))return this.parseOldMeta(e);if(t.includes("/**"))return this.parseNewMeta(e);throw new T("META was not found.")}parseOldMeta(e){const t=e.split("\n")[0],s=t.substring(t.lastIndexOf("//META")+6,t.lastIndexOf("*//")),n=u.testJSON(s);if(!n)throw new T("META could not be parsed.");if(!n.name)throw new T("META missing name data.");return n.format="json",n}parseNewMeta(e){const t=e.split("/**",2)[1].split("*/",1)[0],s={};let n="",i="";for(const e of t.split(ge))if(0!==e.length)if("@"===e.charAt(0)&&" "!==e.charAt(1)){s[n]=i;const t=e.indexOf(" ");n=e.substr(1,t-1),i=e.substr(t+1)}else i+=" "+e.replace("\\n","\n").replace(fe,"@");return s[n]=i.trim(),delete s[""],s.format="jsdoc",s}getAddonRequire(){const e=this,t=this.originalRequire;return function(s,n){const i=ue.resolve(e.addonFolder,ue.basename(n));if(!pe.existsSync(i)||n!==pe.realpathSync(i))return Reflect.apply(t,this,arguments);let o=pe.readFileSync(n,"utf8");o=be(o);const r=pe.statSync(n),a=e.extractMeta(o);a.author||(a.author=N.Addons.unknownAuthor),a.version||(a.version="???"),a.description||(a.description=N.Addons.noDescription),a.id=a.name,a.filename=ue.basename(n),a.added=r.atimeMs,a.modified=r.mtimeMs,a.size=r.size,o=e.getFileModification(s,o,a),s._compile(o,n)}}loadAddon(e,t=!1){if(void 0===e)return;try{require(ue.resolve(this.addonFolder,e))}catch(n){return new B(e,e,"Could not be compiled.",{message:n.message,stack:n.stack})}const s=require(ue.resolve(this.addonFolder,e));if(this.addonList.find(e=>e.id==s.id))return new B(s.name,e,"There is already a plugin with name "+s.name);const n=this.initializeAddon(s);return n||(this.addonList.push(s),t&&W.success(`${s.name} v${s.version} was loaded.`),this.emit("loaded",s.id),this.state[s.id]?this.startAddon(s):this.state[s.id]=!1)}unloadAddon(e,t=!0,s=!1){const n="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e;return!!n&&(this.state[n.id]&&(s?this.stopAddon(n):this.disableAddon(n)),delete require.cache[require.resolve(ue.resolve(this.addonFolder,n.filename))],this.addonList.splice(this.addonList.indexOf(n),1),this.emit("unloaded",n.id),t&&W.success(n.name+" was unloaded."),!0)}reloadAddon(e,t=!0){const s="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e,n=this.unloadAddon(s,t,!0);return n?this.loadAddon(s.filename,t):n}isLoaded(e){return!!this.addonList.find(t=>t.id==e||t.filename==e)}isEnabled(e){const t=this.addonList.find(t=>t.id==e||t.filename==e);return!!t&&this.state[t.id]}enableAddon(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&(this.state[t.id]||(this.state[t.id]=!0,this.startAddon(t),this.saveState()))}disableAddon(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&this.state[t.id]&&(this.state[t.id]=!1,this.stopAddon(t),this.saveState())}toggleAddon(e){this.state[e]?this.disableAddon(e):this.enableAddon(e)}loadNewAddons(){const e=pe.readdirSync(this.addonFolder),t=this.addonList.filter(t=>!e.includes(t.filename)).map(e=>e.id);return{added:e.filter(e=>!this.addonList.find(t=>t.filename==e)&&e.endsWith(this.extension)&&pe.statSync(ue.resolve(this.addonFolder,e)).isFile()),removed:t}}updateList(){const e=this.loadNewAddons();for(const t of e.added)this.loadAddon(t);for(const t of e.removed)this.unloadAddon(t)}loadAllAddons(){this.loadState();const e=[],t=pe.readdirSync(this.addonFolder);for(const s of t){if(!pe.statSync(ue.resolve(this.addonFolder,s)).isFile()||!s.endsWith(this.extension))continue;const t=this.loadAddon(s,!1);t instanceof B&&e.push(t)}return this.saveState(),L.get(this.collection,this.category,this.id)&&this.watchAddons(),e}deleteAddon(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e;return pe.unlinkSync(ue.resolve(this.addonFolder,t.filename))}saveAddon(e,t){const s="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e;return pe.writeFileSync(ue.resolve(this.addonFolder,s.filename),t)}editAddon(e,t){const n="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e,i=ue.resolve(this.addonFolder,n.filename);return void 0===t&&(t="system"==L.get("settings","addons","editAction")),t?s(0).shell.openItem(""+i):this.openDetached(n)}openDetached(e){const t=ue.resolve(this.addonFolder,e.filename),s=pe.readFileSync(t).toString(),n=he.createRef(),i=he.createElement(te,{id:"bd-floating-editor-"+e.name,ref:n,content:s,save:this.saveAddon.bind(this,e),openNative:this.editAddon.bind(this,e,!0),language:this.language});ce.open({onClose:()=>{this.isDetached=!1},onResize:()=>{n&&n.current&&n.current.resize&&n.current.resize()},title:e.name,id:s.id,className:"floating-addon-window",height:470,width:410,center:!0,resizable:!0,children:i,confirmClose:()=>!(!n||!n.current)&&n.current.hasUnsavedChanges,confirmationText:N.Addons.confirmationText.format({name:e.name})})}}class ve extends H.Component{constructor(e){super(e)}render(){const e=this.props.isGroup?"bd-settings-title bd-settings-group-title h5-18_1nd title-3sZWYQ size12-3R0845 height16-2Lv3qA weightSemiBold-NJexzi da-h5 da-title da-size12 da-height16 da-weightSemiBold marginBottom4-2qk4Hy da-marginBottom4 marginTop8-1DLZ1n da-marginTop8":"bd-settings-title h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi defaultColor-1_ajX0 defaultMarginh2-2LTaUL marginBottom20-32qID7",t=this.props.className?`${e} ${this.props.className}`:e;return H.createElement("h2",{className:t,onClick:()=>{this.props.onClick&&this.props.onClick()}},this.props.text,this.props.button&&H.createElement("button",{className:"bd-button bd-button-title",onClick:this.props.button.onClick},this.props.button.title),this.props.otherChildren)}}class we extends H.Component{render(){const e=this.props.size||"24px";return H.createElement("svg",{className:this.props.className||"",onClick:this.props.onClick,fill:"#dcddde",viewBox:"0 0 24 24",style:{width:e,height:e}},H.createElement("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),H.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}}class Ce extends H.Component{render(){const e=this.props.size||"24px";return H.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e},onClick:this.props.onClick},H.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),H.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),H.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}}class Se extends H.Component{constructor(e){super(e),this.state={checked:this.props.checked},this.onChange=this.onChange.bind(this)}onChange(){this.props.disabled||(this.props.onChange(!this.state.checked),this.setState({checked:!this.state.checked}))}render(){const e=this.props.disabled?" bd-switch-disabled":"",t=this.state.checked?" bd-switch-checked":"";return H.createElement("div",{className:"bd-switch"+e+t},H.createElement("input",{type:"checkbox",id:this.props.id,className:"bd-checkbox",disabled:this.props.disabled,checked:this.state.checked,onChange:this.onChange}))}}class Ee extends H.Component{constructor(e){super(e),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?H.createElement("div",{className:"react-error"},"Component Error"):this.props.children}}const Pe=Ee.prototype.render;function xe(){return(xe=Object.assign||function(e){for(var t=1;t
Pe});const ke=g.getByDisplayName("Tooltip");class Ae extends H.Component{constructor(e){super(e),this.state={settingsOpen:!1},this.settingsPanel="",this.panelRef=H.createRef(),this.onChange=this.onChange.bind(this),this.reload=this.reload.bind(this),this.showSettings=this.showSettings.bind(this),this.closeSettings=this.closeSettings.bind(this)}reload(){this.props.reload&&(this.props.addon=this.props.reload(this.props.addon.id),this.forceUpdate())}componentDidUpdate(){this.state.settingsOpen&&(this.settingsPanel instanceof Node&&this.panelRef.current.appendChild(this.settingsPanel),setImmediate(()=>{const e=this.panelRef.current,t=e.closest(".scrollerBase-289Jih");if(!t||!((e,t)=>{const s=e.scrollTop,n=s+e.clientHeight,i=t.offsetTop,o=i+t.clientHeight;return in})(t,e))return;const s=h.offset(e),n=h.offset(t),i=t.scrollTop,o=s.top-n.top+t.scrollTop-30;h.animate({duration:300,update:function(e){t.scrollTop=o>i?i+e*(o-i):i-e*(i-o)}})}))}getString(e){return"string"==typeof e?e:e.toString()}onChange(){this.props.onChange&&this.props.onChange(this.props.addon.id),this.props.enabled=!this.props.enabled,this.forceUpdate()}showSettings(){this.props.hasSettings&&this.setState({settingsOpen:!0})}closeSettings(){this.panelRef.current.innerHTML="",this.setState({settingsOpen:!1})}buildTitle(e,t,s){const n=N.Addons.title.split(/({{[A-Za-z]+}})/),i=n.findIndex(e=>"{{name}}"==e);i&&(n[i]=H.createElement("span",{className:"bd-name"},e));const o=n.findIndex(e=>"{{version}}"==e);i&&(n[o]=H.createElement("span",{className:"bd-version"},t));const r=n.findIndex(e=>"{{author}}"==e);return i&&(n[r]=H.createElement("span",{className:"bd-author"},s)),n.flat()}get settingsComponent(){const e=this.props.addon,t=this.getString(e.name);try{this.settingsPanel=this.props.getSettingsPanel()}catch(e){c.stacktrace("Addon Settings","Unable to get settings panel for "+t+".",e)}const s={id:t+"-settings",className:"addon-settings",ref:this.panelRef};return"string"==typeof settingsPanel&&(c.warn("Addon Settings","Using a DOMString is officially deprecated."),s.dangerouslySetInnerHTML=this.settingsPanel),H.createElement("div",{className:"bd-addon-card settings-open bd-switch-item"},H.createElement("div",{className:"bd-close",onClick:this.closeSettings},H.createElement(ne,null)),H.createElement("div",s,H.createElement(Ee,null,this.settingsPanel instanceof H.Component||"function"==typeof this.settingsPanel?this.settingsPanel:null)))}buildLink(e){const t=this.props.addon[e];if(!t)return null;const s=H.createElement("a",{className:"bd-link bd-link-website",href:t,target:"_blank",rel:"noopener noreferrer"},N.Addons[e]);return"invite"==e&&(s.props.onClick=function(e){e.preventDefault(),e.stopPropagation();let s=t;const n=/\.gg\/(.*)$/;n.test(s)&&(s=s.match(n)[1]),f.LayerStack.popLayer(),f.InviteActions.acceptInviteAndTransitionToInviteChannel(s)}),s}get footer(){const e=["website","source","invite","donate","patreon"];if(!e.some(e=>this.props.addon[e])&&!this.props.hasSettings)return null;const t=e.map(this.buildLink.bind(this)).filter(e=>e);return H.createElement("div",{className:"bd-footer"},H.createElement("span",{className:"bd-links"},t.map((e,s)=>sH.createElement("div",xe({},e,{className:"bd-addon-button",onClick:s}),t))}render(){if(this.state.settingsOpen)return this.settingsComponent;const e=this.props.addon,t=this.getString(e.name),s=this.getString(e.author),n=this.getString(e.description),i=this.getString(e.version);return H.createElement("div",{id:e.id+"-card",className:"bd-addon-card settings-closed"},H.createElement("div",{className:"bd-addon-header"},H.createElement("span",{className:"bd-title"},this.buildTitle(t,i,s)),H.createElement("div",{className:"bd-controls"},this.props.editAddon&&this.makeButton(N.Addons.editAddon,H.createElement(Q,null),this.props.editAddon),this.props.deleteAddon&&this.makeButton(N.Addons.deleteAddon,H.createElement(Ce,null),this.props.deleteAddon),this.props.showReloadIcon&&this.makeButton(N.Addons.reload,H.createElement(we,{className:"bd-reload bd-reload-card"}),this.reload),H.createElement(Se,{checked:this.props.enabled,onChange:this.onChange}))),H.createElement("div",{className:"bd-description-wrap scroller-wrap fade"},H.createElement("div",{className:"bd-description scroller"},n)),this.footer)}}const De=Ae.prototype.render;Object.defineProperty(Ae.prototype,"render",{enumerable:!1,configurable:!1,set:function(){c.warn("AddonCard","Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins")},get:()=>De});class Me extends H.Component{render(){const e=this.props.size||"16px";return H.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e}},H.createElement("path",{d:"M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"}))}}class Ne extends H.Component{constructor(e){super(e),this.state={open:!1,value:this.props.value||this.props.options[0].value},this.dropdown=H.createRef(),this.onChange=this.onChange.bind(this),this.showMenu=this.showMenu.bind(this),this.hideMenu=this.hideMenu.bind(this)}showMenu(e){e.preventDefault(),this.setState({open:!0},()=>{document.addEventListener("click",this.hideMenu)})}hideMenu(){this.setState({open:!1},()=>{document.removeEventListener("click",this.hideMenu)})}onChange(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)}get selected(){return this.props.options.find(e=>e.value==this.state.value)}get options(){const e=this.selected;return H.createElement("div",{className:"bd-select-options"},this.props.options.map(t=>H.createElement("div",{className:"bd-select-option"+(e.value==t.value?" selected":""),onClick:this.onChange.bind(this,t.value)},t.label)))}render(){const e="transparent"==this.props.style?" bd-select-transparent":"",t=this.state.open?" menu-open":"";return H.createElement("div",{className:`bd-select${e}${t}`,onClick:this.showMenu,ref:this.dropdown},H.createElement("div",{className:"bd-select-value"},this.selected.label),H.createElement(Me,{className:"bd-select-arrow"}),this.state.open&&this.options)}}class Le extends H.Component{render(){const e=this.props.size||"16px";return H.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e}},H.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),H.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))}}class Be extends H.Component{render(){return H.createElement("div",{className:"bd-search-wrapper"},H.createElement("input",{onChange:this.props.onChange,onKeyDown:this.props.onKeyDown,type:"text",className:"bd-search",placeholder:this.props.placeholder,maxLength:"50"}),H.createElement(Le,null))}}class Te extends H.Component{constructor(e){super(e),this.state={sort:"name",ascending:!0,query:""},this.sort=this.sort.bind(this),this.reverse=this.reverse.bind(this),this.search=this.search.bind(this),this.update=this.update.bind(this)}componentDidMount(){y.on(this.props.prefix+"-loaded",this.update),y.on(this.props.prefix+"-unloaded",this.update)}componentWillUnmount(){y.off(this.props.prefix+"-loaded",this.update),y.off(this.props.prefix+"-unloaded",this.update)}update(){this.forceUpdate()}reload(){this.props.refreshList&&this.props.refreshList(),this.forceUpdate()}reverse(e){this.setState({ascending:e})}sort(e){this.setState({sort:e})}search(e){this.setState({query:e.target.value.toLocaleLowerCase()})}get sortOptions(){return[{label:N.Addons.name,value:"name"},{label:N.Addons.author,value:"author"},{label:N.Addons.version,value:"version"},{label:N.Addons.added,value:"added"},{label:N.Addons.modified,value:"modified"}]}get directions(){return[{label:N.Sorting.ascending,value:!0},{label:N.Sorting.descending,value:!1}]}render(){const{title:e,folder:t,addonList:n,addonState:i,onChange:o,reload:r}=this.props,a=!L.get("settings","addons","autoReload"),l=t?{title:N.Addons.openFolder.format({type:e}),onClick:()=>{const e=s(0).shell;(e.openItem||e.openPath)(t)}}:null,d=n.sort((e,t)=>{const s=e[this.state.sort],n=t[this.state.sort];return"string"==typeof s?s.toLocaleLowerCase().localeCompare(n.toLocaleLowerCase()):s>n?1:n>s?-1:0});return this.state.ascending||d.reverse(),[H.createElement(ve,{key:"title",text:e,button:l,otherChildren:a&&H.createElement(we,{className:"bd-reload",onClick:this.reload.bind(this)})}),H.createElement("div",{className:"bd-controls bd-addon-controls"},H.createElement(Be,{onChange:this.search,placeholder:N.Addons.search.format({type:this.props.title})+"..."}),H.createElement("div",{className:"bd-addon-dropdowns"},H.createElement("div",{className:"bd-select-wrapper"},H.createElement("label",{className:"bd-label"},N.Sorting.sortBy,":"),H.createElement(Ne,{options:this.sortOptions,onChange:this.sort,style:"transparent"})),H.createElement("div",{className:"bd-select-wrapper"},H.createElement("label",{className:"bd-label"},N.Sorting.order,":"),H.createElement(Ne,{options:this.directions,onChange:this.reverse,style:"transparent"})))),H.createElement("div",{key:"addonList",className:"bd-addon-list"},d.map(e=>{if(this.state.query){let t=e.name.toLocaleLowerCase().includes(this.state.query);if(t=t||e.author.toLocaleLowerCase().includes(this.state.query),t=t||e.description.toLocaleLowerCase().includes(this.state.query),!t)return null}const t=e.type&&"function"==typeof e.plugin.getSettingsPanel,s=t&&e.plugin.getSettingsPanel.bind(e.plugin);return H.createElement(Ee,null,H.createElement(Ae,{editAddon:this.editAddon.bind(this,e.id),deleteAddon:this.deleteAddon.bind(this,e.id),showReloadIcon:a,key:e.id,enabled:i[e.id],addon:e,onChange:o,reload:r,hasSettings:t,getSettingsPanel:s}))}))]}editAddon(e){this.props.editAddon&&this.props.editAddon(e)}async deleteAddon(e){const t=this.props.addonList.find(t=>t.id==e);await this.confirmDelete(t)&&this.props.deleteAddon&&this.props.deleteAddon(t)}confirmDelete(e){return new Promise(t=>{oe.showConfirmationModal(N.Modals.confirmAction,N.Addons.confirmDelete.format({name:e.name}),{danger:!0,confirmText:N.Addons.deleteAddon,onConfirm:()=>{t(!0)},onCancel:()=>{t(!1)}})})}}const je=Te.prototype.render;Object.defineProperty(Te.prototype,"render",{enumerable:!1,configurable:!1,set:function(){c.warn("AddonList","Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins")},get:()=>je});class Fe extends H.Component{render(){return H.createElement("div",{className:"bd-divider divider-3573oO marginTop8-1DLZ1n marginBottom40-2vIwTv"})}}class Oe extends H.Component{render(){return H.createElement("div",{className:"bd-setting-item"},H.createElement("div",{className:"bd-setting-header"},H.createElement("label",{htmlFor:this.props.id,className:"bd-setting-title"},this.props.name),this.props.children),H.createElement("div",{className:"bd-setting-note"},this.props.note),H.createElement("div",{className:"bd-setting-divider"}))}}class Ie extends H.Component{constructor(e){if(super(e),this.props.button&&this.props.collapsible){const e=this.props.button.onClick;this.props.button.onClick=t=>{t.stopPropagation(),e(...arguments)}}this.props.hasOwnProperty("shown")||(this.props.shown=!0),this.container=H.createRef(),this.state={collapsed:this.props.collapsible&&!this.props.shown},this.onChange=this.onChange.bind(this),this.toggleCollapse=this.toggleCollapse.bind(this)}toggleCollapse(){const e=this.container.current,t=this.state.collapsed?300:1;e.style.setProperty("height",e.scrollHeight+"px"),e.classList.add("animating"),this.setState({collapsed:!this.state.collapsed},()=>setTimeout(()=>{e.style.setProperty("height",""),e.classList.remove("animating")},t))}onChange(e,t){this.props.onChange&&(this.props.id?this.props.onChange(this.props.id,e,t):this.props.onChange(e,t),this.forceUpdate())}render(){const{settings:e}=this.props,t="bd-settings-group "+(this.props.collapsible?"collapsible "+(this.state.collapsed?"collapsed":"expanded"):"");return H.createElement("div",{className:t},H.createElement(ve,{text:this.props.name,collapsible:this.props.collapsible,onClick:this.toggleCollapse,button:this.props.button,isGroup:!0}),H.createElement("div",{className:"bd-settings-container",ref:this.container},e.filter(e=>!e.hidden).map(e=>{let t=null;return"dropdown"==e.type&&(t=H.createElement(Ne,{disabled:e.disabled,id:e.id,options:e.options,value:e.value,onChange:this.onChange.bind(this,e.id)})),"switch"==e.type&&(t=H.createElement(Se,{disabled:e.disabled,id:e.id,checked:e.value,onChange:this.onChange.bind(this,e.id)})),t?H.createElement(Oe,{id:e.id,key:e.id,name:e.name,note:e.note},t):null})),this.props.showDivider&&H.createElement(Fe,null))}}const ze=Ie.prototype.render;Object.defineProperty(Ie.prototype,"render",{enumerable:!1,configurable:!1,set:function(){c.warn("Group","Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins")},get:()=>ze});class Re extends H.Component{render(){const e=this.props.size||"18px";return H.createElement("svg",{viewBox:"0 0 24 24",fill:"#FFFFFF",className:this.props.className||"",style:{width:e,height:e},onClick:this.props.onClick},H.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),H.createElement("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}))}}function He(){return(He=Object.assign||function(e){for(var t=1;te.Header&&e.Separator&&e.Item),Ue=g.getByDisplayName("Tooltip");class _e extends H.Component{constructor(e){super(e)}render(){return H.createElement("div",{className:"bd-sidebar-header"},H.createElement(qe.Header,null,"BandagedBD"),H.createElement(Ue,{color:"black",position:"top",text:"Changelog"},e=>H.createElement("div",He({},e,{className:"bd-changelog-button",onClick:()=>oe.showChangelogModal(l)}),H.createElement(Re,{className:"bd-icon",size:"16px"}))))}}var $e=new class{constructor(){this.patchSections(),y.on("strings-updated",this.forceUpdate)}onChange(e){return(t,s,n)=>{const i=L.collections.length+L.panels.length;e(t,s,n);i!=L.collections.length+L.panels.length&&setTimeout(this.forceUpdate.bind(this),50)}}buildSettingsPanel(e,t,s,n,i=null){return t.forEach(e=>{e.settings.forEach(t=>t.value=s[e.id][t.id])}),this.getSettingsPanel(e,t,this.onChange(n),i)}getSettingsPanel(e,t,s,n=null){return[H.createElement(ve,{text:e,button:n}),t.map(e=>H.createElement(Ie,Object.assign({},e,{onChange:s})))]}getAddonPanel(e,t,s,n={}){return H.createElement(Te,Object.assign({},{title:e,addonList:t,addonState:s},n))}async patchSections(){const e=await R.get("UserSettings",e=>e.prototype&&e.prototype.generateSections);j.after("SettingsManager",e.prototype,"render",e=>{e._reactInternalFiber.return.return.return.return.return.return.return.memoizedProps.id="user-settings"}),j.after("SettingsManager",e.prototype,"generateSections",(e,t,s)=>{let n=s.findIndex(e=>"linux"==e.section.toLowerCase())+1;const i=e=>{s.splice(n,0,e),n++};i({section:"DIVIDER"}),i({section:"CUSTOM",element:_e});for(const e of L.collections)e.disabled||i({section:e.name,label:e.name,element:()=>this.buildSettingsPanel(e.name,e.settings,L.state[e.id],L.onSettingChange.bind(L,e.id),e.button?e.button:null)});for(const t of L.panels.sort((e,t)=>e.order>t.order))t.clickListener&&(t.onClick=n=>t.clickListener(e,n,s)),i(t)}),this.forceUpdate()}forceUpdate(){const e=g.getByProps("standardSidebarView").standardSidebarView.split(" ")[0],t=document.querySelector("."+e);if(!t)return;const s=u.findInReactTree(u.getReactInstance(t),e=>e&&e.generateSections,{walkable:["return","stateNode"]});s&&s.forceUpdate()}};const We=s(1),Ge=s(0).remote;var Ve=new class extends ye{get name(){return"PluginManager"}get moduleExtension(){return".js"}get extension(){return".plugin.js"}get addonFolder(){return We.resolve(o.dataPath,"plugins")}get prefix(){return"plugin"}get language(){return"javascript"}constructor(){super(),this.onSwitch=this.onSwitch.bind(this),this.observer=new MutationObserver(e=>{for(let t=0,s=e.length;t$e.getAddonPanel(N.Panels.plugins,this.addonList,this.state,{folder:this.addonFolder,onChange:this.togglePlugin.bind(this),reload:this.reloadPlugin.bind(this),refreshList:this.updatePluginList.bind(this),saveAddon:this.saveAddon.bind(this),editAddon:this.editAddon.bind(this),deleteAddon:this.deleteAddon.bind(this),prefix:this.prefix})}),e}updatePluginList(){return this.updateList()}loadAllPlugins(){return this.loadAllAddons()}enablePlugin(e){return this.enableAddon(e)}disablePlugin(e){return this.disableAddon(e)}togglePlugin(e){return this.toggleAddon(e)}unloadPlugin(e){return this.unloadAddon(e)}loadPlugin(e){const t=this.loadAddon(e);t&&oe.showAddonErrors({themes:[t]})}reloadPlugin(e){const t=this.reloadAddon(e);return t&&oe.showAddonErrors({plugins:[t]}),"string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e}initializeAddon(e){if(!e.type)return new B(e.name,e.filename,"Plugin had no exports",{message:"Plugin had no exports or no name property.",stack:""});try{const t=new e.type;e.plugin=t,e.name=t.getName()||e.name,e.author=t.getAuthor()||e.author||"No author",e.description=t.getDescription()||e.description||"No description",e.version=t.getVersion()||e.version||"No version";try{"function"==typeof e.plugin.load&&e.plugin.load()}catch(t){return this.state[e.id]=!1,new B(e.name,e.filename,"load() could not be fired.",{message:t.message,stack:t.stack})}}catch(t){return new B(e.name,e.filename,"Could not be constructed.",{message:t.message,stack:t.stack})}}getFileModification(e,t,s){e._compile(t,e.filename);return u.isEmpty(e.exports)?(c.warn(this.name,s.name+", please start assigning module.exports"),t+=`\nmodule.exports = ${JSON.stringify(s)};\nmodule.exports.type = ${s.exports||s.name};`):(s.type=e.exports,e.exports=s,"")}startAddon(e){return this.startPlugin(e)}stopAddon(e){return this.stopPlugin(e)}startPlugin(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;if(!t)return;const s=t.plugin;try{s.start(),this.emit("started",t.id),W.show(N.Addons.enabled.format({name:t.name,version:t.version}))}catch(e){return this.state[t.id]=!1,W.error(`${t.name} v${t.version} could not be started.`),c.stacktrace(this.name,t.name+" could not be started.",e),new B(t.name,t.filename,"start() could not be fired.",{message:e.message,stack:e.stack})}}stopPlugin(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;if(!t)return;const s=t.plugin;try{s.stop(),this.emit("stopped",t.id),W.show(N.Addons.disabled.format({name:t.name,version:t.version}))}catch(e){return this.state[t.id]=!1,W.error(`${t.name} v${t.version} could not be stopped.`),c.stacktrace(this.name,t.name+" could not be stopped.",e),new B(t.name,t.filename,"stop() could not be fired.",{message:e.message,stack:e.stack})}}setupFunctions(){Ge.getCurrentWebContents().on("did-navigate-in-page",this.onSwitch.bind(this)),this.observer.observe(document,{childList:!0,subtree:!0})}onSwitch(){this.emit("page-switch");for(let e=0;e$e.getAddonPanel(N.Panels.themes,this.addonList,this.state,{folder:this.addonFolder,onChange:this.toggleTheme.bind(this),reload:this.reloadTheme.bind(this),refreshList:this.updateThemeList.bind(this),saveAddon:this.saveAddon.bind(this),editAddon:this.editAddon.bind(this),deleteAddon:this.deleteAddon.bind(this),prefix:this.prefix})}),e}updateThemeList(){return this.updateList()}loadAllThemes(){return this.loadAllAddons()}enableTheme(e){return this.enableAddon(e)}disableTheme(e){return this.disableAddon(e)}toggleTheme(e){return this.toggleAddon(e)}unloadTheme(e){return this.unloadAddon(e)}loadTheme(e){const t=this.loadAddon(e);t&&oe.showAddonErrors({themes:[t]})}reloadTheme(e){const t=this.reloadAddon(e);t&&oe.showAddonErrors({themes:[t]})}getFileModification(e,t,s){return s.css=t,`module.exports = ${JSON.stringify(s)};`}startAddon(e){return this.addTheme(e)}stopAddon(e){return this.removeTheme(e)}addTheme(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&(D.injectTheme(t.id,t.css),W.show(N.Addons.enabled.format({name:t.name,version:t.version})))}removeTheme(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&(D.removeTheme(t.id),W.show(N.Addons.disabled.format({name:t.name,version:t.version})))}};class Xe{get name(){return"Unnamed Builtin"}get collection(){return"settings"}get category(){return"general"}get id(){return"None"}async initialize(){L.get(this.collection,this.category,this.id)&&await this.enable(),y.on("setting-updated",(e,t,s,n)=>{e==this.collection&&t===this.category&&s===this.id&&(n?this.enable():this.disable())}),this.initialized=!0}registerSetting(e,t,s,n,i){return 4==arguments.length?(e=this.collection,t=arguments[0],s=arguments[1],n=arguments[2],i=arguments[3]):3==arguments.length&&(e=this.collection,t=this.category,s=arguments[0],n=arguments[1],i=arguments[2]),L.on(e,t,s,e=>{e?n():i()})}get(e,t,s){return 2==arguments.length?(e=this.collection,t=arguments[0],s=arguments[1]):1==arguments.length&&(e=this.collection,t=this.category,s=arguments[0]),L.get(e,t,s)}async enable(){this.log("Enabled"),await this.enabled()}async disable(){this.log("Disabled"),await this.disabled()}async enabled(){}async disabled(){}log(...e){c.log(this.name,...e)}warn(...e){c.warn(this.name,...e)}error(...e){c.err(this.name,...e)}stacktrace(e,t){c.stacktrace(this.name,e,t)}before(e,t,s){return j.before(this.name,e,t,s)}after(e,t,s){return j.after(this.name,e,t,s)}unpatchAll(){return j.unpatchAll(this.name)}}class Ze extends H.Component{render(){const e=this.props.size||"24px";return H.createElement("svg",{viewBox:"0 0 24 24",style:{width:e,height:e}},H.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),H.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}))}}class Ke extends H.Component{constructor(e){super(e),this.hasUnsavedChanges=!1,this.onChange=this.onChange.bind(this),this.toggleLiveUpdate=this.toggleLiveUpdate.bind(this),this.updateCss=this.updateCss.bind(this),this.saveCss=this.saveCss.bind(this),this.openDetached=this.props.openDetached?this.openDetached.bind(this):null,this.openNative=this.openNative.bind(this),this.updateEditor=this.updateEditor.bind(this),this.controls=[{label:H.createElement(we,{size:"18px"}),tooltip:N.CustomCSS.update,onClick:this.updateCss},{label:H.createElement(K,{size:"18px"}),tooltip:N.CustomCSS.save,onClick:this.saveCss},{label:H.createElement(Q,{size:"18px"}),tooltip:N.CustomCSS.openNative,onClick:this.openNative},{label:H.createElement(ee,{size:"18px"}),tooltip:N.CustomCSS.settings,onClick:"showSettings"},{label:N.Collections.settings.customcss.liveUpdate.name,type:"checkbox",onChange:this.toggleLiveUpdate,checked:L.get("settings","customcss","liveUpdate"),side:"right"}],this.openDetached&&this.controls.push({label:H.createElement(Ze,{size:"18px"}),tooltip:N.CustomCSS.openDetached,onClick:this.openDetached,side:"right"})}componentDidMount(){y.on("customcss-updated",this.updateEditor)}componentWillUnmount(){y.off("customcss-updated",this.updateEditor)}updateEditor(e){this.editor&&(this.editor.value=e)}get value(){return this.editor.session.getValue()}set value(e){this.editor.setValue(e)}showSettings(){return this.editor.keyBinding.$defaultHandler.commands.showSettingsMenu.exec(this.editor)}resize(){return this.editor.resize()}setEditorRef(e){this.editor=e,this.props.editorRef&&void 0!==this.props.editorRef.current?this.props.editorRef.current=e:this.props.editorRef&&(this.props.editorRef=e)}onChange(){this.hasUnsavedChanges=!0,this.props.onChange&&this.props.onChange(...arguments)}render(){return H.createElement(Z,{ref:this.setEditorRef.bind(this),readOnly:this.props.readOnly,id:this.props.id||"bd-customcss-editor",onChange:this.onChange,controls:this.controls,value:this.props.css})}toggleLiveUpdate(e){L.set("settings","customcss","liveUpdate",e)}updateCss(e,t){this.props.update&&this.props.update(t)}saveCss(e,t){this.hasUnsavedChanges=!1,this.props.save&&this.props.save(t)}openDetached(e,t){this.props.openDetached&&this.props.openDetached(t)}openNative(){this.props.openNative&&this.props.openNative()}}const Qe=s(2),et=s(0),tt=g.getByProps("updateAccount"),st=g.getByProps("dirtyDispatch"),nt=g.getByProps("ActionTypes").ActionTypes;var it=new class extends Xe{get name(){return"Custom CSS"}get category(){return"customcss"}get id(){return"customcss"}get startDetached(){return"detached"==L.get(this.collection,this.category,"openAction")}get nativeOpen(){return"system"==L.get(this.collection,this.category,"openAction")}constructor(){super(),this.savedCss="",this.insertedCss="",this.isDetached=!1}async enabled(){window.ace||D.injectScript("ace-script","https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js").then(()=>{window.require.original&&(window.require=window.require.original)}),L.registerPanel(this.id,N.Panels.customcss,{order:2,element:()=>[H.createElement(ve,{text:N.CustomCSS.editorTitle}),H.createElement(Ke,{css:this.savedCss,save:this.saveCSS.bind(this),update:this.insertCSS.bind(this),openNative:this.openNative.bind(this),openDetached:this.openDetached.bind(this),onChange:this.onChange.bind(this)})],onClick:e=>{if(this.isDetached)return;if(this.nativeOpen)return this.openNative();if(this.startDetached)return this.openDetached();const t=u.findInRenderTree(e._reactInternalFiber,e=>e&&e.onSetSection,{walkable:["child","memoizedProps","props","children"]});t&&t.onSetSection&&t.onSetSection(this.id)}}),this.loadCSS(),this.insertCSS(this.savedCss),this.watchContent()}disabled(){L.removePanel(this.id),this.unwatchContent()}watchContent(){if(this.watcher)return this.error("Already watching content.");const e={};this.log("Starting to watch content."),this.watcher=Qe.watch(S.customCSS,{persistent:!1},async(t,s)=>{if(!t||!s)return;await new Promise(e=>setTimeout(e,50));try{Qe.statSync(S.customCSS)}catch(t){if("ENOENT"!==t.code)return;delete e[s],this.saveCSS("")}const n=Qe.statSync(S.customCSS);if(n&&n.mtime&&n.mtime.getTime()&&"number"==typeof n.mtime.getTime()&&e[s]!=n.mtime.getTime()&&(e[s]=n.mtime.getTime(),"change"==t)){const e=S.loadCustomCSS();if(e==this.savedCss)return;this.savedCss=e,this.insertCSS(this.savedCss),y.emit("customcss-updated",this.savedCss)}})}unwatchContent(){if(!this.watcher)return this.error("Was not watching content.");this.watcher.close(),delete this.watcher,this.log("No longer watching content.")}onChange(e){L.get("settings","customcss","liveUpdate")&&(this.insertCSS(e),this.saveCSS(e))}loadCSS(){this.savedCss=S.loadCustomCSS()}insertCSS(e){void 0===e?e=this.insertedCss:this.insertedCss=e,D.updateCustomCSS(e)}saveCSS(e){void 0!==e&&(this.savedCss=e),S.saveCustomCSS(this.savedCss)}openNative(){et.shell.openExternal("file://"+S.customCSS)}openDetached(e){const t=H.createRef(),s=H.createElement(Ke,{id:"bd-floating-editor",ref:t,css:e,save:this.saveCSS.bind(this),update:this.insertCSS.bind(this),openNative:this.openNative.bind(this),onChange:this.onChange.bind(this)});ce.open({onClose:()=>{this.isDetached=!1},onResize:()=>{t&&t.current&&t.current.resize&&t.current.resize()},title:N.CustomCSS.editorTitle,id:"floating-editor-window",height:470,width:410,center:!0,resizable:!0,children:s,confirmClose:()=>!(!t||!t.current)&&t.current.hasUnsavedChanges,confirmationText:N.CustomCSS.confirmationText}),this.isDetached=!0,tt.close(),st.dirtyDispatch({type:nt.LAYER_POP})}},ot=new class extends Xe{get name(){return"WindowPrefs"}get category(){return"window"}get id(){return"transparency"}enabled(){this.setWindowPreference("transparent",!0),this.setWindowPreference("backgroundColor","#00000000"),this.showModal(N.WindowPrefs.enabledInfo)}disabled(){this.deleteWindowPreference("transparent"),this.deleteWindowPreference("backgroundColor"),this.showModal(N.WindowPrefs.disabledInfo)}showModal(e){this.initialized&&oe.showConfirmationModal(N.Modals.additionalInfo,e,{confirmText:N.Modals.restartNow,cancelText:N.Modals.restartLater,onConfirm:()=>{const e=s(0).remote.app;e.relaunch(),e.exit()}})}getWindowPreference(e){return(S.getData("windowprefs")||{})[e]}setWindowPreference(e,t){const s=S.getData("windowprefs")||{};s[e]=t,S.setData("windowprefs",s)}deleteWindowPreference(e){const t=S.getData("windowprefs")||{};delete t[e],S.setData("windowprefs",t)}},rt=new class extends Xe{get name(){return"24Hour"}get category(){return"general"}get id(){return"twentyFourHour"}enabled(){this.inject24Hour()}disabled(){this.unpatchAll()}inject24Hour(){const e=new RegExp("([0-9]{1,2}):([0-9]{1,2})\\s(AM|PM)"),t=(t,s,n)=>{const i=n.match(e);if(i&&4===i.length)return"AM"===i[3]?n.replace(i[0],`${"12"===i[1]?"00":i[1].padStart(2,"0")}:${i[2]}`):n.replace(i[0],`${"12"===i[1]?"12":parseInt(i[1])+12}:${i[2]}`)};this.after(f.TimeFormatter,"calendarFormat",t),this.after(f.TimeFormatter,"dateFormat",t)}};const at=new RegExp("^(?!da-)((?:[A-Za-z]|[0-9]|-)+)-(?:[A-Za-z]|[0-9]|-|_){6}$");var lt=new class extends Xe{get id(){return"classNormalizer"}get category(){return"general"}get name(){return"ClassNormalizer"}enabled(){this.hasPatched||(this.patchClassModules(g.getModules(this.moduleFilter.bind(this))),this.normalizeElement(document.querySelector("#app-mount")),this.hasPatched=!0,this.patchDOMMethods())}disabled(){this.hasPatched&&(this.unpatchClassModules(g.getModules(this.moduleFilter.bind(this))),this.revertElement(document.querySelector("#app-mount")),this.hasPatched=!1)}patchClassModules(e){for(const t of e)this.patchClassModule("da",t)}unpatchClassModules(e){for(const t of e)this.unpatchClassModule("da",t)}shouldIgnore(e){return!isNaN(e)||(!!(e.endsWith("px")||e.endsWith("ch")||e.endsWith("em")||e.endsWith("ms"))||(!!e.startsWith("layerContainer-")||(!(!e.startsWith("#")||7!=e.length&&4!=e.length)||!(!e.includes("calc(")&&!e.includes("rgba")))))}moduleFilter(e){if("object"!=typeof e||Array.isArray(e))return!1;if(e.__esModule)return!1;if(!Object.keys(e).length)return!1;for(const t in e){const s=e[t];if("string"!=typeof s)return!1;if(!this.shouldIgnore(s)){if(1===s.split("-").length)return!1;if(!at.test(s.split(" ")[0]))return!1}}return!0}patchClassModule(e,t){for(const s in t){const n=t[s];if(this.shouldIgnore(n))continue;const i=n.split(" ");for(const n of i){const i=n.match(at);if(!i||!i.length||i.length<2)continue;const o=i[1].split("-").map((e,t)=>t?e[0].toUpperCase()+e.slice(1):e).join("");t[s]+=` ${e}-${o}`}}}unpatchClassModule(e,t){for(const s in t){const n=t[s];if(this.shouldIgnore(n))continue;let i="";const o=n.split(" ");for(const t of o)t.startsWith(e+"-")||(i+=" "+t);t[s]=i.trim()}}normalizeElement(e){if(!(e instanceof Element))return;const t=e.classList;for(let s=0,n=t.length;st?e[0].toUpperCase()+e.slice(1):e).join("");e.classList.add("da-"+n)}for(const t of e.children)this.normalizeElement(t)}revertElement(e){if(!(e instanceof Element))return;e.children&&e.children.length&&this.revertElement(e.children[0]),e.nextElementSibling&&this.revertElement(e.nextElementSibling);const t=e.classList,s=[];for(let e=0;e{const o=[];t&&o.push("category="+t.replace(/ /g,"%20")),e&&o.push("term="+e.replace(/ /g,"%20")),n&&o.push("from="+n);const r="?"+o.join("&");i.get({url:`${this.endPoint}${r}${r?"&schema=new":"?schema=new"}`,json:!0},(e,t,n)=>{if(e)return s(null);const i=n.size+n.from;s({servers:n.results,size:n.size,from:n.from,total:n.total,next:i>=n.total?null:i})})})}static async join(e,t=!1){if(t)return ut.acceptInvite(e);try{return await fetch(`${this.joinEndPoint}/${e}`,{method:"GET",credentials:"include",mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),!0}catch(e){return!1}}static async checkConnection(){try{const e=await fetch("https://auth.discordservers.com/info",{method:"GET",credentials:"include",mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),t=await e.json();return this._accessToken=t.access_token,t}catch(e){return!1}}static connect(){return new Promise(e=>{const t=new pt(this.windowOptions),s="https://auth.discordservers.com/connect?scopes=guilds.join&previousUrl="+this.connectEndPoint;t.webContents.on("did-navigate",(s,n)=>{n==this.connectEndPoint&&(t.close(),e())}),t.loadURL(s)})}static get windowOptions(){return{width:380,height:450,backgroundColor:"#282b30",show:!0,resizable:!0,maximizable:!1,minimizable:!1,alwaysOnTop:!0,frame:!1,center:!0,webPreferences:{nodeIntegration:!1}}}}const gt=g.getByDisplayName("SettingsView");class ft extends H.Component{get categoryButtons(){return["All","FPS Games","MMO Games","Strategy Games","MOBA Games","RPG Games","Tabletop Games","Sandbox Games","Simulation Games","Music","Community","Language","Programming","Other"]}constructor(e){super(e),this.state={category:"All",query:"",loading:!0,user:null,results:{servers:[],size:0,from:0,total:0,next:null}},this.changeCategory=this.changeCategory.bind(this),this.searchKeyDown=this.searchKeyDown.bind(this),this.connect=this.connect.bind(this),this.loadNextPage=this.loadNextPage.bind(this),this.join=this.join.bind(this)}componentDidMount(){this.checkConnection()}async checkConnection(){const e=await mt.checkConnection();if(!e)return this.setState({loading:!0,user:null});this.setState({user:e}),this.search()}async connect(){await mt.connect(),this.checkConnection()}searchKeyDown(e){this.state.loading||13!==e.which||this.search(e.target.value)}async search(e="",t=0){this.setState({query:e,loading:!0});const s=await mt.search({term:e,category:"All"==this.state.category?"":this.state.category,from:t});if(!s)return this.setState({results:{servers:[],size:0,from:0,total:0,next:null}});this.setState({loading:!1,results:s})}async changeCategory(e){this.state.loading||(await new Promise(t=>this.setState({category:e},t)),this.search())}loadNextPage(){this.state.loading||this.search(this.state.query,this.state.results.next)}async join(e,t=!1){return await mt.join(e,t)}get searchBox(){return H.createElement(Be,{onKeyDown:this.searchKeyDown,placeholder:N.PublicServers.search+"..."})}get title(){if(!this.state.user)return N.PublicServers.notConnected;if(this.state.loading)return N.PublicServers.loading+"...";const e=this.state.results.from+1,t=this.state.results.total,s=this.state.results.next?this.state.results.next:t;let n=N.PublicServers.results.format({start:e,end:s,total:t,category:this.state.category});return this.state.query&&(n+=" "+N.PublicServers.query.format({query:this.state.query})),n}get content(){const e=this.state.user?null:{title:N.PublicServers.connect,onClick:this.connect},t="All"!=this.state.category&&this.state.user?null:this.bdServer,s=this.state.results.servers.map(e=>H.createElement(dt,{key:e.identifier,server:e,joined:mt.hasJoined(e.identifier),join:this.join,defaultAvatar:mt.getDefaultAvatar}));return[H.createElement(ve,{text:this.title,button:e}),t,s,this.state.results.next?this.nextButton:null,this.state.results.servers.length>0&&H.createElement(ve,{text:this.title})]}get nextButton(){return H.createElement("button",{type:"button",className:"bd-button bd-button-next",onClick:this.loadNextPage},this.state.loading?N.PublicServers.loading:N.PublicServers.loadMore)}get connection(){const{user:e}=this.state;return e?H.createElement("div",{id:"bd-connection"},H.createElement("div",{className:"bd-footnote"},N.PublicServers.connection.format(e)),H.createElement("button",{type:"button",className:"bd-button bd-button-reconnect",onClick:this.connect},N.PublicServers.reconnect)):H.createElement("div",{id:"bd-connection"})}get bdServer(){const e={name:"BetterDiscord",online:"7500+",members:"20000+",categories:["community","programming","support"],description:"Official BetterDiscord server for plugins, themes, support, etc",identifier:"86004744966914048",iconUrl:"https://cdn.discordapp.com/icons/86004744966914048/292e7f6bfff2b71dfd13e508a859aedd.webp",nativejoin:!0,invite_code:"0Tmfo5ZbORCRqbAd",pinned:!0};return H.createElement(dt,{server:e,pinned:!0,joined:mt.hasJoined(e.identifier),defaultAvatar:mt.getDefaultAvatar})}render(){const e=this.categoryButtons.map(e=>({section:e,label:e,element:()=>this.content}));return H.createElement(gt,{onClose:this.props.close,onSetSection:this.changeCategory,section:this.state.category,sections:[{section:"HEADER",label:N.PublicServers.search},{section:"CUSTOM",element:()=>this.searchBox},{section:"HEADER",label:N.PublicServers.categories},...e,{section:"DIVIDER"},{section:"HEADER",label:H.createElement("a",{href:"https://discordservers.com",target:"_blank"},"DiscordServers.com")},{section:"DIVIDER"},{section:"CUSTOM",element:()=>this.connection}],theme:"dark"})}}const bt=g.getByProps("pushLayer");var yt=new class extends Xe{get name(){return"PublicServers"}get category(){return"general"}get id(){return"publicServers"}enabled(){const e=g.find(e=>e.default&&"NavigableGuilds"==e.default.displayName),t=g.findByDisplayName("Guilds");e||t||this.warn("Can't find GuildList component"),this.guildPatch=this.after(e||t.prototype,e?"default":"render",this._appendButton),this._appendButton()}disabled(){this.unpatchAll(),h.query("#bd-pub-li").remove()}_appendButton(){const e=f.GuildClasses.wrapper.split(" ")[0],t=h.query(`.${e} .scroller-2TZvBN >:first-child`);h.after(t,this.button)}openPublicServers(){bt.pushLayer(()=>f.React.createElement(ft,{close:bt.popLayer}))}get button(){const e=h.createElement(``),t=h.createElement(`
${N.PublicServers.button}
`);return t.addEventListener("click",()=>{this.openPublicServers()}),e.append(t),e}},vt=new class extends Xe{get name(){return"VoiceDisconnect"}get category(){return"general"}get id(){return"voiceDisconnect"}constructor(){super(),this.beforeUnload=this.beforeUnload.bind(this)}enabled(){window.addEventListener("beforeunload",this.beforeUnload)}disabled(){window.removeEventListener("beforeunload",this.beforeUnload)}beforeUnload(){f.ChannelActions.selectVoiceChannel(null,null)}};const wt=g.getModule(e=>e.default&&e.default.displayName&&"Message"==e.default.displayName);var Ct=new class extends Xe{get name(){return"ColoredText"}get category(){return"appearance"}get id(){return"coloredText"}enabled(){this.injectColoredText()}disabled(){this.unpatchAll()}injectColoredText(){this.after(wt.prototype,"render",(e,t,s)=>{this.after(s.props,"children",{silent:!0,after:({returnValue:t})=>{const s=t.props.children[1],n=e.props.message.colorString;s&&n&&(s.props.style={color:n})}})})}removeColoredText(){document.querySelectorAll(".markup-2BOw-j").forEach(e=>{e.style.setProperty("color","")})}},St=new class extends Xe{get name(){return"DarkMode"}get category(){return"appearance"}get id(){return"darkMode"}enabled(){document.getElementById("app-mount").classList.add("bda-dark","bd-dark")}disabled(){document.getElementById("app-mount").classList.remove("bda-dark","bd-dark")}},Et=new class extends Xe{get name(){return"MinimalMode"}get category(){return"appearance"}get id(){return"minimalMode"}get hideChannelsID(){return"hideChannels"}get hideChannels(){return this.get(this.hideChannelsID)}constructor(){super(),this.enableHideChannels=this.enableHideChannels.bind(this),this.disableHideChannels=this.disableHideChannels.bind(this)}enabled(){document.body.classList.add("bd-minimal"),this.hideChannels&&this.enableHideChannels(),this.hideChannelCancel=this.registerSetting(this.hideChannelsID,this.enableHideChannels,this.disableHideChannels)}disabled(){document.body.classList.remove("bd-minimal"),this.hideChannels&&this.disableHideChannels(),this.hideChannelCancel&&this.hideChannelCancel()}enableHideChannels(){document.body.classList.add("bd-minimal-chan")}disableHideChannels(){document.body.classList.remove("bd-minimal-chan")}},Pt=new class extends Xe{get name(){return"VoiceMode"}get category(){return"appearance"}get id(){return"voiceMode"}enabled(){document.querySelector(".chat-3bRxxu").style.setProperty("visibility","hidden"),document.querySelector(".chat-3bRxxu").style.setProperty("min-width","0px"),document.querySelector(".channels-Ie2l6A").style.setProperty("flex-grow","100000")}disabled(){document.querySelector(".chat-3bRxxu").style.setProperty("visibility",""),document.querySelector(".chat-3bRxxu").style.setProperty("min-width",""),document.querySelector(".channels-Ie2l6A").style.setProperty("flex-grow","")}};const xt=g.getByDisplayName("Tooltip");class kt extends H.Component{constructor(e){super(e),this.state={shouldAnimate:!this.animateOnHover,isFavorite:this.props.isFavorite},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onClick=this.onClick.bind(this),this.toggleFavorite=this.toggleFavorite.bind(this)}get animateOnHover(){return L.get("emotes","general","animateOnHover")}get label(){return this.props.modifier?`${this.props.name}:${this.props.modifier}`:this.props.name}get modifierClass(){return this.props.modifier?" emote"+this.props.modifier:""}onMouseEnter(){!this.state.shouldAnimate&&this.animateOnHover&&this.setState({shouldAnimate:!0})}onMouseLeave(){this.state.shouldAnimate&&this.animateOnHover&&this.setState({shouldAnimate:!1})}onClick(e){this.props.onClick&&this.props.onClick(e)}toggleFavorite(e){e.preventDefault(),e.stopPropagation(),this.state.isFavorite?y.emit("emotes-favorite-removed",this.label):y.emit("emotes-favorite-added",this.label,this.props.url),this.setState({isFavorite:!this.state.isFavorite})}render(){return H.createElement(xt,{color:"black",position:"top",text:this.label,delay:750},e=>H.createElement("div",Object.assign({className:"emotewrapper"+(this.props.jumboable?" jumboable":""),onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick},e),H.createElement("img",{draggable:!1,className:"emote"+this.modifierClass+(this.props.jumboable?" jumboable":"")+(this.state.shouldAnimate?"":" stop-animation"),dataModifier:this.props.modifier,alt:this.label,src:this.props.url}),H.createElement("input",{className:"fav"+(this.state.isFavorite?" active":""),title:N.Emotes.favoriteAction,type:"button",onClick:this.toggleFavorite})))}}const At=s(3),Dt={TwitchGlobal:new M("https://static-cdn.jtvnw.net/emoticons/v1/{{id}}/1.0"),TwitchSubscriber:new M("https://static-cdn.jtvnw.net/emoticons/v1/{{id}}/1.0"),FrankerFaceZ:new M("https://cdn.frankerfacez.com/emoticon/{{id}}/1"),BTTV:new M("https://cdn.betterttv.net/emote/{{id}}/1x")},Mt={TwitchGlobal:{},TwitchSubscriber:{},BTTV:{},FrankerFaceZ:{}},Nt=[],Lt=["twitch","subscriber","bttv","ffz"],Bt=["flip","spin","pulse","spin2","spin3","1spin","2spin","3spin","tr","bl","br","shake","shake2","shake3","flap"];var Tt=new class extends Xe{get name(){return"Emotes"}get collection(){return"settings"}get category(){return"general"}get id(){return"emotes"}get categories(){return Object.keys(Mt).filter(e=>this.isCategoryEnabled(e))}get shouldDownload(){return L.get("emotes",this.category,"download")}isCategoryEnabled(e){return super.get("emotes","categories",e.toLowerCase())}get(e){return super.get("emotes","general",e)}get MessageComponent(){return g.find(e=>e.default&&e.default.displayName&&"Message"==e.default.displayName)}get Emotes(){return Mt}get TwitchGlobal(){return Mt.TwitchGlobal}get TwitchSubscriber(){return Mt.TwitchSubscriber}get BTTV(){return Mt.BTTV}get FrankerFaceZ(){return Mt.FrankerFaceZ}get blacklist(){return Nt}get favorites(){return this.favoriteEmotes}getUrl(e,t){return Dt[e].format({id:Mt[e][t]})}getCategory(e){return Mt[e]}getRemoteFile(e){return u.repoUrl(`data/emotes/${e.toLowerCase()}.json`)}initialize(){super.initialize();const e=S.getBDData("favoriteEmotes");this.favoriteEmotes=e||{},this.addFavorite=this.addFavorite.bind(this),this.removeFavorite=this.removeFavorite.bind(this),this.onCategoryToggle=this.onCategoryToggle.bind(this),this.resetEmotes=this.resetEmotes.bind(this)}async enabled(){L.registerCollection("emotes","Emotes",r,{title:N.Emotes.clearEmotes,onClick:this.resetEmotes}),await this.getBlacklist(),await this.loadEmoteData(),y.on("emotes-favorite-added",this.addFavorite),y.on("emotes-favorite-removed",this.removeFavorite),y.on("setting-updated",this.onCategoryToggle),this.patchMessageContent()}disabled(){y.off("setting-updated",this.onCategoryToggle),y.off("emotes-favorite-added",this.addFavorite),y.off("emotes-favorite-removed",this.removeFavorite),L.removeCollection("emotes"),this.emptyEmotes(),this.cancelEmoteRender&&(this.cancelEmoteRender(),delete this.cancelEmoteRender)}onCategoryToggle(e,t,s,n){if("emotes"==e&&"categories"==t)return n?this.loadEmoteData(s):this.unloadEmoteData(s)}addFavorite(e,t){this.favoriteEmotes.hasOwnProperty(e)||(this.favoriteEmotes[e]=t),this.saveFavorites()}removeFavorite(e){this.favoriteEmotes.hasOwnProperty(e)&&(delete this.favoriteEmotes[e],this.saveFavorites())}isFavorite(e){return this.favoriteEmotes.hasOwnProperty(e)}saveFavorites(){S.setBDData("favoriteEmotes",this.favoriteEmotes)}emptyEmotes(){for(const e in Mt)Object.assign(Mt,{[e]:{}})}patchMessageContent(){this.cancelEmoteRender||(this.cancelEmoteRender=this.before(this.MessageComponent,"default",(e,t)=>{const s=t[0].childrenMessageContent.props.content;if(!s||!s.length)return;for(let e=0;e
"string"==typeof e&&""==e.replace(/\s*/,"")||(!(!e.type||"BDEmote"!=e.type.name)||!!(e.props&&e.props.children&&e.props.children.props&&e.props.children.props.emojiName))))for(const e of s)"object"==typeof e&&("BDEmote"==e.type.name?e.props.jumboable=!0:e.props&&e.props.children&&e.props.children.props&&e.props.children.props.emojiName&&(e.props.children.props.jumboable=!0))}))}async getBlacklist(){try{const e="Blacklist",t=S.emotesExist(e),s=await this.isCacheValid(e),n=s||!s&&t&&!this.shouldDownload?S.getEmoteData(e):await this.downloadEmotes(e);Nt.push(...n)}catch(e){}}isCacheValid(e){return new Promise(t=>{const s=S.getCacheHash("emotes",e);if(!s)return t(!1);At.head({url:this.getRemoteFile(e),headers:{"If-None-Match":s}},(e,s)=>{t(304==s.statusCode)})})}async loadEmoteData(e){e||(e=this.categories),Array.isArray(e)||(e=[e]);const t=Object.keys(Mt);e=e.map(e=>t.find(t=>t.toLowerCase()==e.toLowerCase())),W.show(N.Emotes.loading,{type:"info"}),this.emotesLoaded=!1;for(const t of e){const e=S.emotesExist(t),s=await this.isCacheValid(t);let n=null;if(s||!s&&e&&!this.shouldDownload){this.log(`Loading ${t} emotes from local cache.`);const e=S.getEmoteData(t);Object.keys(e).length>0&&(n=e)}n||(n=await this.downloadEmotes(t)),Object.assign(Mt[t],n),await new Promise(e=>setTimeout(e,1e3))}this.emotesLoaded=!0,y.dispatch("emotes-loaded"),W.show(N.Emotes.loaded,{type:"success"})}unloadEmoteData(e){e||(e=this.categories),Array.isArray(e)||(e=[e]);const t=Object.keys(Mt);e=e.map(e=>t.find(t=>t.toLowerCase()==e.toLowerCase()));for(const t of e)delete Mt[t],Mt[t]={}}downloadEmotes(e){const t=this.getRemoteFile(e);this.log(`Downloading ${e} from ${t}`);const s={url:t,timeout:1e4,json:!0};return new Promise(t=>{At.get(s,(s,n,i)=>{if(s||200!=n.statusCode)return this.stacktrace(`Could not download ${e} emotes.`,s),t({});for(const e in i)(e.length<4||Nt.includes(e)||!i[e])&&delete i[e];S.saveEmoteData(e,i),S.setCacheHash("emotes",e,n.headers.etag),t(i),this.log("Downloaded "+e)})})}resetEmotes(){const e=Object.keys(Mt);this.unloadEmoteData(e);for(const t of e)S.invalidateCache("emotes",t);this.loadEmoteData()}};const jt=(e,t,s={})=>{const{onContextMenu:n,onClick:i}=s,o=h.createElement(`\n
\n
`);return n&&o.addEventListener("contextmenu",n),o.addEventListener("click",i),o};var Ft=new class extends Xe{get name(){return"EmoteMenu"}get collection(){return"emotes"}get category(){return"general"}get id(){return"emoteMenu"}get hideEmojisID(){return"hideEmojiMenu"}get hideEmojis(){return this.get(this.hideEmojisID)}constructor(){super(),this.lastTab="bd-qem-emojis",this.qmeHeader=h.createElement('\n Twitch \n Favourite \n Emojis\n
');for(const e of this.qmeHeader.getElementsByTagName("button"))e.addEventListener("click",this.switchMenu.bind(this));this.teContainer=h.createElement(''),this.teContainerInner=this.teContainer.querySelector(".emote-menu-inner"),this.faContainer=h.createElement(''),this.faContainerInner=this.faContainer.querySelector(".emote-menu-inner"),this.observer=new MutationObserver(e=>{for(const t of e)this.observe(t)}),this.enableHideEmojis=this.enableHideEmojis.bind(this),this.disableHideEmojis=this.disableHideEmojis.bind(this),this.updateTwitchEmotes=this.updateTwitchEmotes.bind(this)}async enabled(){return oe.alert("Emote Menu Broken","Emote Menu is currently broken, it is recommended to disable this until it is fixed.")}disabled(){y.off("emotes-loaded",this.updateTwitchEmotes),this.observer.disconnect(),this.disableHideEmojis(),this.hideEmojiCancel&&this.hideEmojiCancel()}enableHideEmojis(){const e=document.querySelector(".emojiPicker-3m1S-j");e&&e.classList.add("bd-qme-hidden")}disableHideEmojis(){const e=document.querySelector(".emojiPicker-3m1S-j");e&&e.classList.remove("bd-qme-hidden")}insertEmote(e){const t=u.getTextArea();u.insertText(t[0]," "==t.val().slice(-1)?t.val()+e:t.val()+" "+e)}favContext(e){e.stopPropagation();const t=e.target.closest(".emote-container").children[0],s=$('');s.css({top:e.pageY-$("#bd-qem-favourite-container").offset().top,left:e.pageX-$("#bd-qem-favourite-container").offset().left}),$(t).parent().append(s),s.on("click",e=>{e.preventDefault(),e.stopPropagation(),$(t).remove(),Tt.removeFavorite($(t).attr("title")),this.updateFavorites(),$(document).off("mousedown.emotemenu")}),$(document).on("mousedown.emotemenu",(function(e){"removemenu"!=e.target.id&&($("#removemenu").remove(),$(document).off("mousedown.emotemenu"))}))}switchMenu(e){let t="string"==typeof e?e:e.target.id;"bd-qem-emojis"==t&&this.hideEmojis&&(t="bd-qem-favourite");const s=$("#bd-qem-twitch"),n=$("#bd-qem-favourite"),i=$("#bd-qem-emojis");switch(s.removeClass("active"),n.removeClass("active"),i.removeClass("active"),$(".emojiPicker-3m1S-j").hide(),$("#bd-qem-favourite-container").hide(),$("#bd-qem-twitch-container").hide(),t){case"bd-qem-twitch":s.addClass("active"),$("#bd-qem-twitch-container").show();break;case"bd-qem-favourite":n.addClass("active"),$("#bd-qem-favourite-container").show();break;case"bd-qem-emojis":i.addClass("active"),$(".emojiPicker-3m1S-j").show(),$(".emojiPicker-3m1S-j input").focus()}t&&(this.lastTab=t)}observe(e){if(!(e.addedNodes.length&&e.addedNodes[0]instanceof Element))return;const t=e.addedNodes[0];if(!t.classList.contains("layer-v9HyYc")||!t.getElementsByClassName("emojiPicker-3m1S-j").length||t.querySelector(".emojiPicker-3m1S-j").parentElement.classList.contains("animatorLeft-1EQxU0"))return;const s=$(t);this.hideEmojis?s.addClass("bd-qme-hidden"):s.removeClass("bd-qme-hidden"),s.prepend(this.qmeHeader),s.append(this.teContainer),s.append(this.faContainer),this.switchMenu(this.lastTab)}updateTwitchEmotes(){for(;this.teContainerInner.firstChild;)this.teContainerInner.firstChild.remove();for(const e in Tt.getCategory("TwitchGlobal")){if(!Tt.getCategory("TwitchGlobal").hasOwnProperty(e))continue;const t=Tt.getUrl("TwitchGlobal",e),s=jt(e,t,{onClick:this.insertEmote.bind(this,e)});this.teContainerInner.append(s)}}updateFavorites(){for(;this.faContainerInner.firstChild;)this.faContainerInner.firstChild.remove();for(const e in Tt.favorites){const t=Tt.favorites[e],s=jt(e,t,{onClick:this.insertEmote.bind(this,e),onContextMenu:this.favContext.bind(this)});this.faContainerInner.append(s)}Tt.saveFavorites()}},Ot=new class extends Xe{get name(){return"DeveloperMode"}get category(){return"developer"}get id(){return"developerMode"}get selectorModeID(){return"copySelector"}get selectorMode(){return this.get(this.selectorModeID)}constructor(){super(),this.copySelectorListener=this.copySelectorListener.bind(this)}enabled(){document.addEventListener("contextmenu",this.copySelectorListener)}disabled(){document.removeEventListener("contextmenu",this.copySelectorListener)}copySelectorListener(e){e.stopPropagation();const t=this.getSelector(e.target);setImmediate((function(){let s=h.query(".contextMenu-HLZMGh");if(!s){const t=h.query("#app-mount"),n=h.createElement('');s=h.createElement(''),n.append(s),t.append(n),n.style.top=e.clientY+"px",n.style.left=e.clientX+"px",n.style.zIndex="1002";const i=function(e){e.keyCode&&27!==e.keyCode||(n.remove(),document.removeEventListener("click",i),document.removeEventListener("contextmenu",i),document.removeEventListener("keyup",i))};document.addEventListener("click",i),document.addEventListener("contextmenu",i),document.addEventListener("keyup",i)}const n=h.createElement('
'),i=h.createElement('
');i.append(h.createElement('
Copy Selector
')),i.addEventListener("click",()=>{f.ElectronModule.copy(t),s.style.display="none"}),n.append(i),s.append(n)}))}getSelector(e){if(e.id)return"#"+e.id;const t=this.getRules(e),s=t[t.length-1];return s?s.selectorText:e.classList.length?"."+Array.from(e.classList).join("."):"."+Array.from(e.parentElement.classList).join(".")}getRules(e,t=e.ownerDocument.styleSheets){return[...t].filter(e=>!e.href||!e.href.includes("BetterDiscordApp")).map(e=>[...e.cssRules||[]]).flat().filter(t=>t&&t.selectorText&&e.matches(t.selectorText)&&t.style.length&&t.selectorText.split(", ").length<8&&!t.selectorText.split(", ").includes("*"))}},It=new class extends Xe{get name(){return"Debugger"}get category(){return"developer"}get id(){return"debuggerHotkey"}enabled(){document.addEventListener("keydown",this.debugListener)}disabled(){document.removeEventListener("keydown",this.debugListener)}debugListener(e){119!==e.which&&118!=e.which||(e.preventDefault(),e.stopImmediatePropagation())}};const zt=s(0),Rt=s(2),Ht=s(1),qt=zt.remote.BrowserWindow,Ut=zt.remote.getCurrentWebContents();var _t=new class extends Xe{get name(){return"ReactDevTools"}get category(){return"developer"}get id(){return"reactDevTools"}initialize(){super.initialize(),this.findExtension()}findExtension(){let e="";if(e="win32"===process.platform?Ht.resolve(process.env.LOCALAPPDATA,"Google/Chrome/User Data"):"linux"===process.platform?Ht.resolve(process.env.HOME,".config/google-chrome"):"darwin"===process.platform?Ht.resolve(process.env.HOME,"Library/Application Support/Google/Chrome"):Ht.resolve(process.env.HOME,".config/chromium"),e+="/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/",Rt.existsSync(e)){const t=Rt.readdirSync(e);e=Ht.resolve(e,t[t.length-1])}this.extensionPath=e,this.isExtensionInstalled=Rt.existsSync(e),this.listener=this.listener.bind(this)}enabled(){if(this.isExtensionInstalled||this.findExtension(),!this.isExtensionInstalled)return oe.alert("Extension Not Found","Unable to find the React Developer Tools extension on your PC. Please install the extension on your local Chrome installation.");setImmediate(()=>Ut.on("devtools-opened",this.listener)),Ut.isDevToolsOpened()&&this.listener()}disabled(){Ut.removeListener("devtools-opened",this.listener)}listener(){if(!this.isExtensionInstalled)return;qt.removeDevToolsExtension("React Developer Tools");qt.addDevToolsExtension(this.extensionPath)?this.log("Successfully installed react devtools."):this.error("Couldn't find react devtools in chrome extensions!")}};class $t extends H.Component{render(){return H.createElement("svg",{className:"bd-logo "+this.props.className,height:"100%",width:this.props.size||"16px",viewBox:"0 0 2000 2000",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}},H.createElement("metadata",null),H.createElement("defs",null,H.createElement("filter",{id:"shadow1"},H.createElement("feDropShadow",{dx:"20",dy:"0",stdDeviation:"20",floodColor:"rgba(0,0,0,0.35)"})),H.createElement("filter",{id:"shadow2"},H.createElement("feDropShadow",{dx:"15",dy:"0",stdDeviation:"20",floodColor:"rgba(255,255,255,0.15)"})),H.createElement("filter",{id:"shadow3"},H.createElement("feDropShadow",{dx:"10",dy:"0",stdDeviation:"20",floodColor:"rgba(0,0,0,0.35)"}))),H.createElement("g",null,H.createElement("path",{style:{filter:"url(#shadow3)"},fill:"#171717",opacity:"1",d:"M1195.44+135.442L1195.44+135.442L997.6+136.442C1024.2+149.742+1170.34+163.542+1193.64+179.742C1264.34+228.842+1319.74+291.242+1358.24+365.042C1398.14+441.642+1419.74+530.642+1422.54+629.642L1422.54+630.842L1422.54+632.042C1422.54+773.142+1422.54+1228.14+1422.54+1369.14L1422.54+1370.34L1422.54+1371.54C1419.84+1470.54+1398.24+1559.54+1358.24+1636.14C1319.74+1709.94+1264.44+1772.34+1193.64+1821.44C1171.04+1837.14+1025.7+1850.54+1000+1863.54L1193.54+1864.54C1539.74+1866.44+1864.54+1693.34+1864.54+1296.64L1864.54+716.942C1866.44+312.442+1541.64+135.442+1195.44+135.442Z"}),H.createElement("path",{style:{filter:"url(#shadow2)"},fill:"#3E82E5",opacity:"1",d:"M1695.54+631.442C1685.84+278.042+1409.34+135.442+1052.94+135.442L361.74+136.442L803.74+490.442L1060.74+490.442C1335.24+490.442+1335.24+835.342+1060.74+835.342L1060.74+1164.84C1150.22+1164.84+1210.53+1201.48+1241.68+1250.87C1306.07+1353+1245.76+1509.64+1060.74+1509.64L361.74+1863.54L1052.94+1864.54C1409.24+1864.54+1685.74+1721.94+1695.54+1368.54C1695.54+1205.94+1651.04+1084.44+1572.64+999.942C1651.04+915.542+1695.54+794.042+1695.54+631.442Z"}),H.createElement("path",{style:{filter:"url(#shadow1)"},fill:"#FFFFFF",opacity:"1",d:"M1469.25+631.442C1459.55+278.042+1183.05+135.442+826.65+135.442L135.45+135.442L135.45+1004C135.45+1004+135.427+1255.21+355.626+1255.21C575.825+1255.21+575.848+1004+575.848+1004L577.45+490.442L834.45+490.442C1108.95+490.442+1108.95+835.342+834.45+835.342L664.65+835.342L664.65+1164.84L834.45+1164.84C923.932+1164.84+984.244+1201.48+1015.39+1250.87C1079.78+1353+1019.47+1509.64+834.45+1509.64L135.45+1509.64L135.45+1864.54L826.65+1864.54C1182.95+1864.54+1459.45+1721.94+1469.25+1368.54C1469.25+1205.94+1424.75+1084.44+1346.35+999.942C1424.75+915.542+1469.25+794.042+1469.25+631.442Z"})))}}const Wt=f.React,Gt=g.getByDisplayName("Tooltip");var Vt=new class{initialize(){u.suppressErrors(this.patchSocial.bind(this),"BD Social Patch")(),u.suppressErrors(this.patchGuildPills.bind(this),"BD Guild Pills Patch")(),u.suppressErrors(this.patchGuildListItems.bind(this),"BD Guild List Items Patch")(),u.suppressErrors(this.patchGuildSeparator.bind(this),"BD Guild Separator Patch")(),u.suppressErrors(this.patchMessageHeader.bind(this),"BD Message Header Patch")(),u.suppressErrors(this.patchMemberList.bind(this),"BD Member List Patch")()}patchSocial(){if(this.socialPatch)return;const e=g.getByDisplayName("TabBar"),t=g.getByDisplayName("Anchor");e&&(this.socialPatch=j.after("ComponentPatcher",e.prototype,"render",(e,s,n)=>{const i=n.props.children;if(!i||!i.length||i.length<3)return;if("Separator"!==i[i.length-3].type.displayName)return;if(!i[i.length-2].type.toString().includes("socialLinks"))return;if(t){const e=i[i.length-2].type,s=function(){const s=e(...arguments);return s.props.children.push(f.React.createElement(t,{className:"bd-social-link",href:"https://twitter.com/BandagedBD",title:"BandagedBD",target:"_blank"},f.React.createElement($t,{size:"16px",className:"bd-social-logo"}))),s};i[i.length-2].type=s}const r=f.React.createElement("div",{className:"colorMuted-HdFt4q size12-3cLvbJ"},"Injector "+o.version),a=`(${o.hash?o.hash.substring(0,7):o.branch})`,l=f.React.createElement("div",{className:"colorMuted-HdFt4q size12-3cLvbJ"},`BBD ${o.bbdVersion} `,f.React.createElement("span",{className:"versionHash-2gXjIB da-versionHash"},a)),d=i[i.length-1].type;i[i.length-1].type=function(){const e=d(...arguments);return e.props.children.splice(e.props.children.length-1,0,r),e.props.children.splice(1,0,l),e}}))}patchGuildListItems(){if(this.guildListItemsPatch)return;const e=f.GuildClasses.listItem.split(" ")[0],t=f.GuildClasses.blobContainer.split(" ")[0],s=u.getReactInstance(document.querySelector(`.${e} .${t}`).parentElement).return.type;s&&(this.guildListItemsPatch=j.after("ComponentPatcher",s.prototype,"render",(e,t,s)=>{if(!s||!e)return;const n=e.props;return s.props.className+=" bd-guild",n.unread&&(s.props.className+=" bd-unread"),n.selected&&(s.props.className+=" bd-selected"),n.audio&&(s.props.className+=" bd-audio"),n.video&&(s.props.className+=" bd-video"),n.badge&&(s.props.className+=" bd-badge"),n.animatable&&(s.props.className+=" bd-animatable"),s}))}patchGuildPills(){if(this.guildPillPatch)return;const e=g.getModule(e=>e.default&&!e.default.displayName&&e.default.toString&&e.default.toString().includes("translate3d"));e&&(this.guildPillPatch=j.after("ComponentPatcher",e,"default",(e,t,s)=>{const n=t[0];return n.unread&&(s.props.className+=" bd-unread"),n.selected&&(s.props.className+=" bd-selected"),n.hovered&&(s.props.className+=" bd-hovered"),s}))}patchGuildSeparator(){if(this.guildSeparatorPatch)return;const e=g.getByDisplayName("Guilds"),t=g.getByProps("renderListItem");if(!t||!e)return;const s=function(){const e=t.Separator(...arguments);return e.props.className+=" bd-guild-separator",e};this.guildSeparatorPatch=j.after("ComponentPatcher",e.prototype,"render",(e,t,n)=>{const i=u.findInReactTree(n,e=>e.type&&!e.type.displayName&&"function"==typeof e.type&&u.isEmpty(e.props));i&&(i.type=s)})}patchMessageHeader(){if(this.messageHeaderPatch)return;const e=g.getByProps("MessageTimestamp"),t=g.find(e=>"Anchor"==e.displayName);t&&e&&e.default&&(this.messageHeaderPatch=j.after("ComponentPatcher",e,"default",(e,s,n)=>{const i=u.getNestedProp(s[0],"message.author"),o=u.getNestedProp(n,"props.children.1.props.children.1.props.children");o&&i&&i.id&&"249746236008169473"===i.id&&Array.isArray(o)&&o.push(Wt.createElement(Gt,{color:"black",position:"top",text:"BandagedBD Developer"},e=>Wt.createElement(t,Object.assign({className:"bd-chat-badge",href:"https://github.com/rauenzi/BetterDiscordApp",title:"BandagedBD",target:"_blank"},e),Wt.createElement($t,{size:"16px",className:"bd-logo"}))))}))}patchMemberList(){if(this.memberListPatch)return;const e=g.findByDisplayName("MemberListItem"),t=g.find(e=>"Anchor"==e.displayName);t&&e&&e.prototype&&e.prototype.renderDecorators&&(this.memberListPatch=j.after("ComponentPatcher",e.prototype,"renderDecorators",(e,s,n)=>{const i=u.getNestedProp(e,"props.user"),o=u.getNestedProp(n,"props.children");o&&i&&i.id&&"249746236008169473"===i.id&&Array.isArray(o)&&o.push(Wt.createElement(Gt,{color:"black",position:"top",text:"BandagedBD Developer"},e=>Wt.createElement(t,Object.assign({className:"bd-member-badge",href:"https://github.com/rauenzi/BetterDiscordApp",title:"BandagedBD",target:"_blank"},e),Wt.createElement($t,{size:"16px",className:"bd-logo"}))))}))}};const Jt=f.GuildClasses;function Yt(){}Yt.prototype.setConfig=function(e){Object.assign(o,e)},Yt.prototype.init=async function(){if(S.initialize(),await A.initialize(),o.version
o.version&&oe.showConfirmationModal(N.Startup.updateAvailable,N.Startup.updateInfo.format({version:e}),{confirmText:N.Startup.updateNow,cancelText:N.Startup.maybeLater,onConfirm:async()=>{const e=()=>{oe.alert(N.Startup.updateFailed,N.Startup.manualUpdate)};try{if(!await this.updateInjector())return e();const t=s(0).remote.app;t.relaunch(),t.exit()}catch(t){e()}}}),c.log("Startup","Initializing Settings"),L.initialize(),D.initialize(),await this.waitForGuilds(),R.initialize(),Vt.initialize();for(const e in n)n[e].initialize();c.log("Startup","Loading Plugins");const t=Ve.initialize();c.log("Startup","Loading Themes");const i=Ye.initialize();c.log("Startup","Removing Loading Icon"),document.getElementsByClassName("bd-loaderv2")[0].remove(),c.log("Startup","Collecting Startup Errors"),oe.showAddonErrors({plugins:t,themes:i});const r=S.getBDData("version");o.bbdVersion>r&&(oe.showChangelogModal(l),S.setBDData("version",o.bbdVersion))},Yt.prototype.waitForGuilds=function(){let e=0;return new Promise(t=>{const s=function(){e++,"complete"!=document.readyState&&setTimeout(s,100);const n=Jt.wrapper.split(" ")[0],i=Jt.listItem.split(" ")[0],r=Jt.blobContainer.split(" ")[0];return document.querySelectorAll(`.${n} .${i} .${r}`).length>0||e>=50?t(o.deferLoaded=!0):void setTimeout(s,100)};s()})},Yt.prototype.updateInjector=async function(){const e=S.injectionPath;if(!e)return!1;const t=s(2),n=s(1),i=s(6),o=s(7),r=s(8),a=s(3),l=n.resolve(e,".."),d=n.basename(e),h="https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip",u=n.resolve(l,"injector.zip"),p=n.resolve(l,"BetterDiscordApp-injector");c.log("InjectorUpdate","Downloading "+h);let m=await new Promise(e=>{a.get({url:h,encoding:null},async(s,n,i)=>{if(s||200!==n.statusCode)return e(!1);await new Promise(e=>t.exists(u,e))&&await new Promise(e=>t.rename(u,`${u}.bak${Math.round(performance.now())}`,e)),c.log("InjectorUpdate","Writing "+u),t.writeFile(u,i,t=>e(!t))})});if(!m)return m;await new Promise(e=>t.exists(p,e))&&await new Promise(e=>t.rename(p,`${p}.bak${Math.round(performance.now())}`,e));const g=await new Promise(e=>o.open(u,{lazyEntries:!0},(t,s)=>e(s)));g.on("entry",(function(e){if(e.fileName.endsWith("/"))return g.readEntry();c.log("InjectorUpdate","Extracting "+e.fileName);const s=n.resolve(l,e.fileName);r.sync(n.dirname(s)),g.openReadStream(e,(function(e,n){if(e)return m=!1;n.on("end",(function(){g.readEntry()})),n.pipe(t.createWriteStream(s))}))})),g.readEntry(),await new Promise(e=>g.once("end",e));const f=n.resolve(l,`${d}.bak${Math.round(performance.now())}`);return await new Promise(s=>t.rename(e,f,s)),c.log("InjectorUpdate",`Renaming ${n.basename(p)} to ${d}`),m=await new Promise(s=>t.rename(p,e,e=>s(!e))),m?m?(await new Promise(e=>i(f,e)),await new Promise(e=>t.unlink(u,e)),c.log("InjectorUpdate","Injector Updated!"),m):(c.err("InjectorUpdate","Something went wrong... restoring backups."),await new Promise(e=>i(p,e)),await new Promise(s=>t.rename(f,e,s)),m):(c.err("InjectorUpdate","Failed to rename the final directory"),m)};var Xt=new Yt;const Zt={get React(){return f.React},get ReactDOM(){return f.ReactDOM},get WindowConfigFile(){return""},get settings(){return L.collections},get emotes(){return{}},get version(){return o.version},getAllWindowPreferences:function(){return S.getData("windowprefs")||{}},getWindowPreference:function(e){return this.getAllWindowPreferences()[e]},setWindowPreference:function(e,t){const s=this.getAllWindowPreferences();return s[e]=t,S.setData("windowprefs",s)},injectCSS:function(e,t){D.injectStyle(e,t)},clearCSS:function(e){D.removeStyle(e)},linkJS:function(e,t){return D.injectScript(e,t)},unlinkJS:function(e){D.removeScript(e)},alert:function(e,t){oe.alert(e,t)},showConfirmationModal:function(e,t,s={}){return oe.showConfirmationModal(e,t,s)},showToast:function(e,t={}){W.show(e,t)},findModule:function(e){return g.getModule(e)},findAllModules:function(e){return g.getModule(e,!1)},findModuleByProps:function(...e){return g.getByProps(...e)},findModuleByPrototypes:function(...e){return g.getByPrototypes(...e)},findModuleByDisplayName:function(e){return g.getByDisplayName(e)},getInternalInstance:function(e){if(e instanceof window.jQuery||e instanceof Element)return e instanceof jQuery&&(e=e[0]),u.getReactInstance(e)},loadData:function(e,t){return S.getPluginData(e,t)}};Zt.getData=Zt.loadData,Zt.saveData=function(e,t,s){return S.setPluginData(e,t,s)},Zt.setData=Zt.saveData,Zt.deleteData=function(e,t){return S.deletePluginData(e,t)},Zt.monkeyPatch=function(e,t,s){const{before:n,after:i,instead:o,once:r=!1,silent:a=!1,force:l=!1}=s,d=s.displayName||e.displayName||e.name||e.constructor.displayName||e.constructor.name;if(a||console.log("patch",t,"of",d),!e[t]){if(!l)return console.error(t,"does not exist for",d);e[t]=function(){}}const c=e[t],h=()=>{a||console.log("unpatch",t,"of",d),e[t]=c};return e[t]=function(){const s={thisObject:this,methodArguments:arguments,cancelPatch:h,originalMethod:c,callOriginalMethod:()=>s.returnValue=s.originalMethod.apply(s.thisObject,s.methodArguments)};if(o){const n=u.suppressErrors(o,"`instead` callback of "+e[t].displayName)(s);void 0!==n&&(s.returnValue=n)}else n&&u.suppressErrors(n,"`before` callback of "+e[t].displayName)(s),s.callOriginalMethod(),i&&u.suppressErrors(i,"`after` callback of "+e[t].displayName)(s);return r&&h(),s.returnValue},e[t].__monkeyPatched=!0,e[t].__originalMethod||(e[t].__originalMethod=c),e[t].displayName="patched "+(e[t].displayName||t),h},Zt.onRemoved=function(e,t){return u.onRemoved(e,t)},Zt.suppressErrors=function(e,t){return u.suppressErrors(e,t)},Zt.testJSON=function(e){return u.testJSON(e)},Zt.getPlugin=function(e){return c.warn("BdApi","getPlugin is deprecated. Please make use of the addon api (BdApi.Plugins)"),Ve.addonList.find(t=>t.name==e)},Zt.isPluginEnabled=function(e){c.warn("BdApi","isPluginEnabled is deprecated. Please make use of the addon api (BdApi.Plugins)");const t=this.getPlugin(e);return!!t&&Ve.isEnabled(t.id)},Zt.isThemeEnabled=function(e){c.warn("BdApi","isThemeEnabled is deprecated. Please make use of the addon api (BdApi.Themes)");const t=Ye.addonList.find(t=>t.name==e);return!!t&&Ye.isEnabled(t.id)},Zt.isSettingEnabled=function(e,t,s){return L.get(e,t,s)},Zt.enableSetting=function(e,t,s){return L.set(e,t,s,!0)},Zt.disableSetting=function(e,t,s){return L.set(e,t,s,!1)},Zt.toggleSetting=function(e,t,s){return L.set(e,t,s,!L.get(e,t,s))},Zt.getBDData=function(e){return S.getBDData(e)},Zt.setBDData=function(e,t){return S.setBDData(e,t)};const Kt=e=>new class{get folder(){return e.addonFolder}isEnabled(t){return e.isEnabled(t)}enable(t){return e.enableAddon(t)}disable(t){return e.disableAddon(t)}toggle(t){return e.toggleAddon(t)}reload(t){return e.reloadAddon(t)}get(t){return e.addonList.find(e=>e.id==t||e.filename==t)}getAll(){return e.addonList}};Zt.Plugins=Kt(Ve),Zt.Themes=Kt(Ye),Object.freeze(Zt),Object.freeze(Zt.Plugins),Object.freeze(Zt.Themes);var Qt=Zt;!function(){const e=Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"contentWindow").get;Object.defineProperty(HTMLIFrameElement.prototype,"contentWindow",{get:function(){const t=Reflect.apply(e,this,arguments);return new Proxy(t,{getOwnPropertyDescriptor:function(e,t){if("localStorage"!==t)return Object.getOwnPropertyDescriptor(e,t)},get:function(e,t){if("localStorage"===t)return null;const s=e[t];return"function"==typeof s?s.bind(e):s}})}}),Object.defineProperty(Reflect,"apply",{value:Reflect.apply,writable:!1,configurable:!1}),Object.defineProperty(Function.prototype,"bind",{value:Function.prototype.bind,writable:!1,configurable:!1});const t=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const e=arguments[1];return e.toLowerCase().includes("api/webhooks")?null:Reflect.apply(t,this,arguments)}}();const es=document.createElement("div");es.className="bd-loaderv2",es.title="BandagedBD is loading...",document.body.appendChild(es),window.BdApi=Qt;class ts{constructor(e){Xt.setConfig(e)}init(){Xt.init()}}!function(){const e="betterdiscord/",t=s(4),n=t._load;t._load=function(t){if("betterdiscord"===t||t.startsWith(e)){if("api"==t.substr(e.length))return Qt}return n.apply(this,arguments)}}()}]).default;
\ No newline at end of file
+var Core=function(e){var t={};function s(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(n,i,function(t){return e[t]}.bind(null,i));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=9)}([function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("request")},function(e,t){e.exports=require("module")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("rimraf")},function(e,t){e.exports=require("yauzl")},function(e,t){e.exports=require("mkdirp")},function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return ns}));var n={};s.r(n),s.d(n,"CustomCSS",(function(){return at})),s.d(n,"WindowPrefs",(function(){return lt})),s.d(n,"TwentyFourHour",(function(){return dt})),s.d(n,"ClassNormalizer",(function(){return ht})),s.d(n,"PublicServers",(function(){return Ct})),s.d(n,"VoiceDisconnect",(function(){return St})),s.d(n,"ColoredText",(function(){return Mt})),s.d(n,"DarkMode",(function(){return xt})),s.d(n,"MinimalMode",(function(){return Nt})),s.d(n,"VoiceMode",(function(){return Pt})),s.d(n,"EmoteModule",(function(){return zt})),s.d(n,"EmoteMenu",(function(){return Ot})),s.d(n,"CopySelector",(function(){return Rt})),s.d(n,"Debugger",(function(){return Ut})),s.d(n,"ReactDevTools",(function(){return Gt}));var i={local:!1,localServer:"//localhost:8080",minified:!0,version:"0.3.0",branch:"master",repo:"rauenzi",minSupportedVersion:"0.3.0",bbdVersion:"1.0.0"},o=[{type:"category",id:"general",name:"General",collapsible:!0,settings:[{type:"switch",id:"download",value:!0},{type:"switch",id:"emoteMenu",value:!0},{type:"switch",id:"hideEmojiMenu",value:!1,enableWith:"emoteMenu"},{type:"switch",id:"showNames",value:!0},{type:"switch",id:"modifiers",value:!0},{type:"switch",id:"animateOnHover",value:!1}]},{type:"category",id:"categories",name:"Categories",collapsible:!0,settings:[{type:"switch",id:"twitchglobal",value:!0},{type:"switch",id:"twitchsubscriber",value:!1},{type:"switch",id:"frankerfacez",value:!0},{type:"switch",id:"bttv",value:!0}]}],r=[{type:"category",id:"general",collapsible:!0,settings:[{type:"switch",id:"emotes",value:!0},{type:"switch",id:"publicServers",value:!0},{type:"switch",id:"voiceDisconnect",value:!1},{type:"switch",id:"twentyFourHour",value:!1},{type:"switch",id:"classNormalizer",value:!0},{type:"switch",id:"showToasts",value:!0}]},{type:"category",id:"appearance",collapsible:!0,settings:[{type:"switch",id:"voiceMode",value:!1},{type:"switch",id:"minimalMode",value:!1},{type:"switch",id:"hideChannels",value:!1,enableWith:"minimalMode"},{type:"switch",id:"darkMode",value:!0},{type:"switch",id:"coloredText",value:!1}]},{type:"category",id:"addons",collapsible:!0,shown:!1,settings:[{type:"switch",id:"addonErrors",value:!0},{type:"switch",id:"autoScroll",value:!0},{type:"switch",id:"autoReload",value:!0},{type:"dropdown",id:"editAction",value:"detached",options:[{value:"detached"},{value:"system"}]}]},{type:"category",id:"customcss",collapsible:!0,shown:!1,settings:[{type:"switch",id:"customcss",value:!0},{type:"switch",id:"liveUpdate",value:!1},{type:"dropdown",id:"openAction",value:"settings",options:[{value:"settings"},{value:"detached"},{value:"system"}]}]},{type:"category",id:"developer",collapsible:!0,shown:!1,settings:[{type:"switch",id:"debuggerHotkey",value:!1},{type:"switch",id:"copySelector",value:!1},{type:"switch",id:"reactDevTools",value:!1}]},{type:"category",id:"window",collapsible:!0,shown:!1,settings:[{type:"switch",id:"transparency",value:!1},{type:"switch",id:"frame",value:!1,hidden:!0}]}],a={Panels:{plugins:"Plugins",themes:"Themes",customcss:"Custom CSS"},Collections:{settings:{name:"Settings",general:{name:"General",emotes:{name:"Emote System",note:"Enables BD's emote system"},publicServers:{name:"Public Servers",note:"Display public servers button"},voiceDisconnect:{name:"Voice Disconnect",note:"Disconnect from voice server when closing Discord"},twentyFourHour:{name:"24-Hour Timestamps",note:"Hides channels when in minimal mode"},classNormalizer:{name:"Normalize Classes",note:"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)"},showToasts:{name:"Show Toasts",note:"Shows a small notification for important information"}},appearance:{name:"Appearance",voiceMode:{name:"Voice Mode",note:"Hides everything that isn't voice chat"},minimalMode:{name:"Minimal Mode",note:"Hide elements and reduce the size of elements"},hideChannels:{name:"Hide Channels",note:"Hides channels when in minimal mode"},darkMode:{name:"Dark Mode",note:"Make certain elements dark by default"},coloredText:{name:"Colored Text",note:"Make text colour the same as role color"}},addons:{name:"Addon Manager",addonErrors:{name:"Show Addon Errors",note:"Shows a modal with plugin/theme errors"},autoScroll:{name:"Scroll To Settings",note:"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)"},autoReload:{name:"Automatic Loading",note:"Automatically loads, reloads, and unloads plugins and themes"},editAction:{name:"Edit Action",note:"Where plugins & themes appear when editing",options:{detached:"Detached Window",system:"System Editor"}}},customcss:{name:"Custom CSS",customcss:{name:"Custom CSS",note:"Enables the Custom CSS tab"},liveUpdate:{name:"Live Update",note:"Updates the css as you type"},startDetached:{name:"Start Detached",note:"Clicking the Custom CSS tab opens the editor in a separate window"},nativeOpen:{name:"Open in Native Editor",note:"Clicking the Custom CSS tab opens your custom css in your native editor"},openAction:{name:"Editor Location",note:"Where Custom CSS should open by default",options:{settings:"Settings Menu",detached:"Detached Window",system:"System Editor"}}},developer:{name:"Developer Settings",debuggerHotkey:{name:"Debugger Hotkey",note:"Allows activating debugger when pressing F8"},copySelector:{name:"Copy Selector",note:'Adds a "Copy Selector" option to context menus when developer mode is active'},reactDevTools:{name:"React Developer Tools",note:"Injects your local installation of React Developer Tools into Discord"}},window:{name:"Window Preferences",transparency:{name:"Enable Transparency",note:"Enables the main window to be see-through (requires restart)"},frame:{name:"Window Frame",note:"Adds the native os window frame to the main window"}}},emotes:{name:"Emotes",general:{name:"General",download:{name:"Download Emotes",note:"Download emotes whenever they are out of date"},emoteMenu:{name:"Emote Menu",note:"Show Twitch/Favourite emotes in emote menu"},hideEmojiMenu:{name:"Hide Emoji Menu",note:"Hides Discord's emoji menu when using emote menu"},autoCaps:{name:"Emote Autocapitalization",note:"Autocapitalize emote commands"},showNames:{name:"Show Names",note:"Show emote names on hover"},modifiers:{name:"Show Emote Modifiers",note:"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)"},animateOnHover:{name:"Animate On Hover",note:"Only animate the emote modifiers on hover"}},categories:{name:"Categories",twitchglobal:{name:"Twitch Globals",note:"Show Twitch global emotes"},twitchsubscriber:{name:"Twitch Subscribers",note:"Show Twitch subscriber emotes"},frankerfacez:{name:"FrankerFaceZ",note:"Show emotes from FFZ"},bttv:{name:"BetterTTV",note:"Show emotes from BTTV"}}}},Addons:{title:"{{name}} v{{version}} by {{author}}",openFolder:"Open {{type}} Folder",reload:"Reload",addonSettings:"Settings",website:"Website",source:"Source",invite:"Support Server",donate:"Donate",patreon:"Patreon",name:"Name",author:"Author",version:"Version",added:"Date Added",modified:"Date Modified",search:"Search {{type}}",editAddon:"Edit",deleteAddon:"Delete",confirmDelete:"Are you sure you want to delete {{name}}?",confirmationText:"You have unsaved changes to {{name}}. Closing this window will lose all those changes.",enabled:"{{name}} has been enabled.",disabled:"{{name}} has been disabled.",couldNotEnable:"{{name}} could not be enabled.",couldNotDisable:"{{name}} could not be disabled.",couldNotStart:"{{name}} could not be started.",couldNotStop:"{{name}} could not be stopped.",methodError:"{{method}} could not be fired.",unknownAuthor:"Unknown Author",noDescription:"Description not provided."},CustomCSS:{confirmationText:"You have unsaved changes to your Custom CSS. Closing this window will lose all those changes.",update:"Update",save:"Save",openNative:"Open in System Editor",openDetached:"Detach Window",settings:"Editor Settings",editorTitle:"Custom CSS Editor"},Developer:{copySelector:"Copy Selector"},Emotes:{loading:"Loading emotes in the background do not reload.",loaded:"All emotes successfully loaded.",clearEmotes:"Clear Emote Data",favoriteAction:"Favorite!"},PublicServers:{button:"public",join:"Join",joining:"Joining",joined:"Joined",loading:"Loading",loadMore:"Load More",notConnected:"Not connected to DiscordServers.com!",search:"Search",connect:"Connect",reconnect:"Reconnect",categories:"Categories",connection:"Connected as: {{username}}#{{discriminator}}",results:"Showing {{start}}-{{end}} of {{total}} results in {{category}}",query:"for {{query}}"},Modals:{confirmAction:"Are You Sure?",okay:"Okay",cancel:"Cancel",close:"Close",name:"Name",message:"Message",error:"Error",addonErrors:"Addon Errors",restartRequired:"Restart Required",restartNow:"Restart Now",restartLater:"Restart Later",additionalInfo:"Additional Info"},ReactDevTools:{notFound:"Extension Not Found",notFoundDetails:"Unable to find the React Developer Tools extension on your PC. Please install the extension on your local Chrome installation."},Sorting:{sortBy:"Sort By",order:"Order",ascending:"Ascending",descending:"Descending"},Startup:{notSupported:"Not Supported",versionMismatch:"BandagedBD Injector v{{injector}} is not supported by the latest remote (v{{remote}}).\n\nPlease download the latest version from [GitHub](https://github.com/rauenzi/BetterDiscordApp/releases/latest)",incompatibleApp:"BandagedBD does not work with {{app}}. Please uninstall one of them.",updateNow:"Update Now",maybeLater:"Maybe Later",updateAvailable:"Update Available",updateInfo:"There is an update available for BandagedBD's Injector ({{version}}).\n\nYou can either update and restart now, or later.",updateFailed:"Could Not Update",manualUpdate:"Unable to update automatically, please download the installer and reinstall normally.\n\n[Download Installer](https://github.com/rauenzi/BetterDiscordApp/releases/latest)",jqueryFailed:"jQuery Failed To Load",jqueryFailedDetails:"jQuery could not be loaded, and some plugins may not work properly. Proceed at your own risk."},WindowPrefs:{enabledInfo:"This option requires a transparent theme in order to work properly. On Windows this may break your aero snapping and maximizing.\n\nIn order to take effect, Discord needs to be restarted. Do you want to restart now?",disabledInfo:"In order to take effect, Discord needs to be restarted. Do you want to restart now?"}},l={description:"Don't be shocked, this modal is supposed to be here.",changes:[{title:"What's New?",items:["**BandagedBD will now keep you updated with changelogs!** I will try to only show a changelog when there's more than a tiny or internal change.","**Twitter (@BandagedBD)** I created a Twitter to try and provide support and such for those without access to the server. https://Twitter.com/BandagedBD"]},{title:"Fixes",type:"fixed",items:["**Colored Text** option should work again.","**Emotes** should show up in chat.","Fixed a bug where BBD attempted to patch the TabBar module incorrectly. (Thanks, DevilBro)"]},{title:"Minor Stuff",type:"improved",items:["**Colour->Color.** Swapped to using English-US spelling by default to be consistent, and to potentially be prepared for localization.","**Versions simplified.** The BandagedBD version now integrates into Discord's at the bottom-left of settings instead of randomly being a part of the setting list."]}]};const d={err:"error",error:"error",dbg:"debug",debug:"debug",log:"log",warn:"warn",info:"info"};class c{static stacktrace(e,t,s){console.error(`%c[${e}]%c ${t}\n\n%c`,"color: #3a71c1; font-weight: 700;","color: red; font-weight: 700;","color: red;",s)}static err(e,...t){c._log(e,t,"error")}static warn(e,...t){c._log(e,t,"warn")}static info(e,...t){c._log(e,t,"info")}static debug(e,...t){c._log(e,t,"debug")}static log(e,...t){c._log(e,t)}static _log(e,t,s="log"){s=c.parseType(s),Array.isArray(t)||(t=[t]),console[s](`%c[BandagedBD]%c [${e}]%c`,"color: #3E82E5; font-weight: 700;","color: #3a71c1;","",...t)}static parseType(e){return d.hasOwnProperty(e)?d[e]:"log"}}class h{static escapeID(e){return e.replace(/^[^a-z]+|[^\w-]+/gi,"-")}static addStyle(e,t){document.head.append(h.createElement(``))}static removeStyle(e){const t=document.getElementById(e);t&&t.remove()}static addScript(e,t){return new Promise(s=>{const n=document.createElement("script");n.id=e,n.src=t,n.type="text/javascript",n.onload=s,document.head.append(n)})}static removeScript(e){e=this.escapeID(e);const t=document.getElementById(e);t&&t.remove()}static animate({timing:e=(e=>e),update:t,duration:s}){const n=performance.now();requestAnimationFrame((function i(o){let r=(o-n)/s;r>1&&(r=1);const a=e(r);t(a),r<1&&requestAnimationFrame(i)}))}static Q(e){const t=this.parseHTML(e);return(t instanceof NodeList?Array.from(t).some(e=>1===e.nodeType):1===t.nodeType)?t:this.query(e)}static query(e,t){return t||(t=document),t.querySelector(e)}static queryAll(e,t){return t||(t=document),t.querySelectorAll(e)}static parseHTML(e,t=!1){const s=document.createElement("template");s.innerHTML=e;const n=s.content.cloneNode(!0);return t?n:n.childNodes.length>1?n.childNodes:n.childNodes[0]}static createElement(e,t=!1){return this.parseHTML(e,t)}static escapeHTML(e){const t=document.createTextNode(""),s=document.createElement("span");return s.append(t),t.nodeValue=e,s.innerHTML}static addClass(e,...t){t=t.flat().filter(e=>e);for(let e=0;ee),e.classList.add(...t),e}static removeClass(e,...t){for(let e=0;ee),e.classList.remove(...t),e}static toggleClass(e,t,s){return t=t.toString().split(" ").filter(e=>e),void 0!==s?t.forEach(t=>e.classList.toggle(t,s)):t.forEach(t=>e.classList.toggle(t)),e}static hasClass(e,t){return t.toString().split(" ").filter(e=>e).every(t=>e.classList.contains(t))}static replaceClass(e,t,s){return e.classList.replace(t,s),e}static appendTo(e,t){return"string"==typeof t&&(t=this.query(t)),t?(t.append(e),e):null}static prependTo(e,t){return"string"==typeof t&&(t=this.query(t)),t?(t.prepend(e),e):null}static insertAfter(e,t){return t.parentNode.insertBefore(e,t.nextSibling),e}static after(e,t){return e.parentNode.insertBefore(t,e.nextSibling),e}static next(e,t=""){return t?e.querySelector("+ "+t):e.nextElementSibling}static nextAll(e){return e.querySelectorAll("~ *")}static nextUntil(e,t){const s=[];for(;e.nextElementSibling&&!e.nextElementSibling.matches(t);)s.push(e=e.nextElementSibling);return s}static previous(e,t=""){const s=e.previousElementSibling;return t?s&&s.matches(t)?s:null:s}static previousAll(e){const t=[];for(;e.previousElementSibling;)t.push(e=e.previousElementSibling);return t}static previousUntil(e,t){const s=[];for(;e.previousElementSibling&&!e.previousElementSibling.matches(t);)s.push(e=e.previousElementSibling);return s}static indexInParent(e){const t=e.parentNode.childNodes;let s=0;for(let n=0;n "+t)}static findChildren(e,t){return e.querySelectorAll(":scope > "+t)}static parents(e,t=""){const s=[];if(t)for(;e.parentElement&&e.parentElement.closest(t);)s.push(e=e.parentElement.closest(t));else for(;e.parentElement;)s.push(e=e.parentElement);return s}static parentsUntil(e,t){const s=[];for(;e.parentElement&&!e.parentElement.matches(t);)s.push(e=e.parentElement);return s}static siblings(e,t="*"){return Array.from(e.parentElement.children).filter(s=>s!=e&&s.matches(t))}static css(e,t,s){return void 0===s?global.getComputedStyle(e)[t]:(e.style[t]=s,e)}static width(e,t){return void 0===t?parseInt(getComputedStyle(e).width):(e.style.width=t,e)}static height(e,t){return void 0===t?parseInt(getComputedStyle(e).height):(e.style.height=t,e)}static text(e,t){return void 0===t?e.textContent:e.textContent=t}static innerWidth(e){return e.clientWidth}static innerHeight(e){return e.clientHeight}static outerWidth(e){return e.offsetWidth}static outerHeight(e){return e.offsetHeight}static offset(e){return e.getBoundingClientRect()}static get listeners(){return this._listeners||(this._listeners={})}static on(e,t,s,n){const[i,o]=t.split("."),r=s&&n;n||(n=s);const a=r?function(e){e.target.matches(s)&&n(e)}:n;e.addEventListener(i,a);const l=()=>{e.removeEventListener(i,a)};if(o){this.listeners[o]||(this.listeners[o]=[]);const t=()=>{l(),this.listeners[o].splice(this.listeners[o].findIndex(t=>t.event==i&&t.element==e),1)};return this.listeners[o].push({event:i,element:e,cancel:t}),t}return l}static once(e,t,s,n){const[i,o]=t.split("."),r=s&&n;n||(n=s);const a=r?function(t){t.target.matches(s)&&(n(t),e.removeEventListener(i,a))}:function(t){n(t),e.removeEventListener(i,a)};e.addEventListener(i,a);const l=()=>{e.removeEventListener(i,a)};if(o){this.listeners[o]||(this.listeners[o]=[]);const t=()=>{l(),this.listeners[o].splice(this.listeners[o].findIndex(t=>t.event==i&&t.element==e),1)};return this.listeners[o].push({event:i,element:e,cancel:t}),t}return l}static __offAll(e,t){const[s,n]=e.split(".");let i=e=>e.event==s,o=e=>e;t&&(i=e=>e.event==s&&e.element==t,o=e=>e.element==t);const r=this.listeners[n]||[],a=s?r.filter(i):r.filter(o);for(let e=0;e{this.observer.unsubscribe(n),t()};return this.observer.subscribe(n,t=>{const n=Array.from(s?t.addedNodes:t.removedNodes),i=n.indexOf(e)>-1,o=n.some(t=>t.contains(e));return i||o}),e}static onMount(e,t){return this.onMountChange(e,t)}static onUnmount(e,t){return this.onMountChange(e,t,!1)}static onAdded(e,t){return this.onMount(e,t)}static onRemoved(e,t){return this.onUnmount(e,t,!1)}static wrap(e){const t=this.parseHTML('
');for(let s=0;s1?n.childNodes:n.childNodes[0]}static getTextArea(){return h.query(".channelTextArea-1LDbYG textarea")}static insertText(e,t){e.focus(),e.selectionStart=0,e.selectionEnd=e.value.length,document.execCommand("insertText",!1,t)}static escape(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}static testJSON(e){try{return JSON.parse(e)}catch(e){return!1}}static suppressErrors(e,t){return(...s)=>{try{return e(...s)}catch(e){c.stacktrace("SuppressedError","Error occurred in "+t,e)}}}static onRemoved(e,t){const s=new MutationObserver(n=>{for(let i=0;i-1,l=r.some(t=>t.contains(e));(a||l)&&(s.disconnect(),t())}});s.observe(document.body,{subtree:!0,childList:!0})}static isEmpty(e){if(null==e||null==e||""==e)return!0;if("object"!=typeof e)return!1;if(Array.isArray(e))return 0==e.length;for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}static memoizeObject(e){const t=new Proxy(e,{get:function(e,t){if(e.hasOwnProperty(t)){if(Object.getOwnPropertyDescriptor(e,t).get){const s=e[t];delete e[t],e[t]=s}return e[t]}},set:function(e,t,s){return e.hasOwnProperty(t)?c.error("MemoizedObject","Trying to overwrite existing property"):(e[t]=s,e[t])}});return Object.defineProperty(t,"hasOwnProperty",{value:function(e){return void 0!==this[e]}}),t}static extend(e,...t){for(let s=0;se.startsWith("__reactInternalInstance"))]||null}static getOwnerInstance(e,{include:t,exclude:s=["Popout","Tooltip","Scroller","BackgroundFlash"],filter:n=(e=>e)}={}){if(void 0===e)return;const i=void 0===t,o=i?s:t;function r(e){const t=function(e){const t=e.type;return t&&(t.displayName||t.name)||null}(e);return null!==t&&!!(o.includes(t)^i)}let a=this.getReactInstance(e);for(a=a&&a.return;null!==a;a=a.return){if(null===a)continue;const e=a.stateNode;if(null!==a&&!(e instanceof HTMLElement)&&r(a)&&n(e))return e}return null}}class p{static byProperties(e,t=(e=>e)){return s=>{const n=t(s);return!!n&&e.every(e=>void 0!==n[e])}}static byPrototypeFields(e,t=(e=>e)){return s=>{const n=t(s);return!!n&&(!!n.prototype&&e.every(e=>void 0!==n.prototype[e]))}}static byCode(e,t=(e=>e)){return s=>{const n=t(s);return!!n&&-1!==n.toString([]).search(e)}}static byString(...e){return t=>{const s=t.toString([]);for(const t of e)if(!s.includes(t))return!1;return!0}}static byDisplayName(e){return t=>t&&t.displayName===e}static combine(...e){return t=>e.every(e=>e(t))}}const m=e=>{if(e.remove&&e.set&&e.clear&&e.get&&!e.sort)return null;if(!e.getToken&&!e.getEmail&&!e.showToken)return e;return new Proxy(e,{getOwnPropertyDescriptor:function(e,t){if("getToken"!==t&&"getEmail"!==t&&"showToken"!==t)return Object.getOwnPropertyDescriptor(e,t)},get:function(e,t){return"getToken"==t?()=>"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa":"getEmail"==t?()=>"puppet11112@gmail.com":"showToken"==t?()=>!0:e[t]}})};class g{static find(e,t=!0){return this.getModule(e,t)}static findAll(e){return this.getModule(e,!1)}static findByUniqueProperties(e,t=!0){return t?this.getByProps(...e):this.getAllByProps(...e)}static findByDisplayName(e){return this.getByDisplayName(e)}static getModule(e,t=!0){const s=this.getAllModules(),n=[];for(const i in s){if(!s.hasOwnProperty(i))continue;const o=s[i],{exports:r}=o;let a=null;if(r&&(r.__esModule&&r.default&&e(r.default)&&(a=r.default),e(r)&&(a=r),a)){if(t)return m(a);n.push(m(a))}}return t||0==n.length?void 0:n}static getModules(e){return this.getModule(e,!1)}static getByDisplayName(e){return this.getModule(p.byDisplayName(e),!0)}static getByRegex(e,t=!0){return this.getModule(p.byCode(e),t)}static getByPrototypes(...e){return this.getModule(p.byPrototypeFields(e),!0)}static getAllByPrototypes(...e){return this.getModule(p.byPrototypeFields(e),!1)}static getByProps(...e){return this.getModule(p.byProperties(e),!0)}static getAllByProps(...e){return this.getModule(p.byProperties(e),!1)}static getByString(...e){return this.getModule(p.byString(...e),!0)}static getAllByString(...e){return this.getModule(p.byString(...e),!1)}static get require(){if(this._require)return this._require;const e="bbd-webpackmodules",t="function"==typeof window.webpackJsonp?window.webpackJsonp([],{[e]:(e,t,s)=>t.default=s},[e]).default:window.webpackJsonp.push([[],{[e]:(e,t,s)=>e.exports=s},[[e]]]);return delete t.m[e],delete t.c[e],this._require=t}static getAllModules(){return this.require.c}}var f=u.memoizeObject({get React(){return g.getByProps("createElement","cloneElement")},get ReactDOM(){return g.getByProps("render","findDOMNode")},get Flux(){return g.getByProps("connectStores")},get Events(){return g.getByPrototypes("setMaxListeners","emit")},get GuildStore(){return g.getByProps("getGuild")},get SortedGuildStore(){return g.getByProps("getSortedGuilds")},get SelectedGuildStore(){return g.getByProps("getLastSelectedGuildId")},get GuildSync(){return g.getByProps("getSyncedGuilds")},get GuildInfo(){return g.getByProps("getAcronym")},get GuildChannelsStore(){return g.getByProps("getChannels","getDefaultChannel")},get GuildMemberStore(){return g.getByProps("getMember")},get MemberCountStore(){return g.getByProps("getMemberCounts")},get GuildEmojiStore(){return g.getByProps("getEmojis")},get GuildActions(){return g.getByProps("markGuildAsRead")},get GuildPermissions(){return g.getByProps("getGuildPermissions")},get ChannelStore(){return g.getByProps("getChannels","getDMFromUserId")},get SelectedChannelStore(){return g.getByProps("getLastSelectedChannelId")},get ChannelActions(){return g.getByProps("selectChannel")},get PrivateChannelActions(){return g.getByProps("openPrivateChannel")},get ChannelSelector(){return g.getByProps("selectGuild","selectChannel")},get UserInfoStore(){return g.getByProps("getToken")},get UserSettingsStore(){return g.getByProps("guildPositions")},get AccountManager(){return g.getByProps("register","login")},get UserSettingsUpdater(){return g.getByProps("updateRemoteSettings")},get OnlineWatcher(){return g.getByProps("isOnline")},get CurrentUserIdle(){return g.getByProps("getIdleTime")},get RelationshipStore(){return g.getByProps("isBlocked","getFriendIDs")},get RelationshipManager(){return g.getByProps("addRelationship")},get MentionStore(){return g.getByProps("getMentions")},get UserStore(){return g.getByProps("getCurrentUser")},get UserStatusStore(){return g.getByProps("getStatus","getState")},get UserTypingStore(){return g.getByProps("isTyping")},get UserActivityStore(){return g.getByProps("getActivity")},get UserNameResolver(){return g.getByProps("getName")},get UserNoteStore(){return g.getByProps("getNote")},get UserNoteActions(){return g.getByProps("updateNote")},get EmojiInfo(){return g.getByProps("isEmojiDisabled")},get EmojiUtils(){return g.getByProps("getGuildEmoji")},get EmojiStore(){return g.getByProps("getByCategory","EMOJI_NAME_RE")},get InviteStore(){return g.getByProps("getInvites")},get InviteResolver(){return g.getByProps("findInvite")},get InviteActions(){return g.getByProps("acceptInvite")},get DiscordConstants(){return g.getByProps("Permissions","ActivityTypes","StatusTypes")},get DiscordPermissions(){return g.getByProps("Permissions","ActivityTypes","StatusTypes").Permissions},get PermissionUtils(){return g.getByProps("getHighestRole")},get ColorConverter(){return g.getByProps("hex2int")},get ColorShader(){return g.getByProps("darken")},get TinyColor(){return g.getByPrototypes("toRgb")},get ClassResolver(){return g.getByProps("getClass")},get ButtonData(){return g.getByProps("ButtonSizes")},get IconNames(){return g.getByProps("IconNames")},get NavigationUtils(){return g.getByProps("transitionTo","replaceWith","getHistory")},get MessageStore(){return g.getByProps("getMessages")},get MessageActions(){return g.getByProps("jumpToMessage","_sendMessage")},get MessageQueue(){return g.getByProps("enqueue")},get MessageParser(){return g.getByProps("createMessage","parse","unparse")},get hljs(){return g.getByProps("highlight","highlightBlock")},get SimpleMarkdown(){return g.getByProps("parseBlock","parseInline","defaultOutput")},get ExperimentStore(){return g.getByProps("getExperimentOverrides")},get ExperimentsManager(){return g.getByProps("isDeveloper")},get CurrentExperiment(){return g.getByProps("getExperimentId")},get ImageResolver(){return g.getByProps("getUserAvatarURL","getGuildIconURL")},get ImageUtils(){return g.getByProps("getSizedImageSrc")},get AvatarDefaults(){return g.getByProps("getUserAvatarURL","DEFAULT_AVATARS")},get WindowInfo(){return g.getByProps("isFocused","windowSize")},get TagInfo(){return g.getByProps("VALID_TAG_NAMES")},get DOMInfo(){return g.getByProps("canUseDOM")},get LocaleManager(){return g.getByProps("setLocale")},get Moment(){return g.getByProps("parseZone")},get LocationManager(){return g.getByProps("createLocation")},get Timestamps(){return g.getByProps("fromTimestamp")},get TimeFormatter(){return g.getByProps("dateFormat")},get Strings(){return g.getByProps("Messages").Messages},get StringFormats(){return g.getByProps("a","z")},get StringUtils(){return g.getByProps("toASCII")},get URLParser(){return g.getByProps("Url","parse")},get ExtraURLs(){return g.getByProps("getArticleURL")},get DNDActions(){return g.getByProps("beginDrag")},get DNDSources(){return g.getByProps("addTarget")},get DNDObjects(){return g.getByProps("DragSource")},get MediaDeviceInfo(){return g.getByProps("Codecs","SUPPORTED_BROWSERS")},get MediaInfo(){return g.getByProps("getOutputVolume")},get MediaEngineInfo(){return g.getByProps("MediaEngineFeatures")},get VoiceInfo(){return g.getByProps("EchoCancellation")},get VideoStream(){return g.getByProps("getVideoStream")},get SoundModule(){return g.getByProps("playSound")},get ElectronModule(){return g.getByProps("setBadge")},get Dispatcher(){return g.getByProps("dirtyDispatch")},get PathUtils(){return g.getByProps("hasBasename")},get NotificationModule(){return g.getByProps("showNotification")},get RouterModule(){return g.getByProps("Router")},get APIModule(){return g.getByProps("getAPIBaseURL")},get AnalyticEvents(){return g.getByProps("AnalyticEventConfigs")},get KeyGenerator(){return g.getByRegex(/"binary"/)},get Buffers(){return g.getByProps("Buffer","kMaxLength")},get DeviceStore(){return g.getByProps("getDevices")},get SoftwareInfo(){return g.getByProps("os")},get CurrentContext(){return g.getByProps("setTagsContext")},get GuildClasses(){const e=g.getByProps("wrapper","unreadMentionsBar"),t=g.getByProps("guildsError","selected"),s=g.getByProps("blobContainer");return Object.assign({},e,t,s)},get LayerStack(){return g.getByProps("pushLayer")}});const y=s(2),b=s(1),v=DiscordNative.globals?DiscordNative.globals.releaseChannel:DiscordNative.app?DiscordNative.app.getReleaseChannel():"stable";var w=new class{constructor(){this.data={misc:{}},this.pluginData={},this.cacheData={}}initialize(){y.existsSync(this.baseFolder)||y.mkdirSync(this.baseFolder),y.existsSync(this.dataFolder)||y.mkdirSync(this.dataFolder),y.existsSync(this.localeFolder)||y.mkdirSync(this.localeFolder),y.existsSync(this.emoteFolder)||y.mkdirSync(this.emoteFolder),y.existsSync(this.cacheFile)||y.writeFileSync(this.cacheFile,JSON.stringify({})),y.existsSync(this.customCSS)||y.writeFileSync(this.customCSS,"");const e=y.readdirSync(this.dataFolder).filter(e=>!y.statSync(b.resolve(this.dataFolder,e)).isDirectory()&&e.endsWith(".json"));for(const t of e)this.data[t.split(".")[0]]=require(b.resolve(this.dataFolder,t));this.cacheData=u.testJSON(y.readFileSync(this.cacheFile).toString())||{}}get injectionPath(){if(this._injectionPath)return this._injectionPath;const e=s(0).remote.app,t=e.getAppPath(),n=e.getPath("userData"),i=b.resolve(n,e.getVersion(),"modules","discord_desktop_core","injector"),o=b.resolve(t,"..","app"),r=y.existsSync(o)?o:y.existsSync(i)?i:null;return this._injectionPath=r||null}get customCSS(){return this._customCSS||(this._customCSS=b.resolve(this.dataFolder,"custom.css"))}get baseFolder(){return this._baseFolder||(this._baseFolder=b.resolve(i.dataPath,"data"))}get dataFolder(){return this._dataFolder||(this._dataFolder=b.resolve(this.baseFolder,""+v))}get localeFolder(){return this._localeFolder||(this._localeFolder=b.resolve(this.baseFolder,"locales"))}get emoteFolder(){return this._emoteFolder||(this._emoteFolder=b.resolve(this.baseFolder,"emotes"))}get cacheFile(){return this._cacheFile||(this._cacheFile=b.resolve(this.baseFolder,".cache"))}getPluginFile(e){return b.resolve(i.dataPath,"plugins",e+".config.json")}_getFile(e){return"settings"==e||"plugins"==e||"themes"==e||"window"==e?b.resolve(this.dataFolder,e+".json"):b.resolve(this.dataFolder,"misc.json")}getBDData(e){return this.data.misc[e]||""}setBDData(e,t){this.data.misc[e]=t,y.writeFileSync(b.resolve(this.dataFolder,"misc.json"),JSON.stringify(this.data.misc,null,4))}getLocale(e){const t=b.resolve(this.localeFolder,e+".json");return y.existsSync(t)?u.testJSON(y.readFileSync(t).toString()):null}saveLocale(e,t){y.writeFileSync(b.resolve(this.localeFolder,e+".json"),JSON.stringify(t,null,4))}getCacheHash(e,t){return this.cacheData[e]&&y.existsSync(b.resolve(this.baseFolder,e,t+".json"))&&this.cacheData[e][t]||""}setCacheHash(e,t,s){this.cacheData[e]||(this.cacheData[e]={}),this.cacheData[e][t]=s,y.writeFileSync(this.cacheFile,JSON.stringify(this.cacheData))}invalidateCache(e,t){this.cacheData[e]&&(delete this.cacheData[e][t],y.writeFileSync(this.cacheFile,JSON.stringify(this.cacheData)))}emotesExist(e){return y.existsSync(b.resolve(this.emoteFolder,e+".json"))}getEmoteData(e){const t=b.resolve(this.emoteFolder,e+".json");return y.existsSync(t)?u.testJSON(y.readFileSync(t).toString()):null}saveEmoteData(e,t){y.writeFileSync(b.resolve(this.emoteFolder,e+".json"),JSON.stringify(t))}getData(e){return this.data[e]||""}setData(e,t){this.data[e]=t,y.writeFileSync(b.resolve(this.dataFolder,e+".json"),JSON.stringify(t,null,4))}loadCustomCSS(){return y.readFileSync(this.customCSS).toString()}saveCustomCSS(e){return y.writeFileSync(this.customCSS,e)}getPluginData(e,t){return void 0!==this.pluginData[e]?this.pluginData[e][t]||void 0:y.existsSync(this.getPluginFile(e))?(this.pluginData[e]=JSON.parse(y.readFileSync(this.getPluginFile(e))),this.pluginData[e][t]||void 0):void 0}setPluginData(e,t,s){void 0!==s&&(void 0===this.pluginData[e]&&(this.pluginData[e]={}),this.pluginData[e][t]=s,y.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4)))}deletePluginData(e,t){void 0===this.pluginData[e]&&(this.pluginData[e]={}),delete this.pluginData[e][t],y.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4))}};class C{static get bdHead(){return this.getElement("bd-head")}static get bdBody(){return this.getElement("bd-body")}static get bdScripts(){return this.getElement("bd-scripts")}static get bdStyles(){return this.getElement("bd-styles")}static get bdThemes(){return this.getElement("bd-themes")}static get bdCustomCSS(){return this.getElement("#customcss")}static escapeID(e){return e.replace(/^[^a-z]+|[^\w-]+/gi,"-")}static getElement(e,t=document){return e instanceof Node?e:t.querySelector(e)}static createElement(e,t={}){const{className:s,id:n,target:i}=t,o=document.createElement(e);return s&&(o.className=s),n&&(o.id=n),i&&this.getElement(i).append(o),o}static removeStyle(e){e=this.escapeID(e);const t=this.getElement("#"+e,this.bdStyles);t&&t.remove()}static injectStyle(e,t){e=this.escapeID(e);const s=this.getElement("#"+e,this.bdStyles)||this.createElement("style",{id:e});s.textContent=t,this.bdStyles.append(s)}static unlinkStyle(e){return this.removeStyle(e)}static linkStyle(e,t){return e=this.escapeID(e),new Promise(s=>{const n=this.getElement("#"+e,this.bdStyles)||this.createElement("link",{id:e});n.rel="stylesheet",n.href=t,n.onload=s,this.bdStyles.append(n)})}static removeTheme(e){e=this.escapeID(e);const t=this.getElement("#"+e,this.bdThemes);t&&t.remove()}static injectTheme(e,t){e=this.escapeID(e);const s=this.getElement("#"+e,this.bdThemes)||this.createElement("style",{id:e});s.textContent=t,this.bdThemes.append(s)}static updateCustomCSS(e){this.bdCustomCSS.textContent=e}static removeScript(e){e=this.escapeID(e);const t=this.getElement("#"+e,this.bdScripts);t&&t.remove()}static injectScript(e,t){return e=this.escapeID(e),new Promise(s=>{const n=this.getElement("#"+e,this.bdScripts)||this.createElement("script",{id:e});n.src=t,n.onload=s,this.bdScripts.append(n)})}}C.createElement("bd-head",{target:document.head}),C.createElement("bd-body",{target:document.body}),C.createElement("bd-scripts",{target:C.bdHead}),C.createElement("bd-styles",{target:C.bdHead}),C.createElement("bd-themes",{target:C.bdHead}),C.createElement("style",{id:"customcss",target:C.bdHead});const S=s(5);var E=new class extends S{constructor(){super(),this.setMaxListeners(20)}dispatch(e,...t){this.emit(e,...t)}};const M=s(3),{Dispatcher:x,DiscordConstants:N,UserSettingsStore:P}=f;var D=new class{get discordLocale(){return P.locale.split("-")[0]}get defaultLocale(){return"en"}constructor(){this.locale="",this.strings={}}async initialize(){await this.setLocale(this.discordLocale),x.subscribe(N.ActionTypes.USER_SETTINGS_UPDATE,({settings:e})=>{const t=e.locale;t&&t!=this.locale&&this.setLocale(t.split("-")[0])})}async setLocale(e){let t;if(e!=this.defaultLocale){if(t=await this.getLocaleStrings(e),!t)return this.setLocale(this.defaultLocale)}else t=a;this.locale=e,u.extend(this.strings,t),E.emit("strings-updated")}async getLocaleStrings(e){const t=w.getCacheHash("locales",e);if(!t)return await this.downloadLocale(e);const s=await this.downloadLocale(e,t);return s||w.getLocale(e)}downloadLocale(e,t=""){return new Promise(s=>{const n={url:u.repoUrl(`data/locales/${e}.json`),timeout:2e3,json:!0};t&&(n.headers={"If-None-Match":t}),M.get(n,(t,n,i)=>{if(t||200!==n.statusCode)return s(null);w.saveLocale(e,i),w.setCacheHash("locales",e,n.headers.etag),s(i)})})}};class A extends String{format(e){return u.formatString(this,e)}}var k=new Proxy(D.strings,{get:function(e,t){return e.hasOwnProperty(t)?new Proxy(e[t],{get:function(e,t){return"string"==typeof e[t]?new A(e[t]):e[t]}}):new Proxy({},{get:function(){return`String group "${t}" not found.`}})}}),T=new class{constructor(){this.state={},this.collections=[],this.panels=[],this.updateStrings=this.updateStrings.bind(this)}initialize(){this.registerCollection("settings","Settings",r),E.on("strings-updated",this.updateStrings)}registerCollection(e,t,s,n=null){if(this.collections.find(t=>t.id==e))return c.error("Settings","Already have a collection with id "+e);this.collections.push({type:"collection",id:e,name:t,settings:s,button:n}),this.setupCollection(e),this.loadCollection(e),this.updateStrings()}removeCollection(e){const t=this.collections.findIndex(t=>t.id==e);if(!t<0)return c.error("Settings","No collection with id "+e);this.collections.splice(t,1)}registerPanel(e,t,s){if(this.panels.find(t=>t.id==e))return c.error("Settings","Already have a panel with id "+e);const{element:n,onClick:i,order:o=1}=s,r={id:e,order:o,label:t,section:e};i&&(r.clickListener=i),n&&(r.element=n instanceof f.React.Component?()=>f.React.createElement(n,{}):"function"==typeof n?n:()=>n),this.panels.push(r)}removePanel(e){const t=this.panels.findIndex(t=>t.id==e);if(!t<0)return c.error("Settings","No collection with id "+e);this.panels.splice(t,1)}getPath(e,t="",s=""){return{collection:3==e.length?e[0]:t,category:3==e.length?e[1]:2==e.length?e[0]:s,setting:e[e.length-1]}}setupCollection(e){const t=this.collections.find(t=>t.id==e);if(!t)return;const s=t.settings;this.state[t.id]||(this.state[t.id]={});for(let e=0;e{const e=this.state[o.collection][o.category][o.setting];return s.enableWith?!e:e}})}}}}saveSettings(){for(const e in this.state)this.saveCollection(e)}loadSettings(){for(const e in this.state)this.loadCollection(e)}saveCollection(e){w.setData(e,this.state[e])}loadCollection(e){const t=w.getData(e);if(!t)return this.saveCollection(e);for(const s in this.state[e]){t[s]||Object.assign(t,{[s]:this.state[e][s]});for(const n in this.state[e][s]){if(null==t[s][n])continue;const i=this.getSetting(e,s,n);if("switch"==i.type&&(this.state[e][s][n]=t[s][n]),"dropdown"==i.type){i.options.some(e=>e.value==t[s][n])&&(this.state[e][s][n]=t[s][n])}}}this.saveCollection(e)}onSettingChange(e,t,s,n){this.state[e][t][s]=n,E.dispatch("setting-updated",e,t,s,n),this.saveCollection(e)}getSetting(e,t,s){return 2==arguments.length?this.collections[0].find(e=>e.id==arguments[0]).settings.find(e=>e.id==arguments[1]):this.collections.find(t=>t.id==e).settings.find(e=>e.id==t).settings.find(e=>e.id==s)}get(e,t,s){return 2==arguments.length&&(s=t,t=e,e="settings"),!(!this.state[e]||!this.state[e][t])&&this.state[e][t][s]}set(e,t,s,n){return 3==arguments.length&&(n=s,s=t,t=e,e="settings"),this.onSettingChange(e,t,s,n)}on(e,t,s,n){const i=(i,o,r,a)=>{i===e&&o===t&&r===s&&n(a)};return E.on("setting-updated",i),()=>{E.off("setting-updated",i)}}updateStrings(){for(let e=0;e"before"===e.type))try{t.callback(this,arguments)}catch(s){c.err("Patcher",`Could not fire before callback of ${e.functionName} for ${t.caller}`,s)}const s=e.children.filter(e=>"instead"===e.type);if(s.length)for(const n of s)try{const s=n.callback(this,arguments,e.originalFunction.bind(this));void 0!==s&&(t=s)}catch(t){c.err("Patcher",`Could not fire instead callback of ${e.functionName} for ${n.caller}`,t)}else t=e.originalFunction.apply(this,arguments);for(const s of e.children.filter(e=>"after"===e.type))try{const e=s.callback(this,arguments,t);void 0!==e&&(t=e)}catch(t){c.err("Patcher",`Could not fire after callback of ${e.functionName} for ${s.caller}`,t)}return t}}static rePatch(e){e.proxyFunction=e.module[e.functionName]=this.makeOverride(e)}static makePatch(e,t,s){const n={name:s,module:e,functionName:t,originalFunction:e[t],proxyFunction:null,revert:()=>{n.module[n.functionName]=n.originalFunction,n.proxyFunction=null,n.children=[]},counter:0,children:[]};return n.proxyFunction=e[t]=this.makeOverride(n),this.patches.push(n),n}static before(e,t,s,n,i={}){return this.pushChildPatch(e,t,s,n,Object.assign(i,{type:"before"}))}static after(e,t,s,n,i={}){return this.pushChildPatch(e,t,s,n,Object.assign(i,{type:"after"}))}static instead(e,t,s,n,i={}){return this.pushChildPatch(e,t,s,n,Object.assign(i,{type:"instead"}))}static pushChildPatch(e,t,s,n,i={}){const{type:o="after",forcePatch:r=!0}=i,a=this.resolveModule(t);if(!a)return null;if(!a[s]&&r&&(a[s]=function(){}),!(a[s]instanceof Function))return null;"string"==typeof t&&(i.displayName=t);const l=`${i.displayName||a.displayName||a.name||a.constructor.displayName||a.constructor.name}.${s}`,d=this.patches.find(e=>e.module==a&&e.functionName==s)||this.makePatch(a,s,l);d.proxyFunction||this.rePatch(d);const c={caller:e,type:o,id:d.counter,callback:n,unpatch:()=>{if(d.children.splice(d.children.findIndex(e=>e.id===c.id&&e.type===o),1),d.children.length<=0){const e=this.patches.findIndex(e=>e.module==a&&e.functionName==s);this.patches[e].revert(),this.patches.splice(e,1)}}};return d.children.push(c),d.counter++,c.unpatch}}const j=f.React,B={},I=new Set,z=new Set;var F=new class{get named(){return B}get unknown(){return I}get listeners(){return z}constructor(){L.after("ReactComponents",j,"createElement",(e,t,s)=>{this.walkRenderTree(s)}),L.instead("ReactComponents",j.Component.prototype,"componentWillMount",e=>{this.addComponent(e.constructor)}),L.instead("ReactComponents",j.Component.prototype,"UNSAFE_componentWillMount",e=>{this.addComponent(e.constructor)}),L.instead("ReactComponents",j.PureComponent.prototype,"componentWillMount",e=>{this.addComponent(e.constructor)}),L.instead("ReactComponents",j.PureComponent.prototype,"UNSAFE_componentWillMount",e=>{this.addComponent(e.constructor)})}initialize(){this.walkReactTree(document.querySelector("#app-mount")._reactRootContainer._internalRoot.current)}get(e,t){return new Promise(s=>{if(B[e])return s(B[e]);if(z.add({name:e,filter:t,resolve:s}),t)for(const s of I)t(s)&&(s.displayName=e,I.delete(s),this.addNamedComponent(s))})}addNamedComponent(e){const t=e.displayName;if(!B[t]){B[t]=e;for(const s of z)s.name===t&&(s.resolve(e),z.delete(s))}}addUnknownComponent(e){if(!I.has(e)){for(const t of z)t.filter&&t.filter(e)&&(e.displayName=t.name,this.addNamedComponent(e));e.displayName||I.add(e)}}addComponent(e){return e.displayName?this.addNamedComponent(e):this.addUnknownComponent(e)}walkRenderTree(e){if(e){if("function"==typeof e.type&&this.addComponent(e.type),Array.isArray(e))for(const t of e)this.walkRenderTree(t);e.props&&e.props.children&&this.walkRenderTree(e.props.children)}}walkReactTree(e){e&&("function"==typeof e.type&&this.addComponent(e.type),e.child&&this.walkReactTree(e.child),e.sibling&&this.walkReactTree(e.sibling))}};const O=f.React,R=f.ReactDOM,U=g.getByProps("sidebar","hasNotice").sidebar.split(" ")[0],H=g.getByProps("membersWrap").membersWrap.split(" ")[0];class q{static get shouldShowToasts(){return T.get("settings","general","showToasts")}static async success(e,t={}){return this.show(e,Object.assign(t,{type:"success"}))}static async info(e,t={}){return this.show(e,Object.assign(t,{type:"info"}))}static async warning(e,t={}){return this.show(e,Object.assign(t,{type:"warning"}))}static async error(e,t={}){return this.show(e,Object.assign(t,{type:"error"}))}static async default(e,t={}){return this.show(e,Object.assign(t,{type:""}))}static show(e,t={}){const{type:s="",icon:n=!0,timeout:i=3e3,forceShow:o=!1}=t;if(!this.shouldShowToasts&&!o)return;this.ensureContainer();const r=document.createElement("div");r.classList.add("bd-toast"),s&&r.classList.add("toast-"+s),s&&n&&r.classList.add("icon"),r.innerText=e,document.querySelector(".bd-toasts").appendChild(r),setTimeout(()=>{r.classList.add("closing"),setTimeout(()=>{r.remove(),document.querySelectorAll(".bd-toasts .bd-toast").length||document.querySelector(".bd-toasts").remove()},300)},i)}static ensureContainer(){if(document.querySelector(".bd-toasts"))return;const e=document.querySelector(`.${U} + div`),t=e.querySelector("."+H),s=e?e.querySelector("form"):null,n=e?e.getBoundingClientRect().left:310,i=t?t.getBoundingClientRect().left:0,o=i?i-e.getBoundingClientRect().left:e.offsetWidth,r=s?s.offsetHeight:80,a=document.createElement("div");a.classList.add("bd-toasts"),a.style.setProperty("left",n+"px"),a.style.setProperty("width",o+"px"),a.style.setProperty("bottom",r+"px"),C.bdBody.appendChild(a)}}class W{static get shouldShowAddonErrors(){return T.get("settings","addons","addonErrors")}static get ModalActions(){return g.getByProps("openModal","updateModal")}static get ModalStack(){return g.getByProps("push","update","pop","popWithKey")}static get AlertModal(){return g.getByPrototypes("handleCancel","handleSubmit","handleMinorConfirm")}static get TextElement(){return g.getByProps("Sizes","Weights")}static get ConfirmationModal(){return g.findByDisplayName("ConfirmModal")}static get Markdown(){return g.findByDisplayName("Markdown")}static default(e,t){const s=h.createElement(``);s.querySelector(".footer button").addEventListener("click",()=>{s.classList.add("closing"),setTimeout(()=>{s.remove()},300)}),s.querySelector(".bd-backdrop").addEventListener("click",()=>{s.classList.add("closing"),setTimeout(()=>{s.remove()},300)}),document.querySelector("#app-mount").append(s)}static alert(e,t){this.showConfirmationModal(e,t,{cancelText:""})}static showConfirmationModal(e,t,s={}){const n=this.Markdown,i=this.ConfirmationModal,o=this.ModalActions;if(t instanceof A&&(t=t.toString()),!this.ModalActions||!this.ConfirmationModal||!this.Markdown)return this.default(e,t);const r=()=>{},{onConfirm:a=r,onCancel:l=r,confirmText:d=k.Modals.okay,cancelText:c=k.Modals.cancel,danger:h=!1,key:u}=s;return Array.isArray(t)||(t=[t]),t=t.map(e=>"string"==typeof e?O.createElement(n,null,e):e),o.openModal(s=>O.createElement(i,Object.assign({header:e,red:h,confirmText:d,cancelText:c,onConfirm:a,onCancel:l},s),t),{modalKey:u})}static showAddonErrors({plugins:e=[],themes:t=[]}){if(!e||!t||!this.shouldShowAddonErrors)return;if(!e.length&&!t.length)return;const s=h.createElement(`\n
\n
\n
\n \n
\n
\n
\n
${k.Panels.plugins}
\n
${k.Panels.themes}
\n
\n
\n \n
\n
\n \n
\n
\n
`),n=function(e){const t=h.createElement('');for(const s of e){const e=h.createElement(`
\n
${s.name?s.name:s.file}
\n
${s.message}
\n
\n
`);t.append(e),s.error&&e.querySelectorAll("a").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),c.stacktrace("AddonError",`Error details for ${s.name?s.name:s.file}.`,s.error)}))}return t},i=[n(e),n(t)];s.querySelectorAll(".tab-bar-item").forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=s.querySelector(".tab-bar-item.selected");t&&h.removeClass(t,"selected"),h.addClass(e.target,"selected");const n=s.querySelector(".scroller");n.innerHTML="",n.append(i[h.index(e.target)])})),s.querySelector(".footer button").addEventListener("click",()=>{h.addClass(s,"closing"),setTimeout(()=>{s.remove()},300)}),s.querySelector(".bd-backdrop").addEventListener("click",()=>{h.addClass(s,"closing"),setTimeout(()=>{s.remove()},300)}),h.query("#app-mount").append(s),e.length?s.querySelector(".tab-bar-item").click():s.querySelectorAll(".tab-bar-item")[1].click()}static showChangelogModal(e={}){const t=g.getByProps("push","update","pop","popWithKey"),s=g.getByProps("fixed","improved"),n=g.findByDisplayName("Text"),o=g.getByProps("Child"),r=g.getByProps("Tags","default"),a=g.getModule(e=>e.defaultProps&&0==e.defaultProps.selectable),l=g.getByProps("defaultRules","parse");if(!(a&&t&&s&&n&&o&&r&&l))return c.warn("Modals","showChangelogModal missing modules");const{image:d="https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",description:h="",changes:u=[],title:p="BandagedBD",subtitle:m="v"+i.bbdVersion,footer:y}=e,b=O.createElement,v=[b("img",{src:d})];h&&v.push(b("p",null,l.parse(h)));for(let e=0;e
b("li",null,l.parse(e))));v.push(o)}return t.push(a,{className:s.container,selectable:!0,onScroll:e=>e,onClose:e=>e,renderHeader:function(){return b(o.Child,{grow:1,shrink:1},b(r.default,{tag:r.Tags.H4},p),b(n,{size:n.Sizes.SMALL,color:n.Colors.STANDARD,className:s.date},m))},renderFooter:()=>{const e=g.getModule(e=>"Anchor"==e.displayName),s=g.getByProps("anchorUnderlineOnHover")||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"},i=e=>{e.preventDefault(),e.stopPropagation(),t.pop(),f.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j")},r=e?b(e,{onClick:i},"Join our Discord Server."):b("a",{className:`${s.anchor} ${s.anchorUnderlineOnHover}`,onClick:i},"Join our Discord Server."),a=b(n,{size:n.Sizes.SMALL,color:n.Colors.STANDARD},"Need support? ",r);return b(o.Child,{grow:1,shrink:1},y||a)},children:v})}}class _ extends Error{constructor(e,t,s,n){super(s),this.name=e,this.file=t,this.error=n}}class G extends Error{constructor(e){super(e),this.name="MetaError"}}class Q extends O.Component{constructor(e){super(e),this.onClick=this.onClick.bind(this),this.state={checked:this.props.checked||!1}}render(){return O.createElement("div",{className:"checkbox-item"},O.createElement("div",{className:"checkbox-label label-JWQiNe da-label"},this.props.text),O.createElement("div",{className:"checkbox-wrapper checkbox-3kaeSU da-checkbox checkbox-3EVISJ da-checkbox",onClick:this.onClick},O.createElement("div",{className:"checkbox-inner checkboxInner-3yjcPe da-checkboxInner"},O.createElement("input",{className:"checkbox checkboxElement-1qV33p da-checkboxElement",checked:this.state.checked,type:"checkbox"}),O.createElement("span",null)),O.createElement("span",null)))}onClick(){this.props.onChange(!this.state.checked),this.setState({checked:!this.state.checked})}}function V(){return(V=Object.assign||function(e){for(var t=1;t{for(const s of e){if(!(s.addedNodes.length&&s.addedNodes[0]instanceof Element))continue;const e=s.addedNodes[0];e.parentElement===document.body&&e.querySelector("#ace_settingsmenu")&&(e.id="ace_settingsmenu_container",t.disconnect())}});t.observe(document.body,{childList:!0})};const t=this.props.theme==K.defaultProps.theme?this.props.theme.split("-")[1]:this.props.theme;this.editor.setTheme("ace/theme/"+t),this.editor.session.setMode("ace/mode/"+this.props.language),this.editor.setShowPrintMargin(!1),this.editor.setFontSize(this.props.fontSize),this.editor.on("change",this.onChange)}componentWillUnmount(){this.editor.destroy()}get value(){return this.editor.session.getValue()}set value(e){this.editor.setValue(e)}onChange(){this.props.onChange&&this.props.onChange(this.value)}showSettings(){return this.editor.keyBinding.$defaultHandler.commands.showSettingsMenu.exec(this.editor)}resize(){return this.editor.resize()}buildControl(e){return"checkbox"==e.type?this.makeCheckbox(e):this.makeButton(e)}makeCheckbox(e){return O.createElement(Q,{text:e.label,onChange:e.onChange,checked:e.checked})}makeButton(e){return O.createElement(Z,{color:"black",position:"top",text:e.tooltip},t=>O.createElement("button",V({},t,{className:"btn btn-primary",onClick:t=>{e.onClick(t,this.value)}}),e.label))}render(){this.editor&&this.editor.resize&&this.editor.resize();const e=this.props.controls.filter(e=>"right"!=e.side).map(this.buildControl.bind(this)),t=this.props.controls.filter(e=>"right"==e.side).map(this.buildControl.bind(this));return O.createElement("div",{id:"bd-editor-panel",className:this.props.theme},O.createElement("div",{id:"bd-editor-controls"},O.createElement("div",{className:"controls-section controls-left"},e),O.createElement("div",{className:"controls-section controls-right"},t)),O.createElement("div",{className:"editor-wrapper"},O.createElement("div",{id:this.props.id,className:"editor "+this.props.theme},this.props.value)))}}class X extends O.Component{render(){const e=this.props.size||"24px";return O.createElement("svg",{viewBox:"0 0 24 24",style:{width:e,height:e}},O.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),O.createElement("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm2 16H5V5h11.17L19 7.83V19zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zM6 6h9v4H6z"}))}}class ee extends O.Component{render(){const e=this.props.size||"24px";return O.createElement("svg",{viewBox:"0 0 24 24",fill:"#FFFFFF",style:{width:e,height:e},onClick:this.props.onClick},O.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),O.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}}class te extends O.Component{render(){const e=this.props.size||"20px";return O.createElement("svg",{viewBox:"0 0 20 20",style:{width:e,height:e}},O.createElement("path",{fill:"none",d:"M0 0h20v20H0V0z"}),O.createElement("path",{d:"M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}))}}class se extends O.Component{constructor(e){super(e),this.hasUnsavedChanges=!1,this.onChange=this.onChange.bind(this),this.save=this.save.bind(this),this.openNative=this.openNative.bind(this),this.update=this.update.bind(this),this.controls=[{label:O.createElement(X,{size:"18px"}),tooltip:k.CustomCSS.save,onClick:this.save},{label:O.createElement(ee,{size:"18px"}),tooltip:k.CustomCSS.openNative,onClick:this.openNative},{label:O.createElement(te,{size:"18px"}),tooltip:k.CustomCSS.settings,onClick:"showSettings"}]}update(){this.forceUpdate()}updateEditor(e){this.editor&&(this.editor.value=e)}get value(){return this.editor.session.getValue()}set value(e){this.editor.setValue(e)}showSettings(){return this.editor.keyBinding.$defaultHandler.commands.showSettingsMenu.exec(this.editor)}resize(){return this.editor.resize()}setEditorRef(e){this.editor=e,this.props.editorRef&&void 0!==this.props.editorRef.current?this.props.editorRef.current=e:this.props.editorRef&&(this.props.editorRef=e)}render(){return O.createElement(K,{ref:this.setEditorRef.bind(this),language:this.props.language,id:this.props.id||"bd-addon-editor",controls:this.controls,value:this.props.content,onChange:this.onChange})}onChange(){this.hasUnsavedChanges=!0}save(e,t){this.hasUnsavedChanges=!1,this.props.save&&this.props.save(t)}openNative(){this.props.openNative&&this.props.openNative()}}class ne{static get width(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)}static get height(){return Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}class ie extends O.Component{render(){return O.createElement("svg",{viewBox:"0 0 12 12",style:{width:"18px",height:"18px"}},O.createElement("g",{className:"background",fill:"none",fillRule:"evenodd"},O.createElement("path",{d:"M0 0h12v12H0"}),O.createElement("path",{className:"fill",fill:"#dcddde",d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6"})))}}class oe extends O.Component{render(){const e=this.props.size||"24px";return O.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e},onClick:this.props.onClick},O.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),O.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))}}class re extends O.Component{constructor(e){super(e),this.state={modalOpen:!1},this.offX=0,this.offY=0,this.maxX=this.props.maxX||ne.width,this.maxY=this.props.maxY||ne.height,this.minX=this.props.minX||0,this.minY=this.props.minY||0,this.titlebar=O.createRef(),this.window=O.createRef(),this.close=this.close.bind(this),this.maximize=this.maximize.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDragStop=this.onDragStop.bind(this),this.onResizeStart=this.onResizeStart.bind(this)}componentDidMount(){this.window.current.addEventListener("mousedown",this.onResizeStart,!1),this.titlebar.current.addEventListener("mousedown",this.onDragStart,!1),document.addEventListener("mouseup",this.onDragStop,!1)}onResizeStart(){this.currentWidth=this.window.current.offsetWidth,this.currentHeight=this.window.current.offsetHeight}onDragStop(){document.removeEventListener("mousemove",this.onDrag,!0);const e=this.window.current.offsetWidth,t=this.window.current.offsetHeight;if(e!=this.currentWidth||t!=this.currentHeight){this.props.onResize&&this.props.onResize();const s=parseInt(this.window.current.style.left),n=parseInt(this.window.current.style.top);s+e>=this.maxX&&(this.window.current.style.width=this.maxX-s+"px"),n+t>=this.maxY&&(this.window.current.style.height=this.maxY-n+"px")}this.currentWidth=e,this.currentHeight=t}onDragStart(e){const t=this.window.current;this.offY=e.clientY-parseInt(t.offsetTop),this.offX=e.clientX-parseInt(t.offsetLeft),document.addEventListener("mousemove",this.onDrag,!0)}onDrag(e){const t=this.window.current;let s=e.clientY-this.offY;s<=this.minY&&(s=this.minY),s+this.currentHeight>=this.maxY&&(s=this.maxY-this.currentHeight);let n=e.clientX-this.offX;n<=this.minX&&(n=this.minX),n+this.currentWidth>=this.maxX&&(n=this.maxX-this.currentWidth),t.style.top=s+"px",t.style.left=n+"px"}componentWillUnmount(){this.titlebar.current.removeEventListener("mousedown",this.onDragStart,!1),document.removeEventListener("mouseup",this.onDragStop,!1)}render(){const e=this.props.center?ne.height/2-this.props.height/2:this.props.top,t=this.props.center?ne.width/2-this.props.width/2:this.props.left,s=`floating-window${" "+this.props.className||""}${this.props.resizable?" resizable":""}${this.state.modalOpen?" modal-open":""}`,n={height:this.props.height,width:this.props.width,left:t||0,top:e||0};return O.createElement("div",{id:this.props.id,className:s,ref:this.window,style:n},O.createElement("div",{className:"floating-window-titlebar",ref:this.titlebar},O.createElement("span",{className:"title"},this.props.title),O.createElement("div",{className:"floating-window-buttons"},O.createElement("div",{className:"button maximize-button",onClick:this.maximize},O.createElement(oe,{size:"18px"})),O.createElement("div",{className:"button close-button",onClick:this.close},O.createElement(ie,null)))),O.createElement("div",{className:"floating-window-content"},this.props.children))}maximize(){this.window.current.style.width="100%",this.window.current.style.height="100%",this.props.onResize&&this.props.onResize();const e=this.window.current.offsetWidth,t=this.window.current.offsetHeight,s=parseInt(this.window.current.style.left)+e;parseInt(this.window.current.style.top)+t>this.maxY&&(this.window.current.style.top=this.maxY-t+"px"),s>this.maxX&&(this.window.current.style.left=this.maxX-e+"px");const n=parseInt(this.window.current.style.left),i=parseInt(this.window.current.style.top);if(i{W.showConfirmationModal(k.Modals.confirmAction,this.props.confirmationText,{danger:!0,confirmText:k.Modals.close,onConfirm:()=>{e(!0)},onCancel:()=>{e(!1)}})})}}function ae(){return(ae=Object.assign||function(e){for(var t=1;t div[class*="app-"]');return e?e.offsetTop:0}render(){return this.state.windows.map(e=>O.createElement(re,ae({},e,{close:this.close.bind(this,e.id),minY:this.minY}),e.children))}open(e){this.setState({windows:[...this.state.windows,e]})}close(e){this.setState({windows:this.state.windows.filter(t=>(t.id==e&&t.onClose&&t.onClose(),t.id!=e))})}static get id(){return"floating-windows"}static get root(){if(this._root)return this._root;const e=document.createElement("div");return e.id=this.id,document.body.append(e),this._root=e}}var de=le;class ce{static initialize(){const e=O.createRef(),t=O.createElement(de,{ref:e}),s=O.createElement(g.getByProps("AppReferencePositionLayer").AppLayerProvider().props.layerContext.Provider,{value:[document.querySelector("#app-mount > .layerContainer-yqaFcK")]},t),n=h.createElement('');C.bdBody.append(n),R.render(s,n),this.ref=e}static open(e){return this.ref||this.initialize(),this.ref.current.open(e)}}const he=f.React,ue=s(1),pe=s(2),me=s(4).Module;me.globalPaths.push(ue.resolve(s(0).remote.app.getAppPath(),"node_modules"));const ge=/[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,fe=/^\\@/,ye=function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e};class be{get name(){return""}get moduleExtension(){return""}get extension(){return""}get addonFolder(){return""}get language(){return""}get prefix(){return"addon"}get collection(){return"settings"}get category(){return"addons"}get id(){return"autoReload"}emit(e,...t){return E.emit(`${this.prefix}-${e}`,...t)}constructor(){this.timeCache={},this.addonList=[],this.state={}}initialize(){return this.originalRequire=me._extensions[this.moduleExtension],me._extensions[this.moduleExtension]=this.getAddonRequire(),T.on(this.collection,this.category,this.id,e=>{e?this.watchAddons():this.unwatchAddons()}),this.loadAllAddons()}initializeAddon(){}getFileModification(e,t){return t}startAddon(){}stopAddon(){}loadState(){const e=w.getData(this.prefix+"s");e&&Object.assign(this.state,e)}saveState(){w.setData(this.prefix+"s",this.state)}watchAddons(){if(this.watcher)return c.error(this.name,`Already watching ${this.prefix} addons.`);c.log(this.name,`Starting to watch ${this.prefix} addons.`),this.watcher=pe.watch(this.addonFolder,{persistent:!1},async(e,t)=>{if(e&&t&&t.endsWith(this.extension)){await new Promise(e=>setTimeout(e,100));try{const s=pe.statSync(ue.resolve(this.addonFolder,t));if(!s.isFile())return;if(!s||!s.mtime||!s.mtime.getTime())return;if("number"!=typeof s.mtime.getTime())return;if(this.timeCache[t]==s.mtime.getTime())return;this.timeCache[t]=s.mtime.getTime(),"rename"==e&&this.loadAddon(t,!0),"change"==e&&this.reloadAddon(t,!0)}catch(e){if("ENOENT"!==e.code)return;delete this.timeCache[t],this.unloadAddon(t,!0)}}})}unwatchAddons(){if(!this.watcher)return c.error(this.name,`Was not watching ${this.prefix} addons.`);this.watcher.close(),delete this.watcher,c.log(this.name,`No longer watching ${this.prefix} addons.`)}extractMeta(e){const t=e.split("\n")[0];if(t.includes("//META"))return this.parseOldMeta(e);if(t.includes("/**"))return this.parseNewMeta(e);throw new G("META was not found.")}parseOldMeta(e){const t=e.split("\n")[0],s=t.substring(t.lastIndexOf("//META")+6,t.lastIndexOf("*//")),n=u.testJSON(s);if(!n)throw new G("META could not be parsed.");if(!n.name)throw new G("META missing name data.");return n.format="json",n}parseNewMeta(e){const t=e.split("/**",2)[1].split("*/",1)[0],s={};let n="",i="";for(const e of t.split(ge))if(0!==e.length)if("@"===e.charAt(0)&&" "!==e.charAt(1)){s[n]=i;const t=e.indexOf(" ");n=e.substr(1,t-1),i=e.substr(t+1)}else i+=" "+e.replace("\\n","\n").replace(fe,"@");return s[n]=i.trim(),delete s[""],s.format="jsdoc",s}getAddonRequire(){const e=this,t=this.originalRequire;return function(s,n){const i=ue.resolve(e.addonFolder,ue.basename(n));if(!pe.existsSync(i)||n!==pe.realpathSync(i))return Reflect.apply(t,this,arguments);let o=pe.readFileSync(n,"utf8");o=ye(o);const r=pe.statSync(n),a=e.extractMeta(o);a.author||(a.author=k.Addons.unknownAuthor),a.version||(a.version="???"),a.description||(a.description=k.Addons.noDescription),a.id=a.name,a.filename=ue.basename(n),a.added=r.atimeMs,a.modified=r.mtimeMs,a.size=r.size,o=e.getFileModification(s,o,a),s._compile(o,n)}}loadAddon(e,t=!1){if(void 0===e)return;try{require(ue.resolve(this.addonFolder,e))}catch(n){return new _(e,e,"Could not be compiled.",{message:n.message,stack:n.stack})}const s=require(ue.resolve(this.addonFolder,e));if(this.addonList.find(e=>e.id==s.id))return new _(s.name,e,"There is already a plugin with name "+s.name);const n=this.initializeAddon(s);return n||(this.addonList.push(s),t&&q.success(`${s.name} v${s.version} was loaded.`),this.emit("loaded",s.id),this.state[s.id]?this.startAddon(s):this.state[s.id]=!1)}unloadAddon(e,t=!0,s=!1){const n="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e;return!!n&&(this.state[n.id]&&(s?this.stopAddon(n):this.disableAddon(n)),delete require.cache[require.resolve(ue.resolve(this.addonFolder,n.filename))],this.addonList.splice(this.addonList.indexOf(n),1),this.emit("unloaded",n.id),t&&q.success(n.name+" was unloaded."),!0)}reloadAddon(e,t=!0){const s="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e,n=this.unloadAddon(s,t,!0);return n?this.loadAddon(s.filename,t):n}isLoaded(e){return!!this.addonList.find(t=>t.id==e||t.filename==e)}isEnabled(e){const t=this.addonList.find(t=>t.id==e||t.filename==e);return!!t&&this.state[t.id]}getAddon(e){return this.addonList.find(t=>t.id==e||t.filename==e)}enableAddon(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&(this.state[t.id]||(this.state[t.id]=!0,this.startAddon(t),this.saveState()))}disableAddon(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&this.state[t.id]&&(this.state[t.id]=!1,this.stopAddon(t),this.saveState())}toggleAddon(e){this.state[e]?this.disableAddon(e):this.enableAddon(e)}loadNewAddons(){const e=pe.readdirSync(this.addonFolder),t=this.addonList.filter(t=>!e.includes(t.filename)).map(e=>e.id);return{added:e.filter(e=>!this.addonList.find(t=>t.filename==e)&&e.endsWith(this.extension)&&pe.statSync(ue.resolve(this.addonFolder,e)).isFile()),removed:t}}updateList(){const e=this.loadNewAddons();for(const t of e.added)this.loadAddon(t);for(const t of e.removed)this.unloadAddon(t)}loadAllAddons(){this.loadState();const e=[],t=pe.readdirSync(this.addonFolder);for(const s of t){if(!pe.statSync(ue.resolve(this.addonFolder,s)).isFile()||!s.endsWith(this.extension))continue;const t=this.loadAddon(s,!1);t instanceof _&&e.push(t)}return this.saveState(),T.get(this.collection,this.category,this.id)&&this.watchAddons(),e}deleteAddon(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e;return pe.unlinkSync(ue.resolve(this.addonFolder,t.filename))}saveAddon(e,t){const s="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e;return pe.writeFileSync(ue.resolve(this.addonFolder,s.filename),t)}editAddon(e,t){const n="string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e,i=ue.resolve(this.addonFolder,n.filename);return void 0===t&&(t="system"==T.get("settings","addons","editAction")),t?s(0).shell.openItem(""+i):this.openDetached(n)}openDetached(e){const t=ue.resolve(this.addonFolder,e.filename),s=pe.readFileSync(t).toString(),n=he.createRef(),i=he.createElement(se,{id:"bd-floating-editor-"+e.name,ref:n,content:s,save:this.saveAddon.bind(this,e),openNative:this.editAddon.bind(this,e,!0),language:this.language});ce.open({onClose:()=>{this.isDetached=!1},onResize:()=>{n&&n.current&&n.current.resize&&n.current.resize()},title:e.name,id:s.id,className:"floating-addon-window",height:470,width:410,center:!0,resizable:!0,children:i,confirmClose:()=>!(!n||!n.current)&&n.current.hasUnsavedChanges,confirmationText:k.Addons.confirmationText.format({name:e.name})})}}class ve extends O.Component{constructor(e){super(e)}render(){const e=this.props.isGroup?"bd-settings-title bd-settings-group-title h5-18_1nd title-3sZWYQ size12-3R0845 height16-2Lv3qA weightSemiBold-NJexzi da-h5 da-title da-size12 da-height16 da-weightSemiBold marginBottom4-2qk4Hy da-marginBottom4 marginTop8-1DLZ1n da-marginTop8":"bd-settings-title h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi defaultColor-1_ajX0 defaultMarginh2-2LTaUL marginBottom20-32qID7",t=this.props.className?`${e} ${this.props.className}`:e;return O.createElement("h2",{className:t,onClick:()=>{this.props.onClick&&this.props.onClick()}},this.props.text,this.props.button&&O.createElement("button",{className:"bd-button bd-button-title",onClick:this.props.button.onClick},this.props.button.title),this.props.otherChildren)}}class we extends O.Component{render(){const e=this.props.size||"24px";return O.createElement("svg",{className:this.props.className||"",onClick:this.props.onClick,fill:"#dcddde",viewBox:"0 0 24 24",style:{width:e,height:e}},O.createElement("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),O.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}}class Ce extends O.Component{render(){const e=this.props.size||"24px";return O.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e},onClick:this.props.onClick},O.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),O.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),O.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}))}}class Se extends O.Component{constructor(e){super(e),this.state={checked:this.props.checked},this.onChange=this.onChange.bind(this)}onChange(){this.props.disabled||(this.props.onChange(!this.state.checked),this.setState({checked:!this.state.checked}))}render(){const e=this.props.disabled?" bd-switch-disabled":"",t=this.state.checked?" bd-switch-checked":"";return O.createElement("div",{className:"bd-switch"+e+t},O.createElement("input",{type:"checkbox",id:this.props.id,className:"bd-checkbox",disabled:this.props.disabled,checked:this.state.checked,onChange:this.onChange}))}}class Ee extends O.Component{constructor(e){super(e),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?O.createElement("div",{className:"react-error"},"Component Error"):this.props.children}}const Me=Ee.prototype.render;function xe(){return(xe=Object.assign||function(e){for(var t=1;t
Me});const Ne=g.getByDisplayName("Tooltip");class Pe extends O.Component{constructor(e){super(e),this.state={settingsOpen:!1},this.settingsPanel="",this.panelRef=O.createRef(),this.onChange=this.onChange.bind(this),this.reload=this.reload.bind(this),this.showSettings=this.showSettings.bind(this),this.closeSettings=this.closeSettings.bind(this)}reload(){this.props.reload&&(this.props.addon=this.props.reload(this.props.addon.id),this.forceUpdate())}componentDidUpdate(){this.state.settingsOpen&&(this.settingsPanel instanceof Node&&this.panelRef.current.appendChild(this.settingsPanel),setImmediate(()=>{const e=this.panelRef.current,t=e.closest(".scrollerBase-289Jih");if(!t||!((e,t)=>{const s=e.scrollTop,n=s+e.clientHeight,i=t.offsetTop,o=i+t.clientHeight;return in})(t,e))return;const s=h.offset(e),n=h.offset(t),i=t.scrollTop,o=s.top-n.top+t.scrollTop-30;h.animate({duration:300,update:function(e){t.scrollTop=o>i?i+e*(o-i):i-e*(i-o)}})}))}getString(e){return"string"==typeof e?e:e.toString()}onChange(){this.props.onChange&&this.props.onChange(this.props.addon.id),this.props.enabled=!this.props.enabled,this.forceUpdate()}showSettings(){this.props.hasSettings&&this.setState({settingsOpen:!0})}closeSettings(){this.panelRef.current.innerHTML="",this.setState({settingsOpen:!1})}buildTitle(e,t,s){const n=k.Addons.title.split(/({{[A-Za-z]+}})/),i=n.findIndex(e=>"{{name}}"==e);i&&(n[i]=O.createElement("span",{className:"bd-name"},e));const o=n.findIndex(e=>"{{version}}"==e);i&&(n[o]=O.createElement("span",{className:"bd-version"},t));const r=n.findIndex(e=>"{{author}}"==e);return i&&(n[r]=O.createElement("span",{className:"bd-author"},s)),n.flat()}get settingsComponent(){const e=this.props.addon,t=this.getString(e.name);try{this.settingsPanel=this.props.getSettingsPanel()}catch(e){c.stacktrace("Addon Settings","Unable to get settings panel for "+t+".",e)}const s={id:t+"-settings",className:"addon-settings",ref:this.panelRef};return"string"==typeof settingsPanel&&(c.warn("Addon Settings","Using a DOMString is officially deprecated."),s.dangerouslySetInnerHTML=this.settingsPanel),O.createElement("div",{className:"bd-addon-card settings-open bd-switch-item"},O.createElement("div",{className:"bd-close",onClick:this.closeSettings},O.createElement(ie,null)),O.createElement("div",s,O.createElement(Ee,null,this.settingsPanel instanceof O.Component||"function"==typeof this.settingsPanel?this.settingsPanel:null)))}buildLink(e){const t=this.props.addon[e];if(!t)return null;const s=O.createElement("a",{className:"bd-link bd-link-website",href:t,target:"_blank",rel:"noopener noreferrer"},k.Addons[e]);return"invite"==e&&(s.props.onClick=function(e){e.preventDefault(),e.stopPropagation();let s=t;const n=/\.gg\/(.*)$/;n.test(s)&&(s=s.match(n)[1]),f.LayerStack.popLayer(),f.InviteActions.acceptInviteAndTransitionToInviteChannel(s)}),s}get footer(){const e=["website","source","invite","donate","patreon"];if(!e.some(e=>this.props.addon[e])&&!this.props.hasSettings)return null;const t=e.map(this.buildLink.bind(this)).filter(e=>e);return O.createElement("div",{className:"bd-footer"},O.createElement("span",{className:"bd-links"},t.map((e,s)=>sO.createElement("div",xe({},e,{className:"bd-addon-button",onClick:s}),t))}render(){if(this.state.settingsOpen)return this.settingsComponent;const e=this.props.addon,t=this.getString(e.name),s=this.getString(e.author),n=this.getString(e.description),i=this.getString(e.version);return O.createElement("div",{id:e.id+"-card",className:"bd-addon-card settings-closed"},O.createElement("div",{className:"bd-addon-header"},O.createElement("span",{className:"bd-title"},this.buildTitle(t,i,s)),O.createElement("div",{className:"bd-controls"},this.props.editAddon&&this.makeButton(k.Addons.editAddon,O.createElement(ee,null),this.props.editAddon),this.props.deleteAddon&&this.makeButton(k.Addons.deleteAddon,O.createElement(Ce,null),this.props.deleteAddon),this.props.showReloadIcon&&this.makeButton(k.Addons.reload,O.createElement(we,{className:"bd-reload bd-reload-card"}),this.reload),O.createElement(Se,{checked:this.props.enabled,onChange:this.onChange}))),O.createElement("div",{className:"bd-description-wrap scroller-wrap fade"},O.createElement("div",{className:"bd-description scroller"},n)),this.footer)}}const De=Pe.prototype.render;Object.defineProperty(Pe.prototype,"render",{enumerable:!1,configurable:!1,set:function(){c.warn("AddonCard","Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins")},get:()=>De});class Ae extends O.Component{render(){const e=this.props.size||"16px";return O.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e}},O.createElement("path",{d:"M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"}))}}class ke extends O.Component{constructor(e){super(e),this.state={open:!1,value:this.props.value||this.props.options[0].value},this.dropdown=O.createRef(),this.onChange=this.onChange.bind(this),this.showMenu=this.showMenu.bind(this),this.hideMenu=this.hideMenu.bind(this)}showMenu(e){e.preventDefault(),this.setState({open:!0},()=>{document.addEventListener("click",this.hideMenu)})}hideMenu(){this.setState({open:!1},()=>{document.removeEventListener("click",this.hideMenu)})}onChange(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)}get selected(){return this.props.options.find(e=>e.value==this.state.value)}get options(){const e=this.selected;return O.createElement("div",{className:"bd-select-options"},this.props.options.map(t=>O.createElement("div",{className:"bd-select-option"+(e.value==t.value?" selected":""),onClick:this.onChange.bind(this,t.value)},t.label)))}render(){const e="transparent"==this.props.style?" bd-select-transparent":"",t=this.state.open?" menu-open":"";return O.createElement("div",{className:`bd-select${e}${t}`,onClick:this.showMenu,ref:this.dropdown},O.createElement("div",{className:"bd-select-value"},this.selected.label),O.createElement(Ae,{className:"bd-select-arrow"}),this.state.open&&this.options)}}class Te extends O.Component{render(){const e=this.props.size||"16px";return O.createElement("svg",{className:this.props.className||"",fill:"#FFFFFF",viewBox:"0 0 24 24",style:{width:e,height:e}},O.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),O.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))}}class Le extends O.Component{render(){return O.createElement("div",{className:"bd-search-wrapper"},O.createElement("input",{onChange:this.props.onChange,onKeyDown:this.props.onKeyDown,type:"text",className:"bd-search",placeholder:this.props.placeholder,maxLength:"50"}),O.createElement(Te,null))}}class je extends O.Component{constructor(e){super(e),this.state={sort:"name",ascending:!0,query:""},this.sort=this.sort.bind(this),this.reverse=this.reverse.bind(this),this.search=this.search.bind(this),this.update=this.update.bind(this)}componentDidMount(){E.on(this.props.prefix+"-loaded",this.update),E.on(this.props.prefix+"-unloaded",this.update)}componentWillUnmount(){E.off(this.props.prefix+"-loaded",this.update),E.off(this.props.prefix+"-unloaded",this.update)}update(){this.forceUpdate()}reload(){this.props.refreshList&&this.props.refreshList(),this.forceUpdate()}reverse(e){this.setState({ascending:e})}sort(e){this.setState({sort:e})}search(e){this.setState({query:e.target.value.toLocaleLowerCase()})}get sortOptions(){return[{label:k.Addons.name,value:"name"},{label:k.Addons.author,value:"author"},{label:k.Addons.version,value:"version"},{label:k.Addons.added,value:"added"},{label:k.Addons.modified,value:"modified"}]}get directions(){return[{label:k.Sorting.ascending,value:!0},{label:k.Sorting.descending,value:!1}]}render(){const{title:e,folder:t,addonList:n,addonState:i,onChange:o,reload:r}=this.props,a=!T.get("settings","addons","autoReload"),l=t?{title:k.Addons.openFolder.format({type:e}),onClick:()=>{const e=s(0).shell;(e.openItem||e.openPath)(t)}}:null,d=n.sort((e,t)=>{const s=e[this.state.sort],n=t[this.state.sort];return"string"==typeof s?s.toLocaleLowerCase().localeCompare(n.toLocaleLowerCase()):s>n?1:n>s?-1:0});return this.state.ascending||d.reverse(),[O.createElement(ve,{key:"title",text:e,button:l,otherChildren:a&&O.createElement(we,{className:"bd-reload",onClick:this.reload.bind(this)})}),O.createElement("div",{className:"bd-controls bd-addon-controls"},O.createElement(Le,{onChange:this.search,placeholder:k.Addons.search.format({type:this.props.title})+"..."}),O.createElement("div",{className:"bd-addon-dropdowns"},O.createElement("div",{className:"bd-select-wrapper"},O.createElement("label",{className:"bd-label"},k.Sorting.sortBy,":"),O.createElement(ke,{options:this.sortOptions,onChange:this.sort,style:"transparent"})),O.createElement("div",{className:"bd-select-wrapper"},O.createElement("label",{className:"bd-label"},k.Sorting.order,":"),O.createElement(ke,{options:this.directions,onChange:this.reverse,style:"transparent"})))),O.createElement("div",{key:"addonList",className:"bd-addon-list"},d.map(e=>{if(this.state.query){let t=e.name.toLocaleLowerCase().includes(this.state.query);if(t=t||e.author.toLocaleLowerCase().includes(this.state.query),t=t||e.description.toLocaleLowerCase().includes(this.state.query),!t)return null}const t=e.type&&"function"==typeof e.plugin.getSettingsPanel,s=t&&e.plugin.getSettingsPanel.bind(e.plugin);return O.createElement(Ee,null,O.createElement(Pe,{editAddon:this.editAddon.bind(this,e.id),deleteAddon:this.deleteAddon.bind(this,e.id),showReloadIcon:a,key:e.id,enabled:i[e.id],addon:e,onChange:o,reload:r,hasSettings:t,getSettingsPanel:s}))}))]}editAddon(e){this.props.editAddon&&this.props.editAddon(e)}async deleteAddon(e){const t=this.props.addonList.find(t=>t.id==e);await this.confirmDelete(t)&&this.props.deleteAddon&&this.props.deleteAddon(t)}confirmDelete(e){return new Promise(t=>{W.showConfirmationModal(k.Modals.confirmAction,k.Addons.confirmDelete.format({name:e.name}),{danger:!0,confirmText:k.Addons.deleteAddon,onConfirm:()=>{t(!0)},onCancel:()=>{t(!1)}})})}}const Be=je.prototype.render;Object.defineProperty(je.prototype,"render",{enumerable:!1,configurable:!1,set:function(){c.warn("AddonList","Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins")},get:()=>Be});class Ie extends O.Component{render(){return O.createElement("div",{className:"bd-divider divider-3573oO marginTop8-1DLZ1n marginBottom40-2vIwTv"})}}class ze extends O.Component{render(){return O.createElement("div",{className:"bd-setting-item"},O.createElement("div",{className:"bd-setting-header"},O.createElement("label",{htmlFor:this.props.id,className:"bd-setting-title"},this.props.name),this.props.children),O.createElement("div",{className:"bd-setting-note"},this.props.note),O.createElement("div",{className:"bd-setting-divider"}))}}class Fe extends O.Component{constructor(e){if(super(e),this.props.button&&this.props.collapsible){const e=this.props.button.onClick;this.props.button.onClick=t=>{t.stopPropagation(),e(...arguments)}}this.props.hasOwnProperty("shown")||(this.props.shown=!0),this.container=O.createRef(),this.state={collapsed:this.props.collapsible&&!this.props.shown},this.onChange=this.onChange.bind(this),this.toggleCollapse=this.toggleCollapse.bind(this)}toggleCollapse(){const e=this.container.current,t=this.state.collapsed?300:1;e.style.setProperty("height",e.scrollHeight+"px"),e.classList.add("animating"),this.setState({collapsed:!this.state.collapsed},()=>setTimeout(()=>{e.style.setProperty("height",""),e.classList.remove("animating")},t)),this.props.onDrawerToggle&&this.props.onDrawerToggle(this.state.collapsed)}onChange(e,t){this.props.onChange&&(this.props.id?this.props.onChange(this.props.id,e,t):this.props.onChange(e,t),this.forceUpdate())}render(){const{settings:e}=this.props,t="bd-settings-group "+(this.props.collapsible?"collapsible "+(this.state.collapsed?"collapsed":"expanded"):"");return O.createElement("div",{className:t},O.createElement(ve,{text:this.props.name,collapsible:this.props.collapsible,onClick:this.toggleCollapse,button:this.props.button,isGroup:!0}),O.createElement("div",{className:"bd-settings-container",ref:this.container},e.filter(e=>!e.hidden).map(e=>{let t=null;return"dropdown"==e.type&&(t=O.createElement(ke,{disabled:e.disabled,id:e.id,options:e.options,value:e.value,onChange:this.onChange.bind(this,e.id)})),"switch"==e.type&&(t=O.createElement(Se,{disabled:e.disabled,id:e.id,checked:e.value,onChange:this.onChange.bind(this,e.id)})),t?O.createElement(ze,{id:e.id,key:e.id,name:e.name,note:e.note},t):null})),this.props.showDivider&&O.createElement(Ie,null))}}const Oe=Fe.prototype.render;Object.defineProperty(Fe.prototype,"render",{enumerable:!1,configurable:!1,set:function(){c.warn("Group","Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins")},get:()=>Oe});class Re extends O.Component{render(){const e=this.props.size||"18px";return O.createElement("svg",{viewBox:"0 0 24 24",fill:"#FFFFFF",className:this.props.className||"",style:{width:e,height:e},onClick:this.props.onClick},O.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),O.createElement("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}))}}function Ue(){return(Ue=Object.assign||function(e){for(var t=1;te.Header&&e.Separator&&e.Item),qe=g.getByDisplayName("Tooltip");class $e extends O.Component{constructor(e){super(e)}render(){return O.createElement("div",{className:"bd-sidebar-header"},O.createElement(He.Header,null,"BandagedBD"),O.createElement(qe,{color:"black",position:"top",text:"Changelog"},e=>O.createElement("div",Ue({},e,{className:"bd-changelog-button",onClick:()=>W.showChangelogModal(l)}),O.createElement(Re,{className:"bd-icon",size:"16px"}))))}}var We=new class{constructor(){this.patchSections(),E.on("strings-updated",this.forceUpdate)}onDrawerToggle(e,t,s){const n=w.getBDData("drawerStates")||{};n[e]||(n[e]={}),n[e][t]=s,w.setBDData("drawerStates",n)}getDrawerState(e,t,s){const n=w.getBDData("drawerStates")||{};return n[e]&&n[e].hasOwnProperty(t)?n[e][t]:s}onChange(e){return(t,s,n)=>{const i=T.collections.length+T.panels.length;e(t,s,n);i!=T.collections.length+T.panels.length&&setTimeout(this.forceUpdate.bind(this),50)}}buildSettingsPanel(e,t,s,n,i,o=null){return s.forEach(e=>{e.settings.forEach(t=>t.value=n[e.id][t.id])}),this.getSettingsPanel(e,t,s,this.onChange(i),o)}getSettingsPanel(e,t,s,n,i=null){return[O.createElement(ve,{text:t,button:i}),s.map(t=>O.createElement(Fe,Object.assign({},t,{onChange:n,onDrawerToggle:s=>this.onDrawerToggle(e,t.id,s),shown:this.getDrawerState(e,t.id,!t.hasOwnProperty("shown")||t.shown)})))]}getAddonPanel(e,t,s,n={}){return O.createElement(je,Object.assign({},{title:e,addonList:t,addonState:s},n))}async patchSections(){const e=await F.get("UserSettings",e=>e.prototype&&e.prototype.generateSections);L.after("SettingsManager",e.prototype,"render",e=>{e._reactInternalFiber.return.return.return.return.return.return.return.memoizedProps.id="user-settings"}),L.after("SettingsManager",e.prototype,"generateSections",(e,t,s)=>{let n=s.findIndex(e=>"linux"==e.section.toLowerCase())+1;const i=e=>{s.splice(n,0,e),n++};i({section:"DIVIDER"}),i({section:"CUSTOM",element:$e});for(const e of T.collections)e.disabled||i({section:e.name,label:e.name,element:()=>this.buildSettingsPanel(e.id,e.name,e.settings,T.state[e.id],T.onSettingChange.bind(T,e.id),e.button?e.button:null)});for(const t of T.panels.sort((e,t)=>e.order>t.order))t.clickListener&&(t.onClick=n=>t.clickListener(e,n,s)),i(t)}),this.forceUpdate()}forceUpdate(){const e=g.getByProps("standardSidebarView").standardSidebarView.split(" ")[0],t=document.querySelector("."+e);if(!t)return;const s=u.findInReactTree(u.getReactInstance(t),e=>e&&e.generateSections,{walkable:["return","stateNode"]});s&&s.forceUpdate()}};const _e=s(1),Ge=s(0).remote;var Qe=new class extends be{get name(){return"PluginManager"}get moduleExtension(){return".js"}get extension(){return".plugin.js"}get addonFolder(){return _e.resolve(i.dataPath,"plugins")}get prefix(){return"plugin"}get language(){return"javascript"}constructor(){super(),this.onSwitch=this.onSwitch.bind(this),this.observer=new MutationObserver(e=>{for(let t=0,s=e.length;tWe.getAddonPanel(k.Panels.plugins,this.addonList,this.state,{folder:this.addonFolder,onChange:this.togglePlugin.bind(this),reload:this.reloadPlugin.bind(this),refreshList:this.updatePluginList.bind(this),saveAddon:this.saveAddon.bind(this),editAddon:this.editAddon.bind(this),deleteAddon:this.deleteAddon.bind(this),prefix:this.prefix})}),e}updatePluginList(){return this.updateList()}loadAllPlugins(){return this.loadAllAddons()}enablePlugin(e){return this.enableAddon(e)}disablePlugin(e){return this.disableAddon(e)}togglePlugin(e){return this.toggleAddon(e)}unloadPlugin(e){return this.unloadAddon(e)}loadPlugin(e){const t=this.loadAddon(e);t&&W.showAddonErrors({themes:[t]})}reloadPlugin(e){const t=this.reloadAddon(e);return t&&W.showAddonErrors({plugins:[t]}),"string"==typeof e?this.addonList.find(t=>t.id==e||t.filename==e):e}initializeAddon(e){if(!e.type)return new _(e.name,e.filename,"Plugin had no exports",{message:"Plugin had no exports or no name property.",stack:""});try{const t=new e.type;e.plugin=t,e.name=t.getName()||e.name,e.author=t.getAuthor()||e.author||"No author",e.description=t.getDescription()||e.description||"No description",e.version=t.getVersion()||e.version||"No version";try{"function"==typeof e.plugin.load&&e.plugin.load()}catch(t){return this.state[e.id]=!1,new _(e.name,e.filename,"load() could not be fired.",{message:t.message,stack:t.stack})}}catch(t){return new _(e.name,e.filename,"Could not be constructed.",{message:t.message,stack:t.stack})}}getFileModification(e,t,s){e._compile(t,e.filename);return u.isEmpty(e.exports)?(c.warn(this.name,s.name+", please start assigning module.exports"),t+=`\nmodule.exports = ${JSON.stringify(s)};\nmodule.exports.type = ${s.exports||s.name};`):(s.type=e.exports,e.exports=s,"")}startAddon(e){return this.startPlugin(e)}stopAddon(e){return this.stopPlugin(e)}getAddon(e){return this.getPlugin(e)}startPlugin(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;if(!t)return;const s=t.plugin;try{s.start()}catch(e){return this.state[t.id]=!1,q.error(k.Addons.couldNotStart.format({name:t.name,version:t.version})),c.stacktrace(this.name,t.name+" could not be started.",e),new _(t.name,t.filename,k.Addons.enabled.format({method:"start()"}),{message:e.message,stack:e.stack})}this.emit("started",t.id),q.show(k.Addons.enabled.format({name:t.name,version:t.version}))}stopPlugin(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;if(!t)return;const s=t.plugin;try{s.stop()}catch(e){return this.state[t.id]=!1,q.error(k.Addons.couldNotStop.format({name:t.name,version:t.version})),c.stacktrace(this.name,t.name+" could not be stopped.",e),new _(t.name,t.filename,k.Addons.enabled.format({method:"stop()"}),{message:e.message,stack:e.stack})}this.emit("stopped",t.id),q.show(k.Addons.disabled.format({name:t.name,version:t.version}))}getPlugin(e){const t=this.addonList.find(t=>t.id==e||t.filename==e);if(t)return t.plugin}setupFunctions(){Ge.getCurrentWebContents().on("did-navigate-in-page",this.onSwitch.bind(this)),this.observer.observe(document,{childList:!0,subtree:!0})}onSwitch(){this.emit("page-switch");for(let e=0;eWe.getAddonPanel(k.Panels.themes,this.addonList,this.state,{folder:this.addonFolder,onChange:this.toggleTheme.bind(this),reload:this.reloadTheme.bind(this),refreshList:this.updateThemeList.bind(this),saveAddon:this.saveAddon.bind(this),editAddon:this.editAddon.bind(this),deleteAddon:this.deleteAddon.bind(this),prefix:this.prefix})}),e}updateThemeList(){return this.updateList()}loadAllThemes(){return this.loadAllAddons()}enableTheme(e){return this.enableAddon(e)}disableTheme(e){return this.disableAddon(e)}toggleTheme(e){return this.toggleAddon(e)}unloadTheme(e){return this.unloadAddon(e)}loadTheme(e){const t=this.loadAddon(e);t&&W.showAddonErrors({themes:[t]})}reloadTheme(e){const t=this.reloadAddon(e);t&&W.showAddonErrors({themes:[t]})}getFileModification(e,t,s){return s.css=t,`module.exports = ${JSON.stringify(s)};`}startAddon(e){return this.addTheme(e)}stopAddon(e){return this.removeTheme(e)}addTheme(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&(C.injectTheme(t.id,t.css),q.show(k.Addons.enabled.format({name:t.name,version:t.version})))}removeTheme(e){const t="string"==typeof e?this.addonList.find(t=>t.id==e):e;t&&(C.removeTheme(t.id),q.show(k.Addons.disabled.format({name:t.name,version:t.version})))}};const Ye={get React(){return f.React},get ReactDOM(){return f.ReactDOM},get WindowConfigFile(){return""},get settings(){return T.collections},get emotes(){return{}},get version(){return i.version},getAllWindowPreferences:function(){return w.getData("windowprefs")||{}},getWindowPreference:function(e){return this.getAllWindowPreferences()[e]},setWindowPreference:function(e,t){const s=this.getAllWindowPreferences();return s[e]=t,w.setData("windowprefs",s)},injectCSS:function(e,t){C.injectStyle(e,t)},clearCSS:function(e){C.removeStyle(e)},linkJS:function(e,t){return C.injectScript(e,t)},unlinkJS:function(e){C.removeScript(e)},alert:function(e,t){W.alert(e,t)},showConfirmationModal:function(e,t,s={}){return W.showConfirmationModal(e,t,s)},showToast:function(e,t={}){q.show(e,t)},findModule:function(e){return g.getModule(e)},findAllModules:function(e){return g.getModule(e,!1)},findModuleByProps:function(...e){return g.getByProps(...e)},findModuleByPrototypes:function(...e){return g.getByPrototypes(...e)},findModuleByDisplayName:function(e){return g.getByDisplayName(e)},getInternalInstance:function(e){if(e instanceof window.jQuery||e instanceof Element)return e instanceof jQuery&&(e=e[0]),u.getReactInstance(e)},loadData:function(e,t){return w.getPluginData(e,t)}};Ye.getData=Ye.loadData,Ye.saveData=function(e,t,s){return w.setPluginData(e,t,s)},Ye.setData=Ye.saveData,Ye.deleteData=function(e,t){return w.deletePluginData(e,t)},Ye.monkeyPatch=function(e,t,s){const{before:n,after:i,instead:o,once:r=!1}=s,a=n?"before":i?"after":o?"instead":"";if(!a)return c.err("BdApi","Must provide one of: after, before, instead");const l={originalMethod:e[t],callOriginalMethod:()=>l.originalMethod.apply(l.thisObject,l.methodArguments)};l.cancelPatch=L[a]("BdApi",e,t,(e,t,n)=>{l.thisObject=e,l.methodArguments=t,l.returnValue=n;try{Reflect.apply(s[a],null,[l]),r&&l.cancelPatch()}catch(e){}})},Ye.onRemoved=function(e,t){return u.onRemoved(e,t)},Ye.suppressErrors=function(e,t){return u.suppressErrors(e,t)},Ye.testJSON=function(e){return u.testJSON(e)},Ye.getPlugin=function(e){return c.warn("BdApi","getPlugin is deprecated. Please make use of the addon api (BdApi.Plugins)"),Qe.addonList.find(t=>t.name==e)},Ye.isPluginEnabled=function(e){c.warn("BdApi","isPluginEnabled is deprecated. Please make use of the addon api (BdApi.Plugins)");const t=this.getPlugin(e);return!!t&&Qe.isEnabled(t.id)},Ye.isThemeEnabled=function(e){c.warn("BdApi","isThemeEnabled is deprecated. Please make use of the addon api (BdApi.Themes)");const t=Ze.addonList.find(t=>t.name==e);return!!t&&Ze.isEnabled(t.id)},Ye.isSettingEnabled=function(e,t,s){return T.get(e,t,s)},Ye.enableSetting=function(e,t,s){return T.set(e,t,s,!0)},Ye.disableSetting=function(e,t,s){return T.set(e,t,s,!1)},Ye.toggleSetting=function(e,t,s){return T.set(e,t,s,!T.get(e,t,s))},Ye.getBDData=function(e){return w.getBDData(e)},Ye.setBDData=function(e,t){return w.setBDData(e,t)};const Je=e=>new class{get folder(){return e.addonFolder}isEnabled(t){return e.isEnabled(t)}enable(t){return e.enableAddon(t)}disable(t){return e.disableAddon(t)}toggle(t){return e.toggleAddon(t)}reload(t){return e.reloadAddon(t)}get(t){return e.getAddon(t)}getAll(){return e.addonList.map(t=>e.getAddon(t.id))}};Ye.Plugins=Je(Qe),Ye.Themes=Je(Ze),Ye.Patcher={patch:(e,t,s,n,i={})=>"string"!=typeof e?c.err("BdApi.Patcher","Parameter 0 of patch must be a string representing the caller"):"before"!==i.type&&"instead"!==i.type&&"after"!==i.type?c.err("BdApi.Patcher","options.type must be one of: before, instead, after"):L.pushChildPatch(e,t,s,n,i),before:(e,t,s,n,i={})=>Ye.Patcher.patch(e,t,s,n,Object.assign(i,{type:"before"})),instead:(e,t,s,n,i={})=>Ye.Patcher.patch(e,t,s,n,Object.assign(i,{type:"instead"})),after:(e,t,s,n,i={})=>Ye.Patcher.patch(e,t,s,n,Object.assign(i,{type:"after"})),unpatchAll:e=>"string"!=typeof e?c.err("BdApi.Patcher","Parameter 0 of unpatchAll must be a string representing the caller"):L.unpatchAll(e)},Object.freeze(Ye),Object.freeze(Ye.Plugins),Object.freeze(Ye.Themes),Object.freeze(Ye.Patcher);var Ke=Ye;class Xe{get name(){return"Unnamed Builtin"}get collection(){return"settings"}get category(){return"general"}get id(){return"None"}async initialize(){T.get(this.collection,this.category,this.id)&&await this.enable(),E.on("setting-updated",(e,t,s,n)=>{e==this.collection&&t===this.category&&s===this.id&&(n?this.enable():this.disable())}),this.initialized=!0}registerSetting(e,t,s,n,i){return 4==arguments.length?(e=this.collection,t=arguments[0],s=arguments[1],n=arguments[2],i=arguments[3]):3==arguments.length&&(e=this.collection,t=this.category,s=arguments[0],n=arguments[1],i=arguments[2]),T.on(e,t,s,e=>{e?n():i()})}get(e,t,s){return 2==arguments.length?(e=this.collection,t=arguments[0],s=arguments[1]):1==arguments.length&&(e=this.collection,t=this.category,s=arguments[0]),T.get(e,t,s)}async enable(){this.log("Enabled");try{await this.enabled()}catch(e){this.stacktrace("Could not be enabled",e)}}async disable(){this.log("Disabled");try{await this.disabled()}catch(e){this.stacktrace("Could not be disabled",e)}}async enabled(){}async disabled(){}log(...e){c.log(this.name,...e)}warn(...e){c.warn(this.name,...e)}error(...e){c.err(this.name,...e)}stacktrace(e,t){c.stacktrace(this.name,e,t)}before(e,t,s){return L.before(this.name,e,t,s)}after(e,t,s){return L.after(this.name,e,t,s)}unpatchAll(){return L.unpatchAll(this.name)}}class et extends O.Component{render(){const e=this.props.size||"24px";return O.createElement("svg",{viewBox:"0 0 24 24",style:{width:e,height:e}},O.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),O.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}))}}class tt extends O.Component{constructor(e){super(e),this.hasUnsavedChanges=!1,this.onChange=this.onChange.bind(this),this.toggleLiveUpdate=this.toggleLiveUpdate.bind(this),this.updateCss=this.updateCss.bind(this),this.saveCss=this.saveCss.bind(this),this.openDetached=this.props.openDetached?this.openDetached.bind(this):null,this.openNative=this.openNative.bind(this),this.updateEditor=this.updateEditor.bind(this),this.controls=[{label:O.createElement(we,{size:"18px"}),tooltip:k.CustomCSS.update,onClick:this.updateCss},{label:O.createElement(X,{size:"18px"}),tooltip:k.CustomCSS.save,onClick:this.saveCss},{label:O.createElement(ee,{size:"18px"}),tooltip:k.CustomCSS.openNative,onClick:this.openNative},{label:O.createElement(te,{size:"18px"}),tooltip:k.CustomCSS.settings,onClick:"showSettings"},{label:k.Collections.settings.customcss.liveUpdate.name,type:"checkbox",onChange:this.toggleLiveUpdate,checked:T.get("settings","customcss","liveUpdate"),side:"right"}],this.openDetached&&this.controls.push({label:O.createElement(et,{size:"18px"}),tooltip:k.CustomCSS.openDetached,onClick:this.openDetached,side:"right"})}componentDidMount(){E.on("customcss-updated",this.updateEditor)}componentWillUnmount(){E.off("customcss-updated",this.updateEditor)}updateEditor(e){this.editor&&(this.editor.value=e)}get value(){return this.editor.session.getValue()}set value(e){this.editor.setValue(e)}showSettings(){return this.editor.keyBinding.$defaultHandler.commands.showSettingsMenu.exec(this.editor)}resize(){return this.editor.resize()}setEditorRef(e){this.editor=e,this.props.editorRef&&void 0!==this.props.editorRef.current?this.props.editorRef.current=e:this.props.editorRef&&(this.props.editorRef=e)}onChange(){this.hasUnsavedChanges=!0,this.props.onChange&&this.props.onChange(...arguments)}render(){return O.createElement(K,{ref:this.setEditorRef.bind(this),readOnly:this.props.readOnly,id:this.props.id||"bd-customcss-editor",onChange:this.onChange,controls:this.controls,value:this.props.css})}toggleLiveUpdate(e){T.set("settings","customcss","liveUpdate",e)}updateCss(e,t){this.props.update&&this.props.update(t)}saveCss(e,t){this.hasUnsavedChanges=!1,this.props.save&&this.props.save(t)}openDetached(e,t){this.props.openDetached&&this.props.openDetached(t)}openNative(){this.props.openNative&&this.props.openNative()}}const st=s(2),nt=s(0),it=g.getByProps("updateAccount"),ot=g.getByProps("dirtyDispatch"),rt=g.getByProps("ActionTypes").ActionTypes;var at=new class extends Xe{get name(){return"Custom CSS"}get category(){return"customcss"}get id(){return"customcss"}get startDetached(){return"detached"==T.get(this.collection,this.category,"openAction")}get nativeOpen(){return"system"==T.get(this.collection,this.category,"openAction")}constructor(){super(),this.savedCss="",this.insertedCss="",this.isDetached=!1}async enabled(){window.ace||C.injectScript("ace-script","https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.9/ace.js").then(()=>{window.require.original&&(window.require=window.require.original)}),T.registerPanel(this.id,k.Panels.customcss,{order:2,element:()=>[O.createElement(ve,{text:k.CustomCSS.editorTitle}),O.createElement(tt,{css:this.savedCss,save:this.saveCSS.bind(this),update:this.insertCSS.bind(this),openNative:this.openNative.bind(this),openDetached:this.openDetached.bind(this),onChange:this.onChange.bind(this)})],onClick:e=>{if(this.isDetached)return;if(this.nativeOpen)return this.openNative();if(this.startDetached)return this.openDetached();const t=u.findInRenderTree(e._reactInternalFiber,e=>e&&e.onSetSection,{walkable:["child","memoizedProps","props","children"]});t&&t.onSetSection&&t.onSetSection(this.id)}}),this.loadCSS(),this.insertCSS(this.savedCss),this.watchContent()}disabled(){T.removePanel(this.id),this.unwatchContent()}watchContent(){if(this.watcher)return this.error("Already watching content.");const e={};this.log("Starting to watch content."),this.watcher=st.watch(w.customCSS,{persistent:!1},async(t,s)=>{if(!t||!s)return;await new Promise(e=>setTimeout(e,50));try{st.statSync(w.customCSS)}catch(t){if("ENOENT"!==t.code)return;delete e[s],this.saveCSS("")}const n=st.statSync(w.customCSS);if(n&&n.mtime&&n.mtime.getTime()&&"number"==typeof n.mtime.getTime()&&e[s]!=n.mtime.getTime()&&(e[s]=n.mtime.getTime(),"change"==t)){const e=w.loadCustomCSS();if(e==this.savedCss)return;this.savedCss=e,this.insertCSS(this.savedCss),E.emit("customcss-updated",this.savedCss)}})}unwatchContent(){if(!this.watcher)return this.error("Was not watching content.");this.watcher.close(),delete this.watcher,this.log("No longer watching content.")}onChange(e){T.get("settings","customcss","liveUpdate")&&(this.insertCSS(e),this.saveCSS(e))}loadCSS(){this.savedCss=w.loadCustomCSS()}insertCSS(e){void 0===e?e=this.insertedCss:this.insertedCss=e,C.updateCustomCSS(e)}saveCSS(e){void 0!==e&&(this.savedCss=e),w.saveCustomCSS(this.savedCss)}openNative(){nt.shell.openExternal("file://"+w.customCSS)}openDetached(e){const t=O.createRef(),s=O.createElement(tt,{id:"bd-floating-editor",ref:t,css:e,save:this.saveCSS.bind(this),update:this.insertCSS.bind(this),openNative:this.openNative.bind(this),onChange:this.onChange.bind(this)});ce.open({onClose:()=>{this.isDetached=!1},onResize:()=>{t&&t.current&&t.current.resize&&t.current.resize()},title:k.CustomCSS.editorTitle,id:"floating-editor-window",height:470,width:410,center:!0,resizable:!0,children:s,confirmClose:()=>!(!t||!t.current)&&t.current.hasUnsavedChanges,confirmationText:k.CustomCSS.confirmationText}),this.isDetached=!0,it.close(),ot.dirtyDispatch({type:rt.LAYER_POP})}},lt=new class extends Xe{get name(){return"WindowPrefs"}get category(){return"window"}get id(){return"transparency"}enabled(){this.setWindowPreference("transparent",!0),this.setWindowPreference("backgroundColor","#00000000"),this.showModal(k.WindowPrefs.enabledInfo)}disabled(){this.deleteWindowPreference("transparent"),this.deleteWindowPreference("backgroundColor"),this.showModal(k.WindowPrefs.disabledInfo)}showModal(e){this.initialized&&W.showConfirmationModal(k.Modals.additionalInfo,e,{confirmText:k.Modals.restartNow,cancelText:k.Modals.restartLater,onConfirm:()=>{const e=s(0).remote.app;e.relaunch(),e.exit()}})}getWindowPreference(e){return(w.getData("windowprefs")||{})[e]}setWindowPreference(e,t){const s=w.getData("windowprefs")||{};s[e]=t,w.setData("windowprefs",s)}deleteWindowPreference(e){const t=w.getData("windowprefs")||{};delete t[e],w.setData("windowprefs",t)}},dt=new class extends Xe{get name(){return"24Hour"}get category(){return"general"}get id(){return"twentyFourHour"}enabled(){this.inject24Hour()}disabled(){this.unpatchAll()}inject24Hour(){const e=new RegExp("([0-9]{1,2}):([0-9]{1,2})\\s(AM|PM)"),t=(t,s,n)=>{const i=n.match(e);if(i&&4===i.length)return"AM"===i[3]?n.replace(i[0],`${"12"===i[1]?"00":i[1].padStart(2,"0")}:${i[2]}`):n.replace(i[0],`${"12"===i[1]?"12":parseInt(i[1])+12}:${i[2]}`)};this.after(f.TimeFormatter,"calendarFormat",t),this.after(f.TimeFormatter,"dateFormat",t)}};const ct=new RegExp("^(?!da-)((?:[A-Za-z]|[0-9]|-)+)-(?:[A-Za-z]|[0-9]|-|_){6}$");var ht=new class extends Xe{get id(){return"classNormalizer"}get category(){return"general"}get name(){return"ClassNormalizer"}enabled(){this.hasPatched||(this.patchClassModules(g.getModules(this.moduleFilter.bind(this))),this.normalizeElement(document.querySelector("#app-mount")),this.hasPatched=!0,this.patchDOMMethods())}disabled(){this.hasPatched&&(this.unpatchClassModules(g.getModules(this.moduleFilter.bind(this))),this.revertElement(document.querySelector("#app-mount")),this.hasPatched=!1)}patchClassModules(e){for(const t of e)this.patchClassModule("da",t)}unpatchClassModules(e){for(const t of e)this.unpatchClassModule("da",t)}shouldIgnore(e){return!isNaN(e)||(!!(e.endsWith("px")||e.endsWith("ch")||e.endsWith("em")||e.endsWith("ms"))||(!!e.startsWith("layerContainer-")||(!(!e.startsWith("#")||7!=e.length&&4!=e.length)||!(!e.includes("calc(")&&!e.includes("rgba")))))}moduleFilter(e){if("object"!=typeof e||Array.isArray(e))return!1;if(e.__esModule)return!1;if(!Object.keys(e).length)return!1;for(const t in e){const s=e[t];if("string"!=typeof s)return!1;if(!this.shouldIgnore(s)){if(1===s.split("-").length)return!1;if(!ct.test(s.split(" ")[0]))return!1}}return!0}patchClassModule(e,t){for(const s in t){const n=t[s];if(this.shouldIgnore(n))continue;const i=n.split(" ");for(const n of i){const i=n.match(ct);if(!i||!i.length||i.length<2)continue;const o=i[1].split("-").map((e,t)=>t?e[0].toUpperCase()+e.slice(1):e).join("");t[s]+=` ${e}-${o}`}}}unpatchClassModule(e,t){for(const s in t){const n=t[s];if(this.shouldIgnore(n))continue;let i="";const o=n.split(" ");for(const t of o)t.startsWith(e+"-")||(i+=" "+t);t[s]=i.trim()}}normalizeElement(e){if(!(e instanceof Element))return;const t=e.classList;for(let s=0,n=t.length;st?e[0].toUpperCase()+e.slice(1):e).join("");e.classList.add("da-"+n)}for(const t of e.children)this.normalizeElement(t)}revertElement(e){if(!(e instanceof Element))return;e.children&&e.children.length&&this.revertElement(e.children[0]),e.nextElementSibling&&this.revertElement(e.nextElementSibling);const t=e.classList,s=[];for(let e=0;e{const o=[];t&&o.push("category="+t.replace(/ /g,"%20")),e&&o.push("term="+e.replace(/ /g,"%20")),n&&o.push("from="+n);const r="?"+o.join("&");i.get({url:`${this.endPoint}${r}${r?"&schema=new":"?schema=new"}`,json:!0},(e,t,n)=>{if(e)return s(null);const i=n.size+n.from;s({servers:n.results,size:n.size,from:n.from,total:n.total,next:i>=n.total?null:i})})})}static async join(e,t=!1){if(t)return gt.acceptInvite(e);try{return await fetch(`${this.joinEndPoint}/${e}`,{method:"GET",credentials:"include",mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),!0}catch(e){return!1}}static async checkConnection(){try{const e=await fetch("https://auth.discordservers.com/info",{method:"GET",credentials:"include",mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),t=await e.json();return this._accessToken=t.access_token,t}catch(e){return!1}}static connect(){return new Promise(e=>{const t=new ft(this.windowOptions),s="https://auth.discordservers.com/connect?scopes=guilds.join&previousUrl="+this.connectEndPoint;t.webContents.on("did-navigate",(s,n)=>{n==this.connectEndPoint&&(t.close(),e())}),t.loadURL(s)})}static get windowOptions(){return{width:380,height:450,backgroundColor:"#282b30",show:!0,resizable:!0,maximizable:!1,minimizable:!1,alwaysOnTop:!0,frame:!1,center:!0,webPreferences:{nodeIntegration:!1}}}}const bt=g.getByDisplayName("SettingsView");class vt extends O.Component{get categoryButtons(){return["All","FPS Games","MMO Games","Strategy Games","MOBA Games","RPG Games","Tabletop Games","Sandbox Games","Simulation Games","Music","Community","Language","Programming","Other"]}constructor(e){super(e),this.state={category:"All",query:"",loading:!0,user:null,results:{servers:[],size:0,from:0,total:0,next:null}},this.changeCategory=this.changeCategory.bind(this),this.searchKeyDown=this.searchKeyDown.bind(this),this.connect=this.connect.bind(this),this.loadNextPage=this.loadNextPage.bind(this),this.join=this.join.bind(this)}componentDidMount(){this.checkConnection()}async checkConnection(){const e=await yt.checkConnection();if(!e)return this.setState({loading:!0,user:null});this.setState({user:e}),this.search()}async connect(){await yt.connect(),this.checkConnection()}searchKeyDown(e){this.state.loading||13!==e.which||this.search(e.target.value)}async search(e="",t=0){this.setState({query:e,loading:!0});const s=await yt.search({term:e,category:"All"==this.state.category?"":this.state.category,from:t});if(!s)return this.setState({results:{servers:[],size:0,from:0,total:0,next:null}});this.setState({loading:!1,results:s})}async changeCategory(e){this.state.loading||(await new Promise(t=>this.setState({category:e},t)),this.search())}loadNextPage(){this.state.loading||this.search(this.state.query,this.state.results.next)}async join(e,t=!1){return await yt.join(e,t)}get searchBox(){return O.createElement(Le,{onKeyDown:this.searchKeyDown,placeholder:k.PublicServers.search+"..."})}get title(){if(!this.state.user)return k.PublicServers.notConnected;if(this.state.loading)return k.PublicServers.loading+"...";const e=this.state.results.from+1,t=this.state.results.total,s=this.state.results.next?this.state.results.next:t;let n=k.PublicServers.results.format({start:e,end:s,total:t,category:this.state.category});return this.state.query&&(n+=" "+k.PublicServers.query.format({query:this.state.query})),n}get content(){const e=this.state.user?null:{title:k.PublicServers.connect,onClick:this.connect},t="All"!=this.state.category&&this.state.user?null:this.bdServer,s=this.state.results.servers.map(e=>O.createElement(ut,{key:e.identifier,server:e,joined:yt.hasJoined(e.identifier),join:this.join,defaultAvatar:yt.getDefaultAvatar}));return[O.createElement(ve,{text:this.title,button:e}),t,s,this.state.results.next?this.nextButton:null,this.state.results.servers.length>0&&O.createElement(ve,{text:this.title})]}get nextButton(){return O.createElement("button",{type:"button",className:"bd-button bd-button-next",onClick:this.loadNextPage},this.state.loading?k.PublicServers.loading:k.PublicServers.loadMore)}get connection(){const{user:e}=this.state;return e?O.createElement("div",{id:"bd-connection"},O.createElement("div",{className:"bd-footnote"},k.PublicServers.connection.format(e)),O.createElement("button",{type:"button",className:"bd-button bd-button-reconnect",onClick:this.connect},k.PublicServers.reconnect)):O.createElement("div",{id:"bd-connection"})}get bdServer(){const e={name:"BetterDiscord",online:"7500+",members:"20000+",categories:["community","programming","support"],description:"Official BetterDiscord server for plugins, themes, support, etc",identifier:"86004744966914048",iconUrl:"https://cdn.discordapp.com/icons/86004744966914048/292e7f6bfff2b71dfd13e508a859aedd.webp",nativejoin:!0,invite_code:"0Tmfo5ZbORCRqbAd",pinned:!0};return O.createElement(ut,{server:e,pinned:!0,joined:yt.hasJoined(e.identifier),defaultAvatar:yt.getDefaultAvatar})}render(){const e=this.categoryButtons.map(e=>({section:e,label:e,element:()=>this.content}));return O.createElement(bt,{onClose:this.props.close,onSetSection:this.changeCategory,section:this.state.category,sections:[{section:"HEADER",label:k.PublicServers.search},{section:"CUSTOM",element:()=>this.searchBox},{section:"HEADER",label:k.PublicServers.categories},...e,{section:"DIVIDER"},{section:"HEADER",label:O.createElement("a",{href:"https://discordservers.com",target:"_blank"},"DiscordServers.com")},{section:"DIVIDER"},{section:"CUSTOM",element:()=>this.connection}],theme:"dark"})}}const wt=g.getByProps("pushLayer");var Ct=new class extends Xe{get name(){return"PublicServers"}get category(){return"general"}get id(){return"publicServers"}enabled(){const e=g.find(e=>e.default&&"NavigableGuilds"==e.default.displayName),t=g.findByDisplayName("Guilds");e||t||this.warn("Can't find GuildList component"),this.guildPatch=this.after(e||t.prototype,e?"default":"render",this._appendButton),this._appendButton()}disabled(){this.unpatchAll(),h.query("#bd-pub-li").remove()}_appendButton(){const e=f.GuildClasses.wrapper.split(" ")[0],t=h.query(`.${e} .scroller-2TZvBN >:first-child`);h.after(t,this.button)}openPublicServers(){wt.pushLayer(()=>f.React.createElement(vt,{close:wt.popLayer}))}get button(){const e=h.createElement(``),t=h.createElement(`
${k.PublicServers.button}
`);return t.addEventListener("click",()=>{this.openPublicServers()}),e.append(t),e}},St=new class extends Xe{get name(){return"VoiceDisconnect"}get category(){return"general"}get id(){return"voiceDisconnect"}constructor(){super(),this.beforeUnload=this.beforeUnload.bind(this)}enabled(){window.addEventListener("beforeunload",this.beforeUnload)}disabled(){window.removeEventListener("beforeunload",this.beforeUnload)}beforeUnload(){f.ChannelActions.selectVoiceChannel(null,null)}};const Et=g.getModule(e=>e.default&&e.default.displayName&&"Message"==e.default.displayName);var Mt=new class extends Xe{get name(){return"ColoredText"}get category(){return"appearance"}get id(){return"coloredText"}enabled(){this.injectColoredText()}disabled(){this.unpatchAll()}injectColoredText(){this.after(Et.prototype,"render",(e,t,s)=>{this.after(s.props,"children",{silent:!0,after:({returnValue:t})=>{const s=t.props.children[1],n=e.props.message.colorString;s&&n&&(s.props.style={color:n})}})})}removeColoredText(){document.querySelectorAll(".markup-2BOw-j").forEach(e=>{e.style.setProperty("color","")})}},xt=new class extends Xe{get name(){return"DarkMode"}get category(){return"appearance"}get id(){return"darkMode"}enabled(){document.getElementById("app-mount").classList.add("bda-dark","bd-dark")}disabled(){document.getElementById("app-mount").classList.remove("bda-dark","bd-dark")}},Nt=new class extends Xe{get name(){return"MinimalMode"}get category(){return"appearance"}get id(){return"minimalMode"}get hideChannelsID(){return"hideChannels"}get hideChannels(){return this.get(this.hideChannelsID)}constructor(){super(),this.enableHideChannels=this.enableHideChannels.bind(this),this.disableHideChannels=this.disableHideChannels.bind(this)}enabled(){document.body.classList.add("bd-minimal"),this.hideChannels&&this.enableHideChannels(),this.hideChannelCancel=this.registerSetting(this.hideChannelsID,this.enableHideChannels,this.disableHideChannels)}disabled(){document.body.classList.remove("bd-minimal"),this.hideChannels&&this.disableHideChannels(),this.hideChannelCancel&&this.hideChannelCancel()}enableHideChannels(){document.body.classList.add("bd-minimal-chan")}disableHideChannels(){document.body.classList.remove("bd-minimal-chan")}},Pt=new class extends Xe{get name(){return"VoiceMode"}get category(){return"appearance"}get id(){return"voiceMode"}enabled(){document.querySelector(".chat-3bRxxu").style.setProperty("visibility","hidden"),document.querySelector(".chat-3bRxxu").style.setProperty("min-width","0px"),document.querySelector(".channels-Ie2l6A").style.setProperty("flex-grow","100000")}disabled(){document.querySelector(".chat-3bRxxu").style.setProperty("visibility",""),document.querySelector(".chat-3bRxxu").style.setProperty("min-width",""),document.querySelector(".channels-Ie2l6A").style.setProperty("flex-grow","")}};const Dt=g.getByDisplayName("Tooltip");class At extends O.Component{constructor(e){super(e),this.state={shouldAnimate:!this.animateOnHover,isFavorite:this.props.isFavorite},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onClick=this.onClick.bind(this),this.toggleFavorite=this.toggleFavorite.bind(this)}get animateOnHover(){return T.get("emotes","general","animateOnHover")}get label(){return this.props.modifier?`${this.props.name}:${this.props.modifier}`:this.props.name}get modifierClass(){return this.props.modifier?" emote"+this.props.modifier:""}onMouseEnter(){!this.state.shouldAnimate&&this.animateOnHover&&this.setState({shouldAnimate:!0})}onMouseLeave(){this.state.shouldAnimate&&this.animateOnHover&&this.setState({shouldAnimate:!1})}onClick(e){this.props.onClick&&this.props.onClick(e)}toggleFavorite(e){e.preventDefault(),e.stopPropagation(),this.state.isFavorite?E.emit("emotes-favorite-removed",this.label):E.emit("emotes-favorite-added",this.label,this.props.url),this.setState({isFavorite:!this.state.isFavorite})}render(){return O.createElement(Dt,{color:"black",position:"top",text:this.label,delay:750},e=>O.createElement("div",Object.assign({className:"emotewrapper"+(this.props.jumboable?" jumboable":""),onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.onClick},e),O.createElement("img",{draggable:!1,className:"emote"+this.modifierClass+(this.props.jumboable?" jumboable":"")+(this.state.shouldAnimate?"":" stop-animation"),dataModifier:this.props.modifier,alt:this.label,src:this.props.url}),O.createElement("input",{className:"fav"+(this.state.isFavorite?" active":""),title:k.Emotes.favoriteAction,type:"button",onClick:this.toggleFavorite})))}}const kt=s(3),Tt={TwitchGlobal:new A("https://static-cdn.jtvnw.net/emoticons/v1/{{id}}/1.0"),TwitchSubscriber:new A("https://static-cdn.jtvnw.net/emoticons/v1/{{id}}/1.0"),FrankerFaceZ:new A("https://cdn.frankerfacez.com/emoticon/{{id}}/1"),BTTV:new A("https://cdn.betterttv.net/emote/{{id}}/1x")},Lt={TwitchGlobal:{},TwitchSubscriber:{},BTTV:{},FrankerFaceZ:{}},jt=[],Bt=["twitch","subscriber","bttv","ffz"],It=["flip","spin","pulse","spin2","spin3","1spin","2spin","3spin","tr","bl","br","shake","shake2","shake3","flap"];var zt=new class extends Xe{get name(){return"Emotes"}get collection(){return"settings"}get category(){return"general"}get id(){return"emotes"}get categories(){return Object.keys(Lt).filter(e=>this.isCategoryEnabled(e))}get shouldDownload(){return T.get("emotes",this.category,"download")}isCategoryEnabled(e){return super.get("emotes","categories",e.toLowerCase())}get(e){return super.get("emotes","general",e)}get MessageComponent(){return g.find(e=>e.default&&e.default.displayName&&"Message"==e.default.displayName)}get Emotes(){return Lt}get TwitchGlobal(){return Lt.TwitchGlobal}get TwitchSubscriber(){return Lt.TwitchSubscriber}get BTTV(){return Lt.BTTV}get FrankerFaceZ(){return Lt.FrankerFaceZ}get blacklist(){return jt}get favorites(){return this.favoriteEmotes}getUrl(e,t){return Tt[e].format({id:Lt[e][t]})}getCategory(e){return Lt[e]}getRemoteFile(e){return u.repoUrl(`data/emotes/${e.toLowerCase()}.json`)}initialize(){super.initialize();const e=w.getBDData("favoriteEmotes");this.favoriteEmotes=e||{},this.addFavorite=this.addFavorite.bind(this),this.removeFavorite=this.removeFavorite.bind(this),this.onCategoryToggle=this.onCategoryToggle.bind(this),this.resetEmotes=this.resetEmotes.bind(this)}async enabled(){T.registerCollection("emotes","Emotes",o,{title:k.Emotes.clearEmotes,onClick:this.resetEmotes}),await this.getBlacklist(),await this.loadEmoteData(),E.on("emotes-favorite-added",this.addFavorite),E.on("emotes-favorite-removed",this.removeFavorite),E.on("setting-updated",this.onCategoryToggle),this.patchMessageContent()}disabled(){E.off("setting-updated",this.onCategoryToggle),E.off("emotes-favorite-added",this.addFavorite),E.off("emotes-favorite-removed",this.removeFavorite),T.removeCollection("emotes"),this.emptyEmotes(),this.cancelEmoteRender&&(this.cancelEmoteRender(),delete this.cancelEmoteRender)}onCategoryToggle(e,t,s,n){if("emotes"==e&&"categories"==t)return n?this.loadEmoteData(s):this.unloadEmoteData(s)}addFavorite(e,t){this.favoriteEmotes.hasOwnProperty(e)||(this.favoriteEmotes[e]=t),this.saveFavorites()}removeFavorite(e){this.favoriteEmotes.hasOwnProperty(e)&&(delete this.favoriteEmotes[e],this.saveFavorites())}isFavorite(e){return this.favoriteEmotes.hasOwnProperty(e)}saveFavorites(){w.setBDData("favoriteEmotes",this.favoriteEmotes)}emptyEmotes(){for(const e in Lt)Object.assign(Lt,{[e]:{}})}patchMessageContent(){this.cancelEmoteRender||(this.cancelEmoteRender=this.before(this.MessageComponent,"default",(e,t)=>{const s=t[0].childrenMessageContent.props.content;if(!s||!s.length)return;for(let e=0;e
"string"==typeof e&&""==e.replace(/\s*/,"")||(!(!e.type||"BDEmote"!=e.type.name)||!!(e.props&&e.props.children&&e.props.children.props&&e.props.children.props.emojiName))))for(const e of s)"object"==typeof e&&("BDEmote"==e.type.name?e.props.jumboable=!0:e.props&&e.props.children&&e.props.children.props&&e.props.children.props.emojiName&&(e.props.children.props.jumboable=!0))}))}async getBlacklist(){try{const e="Blacklist",t=w.emotesExist(e),s=await this.isCacheValid(e),n=s||!s&&t&&!this.shouldDownload?w.getEmoteData(e):await this.downloadEmotes(e);jt.push(...n)}catch(e){}}isCacheValid(e){return new Promise(t=>{const s=w.getCacheHash("emotes",e);if(!s)return t(!1);kt.head({url:this.getRemoteFile(e),headers:{"If-None-Match":s}},(e,s)=>{t(304==s.statusCode)})})}async loadEmoteData(e){e||(e=this.categories),Array.isArray(e)||(e=[e]);const t=Object.keys(Lt);e=e.map(e=>t.find(t=>t.toLowerCase()==e.toLowerCase())),q.show(k.Emotes.loading,{type:"info"}),this.emotesLoaded=!1;for(const t of e){const e=w.emotesExist(t),s=await this.isCacheValid(t);let n=null;if(s||!s&&e&&!this.shouldDownload){this.log(`Loading ${t} emotes from local cache.`);const e=w.getEmoteData(t);Object.keys(e).length>0&&(n=e)}n||(n=await this.downloadEmotes(t)),Object.assign(Lt[t],n),await new Promise(e=>setTimeout(e,1e3))}this.emotesLoaded=!0,E.dispatch("emotes-loaded"),q.show(k.Emotes.loaded,{type:"success"})}unloadEmoteData(e){e||(e=this.categories),Array.isArray(e)||(e=[e]);const t=Object.keys(Lt);e=e.map(e=>t.find(t=>t.toLowerCase()==e.toLowerCase()));for(const t of e)delete Lt[t],Lt[t]={}}downloadEmotes(e){const t=this.getRemoteFile(e);this.log(`Downloading ${e} from ${t}`);const s={url:t,timeout:1e4,json:!0};return new Promise(t=>{kt.get(s,(s,n,i)=>{if(s||200!=n.statusCode)return this.stacktrace(`Could not download ${e} emotes.`,s),t({});for(const e in i)(e.length<4||jt.includes(e)||!i[e])&&delete i[e];w.saveEmoteData(e,i),w.setCacheHash("emotes",e,n.headers.etag),t(i),this.log("Downloaded "+e)})})}resetEmotes(){const e=Object.keys(Lt);this.unloadEmoteData(e);for(const t of e)w.invalidateCache("emotes",t);this.loadEmoteData()}};const Ft=(e,t,s={})=>{const{onContextMenu:n,onClick:i}=s,o=h.createElement(`\n
\n
`);return n&&o.addEventListener("contextmenu",n),o.addEventListener("click",i),o};var Ot=new class extends Xe{get name(){return"EmoteMenu"}get collection(){return"emotes"}get category(){return"general"}get id(){return"emoteMenu"}get hideEmojisID(){return"hideEmojiMenu"}get hideEmojis(){return this.get(this.hideEmojisID)}constructor(){super(),this.lastTab="bd-qem-emojis",this.qmeHeader=h.createElement('\n Twitch \n Favourite \n Emojis\n
');for(const e of this.qmeHeader.getElementsByTagName("button"))e.addEventListener("click",this.switchMenu.bind(this));this.teContainer=h.createElement(''),this.teContainerInner=this.teContainer.querySelector(".emote-menu-inner"),this.faContainer=h.createElement(''),this.faContainerInner=this.faContainer.querySelector(".emote-menu-inner"),this.observer=new MutationObserver(e=>{for(const t of e)this.observe(t)}),this.enableHideEmojis=this.enableHideEmojis.bind(this),this.disableHideEmojis=this.disableHideEmojis.bind(this),this.updateTwitchEmotes=this.updateTwitchEmotes.bind(this)}async enabled(){return W.alert("Emote Menu Broken","Emote Menu is currently broken, it is recommended to disable this until it is fixed.")}disabled(){E.off("emotes-loaded",this.updateTwitchEmotes),this.observer.disconnect(),this.disableHideEmojis(),this.hideEmojiCancel&&this.hideEmojiCancel()}enableHideEmojis(){const e=document.querySelector(".emojiPicker-3m1S-j");e&&e.classList.add("bd-qme-hidden")}disableHideEmojis(){const e=document.querySelector(".emojiPicker-3m1S-j");e&&e.classList.remove("bd-qme-hidden")}insertEmote(e){const t=u.getTextArea();u.insertText(t[0]," "==t.val().slice(-1)?t.val()+e:t.val()+" "+e)}favContext(e){e.stopPropagation();const t=e.target.closest(".emote-container").children[0],s=$('');s.css({top:e.pageY-$("#bd-qem-favourite-container").offset().top,left:e.pageX-$("#bd-qem-favourite-container").offset().left}),$(t).parent().append(s),s.on("click",e=>{e.preventDefault(),e.stopPropagation(),$(t).remove(),zt.removeFavorite($(t).attr("title")),this.updateFavorites(),$(document).off("mousedown.emotemenu")}),$(document).on("mousedown.emotemenu",(function(e){"removemenu"!=e.target.id&&($("#removemenu").remove(),$(document).off("mousedown.emotemenu"))}))}switchMenu(e){let t="string"==typeof e?e:e.target.id;"bd-qem-emojis"==t&&this.hideEmojis&&(t="bd-qem-favourite");const s=$("#bd-qem-twitch"),n=$("#bd-qem-favourite"),i=$("#bd-qem-emojis");switch(s.removeClass("active"),n.removeClass("active"),i.removeClass("active"),$(".emojiPicker-3m1S-j").hide(),$("#bd-qem-favourite-container").hide(),$("#bd-qem-twitch-container").hide(),t){case"bd-qem-twitch":s.addClass("active"),$("#bd-qem-twitch-container").show();break;case"bd-qem-favourite":n.addClass("active"),$("#bd-qem-favourite-container").show();break;case"bd-qem-emojis":i.addClass("active"),$(".emojiPicker-3m1S-j").show(),$(".emojiPicker-3m1S-j input").focus()}t&&(this.lastTab=t)}observe(e){if(!(e.addedNodes.length&&e.addedNodes[0]instanceof Element))return;const t=e.addedNodes[0];if(!t.classList.contains("layer-v9HyYc")||!t.getElementsByClassName("emojiPicker-3m1S-j").length||t.querySelector(".emojiPicker-3m1S-j").parentElement.classList.contains("animatorLeft-1EQxU0"))return;const s=$(t);this.hideEmojis?s.addClass("bd-qme-hidden"):s.removeClass("bd-qme-hidden"),s.prepend(this.qmeHeader),s.append(this.teContainer),s.append(this.faContainer),this.switchMenu(this.lastTab)}updateTwitchEmotes(){for(;this.teContainerInner.firstChild;)this.teContainerInner.firstChild.remove();for(const e in zt.getCategory("TwitchGlobal")){if(!zt.getCategory("TwitchGlobal").hasOwnProperty(e))continue;const t=zt.getUrl("TwitchGlobal",e),s=Ft(e,t,{onClick:this.insertEmote.bind(this,e)});this.teContainerInner.append(s)}}updateFavorites(){for(;this.faContainerInner.firstChild;)this.faContainerInner.firstChild.remove();for(const e in zt.favorites){const t=zt.favorites[e],s=Ft(e,t,{onClick:this.insertEmote.bind(this,e),onContextMenu:this.favContext.bind(this)});this.faContainerInner.append(s)}zt.saveFavorites()}},Rt=new class extends Xe{get name(){return"DeveloperMode"}get category(){return"developer"}get id(){return"developerMode"}get selectorModeID(){return"copySelector"}get selectorMode(){return this.get(this.selectorModeID)}constructor(){super(),this.copySelectorListener=this.copySelectorListener.bind(this)}enabled(){document.addEventListener("contextmenu",this.copySelectorListener)}disabled(){document.removeEventListener("contextmenu",this.copySelectorListener)}copySelectorListener(e){e.stopPropagation();const t=this.getSelector(e.target);setImmediate((function(){let s=h.query(".contextMenu-HLZMGh");if(!s){const t=h.query("#app-mount"),n=h.createElement('');s=h.createElement(''),n.append(s),t.append(n),n.style.top=e.clientY+"px",n.style.left=e.clientX+"px",n.style.zIndex="1002";const i=function(e){e.keyCode&&27!==e.keyCode||(n.remove(),document.removeEventListener("click",i),document.removeEventListener("contextmenu",i),document.removeEventListener("keyup",i))};document.addEventListener("click",i),document.addEventListener("contextmenu",i),document.addEventListener("keyup",i)}const n=h.createElement('
'),i=h.createElement('
');i.append(h.createElement(`
${k.Developer.copySelector}
`)),i.addEventListener("click",()=>{f.ElectronModule.copy(t),s.style.display="none"}),n.append(i),s.append(n)}))}getSelector(e){if(e.id)return"#"+e.id;const t=this.getRules(e),s=t[t.length-1];return s?s.selectorText:e.classList.length?"."+Array.from(e.classList).join("."):"."+Array.from(e.parentElement.classList).join(".")}getRules(e,t=e.ownerDocument.styleSheets){return[...t].filter(e=>!e.href||!e.href.includes("BetterDiscordApp")).map(e=>[...e.cssRules||[]]).flat().filter(t=>t&&t.selectorText&&e.matches(t.selectorText)&&t.style.length&&t.selectorText.split(", ").length<8&&!t.selectorText.split(", ").includes("*"))}},Ut=new class extends Xe{get name(){return"Debugger"}get category(){return"developer"}get id(){return"debuggerHotkey"}enabled(){document.addEventListener("keydown",this.debugListener)}disabled(){document.removeEventListener("keydown",this.debugListener)}debugListener(e){119!==e.which&&118!=e.which||(e.preventDefault(),e.stopImmediatePropagation())}};const Ht=s(0),qt=s(2),$t=s(1),Wt=Ht.remote.BrowserWindow,_t=Ht.remote.getCurrentWebContents();var Gt=new class extends Xe{get name(){return"ReactDevTools"}get category(){return"developer"}get id(){return"reactDevTools"}initialize(){super.initialize(),this.findExtension()}findExtension(){let e="";if(e="win32"===process.platform?$t.resolve(process.env.LOCALAPPDATA,"Google/Chrome/User Data"):"linux"===process.platform?$t.resolve(process.env.HOME,".config/google-chrome"):"darwin"===process.platform?$t.resolve(process.env.HOME,"Library/Application Support/Google/Chrome"):$t.resolve(process.env.HOME,".config/chromium"),e+="/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/",qt.existsSync(e)){const t=qt.readdirSync(e);e=$t.resolve(e,t[t.length-1])}this.extensionPath=e,this.isExtensionInstalled=qt.existsSync(e),this.listener=this.listener.bind(this)}enabled(){if(this.isExtensionInstalled||this.findExtension(),!this.isExtensionInstalled)return W.alert(k.ReactDevTools.notFound,k.ReactDevTools.notFoundDetails);setImmediate(()=>_t.on("devtools-opened",this.listener)),_t.isDevToolsOpened()&&this.listener()}disabled(){_t.removeListener("devtools-opened",this.listener)}listener(){if(!this.isExtensionInstalled)return;Wt.removeDevToolsExtension("React Developer Tools");Wt.addDevToolsExtension(this.extensionPath)?this.log("Successfully installed react devtools."):this.error("Couldn't find react devtools in chrome extensions!")}};class Qt extends O.Component{render(){return O.createElement("svg",{className:"bd-logo "+this.props.className,height:"100%",width:this.props.size||"16px",viewBox:"0 0 2000 2000",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}},O.createElement("metadata",null),O.createElement("defs",null,O.createElement("filter",{id:"shadow1"},O.createElement("feDropShadow",{dx:"20",dy:"0",stdDeviation:"20",floodColor:"rgba(0,0,0,0.35)"})),O.createElement("filter",{id:"shadow2"},O.createElement("feDropShadow",{dx:"15",dy:"0",stdDeviation:"20",floodColor:"rgba(255,255,255,0.15)"})),O.createElement("filter",{id:"shadow3"},O.createElement("feDropShadow",{dx:"10",dy:"0",stdDeviation:"20",floodColor:"rgba(0,0,0,0.35)"}))),O.createElement("g",null,O.createElement("path",{style:{filter:"url(#shadow3)"},fill:"#171717",opacity:"1",d:"M1195.44+135.442L1195.44+135.442L997.6+136.442C1024.2+149.742+1170.34+163.542+1193.64+179.742C1264.34+228.842+1319.74+291.242+1358.24+365.042C1398.14+441.642+1419.74+530.642+1422.54+629.642L1422.54+630.842L1422.54+632.042C1422.54+773.142+1422.54+1228.14+1422.54+1369.14L1422.54+1370.34L1422.54+1371.54C1419.84+1470.54+1398.24+1559.54+1358.24+1636.14C1319.74+1709.94+1264.44+1772.34+1193.64+1821.44C1171.04+1837.14+1025.7+1850.54+1000+1863.54L1193.54+1864.54C1539.74+1866.44+1864.54+1693.34+1864.54+1296.64L1864.54+716.942C1866.44+312.442+1541.64+135.442+1195.44+135.442Z"}),O.createElement("path",{style:{filter:"url(#shadow2)"},fill:"#3E82E5",opacity:"1",d:"M1695.54+631.442C1685.84+278.042+1409.34+135.442+1052.94+135.442L361.74+136.442L803.74+490.442L1060.74+490.442C1335.24+490.442+1335.24+835.342+1060.74+835.342L1060.74+1164.84C1150.22+1164.84+1210.53+1201.48+1241.68+1250.87C1306.07+1353+1245.76+1509.64+1060.74+1509.64L361.74+1863.54L1052.94+1864.54C1409.24+1864.54+1685.74+1721.94+1695.54+1368.54C1695.54+1205.94+1651.04+1084.44+1572.64+999.942C1651.04+915.542+1695.54+794.042+1695.54+631.442Z"}),O.createElement("path",{style:{filter:"url(#shadow1)"},fill:"#FFFFFF",opacity:"1",d:"M1469.25+631.442C1459.55+278.042+1183.05+135.442+826.65+135.442L135.45+135.442L135.45+1004C135.45+1004+135.427+1255.21+355.626+1255.21C575.825+1255.21+575.848+1004+575.848+1004L577.45+490.442L834.45+490.442C1108.95+490.442+1108.95+835.342+834.45+835.342L664.65+835.342L664.65+1164.84L834.45+1164.84C923.932+1164.84+984.244+1201.48+1015.39+1250.87C1079.78+1353+1019.47+1509.64+834.45+1509.64L135.45+1509.64L135.45+1864.54L826.65+1864.54C1182.95+1864.54+1459.45+1721.94+1469.25+1368.54C1469.25+1205.94+1424.75+1084.44+1346.35+999.942C1424.75+915.542+1469.25+794.042+1469.25+631.442Z"})))}}const Vt=f.React,Zt=g.getByDisplayName("Tooltip");var Yt=new class{initialize(){u.suppressErrors(this.patchSocial.bind(this),"BD Social Patch")(),u.suppressErrors(this.patchGuildPills.bind(this),"BD Guild Pills Patch")(),u.suppressErrors(this.patchGuildListItems.bind(this),"BD Guild List Items Patch")(),u.suppressErrors(this.patchGuildSeparator.bind(this),"BD Guild Separator Patch")(),u.suppressErrors(this.patchMessageHeader.bind(this),"BD Message Header Patch")(),u.suppressErrors(this.patchMemberList.bind(this),"BD Member List Patch")()}patchSocial(){if(this.socialPatch)return;const e=g.getByDisplayName("TabBar"),t=g.getByDisplayName("Anchor");e&&(this.socialPatch=L.after("ComponentPatcher",e.prototype,"render",(e,s,n)=>{const o=n.props.children;if(!o||!o.length||o.length<3)return;if("Separator"!==o[o.length-3].type.displayName)return;if(!o[o.length-2].type.toString().includes("socialLinks"))return;if(t){const e=o[o.length-2].type,s=function(){const s=e(...arguments);return s.props.children.push(f.React.createElement(t,{className:"bd-social-link",href:"https://twitter.com/BandagedBD",title:"BandagedBD",target:"_blank"},f.React.createElement(Qt,{size:"16px",className:"bd-social-logo"}))),s};o[o.length-2].type=s}const r=f.React.createElement("div",{className:"colorMuted-HdFt4q size12-3cLvbJ"},"Injector "+i.version),a=`(${i.hash?i.hash.substring(0,7):i.branch})`,l=f.React.createElement("div",{className:"colorMuted-HdFt4q size12-3cLvbJ"},`BBD ${i.bbdVersion} `,f.React.createElement("span",{className:"versionHash-2gXjIB da-versionHash"},a)),d=o[o.length-1].type;o[o.length-1].type=function(){const e=d(...arguments);return e.props.children.splice(e.props.children.length-1,0,r),e.props.children.splice(1,0,l),e}}))}patchGuildListItems(){if(this.guildListItemsPatch)return;const e=f.GuildClasses.listItem.split(" ")[0],t=f.GuildClasses.blobContainer.split(" ")[0],s=u.getReactInstance(document.querySelector(`.${e} .${t}`).parentElement).return.type;s&&(this.guildListItemsPatch=L.after("ComponentPatcher",s.prototype,"render",(e,t,s)=>{if(!s||!e)return;const n=e.props;return s.props.className+=" bd-guild",n.unread&&(s.props.className+=" bd-unread"),n.selected&&(s.props.className+=" bd-selected"),n.audio&&(s.props.className+=" bd-audio"),n.video&&(s.props.className+=" bd-video"),n.badge&&(s.props.className+=" bd-badge"),n.animatable&&(s.props.className+=" bd-animatable"),s}))}patchGuildPills(){if(this.guildPillPatch)return;const e=g.getModule(e=>e.default&&!e.default.displayName&&e.default.toString&&e.default.toString().includes("translate3d"));e&&(this.guildPillPatch=L.after("ComponentPatcher",e,"default",(e,t,s)=>{const n=t[0];return n.unread&&(s.props.className+=" bd-unread"),n.selected&&(s.props.className+=" bd-selected"),n.hovered&&(s.props.className+=" bd-hovered"),s}))}patchGuildSeparator(){if(this.guildSeparatorPatch)return;const e=g.getByDisplayName("Guilds"),t=g.getByProps("renderListItem");if(!t||!e)return;const s=function(){const e=t.Separator(...arguments);return e.props.className+=" bd-guild-separator",e};this.guildSeparatorPatch=L.after("ComponentPatcher",e.prototype,"render",(e,t,n)=>{const i=u.findInReactTree(n,e=>e.type&&!e.type.displayName&&"function"==typeof e.type&&u.isEmpty(e.props));i&&(i.type=s)})}patchMessageHeader(){if(this.messageHeaderPatch)return;const e=g.getByProps("MessageTimestamp"),t=g.find(e=>"Anchor"==e.displayName);t&&e&&e.default&&(this.messageHeaderPatch=L.after("ComponentPatcher",e,"default",(e,s,n)=>{const i=u.getNestedProp(s[0],"message.author"),o=u.getNestedProp(n,"props.children.1.props.children.1.props.children");o&&i&&i.id&&"249746236008169473"===i.id&&Array.isArray(o)&&o.push(Vt.createElement(Zt,{color:"black",position:"top",text:"BandagedBD Developer"},e=>Vt.createElement(t,Object.assign({className:"bd-chat-badge",href:"https://github.com/rauenzi/BetterDiscordApp",title:"BandagedBD",target:"_blank"},e),Vt.createElement(Qt,{size:"16px",className:"bd-logo"}))))}))}patchMemberList(){if(this.memberListPatch)return;const e=g.findByDisplayName("MemberListItem"),t=g.find(e=>"Anchor"==e.displayName);t&&e&&e.prototype&&e.prototype.renderDecorators&&(this.memberListPatch=L.after("ComponentPatcher",e.prototype,"renderDecorators",(e,s,n)=>{const i=u.getNestedProp(e,"props.user"),o=u.getNestedProp(n,"props.children");o&&i&&i.id&&"249746236008169473"===i.id&&Array.isArray(o)&&o.push(Vt.createElement(Zt,{color:"black",position:"top",text:"BandagedBD Developer"},e=>Vt.createElement(t,Object.assign({className:"bd-member-badge",href:"https://github.com/rauenzi/BetterDiscordApp",title:"BandagedBD",target:"_blank"},e),Vt.createElement(Qt,{size:"16px",className:"bd-logo"}))))}))}};const Jt=document.createElement("style");Jt.textContent="/* BEGIN V2 LOADER */\n/* =============== */\n\n#bd-loading-icon {\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+IDwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBoZWlnaHQ9IjEwMCUiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7IiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMTAwJSIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMjAwMCAyMDAwIj4gICAgPG1ldGFkYXRhIC8+ICAgIDxkZWZzPiAgICAgICAgPGZpbHRlciBpZD0ic2hhZG93MSI+ICAgICAgICA8ZmVEcm9wU2hhZG93IGR4PSIyMCIgZHk9IjAiIHN0ZERldmlhdGlvbj0iMjAiIGZsb29kLWNvbG9yPSJyZ2JhKDAsMCwwLDAuMzUpIi8+ICAgICAgICA8L2ZpbHRlcj4gICAgICAgIDxmaWx0ZXIgaWQ9InNoYWRvdzIiPiAgICAgICAgPGZlRHJvcFNoYWRvdyBkeD0iMTUiIGR5PSIwIiBzdGREZXZpYXRpb249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AwNCs1NzUuODQ4KzEwMDRMNTc3LjQ1KzQ5MC40NDJMODM0LjQ1KzQ5MC40NDJDMTEwOC45NSs0OTAuNDQyKzExMDguOTUrODM1LjM0Mis4MzQuNDUrODM1LjM0Mkw2NjQuNjUrODM1LjM0Mkw2NjQuNjUrMTE2NC44NEw4MzQuNDUrMTE2NC44NEM5MjMuOTMyKzExNjQuODQrOTg0LjI0NCsxMjAxLjQ4KzEwMTUuMzkrMTI1MC44N0MxMDc5Ljc4KzEzNTMrMTAxOS40NysxNTA5LjY0KzgzNC40NSsxNTA5LjY0TDEzNS40NSsxNTA5LjY0TDEzNS40NSsxODY0LjU0TDgyNi42NSsxODY0LjU0QzExODIuOTUrMTg2NC41NCsxNDU5LjQ1KzE3MjEuOTQrMTQ2OS4yNSsxMzY4LjU0QzE0NjkuMjUrMTIwNS45NCsxNDI0Ljc1KzEwODQuNDQrMTM0Ni4zNSs5OTkuOTQyQzE0MjQuNzUrOTE1LjU0MisxNDY5LjI1Kzc5NC4wNDIrMTQ2OS4yNSs2MzEuNDQyWiIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMSIvPiAgICA8L2c+PC9zdmc+);\n}\n#bd-loading-icon {\n position: fixed;\n bottom:5px;\n right:5px;\n z-index: 2147483647;\n display: block;\n width: 20px;\n height: 20px;\n background-size: 100% 100%;\n animation: bd-loading-animation 1.5s ease-in-out infinite;\n}\n\n@keyframes bd-loading-animation {\n 0% { opacity: 0.05; }\n 50% { opacity: 0.6; }\n 100% { opacity: 0.05; }\n}\n/* =============== */\n/* END V2 LOADER */";const Kt=document.createElement("div");Kt.id="bd-loading-icon",Kt.className="bd-loaderv2",Kt.title="BandagedBD is loading...";var Xt=class{static show(){document.body.appendChild(Jt),document.body.appendChild(Kt)}static hide(){Jt&&Jt.remove(),Kt&&Kt.remove()}};const{ipcRenderer:es}=s(0),ts=f.GuildClasses;var ss=new class{constructor(){es.invoke("bd-config","get").then(e=>{this.hasStarted||(Object.assign(i,e),this.init())})}get dependencies(){return[{name:"jquery",type:"script",url:"//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js",backup:"//cdn.jsdelivr.net/gh/jquery/jquery@2.0.0/jquery.min.js",local:null},{name:"bd-stylesheet",type:"style",url:"//cdn.staticaly.com/gh/{{repo}}/BetterDiscordApp/{{hash}}/css/main{{minified}}.css",backup:"//rauenzi.github.io/BetterDiscordApp/css/main{{minified}}.css",local:"{{localServer}}/BetterDiscordApp/css/main.css"}]}setConfig(e){this.hasStarted||Object.assign(i,e)}async init(){if(this.hasStarted)return;this.hasStarted=!0;let e=new Promise(e=>e());if(window.$&&window.jQuery||(e=this.loadDependencies()),w.initialize(),await D.initialize(),i.version
i.version&&W.showConfirmationModal(k.Startup.updateAvailable,k.Startup.updateInfo.format({version:t}),{confirmText:k.Startup.updateNow,cancelText:k.Startup.maybeLater,onConfirm:async()=>{const e=()=>{W.alert(k.Startup.updateFailed,k.Startup.manualUpdate)};try{if(!await this.updateInjector())return e();const t=s(0).remote.app;t.relaunch(),t.exit()}catch(t){e()}}}),c.log("Startup","Initializing Settings"),T.initialize(),await this.waitForGuilds(),F.initialize(),Yt.initialize();for(const e in n)n[e].initialize();await e,c.log("Startup","Loading Plugins");const o=Qe.initialize();c.log("Startup","Loading Themes");const r=Ze.initialize();c.log("Startup","Removing Loading Icon"),Xt.hide(),c.log("Startup","Collecting Startup Errors"),W.showAddonErrors({plugins:o,themes:r});const a=w.getBDData("version");i.bbdVersion>a&&(W.showChangelogModal(l),w.setBDData("version",i.bbdVersion))}waitForGuilds(){let e=0;return new Promise(t=>{const s=function(){e++,"complete"!=document.readyState&&setTimeout(s,100);const n=ts.wrapper.split(" ")[0],o=ts.listItem.split(" ")[0],r=ts.blobContainer.split(" ")[0];return document.querySelectorAll(`.${n} .${o} .${r}`).length>0||e>=50?t(i.deferLoaded=!0):void setTimeout(s,100)};s()})}async loadDependencies(){for(const e of this.dependencies){const t=u.formatString(i.local&&null!=e.local?e.local:e.url,{repo:i.repo,hash:i.hash,minified:i.minified?".min":"",localServer:i.localServer});c.log("Startup",`Loading Resource (${t})`);const s=("script"==e.type?C.injectScript:C.linkStyle).bind(C);try{await s(e.name,t)}catch(n){const o=u.formatString(e.backup,{minified:i.minified?".min":""});c.stacktrace("Startup",`Could not load ${t}. Using backup ${o}`,n);try{await s(e.name,o)}catch(s){c.stacktrace("Startup",`Could not load ${t}. Using backup ${o}`,n),"jquery"===e.name&&W.alert(k.Startup.jqueryFailed,k.Startup.jqueryFailedDetails)}}}}async updateInjector(){const e=w.injectionPath;if(!e)return!1;const t=s(2),n=s(1),i=s(6),o=s(7),r=s(8),a=s(3),l=n.resolve(e,".."),d=n.basename(e),h="https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip",u=n.resolve(l,"injector.zip"),p=n.resolve(l,"BetterDiscordApp-injector");c.log("InjectorUpdate","Downloading "+h);let m=await new Promise(e=>{a.get({url:h,encoding:null},async(s,n,i)=>{if(s||200!==n.statusCode)return e(!1);await new Promise(e=>t.exists(u,e))&&await new Promise(e=>t.rename(u,`${u}.bak${Math.round(performance.now())}`,e)),c.log("InjectorUpdate","Writing "+u),t.writeFile(u,i,t=>e(!t))})});if(!m)return m;await new Promise(e=>t.exists(p,e))&&await new Promise(e=>t.rename(p,`${p}.bak${Math.round(performance.now())}`,e));const g=await new Promise(e=>o.open(u,{lazyEntries:!0},(t,s)=>e(s)));g.on("entry",(function(e){if(e.fileName.endsWith("/"))return g.readEntry();c.log("InjectorUpdate","Extracting "+e.fileName);const s=n.resolve(l,e.fileName);r.sync(n.dirname(s)),g.openReadStream(e,(function(e,n){if(e)return m=!1;n.on("end",(function(){g.readEntry()})),n.pipe(t.createWriteStream(s))}))})),g.readEntry(),await new Promise(e=>g.once("end",e));const f=n.resolve(l,`${d}.bak${Math.round(performance.now())}`);return await new Promise(s=>t.rename(e,f,s)),c.log("InjectorUpdate",`Renaming ${n.basename(p)} to ${d}`),m=await new Promise(s=>t.rename(p,e,e=>s(!e))),m?m?(await new Promise(e=>i(f,e)),await new Promise(e=>t.unlink(u,e)),c.log("InjectorUpdate","Injector Updated!"),m):(c.err("InjectorUpdate","Something went wrong... restoring backups."),await new Promise(e=>i(p,e)),await new Promise(s=>t.rename(f,e,s)),m):(c.err("InjectorUpdate","Failed to rename the final directory"),m)}};!function(){const e=Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"contentWindow").get;Object.defineProperty(HTMLIFrameElement.prototype,"contentWindow",{get:function(){const t=Reflect.apply(e,this,arguments);return new Proxy(t,{getOwnPropertyDescriptor:function(e,t){if("localStorage"!==t)return Object.getOwnPropertyDescriptor(e,t)},get:function(e,t){if("localStorage"===t)return null;const s=e[t];return"function"==typeof s?s.bind(e):s}})}}),Object.defineProperty(Reflect,"apply",{value:Reflect.apply,writable:!1,configurable:!1}),Object.defineProperty(Function.prototype,"bind",{value:Function.prototype.bind,writable:!1,configurable:!1});const t=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const e=arguments[1];return e.toLowerCase().includes("api/webhooks")?null:Reflect.apply(t,this,arguments)}}(),function(){const e="betterdiscord/",t=s(4),n=t._load;t._load=function(t){if("betterdiscord"===t||t.startsWith(e)){if("bdapi"==t.substr(e.length))return Ke}return n.apply(this,arguments)}}(),window.BdApi=Ke,Xt.show();class ns{constructor(e){ss.setConfig(e)}init(){ss.init()}}}]).default;
\ No newline at end of file
diff --git a/src/builtins/developer/copyselector.js b/src/builtins/developer/copyselector.js
index 953eb8a4..0821b77d 100644
--- a/src/builtins/developer/copyselector.js
+++ b/src/builtins/developer/copyselector.js
@@ -1,5 +1,5 @@
import Builtin from "../../structs/builtin";
-import {DOM, DiscordModules} from "modules";
+import {DOM, DiscordModules, Strings} from "modules";
export default new class DeveloperMode extends Builtin {
get name() {return "DeveloperMode";}
@@ -49,7 +49,7 @@ export default new class DeveloperMode extends Builtin {
const cmg = DOM.createElement(``);
const cmi = DOM.createElement(`
`);
- cmi.append(DOM.createElement(`
Copy Selector
`));
+ cmi.append(DOM.createElement(`
${Strings.Developer.copySelector}
`));
cmi.addEventListener("click", () => {
DiscordModules.ElectronModule.copy(selector);
cm.style.display = "none";
diff --git a/src/builtins/developer/reactdevtools.js b/src/builtins/developer/reactdevtools.js
index ddcdb4e7..c6d6f062 100644
--- a/src/builtins/developer/reactdevtools.js
+++ b/src/builtins/developer/reactdevtools.js
@@ -1,6 +1,6 @@
import Builtin from "../../structs/builtin";
import Modals from "../../ui/modals";
-
+import {Strings} from "modules";
const electron = require("electron");
const fs = require("fs");
@@ -37,7 +37,7 @@ export default new class ReactDevTools extends Builtin {
enabled() {
if (!this.isExtensionInstalled) this.findExtension();
- if (!this.isExtensionInstalled) return Modals.alert("Extension Not Found", "Unable to find the React Developer Tools extension on your PC. Please install the extension on your local Chrome installation.");
+ if (!this.isExtensionInstalled) return Modals.alert(Strings.ReactDevTools.notFound, Strings.ReactDevTools.notFoundDetails);
setImmediate(() => webContents.on("devtools-opened", this.listener));
if (webContents.isDevToolsOpened()) this.listener();
}
diff --git a/src/builtins/emotes/emotemenu.js b/src/builtins/emotes/emotemenu.js
index 4c68b1a8..2ba552e3 100644
--- a/src/builtins/emotes/emotemenu.js
+++ b/src/builtins/emotes/emotemenu.js
@@ -68,6 +68,7 @@ export default new class EmoteMenu extends Builtin {
}
async enabled() {
+ // Temporary measure, so not using Strings/translation
return Modals.alert("Emote Menu Broken", "Emote Menu is currently broken, it is recommended to disable this until it is fixed.");
// this.log("Starting to observe");
// this.observer.observe(document.getElementById("app-mount"), {
diff --git a/src/data/strings.js b/src/data/strings.js
index dc1eb275..2956d2df 100644
--- a/src/data/strings.js
+++ b/src/data/strings.js
@@ -211,15 +211,14 @@ export default {
confirmationText: "You have unsaved changes to {{name}}. Closing this window will lose all those changes.",
enabled: "{{name}} has been enabled.",
disabled: "{{name}} has been disabled.",
+ couldNotEnable: "{{name}} could not be enabled.",
+ couldNotDisable: "{{name}} could not be disabled.",
+ couldNotStart: "{{name}} could not be started.",
+ couldNotStop: "{{name}} could not be stopped.",
+ methodError: "{{method}} could not be fired.",
unknownAuthor: "Unknown Author",
noDescription: "Description not provided."
},
- Emotes: {
- loading: "Loading emotes in the background do not reload.",
- loaded: "All emotes successfully loaded.",
- clearEmotes: "Clear Emote Data",
- favoriteAction: "Favorite!"
- },
CustomCSS: {
confirmationText: "You have unsaved changes to your Custom CSS. Closing this window will lose all those changes.",
update: "Update",
@@ -229,6 +228,15 @@ export default {
settings: "Editor Settings",
editorTitle: "Custom CSS Editor"
},
+ Developer: {
+ copySelector: "Copy Selector"
+ },
+ Emotes: {
+ loading: "Loading emotes in the background do not reload.",
+ loaded: "All emotes successfully loaded.",
+ clearEmotes: "Clear Emote Data",
+ favoriteAction: "Favorite!"
+ },
PublicServers: {
button: "public",
join: "Join",
@@ -259,16 +267,16 @@ export default {
restartLater: "Restart Later",
additionalInfo: "Additional Info"
},
+ ReactDevTools: {
+ notFound: "Extension Not Found",
+ notFoundDetails: "Unable to find the React Developer Tools extension on your PC. Please install the extension on your local Chrome installation."
+ },
Sorting: {
sortBy: "Sort By",
order: "Order",
ascending: "Ascending",
descending: "Descending"
},
- WindowPrefs: {
- enabledInfo: "This option requires a transparent theme in order to work properly. On Windows this may break your aero snapping and maximizing.\n\nIn order to take effect, Discord needs to be restarted. Do you want to restart now?",
- disabledInfo: "In order to take effect, Discord needs to be restarted. Do you want to restart now?"
- },
Startup: {
notSupported: "Not Supported",
versionMismatch: "BandagedBD Injector v{{injector}} is not supported by the latest remote (v{{remote}}).\n\nPlease download the latest version from [GitHub](https://github.com/rauenzi/BetterDiscordApp/releases/latest)",
@@ -278,6 +286,12 @@ export default {
updateAvailable: "Update Available",
updateInfo: "There is an update available for BandagedBD's Injector ({{version}}).\n\nYou can either update and restart now, or later.",
updateFailed: "Could Not Update",
- manualUpdate: "Unable to update automatically, please download the installer and reinstall normally.\n\n[Download Installer](https://github.com/rauenzi/BetterDiscordApp/releases/latest)"
+ manualUpdate: "Unable to update automatically, please download the installer and reinstall normally.\n\n[Download Installer](https://github.com/rauenzi/BetterDiscordApp/releases/latest)",
+ jqueryFailed: "jQuery Failed To Load",
+ jqueryFailedDetails: "jQuery could not be loaded, and some plugins may not work properly. Proceed at your own risk."
+ },
+ WindowPrefs: {
+ enabledInfo: "This option requires a transparent theme in order to work properly. On Windows this may break your aero snapping and maximizing.\n\nIn order to take effect, Discord needs to be restarted. Do you want to restart now?",
+ disabledInfo: "In order to take effect, Discord needs to be restarted. Do you want to restart now?"
}
};
diff --git a/src/index.js b/src/index.js
index e3f39c12..d37fd490 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,51 +1,18 @@
-// import {Config} from "data";
import secure from "./secure";
+import patchModuleLoad from "./moduleloader";
import Core from "./modules/core";
import BdApi from "./modules/pluginapi";
-// import PluginManager from "./modules/pluginmanager";
-// import ThemeManager from "./modules/thememanager";
-// import Events from "./modules/emitter";
-// import Settings from "./modules/settingsmanager";
-// import DataStore from "./modules/datastore";
-// import EmoteModule from "./builtins/emotes/emotes";
-// import DomManager from "./modules/dommanager";
-// import Utilities from "./modules/utilities";
-// import ReactComponents from "./modules/reactcomponents";
-// import Strings from "./modules/strings";
+import LoadingIcon from "./loadingicon";
// Perform some setup
secure();
-
-const loadingIcon = document.createElement("div");
-loadingIcon.className = "bd-loaderv2";
-loadingIcon.title = "BandagedBD is loading...";
-document.body.appendChild(loadingIcon);
-
-// window.Core = Core;
+patchModuleLoad();
window.BdApi = BdApi;
-// window.settings = SettingsInfo;
-// window.settingsCookie = SettingsCookie;
-// window.pluginCookie = PluginCookie;
-// window.themeCookie = ThemeCookie;
-// window.pluginModule = PluginManager;
-// window.themeModule = ThemeManager;
-// // window.bdthemes = Themes;
-// // window.bdplugins = Plugins;
-// window.bdEmotes = EmoteModule.Emotes;
-// window.bemotes = EmoteModule.blacklist;
-// // window.bdPluginStorage = bdPluginStorage;
-// window.settingsModule = Settings;
-// window.DataStore = DataStore;
+// Add loading icon at the bottom right
+LoadingIcon.show();
-// window.DomManager = DomManager;
-// window.utils = Utilities;
-// window.Components = ReactComponents;
-
-// window.BDEvents = Events;
-// window.bdConfig = Config;
-// window.Strings = Strings;
-
+// Backwards compatibility for now
export default class CoreWrapper {
constructor(config) {
Core.setConfig(config);
@@ -54,39 +21,4 @@ export default class CoreWrapper {
init() {
Core.init();
}
-}
-
-function patchModuleLoad() {
- const namespace = "betterdiscord";
- const prefix = `${namespace}/`;
- const Module = require("module");
- const load = Module._load;
- // const resolveFilename = Module._resolveFilename;
-
- Module._load = function(request) {
- if (request === namespace || request.startsWith(prefix)) {
- const requested = request.substr(prefix.length);
- if (requested == "api") return BdApi;
- }
-
- return load.apply(this, arguments);
- };
-
- // Module._resolveFilename = function (request, parent, isMain) {
- // if (request === "betterdiscord" || request.startsWith("betterdiscord/")) {
- // const contentPath = PluginManager.getPluginPathByModule(parent);
- // if (contentPath) return request;
- // }
-
- // return resolveFilename.apply(this, arguments);
- // };
-
- return function() {
- Module._load = load;
- };
-}
-
-patchModuleLoad();
-
-// var settingsPanel, emoteModule, quickEmoteMenu, voiceMode,, dMode, publicServersModule;
-// var bdConfig = null;
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/loadingicon.js b/src/loadingicon.js
new file mode 100644
index 00000000..1cacf79f
--- /dev/null
+++ b/src/loadingicon.js
@@ -0,0 +1,45 @@
+const css = `/* BEGIN V2 LOADER */
+/* =============== */
+
+#bd-loading-icon {
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+IDwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBoZWlnaHQ9IjEwMCUiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtz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QzE0MjQuNzUrOTE1LjU0MisxNDY5LjI1Kzc5NC4wNDIrMTQ2OS4yNSs2MzEuNDQyWiIgZmlsbD0iI0ZGRkZGRiIgb3BhY2l0eT0iMSIvPiAgICA8L2c+PC9zdmc+);
+}
+#bd-loading-icon {
+ position: fixed;
+ bottom:5px;
+ right:5px;
+ z-index: 2147483647;
+ display: block;
+ width: 20px;
+ height: 20px;
+ background-size: 100% 100%;
+ animation: bd-loading-animation 1.5s ease-in-out infinite;
+}
+
+@keyframes bd-loading-animation {
+ 0% { opacity: 0.05; }
+ 50% { opacity: 0.6; }
+ 100% { opacity: 0.05; }
+}
+/* =============== */
+/* END V2 LOADER */`;
+
+const iconStyle = document.createElement("style");
+iconStyle.textContent = css;
+
+const loadingIcon = document.createElement("div");
+loadingIcon.id = "bd-loading-icon";
+loadingIcon.className = "bd-loaderv2";
+loadingIcon.title = "BandagedBD is loading...";
+
+export default class {
+ static show() {
+ document.body.appendChild(iconStyle);
+ document.body.appendChild(loadingIcon);
+ }
+
+ static hide() {
+ if (iconStyle) iconStyle.remove();
+ if (loadingIcon) loadingIcon.remove();
+ }
+}
\ No newline at end of file
diff --git a/src/moduleloader.js b/src/moduleloader.js
new file mode 100644
index 00000000..29258c22
--- /dev/null
+++ b/src/moduleloader.js
@@ -0,0 +1,21 @@
+import BdApi from "./modules/pluginapi";
+
+export default function() {
+ const namespace = "betterdiscord";
+ const prefix = `${namespace}/`;
+ const Module = require("module");
+ const load = Module._load;
+
+ Module._load = function(request) {
+ if (request === namespace || request.startsWith(prefix)) {
+ const requested = request.substr(prefix.length);
+ if (requested == "bdapi") return BdApi;
+ }
+
+ return load.apply(this, arguments);
+ };
+
+ return function() {
+ Module._load = load;
+ };
+}
\ No newline at end of file
diff --git a/src/modules/addonmanager.js b/src/modules/addonmanager.js
index 1b5a86e6..40847b95 100644
--- a/src/modules/addonmanager.js
+++ b/src/modules/addonmanager.js
@@ -221,6 +221,10 @@ export default class AddonManager {
return this.state[addon.id];
}
+ getAddon(idOrFile) {
+ return this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);
+ }
+
enableAddon(idOrAddon) {
const addon = typeof(idOrAddon) == "string" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;
if (!addon) return;
diff --git a/src/modules/core.js b/src/modules/core.js
index c9b0f7ef..d94cff38 100644
--- a/src/modules/core.js
+++ b/src/modules/core.js
@@ -15,187 +15,236 @@ import DataStore from "./datastore";
import DiscordModules from "./discordmodules";
import ComponentPatcher from "./componentpatcher";
import Strings from "./strings";
+import LoadingIcon from "../loadingicon";
+import Utilities from "./utilities";
-
+const {ipcRenderer} = require("electron");
const GuildClasses = DiscordModules.GuildClasses;
-function Core() {
-}
-
-Core.prototype.setConfig = function(config) {
- Object.assign(Config, config);
-};
-
-Core.prototype.init = async function() {
-
- DataStore.initialize();
- await LocaleManager.initialize();
-
- if (Config.version < Config.minSupportedVersion) {
- return Modals.alert(Strings.Startup.notSupported, Strings.Startup.versionMismatch.format({injector: Config.version, remote: Config.bbdVersion}));
+export default new class Core {
+ constructor() {
+ ipcRenderer.invoke("bd-config", "get").then(injectorConfig => {
+ if (this.hasStarted) return;
+ Object.assign(Config, injectorConfig);
+ this.init();
+ });
}
- if (window.ED) {
- return Modals.alert(Strings.Startup.notSupported, Strings.Startup.incompatibleApp.format({app: "EnhancedDiscord"}));
- }
-
- if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes("Patched")) {
- return Modals.alert(Strings.Startup.notSupported, Strings.Startup.incompatibleApp.format({app: "Powercord"}));
- }
-
- const latestLocalVersion = Config.updater ? Config.updater.LatestVersion : Config.latestVersion;
- if (latestLocalVersion > Config.version) {
- Modals.showConfirmationModal(Strings.Startup.updateAvailable, Strings.Startup.updateInfo.format({version: latestLocalVersion}), {
- confirmText: Strings.Startup.updateNow,
- cancelText: Strings.Startup.maybeLater,
- onConfirm: async () => {
- const onUpdateFailed = () => {Modals.alert(Strings.Startup.updateFailed, Strings.Startup.manualUpdate);};
- try {
- const didUpdate = await this.updateInjector();
- if (!didUpdate) return onUpdateFailed();
- const app = require("electron").remote.app;
- app.relaunch();
- app.exit();
- }
- catch (err) {
- onUpdateFailed();
- }
+ get dependencies() {
+ return [
+ {
+ name: "jquery",
+ type: "script",
+ url: "//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js",
+ backup: "//cdn.jsdelivr.net/gh/jquery/jquery@2.0.0/jquery.min.js",
+ local: null
+ },
+ {
+ name: "bd-stylesheet",
+ type: "style",
+ url: "//cdn.staticaly.com/gh/{{repo}}/BetterDiscordApp/{{hash}}/css/main{{minified}}.css",
+ backup: "//rauenzi.github.io/BetterDiscordApp/css/main{{minified}}.css",
+ local: "{{localServer}}/BetterDiscordApp/css/main.css"
}
+ ];
+ }
+
+ setConfig(config) {
+ if (this.hasStarted) return;
+ Object.assign(Config, config);
+ }
+
+ async init() {
+ if (this.hasStarted) return;
+ this.hasStarted = true;
+
+ // Load dependencies asynchronously if they don't exist
+ let dependencyPromise = new Promise(r => r());
+ if (!window.$ || !window.jQuery) dependencyPromise = this.loadDependencies();
+
+ DataStore.initialize();
+ await LocaleManager.initialize();
+
+ if (Config.version < Config.minSupportedVersion) return Modals.alert(Strings.Startup.notSupported, Strings.Startup.versionMismatch.format({injector: Config.version, remote: Config.bbdVersion}));
+ if (window.ED) return Modals.alert(Strings.Startup.notSupported, Strings.Startup.incompatibleApp.format({app: "EnhancedDiscord"}));
+ if (window.WebSocket && window.WebSocket.name && window.WebSocket.name.includes("Patched")) return Modals.alert(Strings.Startup.notSupported, Strings.Startup.incompatibleApp.format({app: "Powercord"}));
+
+ const latestLocalVersion = Config.updater ? Config.updater.LatestVersion : Config.latestVersion;
+ if (latestLocalVersion > Config.version) {
+ Modals.showConfirmationModal(Strings.Startup.updateAvailable, Strings.Startup.updateInfo.format({version: latestLocalVersion}), {
+ confirmText: Strings.Startup.updateNow,
+ cancelText: Strings.Startup.maybeLater,
+ onConfirm: async () => {
+ const onUpdateFailed = () => { Modals.alert(Strings.Startup.updateFailed, Strings.Startup.manualUpdate); };
+ try {
+ const didUpdate = await this.updateInjector();
+ if (!didUpdate) return onUpdateFailed();
+ const app = require("electron").remote.app;
+ app.relaunch();
+ app.exit();
+ }
+ catch (err) {
+ onUpdateFailed();
+ }
+ }
+ });
+ }
+
+
+ Logger.log("Startup", "Initializing Settings");
+ Settings.initialize();
+
+ // DOMManager.initialize();
+ await this.waitForGuilds();
+ ReactComponents.initialize();
+ ComponentPatcher.initialize();
+ for (const module in Builtins) Builtins[module].initialize();
+
+ await dependencyPromise;
+ Logger.log("Startup", "Loading Plugins");
+ const pluginErrors = PluginManager.initialize();
+
+ Logger.log("Startup", "Loading Themes");
+ const themeErrors = ThemeManager.initialize();
+
+ Logger.log("Startup", "Removing Loading Icon");
+ LoadingIcon.hide();
+
+ // Show loading errors
+ Logger.log("Startup", "Collecting Startup Errors");
+ Modals.showAddonErrors({plugins: pluginErrors, themes: themeErrors});
+
+ const previousVersion = DataStore.getBDData("version");
+ if (Config.bbdVersion > previousVersion) {
+ Modals.showChangelogModal(Changelog);
+ DataStore.setBDData("version", Config.bbdVersion);
+ }
+ }
+
+ waitForGuilds() {
+ let timesChecked = 0;
+ return new Promise(resolve => {
+ const checkForGuilds = function () {
+ timesChecked++;
+ if (document.readyState != "complete") setTimeout(checkForGuilds, 100);
+ const wrapper = GuildClasses.wrapper.split(" ")[0];
+ const guild = GuildClasses.listItem.split(" ")[0];
+ const blob = GuildClasses.blobContainer.split(" ")[0];
+ if (document.querySelectorAll(`.${wrapper} .${guild} .${blob}`).length > 0) return resolve(Config.deferLoaded = true);
+ else if (timesChecked >= 50) return resolve(Config.deferLoaded = true);
+ setTimeout(checkForGuilds, 100);
+ };
+
+ checkForGuilds();
});
}
-
- Logger.log("Startup", "Initializing Settings");
- Settings.initialize();
-
- DOMManager.initialize();
- await this.waitForGuilds();
- ReactComponents.initialize();
- ComponentPatcher.initialize();
- for (const module in Builtins) Builtins[module].initialize();
-
- Logger.log("Startup", "Loading Plugins");
- const pluginErrors = PluginManager.initialize();
-
- Logger.log("Startup", "Loading Themes");
- const themeErrors = ThemeManager.initialize();
-
- Logger.log("Startup", "Removing Loading Icon");
- document.getElementsByClassName("bd-loaderv2")[0].remove();
-
- // Show loading errors
- Logger.log("Startup", "Collecting Startup Errors");
- Modals.showAddonErrors({plugins: pluginErrors, themes: themeErrors});
-
- const previousVersion = DataStore.getBDData("version");
- if (Config.bbdVersion > previousVersion) {
- Modals.showChangelogModal(Changelog);
- DataStore.setBDData("version", Config.bbdVersion);
+ async loadDependencies() {
+ for (const data of this.dependencies) {
+ const url = Utilities.formatString((Config.local && data.local != null) ? data.local : data.url, {repo: Config.repo, hash: Config.hash, minified: Config.minified ? ".min" : "", localServer: Config.localServer});
+ Logger.log(`Startup`, `Loading Resource (${url})`);
+ const injector = (data.type == "script" ? DOMManager.injectScript : DOMManager.linkStyle).bind(DOMManager);
+ try {
+ await injector(data.name, url);
+ }
+ catch (err) {
+ const backup = Utilities.formatString(data.backup, {minified: Config.minified ? ".min" : ""});
+ Logger.stacktrace(`Startup`, `Could not load ${url}. Using backup ${backup}`, err);
+ try {
+ await injector(data.name, backup);
+ }
+ catch (e) {
+ Logger.stacktrace(`Startup`, `Could not load ${url}. Using backup ${backup}`, err);
+ if (data.name === "jquery") Modals.alert(Strings.Startup.jqueryFailed, Strings.Startup.jqueryFailedDetails);
+ }
+ }
+ }
}
-};
-Core.prototype.waitForGuilds = function() {
- let timesChecked = 0;
- return new Promise(resolve => {
- const checkForGuilds = function() {
- timesChecked++;
- if (document.readyState != "complete") setTimeout(checkForGuilds, 100);
- const wrapper = GuildClasses.wrapper.split(" ")[0];
- const guild = GuildClasses.listItem.split(" ")[0];
- const blob = GuildClasses.blobContainer.split(" ")[0];
- if (document.querySelectorAll(`.${wrapper} .${guild} .${blob}`).length > 0) return resolve(Config.deferLoaded = true);
- else if (timesChecked >= 50) return resolve(Config.deferLoaded = true);
- setTimeout(checkForGuilds, 100);
- };
+ async updateInjector() {
+ const injectionPath = DataStore.injectionPath;
+ if (!injectionPath) return false;
- checkForGuilds();
- });
-};
+ const fs = require("fs");
+ const path = require("path");
+ const rmrf = require("rimraf");
+ const yauzl = require("yauzl");
+ const mkdirp = require("mkdirp");
+ const request = require("request");
-Core.prototype.updateInjector = async function() {
- const injectionPath = DataStore.injectionPath;
- if (!injectionPath) return false;
+ const parentPath = path.resolve(injectionPath, "..");
+ const folderName = path.basename(injectionPath);
+ const zipLink = "https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip";
+ const savedZip = path.resolve(parentPath, "injector.zip");
+ const extractedFolder = path.resolve(parentPath, "BetterDiscordApp-injector");
- const fs = require("fs");
- const path = require("path");
- const rmrf = require("rimraf");
- const yauzl = require("yauzl");
- const mkdirp = require("mkdirp");
- const request = require("request");
+ // Download the injector zip file
+ Logger.log("InjectorUpdate", "Downloading " + zipLink);
+ let success = await new Promise(resolve => {
+ request.get({url: zipLink, encoding: null}, async (error, response, body) => {
+ if (error || response.statusCode !== 200) return resolve(false);
+ // Save a backup in case someone has their own copy
+ const alreadyExists = await new Promise(res => fs.exists(savedZip, res));
+ if (alreadyExists) await new Promise(res => fs.rename(savedZip, `${savedZip}.bak${Math.round(performance.now())}`, res));
- const parentPath = path.resolve(injectionPath, "..");
- const folderName = path.basename(injectionPath);
- const zipLink = "https://github.com/rauenzi/BetterDiscordApp/archive/injector.zip";
- const savedZip = path.resolve(parentPath, "injector.zip");
- const extractedFolder = path.resolve(parentPath, "BetterDiscordApp-injector");
-
- // Download the injector zip file
- Logger.log("InjectorUpdate", "Downloading " + zipLink);
- let success = await new Promise(resolve => {
- request.get({url: zipLink, encoding: null}, async (error, response, body) => {
- if (error || response.statusCode !== 200) return resolve(false);
- // Save a backup in case someone has their own copy
- const alreadyExists = await new Promise(res => fs.exists(savedZip, res));
- if (alreadyExists) await new Promise(res => fs.rename(savedZip, `${savedZip}.bak${Math.round(performance.now())}`, res));
-
- Logger.log("InjectorUpdate", "Writing " + savedZip);
- fs.writeFile(savedZip, body, err => resolve(!err));
+ Logger.log("InjectorUpdate", "Writing " + savedZip);
+ fs.writeFile(savedZip, body, err => resolve(!err));
+ });
});
- });
- if (!success) return success;
+ if (!success) return success;
- // Check and delete rename extraction
- const alreadyExists = await new Promise(res => fs.exists(extractedFolder, res));
- if (alreadyExists) await new Promise(res => fs.rename(extractedFolder, `${extractedFolder}.bak${Math.round(performance.now())}`, res));
-
- // Unzip the downloaded zip file
- const zipfile = await new Promise(r => yauzl.open(savedZip, {lazyEntries: true}, (err, zip) => r(zip)));
- zipfile.on("entry", function(entry) {
- // Skip directories, they are handled with mkdirp
- if (entry.fileName.endsWith("/")) return zipfile.readEntry();
+ // Check and delete rename extraction
+ const alreadyExists = await new Promise(res => fs.exists(extractedFolder, res));
+ if (alreadyExists) await new Promise(res => fs.rename(extractedFolder, `${extractedFolder}.bak${Math.round(performance.now())}`, res));
- Logger.log("InjectorUpdate", "Extracting " + entry.fileName);
- // Make any needed parent directories
- const fullPath = path.resolve(parentPath, entry.fileName);
- mkdirp.sync(path.dirname(fullPath));
- zipfile.openReadStream(entry, function(err, readStream) {
- if (err) return success = false;
- readStream.on("end", function() {zipfile.readEntry();}); // Go to next file after this
- readStream.pipe(fs.createWriteStream(fullPath));
+ // Unzip the downloaded zip file
+ const zipfile = await new Promise(r => yauzl.open(savedZip, {lazyEntries: true}, (err, zip) => r(zip)));
+ zipfile.on("entry", function (entry) {
+ // Skip directories, they are handled with mkdirp
+ if (entry.fileName.endsWith("/")) return zipfile.readEntry();
+
+ Logger.log("InjectorUpdate", "Extracting " + entry.fileName);
+ // Make any needed parent directories
+ const fullPath = path.resolve(parentPath, entry.fileName);
+ mkdirp.sync(path.dirname(fullPath));
+ zipfile.openReadStream(entry, function (err, readStream) {
+ if (err) return success = false;
+ readStream.on("end", function () { zipfile.readEntry(); }); // Go to next file after this
+ readStream.pipe(fs.createWriteStream(fullPath));
+ });
});
- });
- zipfile.readEntry(); // Start reading
+ zipfile.readEntry(); // Start reading
- // Wait for the final file to finish
- await new Promise(resolve => zipfile.once("end", resolve));
- // Save a backup in case something goes wrong during final step
- const backupFolder = path.resolve(parentPath, `${folderName}.bak${Math.round(performance.now())}`);
- await new Promise(resolve => fs.rename(injectionPath, backupFolder, resolve));
+ // Wait for the final file to finish
+ await new Promise(resolve => zipfile.once("end", resolve));
- // Rename the extracted folder to what it should be
- Logger.log("InjectorUpdate", `Renaming ${path.basename(extractedFolder)} to ${folderName}`);
- success = await new Promise(resolve => fs.rename(extractedFolder, injectionPath, err => resolve(!err)));
- if (!success) {
- Logger.err("InjectorUpdate", "Failed to rename the final directory");
+ // Save a backup in case something goes wrong during final step
+ const backupFolder = path.resolve(parentPath, `${folderName}.bak${Math.round(performance.now())}`);
+ await new Promise(resolve => fs.rename(injectionPath, backupFolder, resolve));
+
+ // Rename the extracted folder to what it should be
+ Logger.log("InjectorUpdate", `Renaming ${path.basename(extractedFolder)} to ${folderName}`);
+ success = await new Promise(resolve => fs.rename(extractedFolder, injectionPath, err => resolve(!err)));
+ if (!success) {
+ Logger.err("InjectorUpdate", "Failed to rename the final directory");
+ return success;
+ }
+
+ // If rename had issues, delete what we tried to rename and restore backup
+ if (!success) {
+ Logger.err("InjectorUpdate", "Something went wrong... restoring backups.");
+ await new Promise(resolve => rmrf(extractedFolder, resolve));
+ await new Promise(resolve => fs.rename(backupFolder, injectionPath, resolve));
+ return success;
+ }
+
+ // If we've gotten to this point, everything should have gone smoothly.
+ // Cleanup the backup folder then remove the zip
+ await new Promise(resolve => rmrf(backupFolder, resolve));
+ await new Promise(resolve => fs.unlink(savedZip, resolve));
+
+ Logger.log("InjectorUpdate", "Injector Updated!");
return success;
}
-
- // If rename had issues, delete what we tried to rename and restore backup
- if (!success) {
- Logger.err("InjectorUpdate", "Something went wrong... restoring backups.");
- await new Promise(resolve => rmrf(extractedFolder, resolve));
- await new Promise(resolve => fs.rename(backupFolder, injectionPath, resolve));
- return success;
- }
-
- // If we've gotten to this point, everything should have gone smoothly.
- // Cleanup the backup folder then remove the zip
- await new Promise(resolve => rmrf(backupFolder, resolve));
- await new Promise(resolve => fs.unlink(savedZip, resolve));
-
- Logger.log("InjectorUpdate", "Injector Updated!");
- return success;
-};
-
-export default new Core();
\ No newline at end of file
+};
\ No newline at end of file
diff --git a/src/modules/dommanager.js b/src/modules/dommanager.js
index a77a94cc..c5d3aaa6 100644
--- a/src/modules/dommanager.js
+++ b/src/modules/dommanager.js
@@ -10,14 +10,14 @@ export default class DOMManager {
// static get bdModals() { return this.getElement("bd-modals") || this.createElement("bd-modals").appendTo(this.bdBody); }
// static get bdToasts() { return this.getElement("bd-toasts") || this.createElement("bd-toasts").appendTo(this.bdBody); }
- static initialize() {
- this.createElement("bd-head", {target: document.head});
- this.createElement("bd-body", {target: document.body});
- this.createElement("bd-scripts", {target: this.bdHead});
- this.createElement("bd-styles", {target: this.bdHead});
- this.createElement("bd-themes", {target: this.bdHead});
- this.createElement("style", {id: "customcss", target: this.bdHead});
- }
+ // static initialize() {
+ // this.createElement("bd-head", {target: document.head});
+ // this.createElement("bd-body", {target: document.body});
+ // this.createElement("bd-scripts", {target: this.bdHead});
+ // this.createElement("bd-styles", {target: this.bdHead});
+ // this.createElement("bd-themes", {target: this.bdHead});
+ // this.createElement("style", {id: "customcss", target: this.bdHead});
+ // }
static escapeID(id) {
return id.replace(/^[^a-z]+|[^\w-]+/gi, "-");
@@ -50,6 +50,21 @@ export default class DOMManager {
this.bdStyles.append(style);
}
+ static unlinkStyle(id) {
+ return this.removeStyle(id);
+ }
+
+ static linkStyle(id, url) {
+ id = this.escapeID(id);
+ return new Promise(resolve => {
+ const link = this.getElement(`#${id}`, this.bdStyles) || this.createElement("link", {id});
+ link.rel = "stylesheet";
+ link.href = url;
+ link.onload = resolve;
+ this.bdStyles.append(link);
+ });
+ }
+
static removeTheme(id) {
id = this.escapeID(id);
const exists = this.getElement(`#${id}`, this.bdThemes);
@@ -82,4 +97,11 @@ export default class DOMManager {
this.bdScripts.append(script);
});
}
-}
\ No newline at end of file
+}
+
+DOMManager.createElement("bd-head", {target: document.head});
+DOMManager.createElement("bd-body", {target: document.body});
+DOMManager.createElement("bd-scripts", {target: DOMManager.bdHead});
+DOMManager.createElement("bd-styles", {target: DOMManager.bdHead});
+DOMManager.createElement("bd-themes", {target: DOMManager.bdHead});
+DOMManager.createElement("style", {id: "customcss", target: DOMManager.bdHead});
\ No newline at end of file
diff --git a/src/modules/pluginapi.js b/src/modules/pluginapi.js
index b71eb67a..590d66a9 100644
--- a/src/modules/pluginapi.js
+++ b/src/modules/pluginapi.js
@@ -10,6 +10,7 @@ import PluginManager from "./pluginmanager";
import ThemeManager from "./thememanager";
import Settings from "./settingsmanager";
import Logger from "./logger";
+import Patcher from "./patcher";
const BdApi = {
get React() { return DiscordModules.React; },
@@ -148,43 +149,65 @@ BdApi.deleteData = function(pluginName, key) {
};
// Patches other functions
+// BdApi.monkeyPatch = function(what, methodName, options) {
+// const {before, after, instead, once = false, silent = false, force = false} = options;
+// const displayName = options.displayName || what.displayName || what.name || what.constructor.displayName || what.constructor.name;
+// if (!silent) console.log("patch", methodName, "of", displayName); // eslint-disable-line no-console
+// if (!what[methodName]) {
+// if (force) what[methodName] = function() {};
+// else return console.error(methodName, "does not exist for", displayName); // eslint-disable-line no-console
+// }
+// const origMethod = what[methodName];
+// const cancel = () => {
+// if (!silent) console.log("unpatch", methodName, "of", displayName); // eslint-disable-line no-console
+// what[methodName] = origMethod;
+// };
+// what[methodName] = function() {
+// const data = {
+// thisObject: this,
+// methodArguments: arguments,
+// cancelPatch: cancel,
+// originalMethod: origMethod,
+// callOriginalMethod: () => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)
+// };
+// if (instead) {
+// const tempRet = Utilities.suppressErrors(instead, "`instead` callback of " + what[methodName].displayName)(data);
+// if (tempRet !== undefined) data.returnValue = tempRet;
+// }
+// else {
+// if (before) Utilities.suppressErrors(before, "`before` callback of " + what[methodName].displayName)(data);
+// data.callOriginalMethod();
+// if (after) Utilities.suppressErrors(after, "`after` callback of " + what[methodName].displayName)(data);
+// }
+// if (once) cancel();
+// return data.returnValue;
+// };
+// what[methodName].__monkeyPatched = true;
+// if (!what[methodName].__originalMethod) what[methodName].__originalMethod = origMethod;
+// what[methodName].displayName = "patched " + (what[methodName].displayName || methodName);
+// return cancel;
+// };
BdApi.monkeyPatch = function(what, methodName, options) {
- const {before, after, instead, once = false, silent = false, force = false} = options;
- const displayName = options.displayName || what.displayName || what.name || what.constructor.displayName || what.constructor.name;
- if (!silent) console.log("patch", methodName, "of", displayName); // eslint-disable-line no-console
- if (!what[methodName]) {
- if (force) what[methodName] = function() {};
- else return console.error(methodName, "does not exist for", displayName); // eslint-disable-line no-console
- }
- const origMethod = what[methodName];
- const cancel = () => {
- if (!silent) console.log("unpatch", methodName, "of", displayName); // eslint-disable-line no-console
- what[methodName] = origMethod;
+ const {before, after, instead, once = false} = options;
+ const patchType = before ? "before" : after ? "after" : instead ? "instead" : "";
+ if (!patchType) return Logger.err("BdApi", "Must provide one of: after, before, instead");
+ const originalMethod = what[methodName];
+ const data = {
+ originalMethod: originalMethod,
+ callOriginalMethod: () => data.originalMethod.apply(data.thisObject, data.methodArguments)
};
- what[methodName] = function() {
- const data = {
- thisObject: this,
- methodArguments: arguments,
- cancelPatch: cancel,
- originalMethod: origMethod,
- callOriginalMethod: () => data.returnValue = data.originalMethod.apply(data.thisObject, data.methodArguments)
- };
- if (instead) {
- const tempRet = Utilities.suppressErrors(instead, "`instead` callback of " + what[methodName].displayName)(data);
- if (tempRet !== undefined) data.returnValue = tempRet;
+ data.cancelPatch = Patcher[patchType]("BdApi", what, methodName, (thisObject, args, returnValue) => {
+ data.thisObject = thisObject;
+ data.methodArguments = args;
+ data.returnValue = returnValue;
+ try {
+ Reflect.apply(options[patchType], null, [data]);
+ if (once) data.cancelPatch();
}
- else {
- if (before) Utilities.suppressErrors(before, "`before` callback of " + what[methodName].displayName)(data);
- data.callOriginalMethod();
- if (after) Utilities.suppressErrors(after, "`after` callback of " + what[methodName].displayName)(data);
+ catch (err) {
+ // Logger.err("monkeyPatch", `Error in the ${patchType} of ${methodName}`);
}
- if (once) cancel();
- return data.returnValue;
- };
- what[methodName].__monkeyPatched = true;
- if (!what[methodName].__originalMethod) what[methodName].__originalMethod = origMethod;
- what[methodName].displayName = "patched " + (what[methodName].displayName || methodName);
- return cancel;
+ });
};
// Event when element is removed
BdApi.onRemoved = function(node, callback) {
@@ -255,15 +278,30 @@ const makeAddonAPI = (manager) => new class AddonAPI {
disable(idOrAddon) {return manager.disableAddon(idOrAddon);}
toggle(idOrAddon) {return manager.toggleAddon(idOrAddon);}
reload(idOrFileOrAddon) {return manager.reloadAddon(idOrFileOrAddon);}
- get(idOrFile) {return manager.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);}
- getAll() {return manager.addonList;}
+ get(idOrFile) {return manager.getAddon(idOrFile);}
+ getAll() {return manager.addonList.map(a => manager.getAddon(a.id));}
};
BdApi.Plugins = makeAddonAPI(PluginManager);
BdApi.Themes = makeAddonAPI(ThemeManager);
+BdApi.Patcher = {
+ patch: (caller, moduleToPatch, functionName, callback, options = {}) => {
+ if (typeof(caller) !== "string") return Logger.err("BdApi.Patcher", "Parameter 0 of patch must be a string representing the caller");
+ if (options.type !== "before" && options.type !== "instead" && options.type !== "after") return Logger.err("BdApi.Patcher", "options.type must be one of: before, instead, after");
+ return Patcher.pushChildPatch(caller, moduleToPatch, functionName, callback, options);
+ },
+ before: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "before"})),
+ instead: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "instead"})),
+ after: (caller, moduleToPatch, functionName, callback, options = {}) => BdApi.Patcher.patch(caller, moduleToPatch, functionName, callback, Object.assign(options, {type: "after"})),
+ unpatchAll: (caller) => {
+ if (typeof(caller) !== "string") return Logger.err("BdApi.Patcher", "Parameter 0 of unpatchAll must be a string representing the caller");
+ return Patcher.unpatchAll(caller);
+ }
+};
Object.freeze(BdApi);
Object.freeze(BdApi.Plugins);
Object.freeze(BdApi.Themes);
+Object.freeze(BdApi.Patcher);
export default BdApi;
\ No newline at end of file
diff --git a/src/modules/pluginmanager.js b/src/modules/pluginmanager.js
index 4dc21e8b..5d849f2b 100644
--- a/src/modules/pluginmanager.js
+++ b/src/modules/pluginmanager.js
@@ -104,6 +104,7 @@ export default new class PluginManager extends AddonManager {
startAddon(id) {return this.startPlugin(id);}
stopAddon(id) {return this.stopPlugin(id);}
+ getAddon(id) {return this.getPlugin(id);}
startPlugin(idOrAddon) {
const addon = typeof(idOrAddon) == "string" ? this.addonList.find(p => p.id == idOrAddon) : idOrAddon;
@@ -111,15 +112,15 @@ export default new class PluginManager extends AddonManager {
const plugin = addon.plugin;
try {
plugin.start();
- this.emit("started", addon.id);
- Toasts.show(Strings.Addons.enabled.format({name: addon.name, version: addon.version}));
}
catch (err) {
this.state[addon.id] = false;
- Toasts.error(`${addon.name} v${addon.version} could not be started.`);
+ Toasts.error(Strings.Addons.couldNotStart.format({name: addon.name, version: addon.version}));
Logger.stacktrace(this.name, addon.name + " could not be started.", err);
- return new AddonError(addon.name, addon.filename, "start() could not be fired.", {message: err.message, stack: err.stack});
+ return new AddonError(addon.name, addon.filename, Strings.Addons.enabled.format({method: "start()"}), {message: err.message, stack: err.stack});
}
+ this.emit("started", addon.id);
+ Toasts.show(Strings.Addons.enabled.format({name: addon.name, version: addon.version}));
}
stopPlugin(idOrAddon) {
@@ -128,15 +129,21 @@ export default new class PluginManager extends AddonManager {
const plugin = addon.plugin;
try {
plugin.stop();
- this.emit("stopped", addon.id);
- Toasts.show(Strings.Addons.disabled.format({name: addon.name, version: addon.version}));
}
catch (err) {
this.state[addon.id] = false;
- Toasts.error(`${addon.name} v${addon.version} could not be stopped.`);
+ Toasts.error(Strings.Addons.couldNotStop.format({name: addon.name, version: addon.version}));
Logger.stacktrace(this.name, addon.name + " could not be stopped.", err);
- return new AddonError(addon.name, addon.filename, "stop() could not be fired.", {message: err.message, stack: err.stack});
+ return new AddonError(addon.name, addon.filename, Strings.Addons.enabled.format({method: "stop()"}), {message: err.message, stack: err.stack});
}
+ this.emit("stopped", addon.id);
+ Toasts.show(Strings.Addons.disabled.format({name: addon.name, version: addon.version}));
+ }
+
+ getPlugin(idOrFile) {
+ const addon = this.addonList.find(c => c.id == idOrFile || c.filename == idOrFile);
+ if (!addon) return;
+ return addon.plugin;
}
setupFunctions() {
diff --git a/src/structs/builtin.js b/src/structs/builtin.js
index 7be192bc..6d045981 100644
--- a/src/structs/builtin.js
+++ b/src/structs/builtin.js
@@ -57,12 +57,14 @@ export default class BuiltinModule {
async enable() {
this.log("Enabled");
- await this.enabled();
+ try {await this.enabled();}
+ catch (e) {this.stacktrace("Could not be enabled", e);}
}
async disable() {
this.log("Disabled");
- await this.disabled();
+ try {await this.disabled();}
+ catch (e) {this.stacktrace("Could not be disabled", e);}
}
async enabled() {}
diff --git a/src/ui/modals.js b/src/ui/modals.js
index 08524505..d1f2aa37 100644
--- a/src/ui/modals.js
+++ b/src/ui/modals.js
@@ -46,7 +46,7 @@ export default class Modals {
}
static alert(title, content) {
- this.showConfirmationModal(title, content);
+ this.showConfirmationModal(title, content, {cancelText: ""});
}
/**
diff --git a/src/ui/settings.js b/src/ui/settings.js
index 9023e40b..082ebcab 100644
--- a/src/ui/settings.js
+++ b/src/ui/settings.js
@@ -1,4 +1,4 @@
-import {React, WebpackModules, Patcher, ReactComponents, Utilities, Settings, Events} from "modules";
+import {React, WebpackModules, Patcher, ReactComponents, Utilities, Settings, Events, DataStore} from "modules";
import AddonList from "./settings/addonlist";
import SettingsGroup from "./settings/group";
@@ -12,6 +12,20 @@ export default new class SettingsRenderer {
Events.on("strings-updated", this.forceUpdate);
}
+ onDrawerToggle(collection, group, state) {
+ const drawerStates = DataStore.getBDData("drawerStates") || {};
+ if (!drawerStates[collection]) drawerStates[collection] = {};
+ drawerStates[collection][group] = state;
+ DataStore.setBDData("drawerStates", drawerStates);
+ }
+
+ getDrawerState(collection, group, defaultValue) {
+ const drawerStates = DataStore.getBDData("drawerStates") || {};
+ if (!drawerStates[collection]) return defaultValue;
+ if (!drawerStates[collection].hasOwnProperty(group)) return defaultValue;
+ return drawerStates[collection][group];
+ }
+
onChange(onChange) {
return (collection, category, id) => {
const before = Settings.collections.length + Settings.panels.length;
@@ -21,16 +35,20 @@ export default new class SettingsRenderer {
};
}
- buildSettingsPanel(title, config, state, onChange, button = null) {
+ buildSettingsPanel(id, title, config, state, onChange, button = null) {
config.forEach(section => {
section.settings.forEach(item => item.value = state[section.id][item.id]);
});
- return this.getSettingsPanel(title, config, this.onChange(onChange), button);
+ return this.getSettingsPanel(id, title, config, this.onChange(onChange), button);
}
- getSettingsPanel(title, groups, onChange, button = null) {
+ getSettingsPanel(id, title, groups, onChange, button = null) {
return [React.createElement(SettingsTitle, {text: title, button: button}), groups.map(section => {
- return React.createElement(SettingsGroup, Object.assign({}, section, {onChange}));
+ return React.createElement(SettingsGroup, Object.assign({}, section, {
+ onChange: onChange,
+ onDrawerToggle: state => this.onDrawerToggle(id, section.id, state),
+ shown: this.getDrawerState(id, section.id, section.hasOwnProperty("shown") ? section.shown : true)
+ }));
})];
}
@@ -61,14 +79,13 @@ export default new class SettingsRenderer {
insert({
section: collection.name,
label: collection.name,
- element: () => this.buildSettingsPanel(collection.name, collection.settings, Settings.state[collection.id], Settings.onSettingChange.bind(Settings, collection.id), collection.button ? collection.button : null)
+ element: () => this.buildSettingsPanel(collection.id, collection.name, collection.settings, Settings.state[collection.id], Settings.onSettingChange.bind(Settings, collection.id), collection.button ? collection.button : null)
});
}
for (const panel of Settings.panels.sort((a,b) => a.order > b.order)) {
if (panel.clickListener) panel.onClick = (event) => panel.clickListener(thisObject, event, returnValue);
insert(panel);
}
- // insert({section: "CUSTOM", element: Attribution});
});
this.forceUpdate();
}
diff --git a/src/ui/settings/attribution.jsx b/src/ui/settings/attribution.jsx
deleted file mode 100644
index 8fd598a2..00000000
--- a/src/ui/settings/attribution.jsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import {Config} from "data";
-import {React, Strings} from "modules";
-
-export default class BBDAttribution extends React.Component {
-
- buildTitle(name, version, author) {
- const title = Strings.Addons.title.split(/({{[A-Za-z]+}})/);
- const nameIndex = title.findIndex(s => s == "{{name}}");
- if (nameIndex) title[nameIndex] = name;
- const versionIndex = title.findIndex(s => s == "{{version}}");
- if (nameIndex) title[versionIndex] = version;
- const authorIndex = title.findIndex(s => s == "{{author}}");
- if (nameIndex) title[authorIndex] = author;
- return title.flat();
- }
-
- render() {
- return
- {this.buildTitle("BBD", Config.bbdVersion,
Zerebos )}
-
;
- }
-}
\ No newline at end of file
diff --git a/src/ui/settings/group.jsx b/src/ui/settings/group.jsx
index 8af9b1c6..95fa9239 100644
--- a/src/ui/settings/group.jsx
+++ b/src/ui/settings/group.jsx
@@ -39,6 +39,7 @@ export default class Group extends React.Component {
container.style.setProperty("height", "");
container.classList.remove("animating");
}, timeout));
+ if (this.props.onDrawerToggle) this.props.onDrawerToggle(this.state.collapsed);
}
onChange(id, value) {
diff --git a/src/ui/ui.js b/src/ui/ui.js
deleted file mode 100644
index feb4f8ab..00000000
--- a/src/ui/ui.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// export {default as SettingsPanel} from "./settings/settings";
-// export {default as PublicServersMenu} from "./publicservers/menu";
-// export {default as Toasts} from "./toasts";
-// export {default as Modals} from "./modals";
\ No newline at end of file