diff --git a/js/main.js b/js/main.js index c479fc1..100cb3b 100644 --- a/js/main.js +++ b/js/main.js @@ -371,7 +371,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 _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2 {\n constructor() {\n this.editorDetached = false;\n\n this.WebpackModules = (() => {\n const req = webpackJsonp.push([[], {\n __extra_id__: (module, exports, req) => module.exports = req\n }, [[\"__extra_id__\"]]]);\n delete req.m.__extra_id__;\n delete req.c.__extra_id__;\n\n const shouldProtect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return true;\n if (theModule.getToken || theModule.getEmail || theModule.showToken) return true;\n return false;\n };\n\n const protect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return null;\n if (!theModule.getToken && !theModule.getEmail && !theModule.showToken) return theModule;\n const proxy = new Proxy(theModule, {\n get: function (obj, func) {\n if (func == \"getToken\") return () => \"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa\";\n if (func == \"getEmail\") return () => \"puppet11112@gmail.com\";\n if (func == \"showToken\") return () => true;\n if (func == \"__proto__\") return proxy;\n return obj[func];\n }\n });\n return proxy;\n };\n\n const find = filter => {\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default);\n if (m && filter(m)) return protect(m);\n }\n } // console.warn(\"Cannot find loaded module in cache\");\n\n\n return null;\n };\n\n const findAll = filter => {\n const modules = [];\n\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default));else if (m && filter(m)) modules.push(protect(m));\n }\n }\n\n return modules;\n };\n\n const findByUniqueProperties = propNames => find(module => propNames.every(prop => module[prop] !== undefined));\n\n const findByPrototypes = protoNames => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));\n\n const findByDisplayName = displayName => find(module => module.displayName === displayName);\n\n return {\n find,\n findAll,\n findByUniqueProperties,\n findByPrototypes,\n findByDisplayName\n };\n })();\n\n this.internal = {\n react: this.WebpackModules.findByUniqueProperties([\"Component\", \"PureComponent\", \"Children\", \"createElement\", \"cloneElement\"]),\n reactDom: this.WebpackModules.findByUniqueProperties([\"findDOMNode\"])\n };\n\n this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith(\"__reactInternalInstance\"))];\n }\n\n initialize() {}\n\n joinBD1() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"0Tmfo5ZbORCRqbAd\");\n }\n\n leaveBD1() {\n this.GuildActions.leaveGuild(\"86004744966914048\");\n }\n\n joinBD2() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n }\n\n leaveBD2() {\n this.GuildActions.leaveGuild(\"280806472928198656\");\n }\n\n get react() {\n return this.internal.react;\n }\n\n get React() {\n return this.internal.react;\n }\n\n get reactDom() {\n return this.internal.reactDom;\n }\n\n get ReactDom() {\n return this.internal.reactDom;\n }\n\n get reactComponent() {\n return this.internal.react.Component;\n }\n\n get ReactComponent() {\n return this.internal.react.Component;\n }\n\n get anchorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"anchorUnderlineOnHover\"]) || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n }\n\n get slateEditorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"slateTextArea\"]);\n }\n\n get messageClasses() {\n return this.WebpackModules.findByUniqueProperties([\"message\", \"containerCozy\"]);\n }\n\n get guildClasses() {\n const guildsWrapper = this.WebpackModules.findByUniqueProperties([\"wrapper\", \"unreadMentionsBar\"]);\n const guilds = this.WebpackModules.findByUniqueProperties([\"guildsError\", \"selected\"]);\n const pill = this.WebpackModules.findByUniqueProperties([\"blobContainer\"]);\n return Object.assign({}, guildsWrapper, guilds, pill);\n }\n\n get MessageContentComponent() {\n return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty(\"disableButtons\"));\n }\n\n get MessageComponent() {\n return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == \"Message\");\n }\n\n get TimeFormatter() {\n return this.WebpackModules.findByUniqueProperties([\"dateFormat\"]);\n }\n\n get TooltipWrapper() {\n return this.WebpackModules.findByDisplayName(\"Tooltip\");\n }\n\n get NativeModule() {\n return this.WebpackModules.findByUniqueProperties([\"setBadge\"]);\n }\n\n get InviteActions() {\n return this.WebpackModules.findByUniqueProperties([\"acceptInvite\"]);\n }\n\n get GuildActions() {\n return this.WebpackModules.findByUniqueProperties([\"leaveGuild\"]);\n }\n\n get Tooltips() {\n return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);\n }\n\n get KeyGenerator() {\n return this.WebpackModules.find(m => m.toString && /\"binary\"/.test(m.toString()));\n }\n\n get LayerStack() {\n return this.WebpackModules.findByUniqueProperties([\"popLayer\"]);\n }\n\n get UserStore() {\n return this.WebpackModules.findByUniqueProperties([\"getCurrentUser\"]);\n }\n\n get ChannelStore() {\n return this.WebpackModules.findByUniqueProperties([\"getChannel\"]);\n }\n\n get ChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"openPrivateChannel\"]);\n }\n\n get PrivateChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"selectPrivateChannel\"]);\n }\n\n openDM(userId) {\n const selfId = this.UserStore.getCurrentUser().id;\n if (selfId == userId) return;\n const privateChannelId = this.ChannelStore.getDMFromUserId(userId);\n if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);\n this.ChannelActions.openPrivateChannel(selfId, userId);\n }\n\n parseSettings(cat) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === cat && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92Mi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy92Mi5qcz84NTdiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgVjIge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICB0aGlzLmVkaXRvckRldGFjaGVkID0gZmFsc2U7XG5cbiAgICB0aGlzLldlYnBhY2tNb2R1bGVzID0gKCgpID0+IHtcbiAgICAgIGNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICAgICAgICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbiAgICAgIH0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG4gICAgICBkZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuICAgICAgZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuICAgICAgY29uc3Qgc2hvdWxkUHJvdGVjdCA9IHRoZU1vZHVsZSA9PiB7XG4gICAgICAgIGlmICh0aGVNb2R1bGUucmVtb3ZlICYmIHRoZU1vZHVsZS5zZXQgJiYgdGhlTW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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/modules/v2.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _0globals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../0globals */ \"./src/0globals.js\");\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (new class V2 {\n constructor() {\n this.editorDetached = false;\n\n this.WebpackModules = (() => {\n const req = webpackJsonp.push([[], {\n __extra_id__: (module, exports, req) => module.exports = req\n }, [[\"__extra_id__\"]]]);\n delete req.m.__extra_id__;\n delete req.c.__extra_id__;\n\n const shouldProtect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return true;\n if (theModule.getToken || theModule.getEmail || theModule.showToken) return true;\n return false;\n };\n\n const protect = theModule => {\n if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort) return null;\n if (!theModule.getToken && !theModule.getEmail && !theModule.showToken) return theModule;\n const proxy = new Proxy(theModule, {\n get: function (obj, func) {\n if (func == \"getToken\") return () => \"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa\";\n if (func == \"getEmail\") return () => \"puppet11112@gmail.com\";\n if (func == \"showToken\") return () => true; // if (func == \"__proto__\") return proxy;\n\n return obj[func];\n }\n });\n return proxy;\n }; // for (const i in req.c) {\n // if (req.c.hasOwnProperty(i)) {\n // const m = req.c[i].exports;\n // if (m) {\n // const whatToCheck = m.default ? m.default : m;\n // const shouldDelete = shouldProtect(whatToCheck);\n // if (shouldDelete) delete req.c[i].exports;\n // // if (m.__esModule && m.default) m.default = protect(m.default);\n // // req.c[i].exports = m.default ? Object.assign({}, m, {\"default\": protect(m.default)}) : protect(m);\n // }\n // // if (m && m.__esModule && m.default) {\n // // delete req.c[i].exports;\n // // req.c[i].exports = Object.assign({}, m, {\"default\": protect(m.default)});\n // // }\n // // else if (m) {\n // // delete req.c[i].exports;\n // // req.c[i].exports = protect(m);\n // // }\n // if (i == 14) console.log(req.c[i].exports);\n // }\n // }\n // window.req = req;\n\n\n const find = filter => {\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) return protect(m.default);\n if (m && filter(m)) return protect(m);\n }\n } // console.warn(\"Cannot find loaded module in cache\");\n\n\n return null;\n };\n\n const findAll = filter => {\n const modules = [];\n\n for (const i in req.c) {\n if (req.c.hasOwnProperty(i)) {\n const m = req.c[i].exports;\n if (m && m.__esModule && m.default && filter(m.default)) modules.push(protect(m.default));else if (m && filter(m)) modules.push(protect(m));\n }\n }\n\n return modules;\n };\n\n const findByUniqueProperties = propNames => find(module => propNames.every(prop => module[prop] !== undefined));\n\n const findByPrototypes = protoNames => find(module => module.prototype && protoNames.every(protoProp => module.prototype[protoProp] !== undefined));\n\n const findByDisplayName = displayName => find(module => module.displayName === displayName);\n\n return {\n find,\n findAll,\n findByUniqueProperties,\n findByPrototypes,\n findByDisplayName\n };\n })();\n\n this.internal = {\n react: this.WebpackModules.findByUniqueProperties([\"Component\", \"PureComponent\", \"Children\", \"createElement\", \"cloneElement\"]),\n reactDom: this.WebpackModules.findByUniqueProperties([\"findDOMNode\"])\n };\n\n this.getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith(\"__reactInternalInstance\"))];\n }\n\n initialize() {}\n\n joinBD1() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"0Tmfo5ZbORCRqbAd\");\n }\n\n leaveBD1() {\n this.GuildActions.leaveGuild(\"86004744966914048\");\n }\n\n joinBD2() {\n this.InviteActions.acceptInviteAndTransitionToInviteChannel(\"2HScm8j\");\n }\n\n leaveBD2() {\n this.GuildActions.leaveGuild(\"280806472928198656\");\n }\n\n get react() {\n return this.internal.react;\n }\n\n get React() {\n return this.internal.react;\n }\n\n get reactDom() {\n return this.internal.reactDom;\n }\n\n get ReactDom() {\n return this.internal.reactDom;\n }\n\n get reactComponent() {\n return this.internal.react.Component;\n }\n\n get ReactComponent() {\n return this.internal.react.Component;\n }\n\n get anchorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"anchorUnderlineOnHover\"]) || {\n anchor: \"anchor-3Z-8Bb\",\n anchorUnderlineOnHover: \"anchorUnderlineOnHover-2ESHQB\"\n };\n }\n\n get slateEditorClasses() {\n return this.WebpackModules.findByUniqueProperties([\"slateTextArea\"]);\n }\n\n get messageClasses() {\n return this.WebpackModules.findByUniqueProperties([\"message\", \"containerCozy\"]);\n }\n\n get guildClasses() {\n const guildsWrapper = this.WebpackModules.findByUniqueProperties([\"wrapper\", \"unreadMentionsBar\"]);\n const guilds = this.WebpackModules.findByUniqueProperties([\"guildsError\", \"selected\"]);\n const pill = this.WebpackModules.findByUniqueProperties([\"blobContainer\"]);\n return Object.assign({}, guildsWrapper, guilds, pill);\n }\n\n get MessageContentComponent() {\n return this.WebpackModules.find(m => m.defaultProps && m.defaultProps.hasOwnProperty(\"disableButtons\"));\n }\n\n get MessageComponent() {\n return this.WebpackModules.find(m => m.default && m.default.displayName && m.default.displayName == \"Message\");\n }\n\n get TimeFormatter() {\n return this.WebpackModules.findByUniqueProperties([\"dateFormat\"]);\n }\n\n get TooltipWrapper() {\n return this.WebpackModules.findByDisplayName(\"Tooltip\");\n }\n\n get NativeModule() {\n return this.WebpackModules.findByUniqueProperties([\"setBadge\"]);\n }\n\n get InviteActions() {\n return this.WebpackModules.findByUniqueProperties([\"acceptInvite\"]);\n }\n\n get GuildActions() {\n return this.WebpackModules.findByUniqueProperties([\"leaveGuild\"]);\n }\n\n get Tooltips() {\n return this.WebpackModules.find(m => m.hide && m.show && !m.search && !m.submit && !m.search && !m.activateRagingDemon && !m.dismiss);\n }\n\n get KeyGenerator() {\n return this.WebpackModules.find(m => m.toString && /\"binary\"/.test(m.toString()));\n }\n\n get LayerStack() {\n return this.WebpackModules.findByUniqueProperties([\"popLayer\"]);\n }\n\n get UserStore() {\n return this.WebpackModules.findByUniqueProperties([\"getCurrentUser\"]);\n }\n\n get ChannelStore() {\n return this.WebpackModules.findByUniqueProperties([\"getChannel\"]);\n }\n\n get ChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"openPrivateChannel\"]);\n }\n\n get PrivateChannelActions() {\n return this.WebpackModules.findByUniqueProperties([\"selectPrivateChannel\"]);\n }\n\n openDM(userId) {\n const selfId = this.UserStore.getCurrentUser().id;\n if (selfId == userId) return;\n const privateChannelId = this.ChannelStore.getDMFromUserId(userId);\n if (privateChannelId) return this.PrivateChannelActions.selectPrivateChannel(privateChannelId);\n this.ChannelActions.openPrivateChannel(selfId, userId);\n }\n\n parseSettings(cat) {\n return Object.keys(_0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"]).reduce((arr, key) => {\n const setting = _0globals__WEBPACK_IMPORTED_MODULE_0__[\"settings\"][key];\n\n if (setting.cat === cat && setting.implemented && !setting.hidden) {\n setting.text = key;\n arr.push(setting);\n }\n\n return arr;\n }, []);\n }\n\n}());//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvbW9kdWxlcy92Mi5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL0NvcmUvLi9zcmMvbW9kdWxlcy92Mi5qcz84NTdiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldHRpbmdzIH0gZnJvbSBcIi4uLzBnbG9iYWxzXCI7XG5leHBvcnQgZGVmYXVsdCBuZXcgY2xhc3MgVjIge1xuICBjb25zdHJ1Y3RvcigpIHtcbiAgICB0aGlzLmVkaXRvckRldGFjaGVkID0gZmFsc2U7XG5cbiAgICB0aGlzLldlYnBhY2tNb2R1bGVzID0gKCgpID0+IHtcbiAgICAgIGNvbnN0IHJlcSA9IHdlYnBhY2tKc29ucC5wdXNoKFtbXSwge1xuICAgICAgICBfX2V4dHJhX2lkX186IChtb2R1bGUsIGV4cG9ydHMsIHJlcSkgPT4gbW9kdWxlLmV4cG9ydHMgPSByZXFcbiAgICAgIH0sIFtbXCJfX2V4dHJhX2lkX19cIl1dXSk7XG4gICAgICBkZWxldGUgcmVxLm0uX19leHRyYV9pZF9fO1xuICAgICAgZGVsZXRlIHJlcS5jLl9fZXh0cmFfaWRfXztcblxuICAgICAgY29uc3Qgc2hvdWxkUHJvdGVjdCA9IHRoZU1vZHVsZSA9PiB7XG4gICAgICAgIGlmICh0aGVNb2R1bGUucmVtb3ZlICYmIHRoZU1vZHVsZS5zZXQgJiYgdGhlTW9kdWxlLmNsZWFyICYmIHRoZU1vZHVsZS5nZXQgJiYg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AgICAgICAgcmV0dXJuIG9ialtmdW5jXTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gcHJveHk7XG4gICAgICB9OyAvLyBmb3IgKGNvbnN0IGkgaW4gcmVxLmMpIHtcbiAgICAgIC8vICAgICBpZiAocmVxLmMuaGFzT3duUHJvcGVydHkoaSkpIHtcbiAgICAgIC8vICAgICAgICAgY29uc3QgbSA9IHJlcS5jW2ldLmV4cG9ydHM7XG4gICAgICAvLyAgICAgICAgIGlmIChtKSB7XG4gICAgICAvLyAgICAgICAgICAgICBjb25zdCB3aGF0VG9DaGVjayA9IG0uZGVmYXVsdCA/IG0uZGVmYXVsdCA6IG07XG4gICAgICAvLyAgICAgICAgICAgICBjb25zdCBzaG91bGREZWxldGUgPSBzaG91bGRQcm90ZWN0KHdoYXRUb0NoZWNrKTtcbiAgICAgIC8vICAgICAgICAgICAgIGlmIChzaG91bGREZWxldGUpIGRlbGV0ZSByZXEuY1tpXS5leHBvcnRzO1xuICAgICAgLy8gICAgICAgICAgICAgLy8gaWYgKG0uX19lc01vZHVsZSAmJiBtLmRlZmF1bHQpIG0uZGVmYXVsdCA9IHByb3RlY3QobS5kZWZhdWx0KTtcbiAgICAgIC8vICAgICAgICAgICAgIC8vIHJlcS5jW2ldLmV4cG9ydHMgPSBtLmRlZmF1bHQgPyBPYmplY3QuYXNzaWduKHt9LCBtLCB7XCJkZWZhdWx0XCI6IHByb3RlY3QobS5kZWZhdWx0KX0pIDogcHJvdGVjdChtKTtcbiAgICAgIC8vICAgICAgICAgfVxuICAgICAgLy8gICAgICAgICAvLyBpZiAobSAmJiBtLl9fZXNNb2R1bGUgJiYgbS5kZWZhdWx0KSB7XG4gICAgICAvLyAgICAgICAgIC8vICAgICBkZWxldGUgcmVxLmNbaV0uZXhwb3J0cztcbiAgICAgIC8vICAgICAgICAgLy8gICAgIHJlcS5jW2ldLmV4cG9ydHMgPSBPYmplY3QuYXNzaWduKHt9LCBtLCB7XCJkZWZhdWx0XCI6IHByb3RlY3QobS5kZWZhdWx0KX0pO1xuICAgICAgLy8gICAgICAgICAvLyB9XG4gICAgICAvLyAgICAgICAgIC8vIGVsc2UgaWYgKG0pIHtcbiAgICAgIC8vICAgICAgICAgLy8gICAgIGRlbGV0ZSByZXEuY1tpXS5leHBvcnRzO1xuICAgICAgLy8gICAgICAgICAvLyAgICAgcmVxLmNbaV0uZXhwb3J0cyA9IHByb3RlY3QobSk7XG4gICAgICAvLyAgICAgICAgIC8vIH1cbiAgICAgIC8vICAgICAgICAgaWYgKGkgPT0gMTQpIGNvbnNvbGUubG9nKHJlcS5jW2ldLmV4cG9ydHMpO1xuICAgICAgLy8gICAgIH1cbiAgICAgIC8vIH1cbiAgICAgIC8vIHdpbmRvdy5yZXEgPSByZXE7XG5cblxuICAgICAgY29uc3QgZmluZCA9IGZpbHRlciA9PiB7XG4gICAgICAgIGZvciAoY29uc3QgaSBpbiByZXEuYykge1xuICAgICAgICAgIGlmIChyZXEuYy5oYXNPd25Qcm9wZXJ0eShpKSkge1xuICAgICAgICAgICAgY29uc3QgbSA9IHJlcS5jW2ldLmV4cG9ydHM7XG4gICAgICAgICAgICBpZiAobSAmJiBtLl9fZXNNb2R1bGUgJiYgbS5kZWZhdWx0ICYmIGZpbHRlcihtLmRlZmF1bHQpKSByZXR1cm4gcHJvdGVjdChtLmRlZmF1bHQpO1xuICAgICAgICAgICAgaWYgKG0gJiYgZmlsdGVyKG0pKSByZXR1cm4gcHJvdGVjdChtKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gY29uc29sZS53YXJuKFwiQ2Fubm90IGZpbmQgbG9hZGVkIG1vZHVsZSBpbiBjYWNoZVwiKTtcblxuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfTtcblxuICAgICAgY29uc3QgZmluZEFsbCA9IGZpbHRlciA9PiB7XG4gICAgICAgIGNvbnN0IG1vZHVsZXMgPSBbXTtcblxuICAgICAgICBmb3IgKGNvbnN0IGkgaW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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/modules/v2.js\n"); /***/ }), diff --git a/js/main.min.js b/js/main.min.js index d8ee303..d0dc670 100644 --- a/js/main.min.js +++ b/js/main.min.js @@ -1 +1 @@ -var Core=function(e){var t={};function n(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(s,o,function(t){return e[t]}.bind(null,o));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("request")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("module")},function(e,t,n){"use strict";n.r(t);var s={};n.r(s),n.d(s,"minimumDiscordVersion",(function(){return o})),n.d(s,"currentDiscordVersion",(function(){return r})),n.d(s,"minSupportedVersion",(function(){return i})),n.d(s,"bbdVersion",(function(){return a})),n.d(s,"bbdChangelog",(function(){return l})),n.d(s,"settings",(function(){return c})),n.d(s,"defaultCookie",(function(){return d})),n.d(s,"settingsCookie",(function(){return u})),n.d(s,"bdpluginErrors",(function(){return h})),n.d(s,"bdthemeErrors",(function(){return p})),n.d(s,"bdConfig",(function(){return m})),n.d(s,"bemotes",(function(){return g})),n.d(s,"emotesFfz",(function(){return f})),n.d(s,"emotesBTTV",(function(){return b})),n.d(s,"emotesBTTV2",(function(){return v})),n.d(s,"emotesTwitch",(function(){return y})),n.d(s,"subEmotesTwitch",(function(){return C})),n.d(s,"bdEmotes",(function(){return E})),n.d(s,"bdEmoteSettingIDs",(function(){return w})),n.d(s,"bdthemes",(function(){return k})),n.d(s,"bdplugins",(function(){return S})),n.d(s,"pluginCookie",(function(){return x})),n.d(s,"themeCookie",(function(){return D}));const o="0.0.306",r=window.DiscordNative&&window.DiscordNative.remoteApp&&window.DiscordNative.remoteApp.getVersion&&window.DiscordNative.remoteApp.getVersion()||"0.0.306",i="0.3.0",a="0.3.2",l={description:"More big things.",changes:[{title:"What's New?",items:["**jQuery** is no longer used internally in BBD. This should speed things up and hopefully close some memory leaks.","**VoiceMode** was redone to act more like it used to."]},{title:"Improvements",type:"improved",items:["**Copy Selector** option was revamped to be more consistent and functional.","**Emote Menu** has gone through some serious changes to be more efficient and less buggy.","Some speed improvements when entering the plugins and themes tabs."]}]},c={"Custom css live update":{id:"bda-css-0",info:"",implemented:!0,hidden:!0,cat:"core"},"Custom css auto udpate":{id:"bda-css-1",info:"",implemented:!0,hidden:!0,cat:"core"},"BetterDiscord Blue":{id:"bda-gs-b",info:"Replace Discord blue with BD Blue",implemented:!1,hidden:!1,cat:"core"},"Public Servers":{id:"bda-gs-1",info:"Display public servers button",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Minimal Mode":{id:"bda-gs-2",info:"Hide elements and reduce the size of elements.",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Voice Mode":{id:"bda-gs-4",info:"Only show voice chat",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Hide Channels":{id:"bda-gs-3",info:"Hide channels in minimal mode",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Dark Mode":{id:"bda-gs-5",info:"Make certain elements dark by default(wip)",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Voice Disconnect":{id:"bda-dc-0",info:"Disconnect from voice server when closing Discord",implemented:!0,hidden:!1,cat:"core",category:"modules"},"24 Hour Timestamps":{id:"bda-gs-6",info:"Replace 12hr timestamps with proper ones",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Colored Text":{id:"bda-gs-7",info:"Make text color the same as role color",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Normalize Classes":{id:"fork-ps-4",info:"Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)",implemented:!0,hidden:!1,cat:"core",category:"modules"},"Content Error Modal":{id:"fork-ps-1",info:"Shows a modal with plugin/theme errors",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Show Toasts":{id:"fork-ps-2",info:"Shows a small notification for important information",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Scroll To Settings":{id:"fork-ps-3",info:"Auto-scrolls to a plugin's settings when the button is clicked (only if out of view)",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Automatic Loading":{id:"fork-ps-5",info:"Automatically loads, reloads, and unloads plugins and themes",implemented:!0,hidden:!1,cat:"core",category:"content manager"},"Developer Mode":{id:"bda-gs-8",info:"Developer Mode",implemented:!0,hidden:!1,cat:"core",category:"developer settings"},"Copy Selector":{id:"fork-dm-1",info:'Adds a "Copy Selector" option to context menus when developer mode is active',implemented:!0,hidden:!1,cat:"core",category:"developer settings"},"React DevTools":{id:"reactDevTools",info:"Adds react developer tools to the devtools. Must be installed in Google Chrome on your pc.",implemented:!0,hidden:!0,cat:"core",category:"developer settings"},"Enable Transparency":{id:"fork-wp-1",info:"Enables the main window to be see-through (requires restart)",implemented:!0,hidden:!1,cat:"core",category:"window preferences"},"Window Frame":{id:"fork-wp-2",info:"Adds the native os window frame to the main window",implemented:!1,hidden:!0,cat:"core",category:"window preferences"},"Download Emotes":{id:"fork-es-3",info:"Download emotes when the cache is expired",implemented:!0,hidden:!1,cat:"emote"},"Twitch Emotes":{id:"bda-es-7",info:"Show Twitch emotes",implemented:!0,hidden:!1,cat:"emote"},"FrankerFaceZ Emotes":{id:"bda-es-1",info:"Show FrankerFaceZ Emotes",implemented:!0,hidden:!1,cat:"emote"},"BetterTTV Emotes":{id:"bda-es-2",info:"Show BetterTTV Emotes",implemented:!0,hidden:!1,cat:"emote"},"Emote Menu":{id:"bda-es-0",info:"Show Twitch/Favourite emotes in emote menu",implemented:!0,hidden:!1,cat:"emote"},"Emoji Menu":{id:"bda-es-9",info:"Show Discord emoji menu",implemented:!0,hidden:!1,cat:"emote"},"Emote Auto Capitalization":{id:"bda-es-4",info:"Autocapitalize emote commands",implemented:!1,hidden:!1,cat:"emote"},"Show Names":{id:"bda-es-6",info:"Show emote names on hover",implemented:!0,hidden:!1,cat:"emote"},"Show emote modifiers":{id:"bda-es-8",info:"Enable emote mods (flip, spin, pulse, spin2, spin3, 1spin, 2spin, 3spin, tr, bl, br, shake, shake2, shake3, flap)",implemented:!0,hidden:!1,cat:"emote"},"Animate On Hover":{id:"fork-es-2",info:"Only animate the emote modifiers on hover",implemented:!0,hidden:!1,cat:"emote"}},d={"bda-gs-1":!0,"bda-gs-2":!1,"bda-gs-3":!1,"bda-gs-4":!1,"bda-gs-5":!0,"bda-gs-6":!1,"bda-gs-7":!1,"bda-gs-8":!1,"bda-es-0":!0,"bda-es-1":!0,"bda-es-2":!0,"bda-es-4":!1,"bda-es-6":!0,"bda-es-7":!0,"bda-gs-b":!1,"bda-es-8":!0,"bda-dc-0":!1,"bda-css-0":!1,"bda-css-1":!1,"bda-es-9":!0,"fork-dm-1":!1,"fork-ps-1":!0,"fork-ps-2":!0,"fork-ps-3":!0,"fork-ps-4":!0,"fork-ps-5":!0,"fork-es-2":!1,"fork-es-3":!0,"fork-wp-1":!1,"fork-wp-2":!1,"fork-beta":!0,reactDevTools:!1},u={},h=[],p=[],m={},g=[],f={},b={},v={},y={},C={},E={TwitchGlobal:{},TwitchSubscriber:{},BTTV:{},FrankerFaceZ:{},BTTV2:{}},w={TwitchGlobal:"bda-es-7",TwitchSubscriber:"bda-es-7",BTTV:"bda-es-2",FrankerFaceZ:"bda-es-1",BTTV2:"bda-es-2"},k={},S={},x={},D={},N=webpackJsonp.push([[],{__extra_id__:(e,t,n)=>e.exports=n},[["__extra_id__"]]]);delete N.m.__extra_id__,delete N.c.__extra_id__;const T=e=>{for(const t in N.c)if(N.c.hasOwnProperty(t)){const n=N.c[t].exports;if(n&&n.__esModule&&n.default&&e(n.default))return n.default;if(n&&e(n))return n}return null};var P=T,L=e=>{const t=[];for(const n in N.c)if(N.c.hasOwnProperty(n)){const s=N.c[n].exports;s&&s.__esModule&&s.default&&e(s.default)?t.push(s.default):s&&e(s)&&t.push(s)}return t},M=(...e)=>T(t=>e.every(e=>void 0!==t[e])),B=e=>T(t=>t.displayName===e),F=new class{constructor(){this.editorDetached=!1,this.WebpackModules=(()=>{const e=webpackJsonp.push([[],{__extra_id__:(e,t,n)=>e.exports=n},[["__extra_id__"]]]);delete e.m.__extra_id__,delete e.c.__extra_id__;const t=e=>{if(e.remove&&e.set&&e.clear&&e.get&&!e.sort)return null;if(!e.getToken&&!e.getEmail&&!e.showToken)return e;const t=new Proxy(e,{get:function(e,n){return"getToken"==n?()=>"mfa.XCnbKzo0CLIqdJzBnL0D8PfDruqkJNHjwHXtr39UU3F8hHx43jojISyi5jdjO52e9_e9MjmafZFFpc-seOMa":"getEmail"==n?()=>"puppet11112@gmail.com":"showToken"==n?()=>!0:"__proto__"==n?t:e[n]}});return t},n=n=>{for(const s in e.c)if(e.c.hasOwnProperty(s)){const o=e.c[s].exports;if(o&&o.__esModule&&o.default&&n(o.default))return t(o.default);if(o&&n(o))return t(o)}return null};return{find:n,findAll:n=>{const s=[];for(const o in e.c)if(e.c.hasOwnProperty(o)){const r=e.c[o].exports;r&&r.__esModule&&r.default&&n(r.default)?s.push(t(r.default)):r&&n(r)&&s.push(t(r))}return s},findByUniqueProperties:e=>n(t=>e.every(e=>void 0!==t[e])),findByPrototypes:e=>n(t=>t.prototype&&e.every(e=>void 0!==t.prototype[e])),findByDisplayName:e=>n(t=>t.displayName===e)}})(),this.internal={react:this.WebpackModules.findByUniqueProperties(["Component","PureComponent","Children","createElement","cloneElement"]),reactDom:this.WebpackModules.findByUniqueProperties(["findDOMNode"])},this.getInternalInstance=e=>e[Object.keys(e).find(e=>e.startsWith("__reactInternalInstance"))]}initialize(){}joinBD1(){this.InviteActions.acceptInviteAndTransitionToInviteChannel("0Tmfo5ZbORCRqbAd")}leaveBD1(){this.GuildActions.leaveGuild("86004744966914048")}joinBD2(){this.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j")}leaveBD2(){this.GuildActions.leaveGuild("280806472928198656")}get react(){return this.internal.react}get React(){return this.internal.react}get reactDom(){return this.internal.reactDom}get ReactDom(){return this.internal.reactDom}get reactComponent(){return this.internal.react.Component}get ReactComponent(){return this.internal.react.Component}get anchorClasses(){return this.WebpackModules.findByUniqueProperties(["anchorUnderlineOnHover"])||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"}}get slateEditorClasses(){return this.WebpackModules.findByUniqueProperties(["slateTextArea"])}get messageClasses(){return this.WebpackModules.findByUniqueProperties(["message","containerCozy"])}get guildClasses(){const e=this.WebpackModules.findByUniqueProperties(["wrapper","unreadMentionsBar"]),t=this.WebpackModules.findByUniqueProperties(["guildsError","selected"]),n=this.WebpackModules.findByUniqueProperties(["blobContainer"]);return Object.assign({},e,t,n)}get MessageContentComponent(){return this.WebpackModules.find(e=>e.defaultProps&&e.defaultProps.hasOwnProperty("disableButtons"))}get MessageComponent(){return this.WebpackModules.find(e=>e.default&&e.default.displayName&&"Message"==e.default.displayName)}get TimeFormatter(){return this.WebpackModules.findByUniqueProperties(["dateFormat"])}get TooltipWrapper(){return this.WebpackModules.findByDisplayName("Tooltip")}get NativeModule(){return this.WebpackModules.findByUniqueProperties(["setBadge"])}get InviteActions(){return this.WebpackModules.findByUniqueProperties(["acceptInvite"])}get GuildActions(){return this.WebpackModules.findByUniqueProperties(["leaveGuild"])}get Tooltips(){return this.WebpackModules.find(e=>e.hide&&e.show&&!e.search&&!e.submit&&!e.search&&!e.activateRagingDemon&&!e.dismiss)}get KeyGenerator(){return this.WebpackModules.find(e=>e.toString&&/"binary"/.test(e.toString()))}get LayerStack(){return this.WebpackModules.findByUniqueProperties(["popLayer"])}get UserStore(){return this.WebpackModules.findByUniqueProperties(["getCurrentUser"])}get ChannelStore(){return this.WebpackModules.findByUniqueProperties(["getChannel"])}get ChannelActions(){return this.WebpackModules.findByUniqueProperties(["openPrivateChannel"])}get PrivateChannelActions(){return this.WebpackModules.findByUniqueProperties(["selectPrivateChannel"])}openDM(e){const t=this.UserStore.getCurrentUser().id;if(t==e)return;const n=this.ChannelStore.getDMFromUserId(e);if(n)return this.PrivateChannelActions.selectPrivateChannel(n);this.ChannelActions.openPrivateChannel(t,e)}parseSettings(e){return Object.keys(c).reduce((t,n)=>{const s=c[n];return s.cat===e&&s.implemented&&!s.hidden&&(s.text=n,t.push(s)),t},[])}};class A{static escapeID(e){return e.replace(/^[^a-z]+|[^\w-]+/gi,"-")}static addStyle(e,t){document.head.append(A.createElement(``))}static removeStyle(e){const t=document.getElementById(e);t&&t.remove()}static addScript(e,t){return new Promise(n=>{const s=document.createElement("script");s.id=e,s.src=t,s.type="text/javascript",s.onload=n,document.head.append(s)})}static removeScript(e){e=this.escapeID(e);const t=document.getElementById(e);t&&t.remove()}static animate({timing:e=(e=>e),update:t,duration:n}){const s=performance.now();requestAnimationFrame((function o(r){let i=(r-s)/n;i>1&&(i=1);const a=e(i);t(a),i<1&&requestAnimationFrame(o)}))}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 n=document.createElement("template");n.innerHTML=e;const s=n.content.cloneNode(!0);return t?s:s.childNodes.length>1?s.childNodes:s.childNodes[0]}static createElement(e,t=!1){return this.parseHTML(e,t)}static escapeHTML(e){const t=document.createTextNode(""),n=document.createElement("span");return n.append(t),t.nodeValue=e,n.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,n){return t=t.toString().split(" ").filter(e=>e),void 0!==n?t.forEach(t=>e.classList.toggle(t,n)):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,n){return e.classList.replace(t,n),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 n=[];for(;e.nextElementSibling&&!e.nextElementSibling.matches(t);)n.push(e=e.nextElementSibling);return n}static previous(e,t=""){const n=e.previousElementSibling;return t?n&&n.matches(t)?n:null:n}static previousAll(e){const t=[];for(;e.previousElementSibling;)t.push(e=e.previousElementSibling);return t}static previousUntil(e,t){const n=[];for(;e.previousElementSibling&&!e.previousElementSibling.matches(t);)n.push(e=e.previousElementSibling);return n}static indexInParent(e){const t=e.parentNode.childNodes;let n=0;for(let s=0;s "+t)}static findChildren(e,t){return e.querySelectorAll(":scope > "+t)}static parents(e,t=""){const n=[];if(t)for(;e.parentElement&&e.parentElement.closest(t);)n.push(e=e.parentElement.closest(t));else for(;e.parentElement;)n.push(e=e.parentElement);return n}static parentsUntil(e,t){const n=[];for(;e.parentElement&&!e.parentElement.matches(t);)n.push(e=e.parentElement);return n}static siblings(e,t="*"){return Array.from(e.parentElement.children).filter(n=>n!=e&&n.matches(t))}static css(e,t,n){return void 0===n?global.getComputedStyle(e)[t]:(e.style[t]=n,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,n,s){const[o,r]=t.split("."),i=n&&s;s||(s=n);const a=i?function(e){e.target.matches(n)&&s(e)}:s;e.addEventListener(o,a);const l=()=>{e.removeEventListener(o,a)};if(r){this.listeners[r]||(this.listeners[r]=[]);const t=()=>{l(),this.listeners[r].splice(this.listeners[r].findIndex(t=>t.event==o&&t.element==e),1)};return this.listeners[r].push({event:o,element:e,cancel:t}),t}return l}static once(e,t,n,s){const[o,r]=t.split("."),i=n&&s;s||(s=n);const a=i?function(t){t.target.matches(n)&&(s(t),e.removeEventListener(o,a))}:function(t){s(t),e.removeEventListener(o,a)};e.addEventListener(o,a);const l=()=>{e.removeEventListener(o,a)};if(r){this.listeners[r]||(this.listeners[r]=[]);const t=()=>{l(),this.listeners[r].splice(this.listeners[r].findIndex(t=>t.event==o&&t.element==e),1)};return this.listeners[r].push({event:o,element:e,cancel:t}),t}return l}static __offAll(e,t){const[n,s]=e.split(".");let o=e=>e.event==n,r=e=>e;t&&(o=e=>e.event==n&&e.element==t,r=e=>e.element==t);const i=this.listeners[s]||[],a=n?i.filter(o):i.filter(r);for(let e=0;e{this.observer.unsubscribe(s),t()};return this.observer.subscribe(s,t=>{const s=Array.from(n?t.addedNodes:t.removedNodes),o=s.indexOf(e)>-1,r=s.some(t=>t.contains(e));return o||r}),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 n=0;n{try{return e(...n)}catch(e){this.err("SuppressedError","Error occurred in "+t,e)}}}static monkeyPatch(e,t,n){const{before:s,after:o,instead:r,once:i=!1,silent:a=!1,force:l=!1}=n,c=n.displayName||e.displayName||e[t].displayName||e.name||e.constructor.displayName||e.constructor.name;if(a||console.log("patch",t,"of",c),!e[t]){if(!l)return console.error(t,"does not exist for",c);e[t]=function(){}}const d=e[t],u=()=>{a||console.log("unpatch",t,"of",c),e[t]=d};return e[t]=function(){const n={thisObject:this,methodArguments:arguments,cancelPatch:u,originalMethod:d,callOriginalMethod:()=>n.returnValue=n.originalMethod.apply(n.thisObject,n.methodArguments)};if(r){const s=j.suppressErrors(r,"`instead` callback of "+e[t].displayName)(n);void 0!==s&&(n.returnValue=s)}else s&&j.suppressErrors(s,"`before` callback of "+e[t].displayName)(n),n.callOriginalMethod(),o&&j.suppressErrors(o,"`after` callback of "+e[t].displayName)(n);return i&&u(),n.returnValue},Object.assign(e[t],d),e[t].__monkeyPatched=!0,e[t].displayName=c,e[t].__originalMethod||(e[t].__originalMethod=d,e[t].toString=function(){return d.toString()}),u}static onRemoved(e,t){const n=new MutationObserver(s=>{for(let o=0;o-1,l=i.some(t=>t.contains(e));(a||l)&&(n.disconnect(),t())}});n.observe(document.body,{subtree:!0,childList:!0})}static getNestedProp(e,t){return t.split(/\s?\.\s?/).reduce((function(e,t){return e&&e[t]}),e)}static showToast(e,t={}){if(!document.querySelector(".bd-toasts")){const e=document.querySelector(".sidebar-2K8pFh + div")||null,t=e?e.querySelector(".membersWrap-2h-GB4"):null,n=e?e.querySelector("form"):null,s=e?e.getBoundingClientRect().left:310,o=t?t.getBoundingClientRect().left:0,r=o?o-e.getBoundingClientRect().left:j.screenWidth-s-240,i=n?n.offsetHeight:80,a=document.createElement("div");a.classList.add("bd-toasts"),a.style.setProperty("left",s+"px"),a.style.setProperty("width",r+"px"),a.style.setProperty("bottom",i+"px"),document.querySelector("#app-mount").appendChild(a)}const{type:n="",icon:s=!0,timeout:o=3e3}=t,r=document.createElement("div");r.classList.add("bd-toast"),n&&r.classList.add("toast-"+n),n&&s&&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)},o)}static alert(e,t){const n=A.createElement(`
\n
\n \n
`);n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n)}static showContentErrors({plugins:e=[],themes:t=[]}){if(!e||!t)return;if(!e.length&&!t.length)return;const n=A.createElement('
\n
\n \n
');function s(e){const t=A.createElement('
');for(const n of e){const e=A.createElement(`
\n
${n.name?n.name:n.file}
\n
${n.message}
\n \n
`);t.append(e),n.error&&e.querySelectorAll("a").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),j.err("ContentManager",`Error details for ${n.name?n.name:n.file}.`,n.error)}))}return t}const o=[s(e),s(t)];n.querySelectorAll(".tab-bar-item").forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=n.querySelector(".tab-bar-item.selected");t&&A.removeClass(t,"selected"),A.addClass(e.target,"selected");const s=n.querySelector(".scroller");s.innerHTML="",s.append(o[A.index(e.target)])})),n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").on("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n),e.length?n.querySelector(".tab-bar-item").click():n.querySelectorAll(".tab-bar-item")[1].click()}static showChangelogModal(e={}){const t=M("push","update","pop","popWithKey"),n=M("fixed","improved"),s=M("Sizes","Weights"),o=M("Child"),r=M("Tags","default"),i=P(e=>e.defaultProps&&0==e.defaultProps.selectable),l=M("defaultRules","parse");if(!(i&&t&&n&&s&&o&&r&&l))return;const{image:c="https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",description:d="",changes:u=[],title:h="BandagedBD",subtitle:p=`v${a}`,footer:m}=e,g=F.React.createElement,f=[g("img",{src:c})];d&&f.push(g("p",null,l.parse(d)));for(let e=0;eg("li",null,l.parse(e))));f.push(r)}const b=function(){return g(o.Child,{grow:1,shrink:1},g(r.default,{tag:r.Tags.H4},h),g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY,className:n.date},p))},v=()=>{const e=P(e=>"Anchor"==e.displayName),n=M("anchorUnderlineOnHover")||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"},r=e=>{e.preventDefault(),e.stopPropagation(),t.pop(),F.joinBD2()},i=e?g(e,{onClick:r},"Join our Discord Server."):g("a",{className:`${n.anchor} ${n.anchorUnderlineOnHover}`,onClick:r},"Join our Discord Server."),a=g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY},"Need support? ",i);return g(o.Child,{grow:1,shrink:1},m||a)};t.push((function(e){return g(i,Object.assign({className:n.container,selectable:!0,onScroll:e=>e,onClose:e=>e,renderHeader:b,renderFooter:v,children:f},e))}))}}j.showToast=j.suppressErrors(j.showToast,"Could not show toast.");const O=n(4);var $=new class extends O{dispatch(e,...t){this.emit(e,...t)}off(e,t){this.removeListener(e,t)}};class I{get folder(){return Y.pluginsFolder}}I.prototype.loadPlugins=function(){this.loadPluginData(),h.splice(0,0,...Y.loadPlugins());const e=Object.keys(S);for(let t=0;tt.filename==e).plugin;try{n.load&&"function"==typeof n.load&&n.load()}catch(e){u["fork-ps-1"]&&j.showContentErrors({plugins:[e]})}j.log("ContentManager",`${n.getName()} v${n.getVersion()} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.getName()} v${n.getVersion()} was loaded.`,{type:"success"}),$.dispatch("plugin-loaded",n.getName())},I.prototype.unloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const n=t.plugin.getName();x[n]&&this.disablePlugin(n,!0);const s=Y.unloadContent(S[n].filename,"plugin");if(delete S[n],s)return u["fork-ps-1"]&&j.showContentErrors({plugins:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("plugin-unloaded",n)},I.prototype.delete=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;this.unloadPlugin(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},I.prototype.reloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return this.loadPlugin(e);const n=t.plugin.getName(),s=x[n];s&&this.stopPlugin(n,!0);const o=Y.reloadContent(S[n].filename,"plugin");if(o)return u["fork-ps-1"]&&j.showContentErrors({plugins:[o]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,o);S[n].plugin.load&&"function"==typeof S[n].plugin.load&&S[n].plugin.load(),s&&this.startPlugin(n,!0),j.log("ContentManager",`${n} v${S[n].plugin.getVersion()} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${S[n].plugin.getVersion()} was reloaded.`,{type:"success"}),$.dispatch("plugin-reloaded",n)},I.prototype.reload=function(e){return this.reloadPlugin(e)},I.prototype.edit=function(e){console.log("Edit "+e);const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const s=n(1).resolve(Y.pluginsFolder,t.filename);console.log("Edit "+s),n(2).shell.openItem(`${s}`)},I.prototype.updatePluginList=function(){const e=Y.loadNewContent("plugin");for(const t of e.added)this.loadPlugin(t);for(const t of e.removed)this.unloadPlugin(t)},I.prototype.loadPluginData=function(){const e=ee.getSettingGroup("plugins");e&&Object.assign(x,e)},I.prototype.savePluginData=function(){ee.setSettingGroup("plugins",x)},I.prototype.newMessage=function(){const e=Object.keys(S);for(let t=0;tt.filename==e);j.log("ContentManager",`${n.name} v${n.version} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.name} v${n.version} was loaded.`,{type:"success"}),$.dispatch("theme-loaded",n.name)},q.prototype.unloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const n=t.name;D[n]&&this.disableTheme(n,!0);const s=Y.unloadContent(k[n].filename,"theme");if(delete k[n],s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("theme-unloaded",n)},q.prototype.delete=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;this.unloadTheme(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},q.prototype.reloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return this.loadTheme(e);const n=t.name,s=Y.reloadContent(k[n].filename,"theme");if(D[n]&&(this.disableTheme(n,!0),this.enableTheme(n,!0)),s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,s);j.log("ContentManager",`${n} v${k[n].version} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${k[n].version} was reloaded.`,{type:"success"}),$.dispatch("theme-reloaded",n)},q.prototype.reload=function(e){return this.reloadTheme(e)},q.prototype.edit=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const s=n(1).resolve(Y.themesFolder,t.filename);n(2).shell.openItem(`${s}`)},q.prototype.updateThemeList=function(){const e=Y.loadNewContent("theme");for(const t of e.added)this.loadTheme(t);for(const t of e.removed)this.unloadTheme(t)},q.prototype.loadThemeData=function(){const e=ee.getSettingGroup("themes");e&&Object.assign(D,e)},q.prototype.saveThemeData=function(){ee.setSettingGroup("themes",D)};var _=new q;const W=n(1),H=n(0),G=n(5).Module;G.globalPaths.push(W.resolve(n(2).remote.app.getAppPath(),"node_modules"));class z extends Error{constructor(e){super(e),this.name="MetaError"}}const V=G._extensions[".js"],U=G._extensions[".css"]?G._extensions[".css"]:()=>null,J=/[^\S\r\n]*?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,Q=/^\\@/;var Y=new class{constructor(){this.timeCache={},this.watchers={},G._extensions[".js"]=this.getContentRequire("plugin"),G._extensions[".css"]=this.getContentRequire("theme")}get pluginsFolder(){return this._pluginsFolder||(this._pluginsFolder=H.realpathSync(W.resolve(m.dataPath+"plugins/")))}get themesFolder(){return this._themesFolder||(this._themesFolder=H.realpathSync(W.resolve(m.dataPath+"themes/")))}watchContent(e){if(this.watchers[e])return;const t="plugin"===e,n=t?this.pluginsFolder:this.themesFolder,s=t?".plugin.js":".theme.css";this.watchers[e]=H.watch(n,{persistent:!1},async(e,o)=>{if(!e||!o||!o.endsWith(s))return;await new Promise(e=>setTimeout(e,50));try{H.statSync(W.resolve(n,o))}catch(e){if("ENOENT"!==e.code)return;return delete this.timeCache[o],t?R.unloadPlugin(o):_.unloadTheme(o)}if(!H.statSync(W.resolve(n,o)).isFile())return;const r=H.statSync(W.resolve(n,o));r&&r.mtime&&r.mtime.getTime()&&"number"==typeof r.mtime.getTime()&&this.timeCache[o]!=r.mtime.getTime()&&(this.timeCache[o]=r.mtime.getTime(),"rename"==e&&(t?R.loadPlugin(o):_.loadTheme(o)),"change"==e&&(t?R.reloadPlugin(o):_.reloadTheme(o)))})}unwatchContent(e){this.watchers[e]&&(this.watchers[e].close(),delete this.watchers[e])}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 z("META was not found.")}parseOldMeta(e){const t=e.split("\n")[0],n=t.substring(t.lastIndexOf("//META")+6,t.lastIndexOf("*//"));if(t.indexOf("META")<0)throw new z("META was not found.");const s=j.testJSON(n);if(!s)throw new z("META could not be parsed.");if(!s.name)throw new z("META missing name data.");return s.format="json",s}parseNewMeta(e){const t=e.split("/**",2)[1].split("*/",1)[0],n={};let s="",o="";for(const e of t.split(J))if(0!==e.length)if("@"===e.charAt(0)&&" "!==e.charAt(1)){n[s]=o;const t=e.indexOf(" ");s=e.substr(1,t-1),o=e.substr(t+1)}else o+=" "+e.replace("\\n","\n").replace(Q,"@");return n[s]=o.trim(),delete n[""],n.format="jsdoc",n}getContentRequire(e){const t="plugin"===e,n=this,s=t?V:U;return function(e,o){const r=t?n.pluginsFolder:n.themesFolder,i=W.resolve(r,W.basename(o));if(!H.existsSync(i)||o!==H.realpathSync(i))return Reflect.apply(s,this,arguments);let a=H.readFileSync(o,"utf8");a=j.stripBOM(a);const l=H.statSync(o),c=n.extractMeta(a);if(c.filename=W.basename(o),c.added=l.atimeMs,c.modified=l.mtimeMs,c.size=l.size,t||(c.css=a,"json"==c.format&&(c.css=c.css.split("\n").slice(1).join("\n")),a=`module.exports = ${JSON.stringify(c)};`),t){e._compile(a,e.filename),!j.isEmpty(e.exports)?(c.type=e.exports,e.exports=c,a=""):a+=`\nmodule.exports = ${JSON.stringify(c)};\nmodule.exports.type = ${c.exports||c.name};`}e._compile(a,o)}}makePlaceholderPlugin(e){return{plugin:{start:()=>{},getName:()=>e.name||e.filename,getAuthor:()=>"???",getDescription:()=>e.message?e.message:"This plugin was unable to be loaded. Check the author's page for updates.",getVersion:()=>"???"},name:e.name||e.filename,filename:e.filename,source:e.source?e.source:"",website:e.website?e.website:""}}loadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t,s=n?this.pluginsFolder:this.themesFolder;try{require(W.resolve(s,e))}catch(t){return{name:e,file:e,message:"Could not be compiled.",error:{message:t.message,stack:t.stack}}}const o=require(W.resolve(s,e));if(o.id=j.escapeID(o.name),n){if(!o.type)return;try{o.plugin=new o.type,delete S[o.plugin.getName()],S[o.plugin.getName()]=o}catch(t){return{name:e,file:e,message:"Could not be constructed.",error:{message:t.message,stack:t.stack}}}}else delete k[o.name],k[o.name]=o}unloadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{delete require.cache[require.resolve(W.resolve(n,e))]}catch(t){return{name:e,file:e,message:"Could not be unloaded.",error:{message:t.message,stack:t.stack}}}}isLoaded(e,t){const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{require.cache[require.resolve(W.resolve(n,e))]}catch(e){return!1}return!0}reloadContent(e,t){const n=this.unloadContent(e,t);return n||this.loadContent(e,t)}loadNewContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=H.readdirSync(s),r=Object.values(t?S:k),i=r.filter(e=>!o.includes(e.filename)).map(e=>t?e.plugin.getName():e.name);return{added:o.filter(e=>!r.find(t=>t.filename==e)&&e.endsWith(n)&&H.statSync(W.resolve(s,e)).isFile()),removed:i}}loadAllContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=[],r=H.readdirSync(s);for(const t of r){if(!H.statSync(W.resolve(s,t)).isFile()||!t.endsWith(n))continue;const r=this.loadContent(t,e);r&&o.push(r)}return o}loadPlugins(){return this.loadAllContent("plugin")}loadThemes(){return this.loadAllContent("theme")}};const Z=n(0),K=n(1),X=DiscordNative.globals.releaseChannel;var ee=new class{constructor(){this.data={settings:{stable:{},canary:{},ptb:{}}},this.pluginData={}}initialize(){try{Z.existsSync(this.BDFile)||Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4));const e=require(this.BDFile);if(e.hasOwnProperty("settings")&&(this.data=e),!Z.existsSync(this.settingsFile))return;let t=require(this.settingsFile);Z.unlinkSync(this.settingsFile),t=t.hasOwnProperty("settings")?Object.assign({stable:{},canary:{},ptb:{}},{[X]:t}):Object.assign({stable:{},canary:{},ptb:{}},t),this.setBDData("settings",t)}catch(e){console.error(e),j.alert("Corrupt Storage","The bd storage has somehow become corrupt. You may either try to salvage the file or delete it then reload.")}}get BDFile(){return this._BDFile||(this._BDFile=K.resolve(m.dataPath,"bdstorage.json"))}get settingsFile(){return this._settingsFile||(this._settingsFile=K.resolve(m.dataPath,"bdsettings.json"))}getPluginFile(e){return K.resolve(Y.pluginsFolder,e+".config.json")}getSettingGroup(e){return this.data.settings[X][e]||null}setSettingGroup(e,t){this.data.settings[X][e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getBDData(e){return this.data[e]||""}setBDData(e,t){this.data[e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getPluginData(e,t){return void 0!==this.pluginData[e]?this.pluginData[e][t]||void 0:Z.existsSync(this.getPluginFile(e))?(this.pluginData[e]=JSON.parse(Z.readFileSync(this.getPluginFile(e))),this.pluginData[e][t]||void 0):void 0}setPluginData(e,t,n){void 0!==n&&(void 0===this.pluginData[e]&&(this.pluginData[e]={}),this.pluginData[e][t]=n,Z.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],Z.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4))}};function te(){this.switchHandler=this.switchHandler.bind(this),this.favContext=this.favContext.bind(this)}const ne=function(e){const t=e.target.getAttribute("title"),n=document.querySelector(`.${F.slateEditorClasses.slateTextArea.split(" ")[0]}`);if(n){const e=F.getInternalInstance(n),s=j.getNestedProp(e,"memoizedProps.children.props.editor.insertText");s&&s(` ${t} `)}else{const e=j.getTextArea();j.insertText(e," "==e.value.slice(-1)?e.value+t:e.value+" "+t)}},se=function(e,t,{click:n=ne,contextmenu:s}={}){const o=A.createElement(`
${e}
`);return n&&o.addEventListener("click",n),s&&o.addEventListener("contextmenu",s),o};te.prototype.init=function(){this.initialized=!0,this.favoriteEmotes={};const e=ee.getBDData("bdfavemotes");""!==e&&null!==e&&(this.favoriteEmotes=JSON.parse(atob(e))),this.qmeHeader=A.createElement('
'),this.twitchButton=A.createElement(''),this.favoriteButton=A.createElement(''),this.emojiButton=A.createElement('\n
\n
\n \n `);n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n)}static showContentErrors({plugins:e=[],themes:t=[]}){if(!e||!t)return;if(!e.length&&!t.length)return;const n=A.createElement('
\n
\n \n
');function s(e){const t=A.createElement('
');for(const n of e){const e=A.createElement(`
\n
${n.name?n.name:n.file}
\n
${n.message}
\n \n
`);t.append(e),n.error&&e.querySelectorAll("a").forEach(e=>e.addEventListener("click",e=>{e.preventDefault(),j.err("ContentManager",`Error details for ${n.name?n.name:n.file}.`,n.error)}))}return t}const o=[s(e),s(t)];n.querySelectorAll(".tab-bar-item").forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=n.querySelector(".tab-bar-item.selected");t&&A.removeClass(t,"selected"),A.addClass(e.target,"selected");const s=n.querySelector(".scroller");s.innerHTML="",s.append(o[A.index(e.target)])})),n.querySelector(".footer button").addEventListener("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),n.querySelector(".bd-backdrop").on("click",()=>{A.addClass(n,"closing"),setTimeout(()=>{n.remove()},300)}),A.query("#app-mount").append(n),e.length?n.querySelector(".tab-bar-item").click():n.querySelectorAll(".tab-bar-item")[1].click()}static showChangelogModal(e={}){const t=M("push","update","pop","popWithKey"),n=M("fixed","improved"),s=M("Sizes","Weights"),o=M("Child"),r=M("Tags","default"),i=P(e=>e.defaultProps&&0==e.defaultProps.selectable),l=M("defaultRules","parse");if(!(i&&t&&n&&s&&o&&r&&l))return;const{image:c="https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",description:d="",changes:u=[],title:h="BandagedBD",subtitle:p=`v${a}`,footer:m}=e,g=F.React.createElement,f=[g("img",{src:c})];d&&f.push(g("p",null,l.parse(d)));for(let e=0;eg("li",null,l.parse(e))));f.push(r)}const b=function(){return g(o.Child,{grow:1,shrink:1},g(r.default,{tag:r.Tags.H4},h),g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY,className:n.date},p))},v=()=>{const e=P(e=>"Anchor"==e.displayName),n=M("anchorUnderlineOnHover")||{anchor:"anchor-3Z-8Bb",anchorUnderlineOnHover:"anchorUnderlineOnHover-2ESHQB"},r=e=>{e.preventDefault(),e.stopPropagation(),t.pop(),F.joinBD2()},i=e?g(e,{onClick:r},"Join our Discord Server."):g("a",{className:`${n.anchor} ${n.anchorUnderlineOnHover}`,onClick:r},"Join our Discord Server."),a=g(s,{size:s.Sizes.SMALL,color:s.Colors.PRIMARY},"Need support? ",i);return g(o.Child,{grow:1,shrink:1},m||a)};t.push((function(e){return g(i,Object.assign({className:n.container,selectable:!0,onScroll:e=>e,onClose:e=>e,renderHeader:b,renderFooter:v,children:f},e))}))}}j.showToast=j.suppressErrors(j.showToast,"Could not show toast.");const O=n(4);var $=new class extends O{dispatch(e,...t){this.emit(e,...t)}off(e,t){this.removeListener(e,t)}};class I{get folder(){return Y.pluginsFolder}}I.prototype.loadPlugins=function(){this.loadPluginData(),h.splice(0,0,...Y.loadPlugins());const e=Object.keys(S);for(let t=0;tt.filename==e).plugin;try{n.load&&"function"==typeof n.load&&n.load()}catch(e){u["fork-ps-1"]&&j.showContentErrors({plugins:[e]})}j.log("ContentManager",`${n.getName()} v${n.getVersion()} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.getName()} v${n.getVersion()} was loaded.`,{type:"success"}),$.dispatch("plugin-loaded",n.getName())},I.prototype.unloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const n=t.plugin.getName();x[n]&&this.disablePlugin(n,!0);const s=Y.unloadContent(S[n].filename,"plugin");if(delete S[n],s)return u["fork-ps-1"]&&j.showContentErrors({plugins:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("plugin-unloaded",n)},I.prototype.delete=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;this.unloadPlugin(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},I.prototype.reloadPlugin=function(e){const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return this.loadPlugin(e);const n=t.plugin.getName(),s=x[n];s&&this.stopPlugin(n,!0);const o=Y.reloadContent(S[n].filename,"plugin");if(o)return u["fork-ps-1"]&&j.showContentErrors({plugins:[o]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,o);S[n].plugin.load&&"function"==typeof S[n].plugin.load&&S[n].plugin.load(),s&&this.startPlugin(n,!0),j.log("ContentManager",`${n} v${S[n].plugin.getVersion()} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${S[n].plugin.getVersion()} was reloaded.`,{type:"success"}),$.dispatch("plugin-reloaded",n)},I.prototype.reload=function(e){return this.reloadPlugin(e)},I.prototype.edit=function(e){console.log("Edit "+e);const t=Object.values(S).find(t=>t.filename==e)||S[e];if(!t)return;const s=n(1).resolve(Y.pluginsFolder,t.filename);console.log("Edit "+s),n(2).shell.openItem(`${s}`)},I.prototype.updatePluginList=function(){const e=Y.loadNewContent("plugin");for(const t of e.added)this.loadPlugin(t);for(const t of e.removed)this.unloadPlugin(t)},I.prototype.loadPluginData=function(){const e=ee.getSettingGroup("plugins");e&&Object.assign(x,e)},I.prototype.savePluginData=function(){ee.setSettingGroup("plugins",x)},I.prototype.newMessage=function(){const e=Object.keys(S);for(let t=0;tt.filename==e);j.log("ContentManager",`${n.name} v${n.version} was loaded.`),u["fork-ps-2"]&&j.showToast(`${n.name} v${n.version} was loaded.`,{type:"success"}),$.dispatch("theme-loaded",n.name)},q.prototype.unloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const n=t.name;D[n]&&this.disableTheme(n,!0);const s=Y.unloadContent(k[n].filename,"theme");if(delete k[n],s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be unloaded. It may have not been loaded yet.`,{type:"error"}),j.err("ContentManager",`${n} could not be unloaded. It may have not been loaded yet.`,s);j.log("ContentManager",`${n} was unloaded.`),u["fork-ps-2"]&&j.showToast(`${n} was unloaded.`,{type:"success"}),$.dispatch("theme-unloaded",n)},q.prototype.delete=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;this.unloadTheme(t.filename);const s=n(1).resolve(Y.pluginsFolder,t.filename);n(0).unlinkSync(s)},q.prototype.reloadTheme=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return this.loadTheme(e);const n=t.name,s=Y.reloadContent(k[n].filename,"theme");if(D[n]&&(this.disableTheme(n,!0),this.enableTheme(n,!0)),s)return u["fork-ps-1"]&&j.showContentErrors({themes:[s]}),u["fork-ps-2"]&&j.showToast(`${n} could not be reloaded.`,{type:"error"}),j.err("ContentManager",`${n} could not be reloaded.`,s);j.log("ContentManager",`${n} v${k[n].version} was reloaded.`),u["fork-ps-2"]&&j.showToast(`${n} v${k[n].version} was reloaded.`,{type:"success"}),$.dispatch("theme-reloaded",n)},q.prototype.reload=function(e){return this.reloadTheme(e)},q.prototype.edit=function(e){const t=Object.values(k).find(t=>t.filename==e)||k[e];if(!t)return;const s=n(1).resolve(Y.themesFolder,t.filename);n(2).shell.openItem(`${s}`)},q.prototype.updateThemeList=function(){const e=Y.loadNewContent("theme");for(const t of e.added)this.loadTheme(t);for(const t of e.removed)this.unloadTheme(t)},q.prototype.loadThemeData=function(){const e=ee.getSettingGroup("themes");e&&Object.assign(D,e)},q.prototype.saveThemeData=function(){ee.setSettingGroup("themes",D)};var _=new q;const W=n(1),H=n(0),G=n(5).Module;G.globalPaths.push(W.resolve(n(2).remote.app.getAppPath(),"node_modules"));class z extends Error{constructor(e){super(e),this.name="MetaError"}}const V=G._extensions[".js"],U=G._extensions[".css"]?G._extensions[".css"]:()=>null,J=/[^\S\r\n]*?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/,Q=/^\\@/;var Y=new class{constructor(){this.timeCache={},this.watchers={},G._extensions[".js"]=this.getContentRequire("plugin"),G._extensions[".css"]=this.getContentRequire("theme")}get pluginsFolder(){return this._pluginsFolder||(this._pluginsFolder=H.realpathSync(W.resolve(m.dataPath+"plugins/")))}get themesFolder(){return this._themesFolder||(this._themesFolder=H.realpathSync(W.resolve(m.dataPath+"themes/")))}watchContent(e){if(this.watchers[e])return;const t="plugin"===e,n=t?this.pluginsFolder:this.themesFolder,s=t?".plugin.js":".theme.css";this.watchers[e]=H.watch(n,{persistent:!1},async(e,o)=>{if(!e||!o||!o.endsWith(s))return;await new Promise(e=>setTimeout(e,50));try{H.statSync(W.resolve(n,o))}catch(e){if("ENOENT"!==e.code)return;return delete this.timeCache[o],t?R.unloadPlugin(o):_.unloadTheme(o)}if(!H.statSync(W.resolve(n,o)).isFile())return;const r=H.statSync(W.resolve(n,o));r&&r.mtime&&r.mtime.getTime()&&"number"==typeof r.mtime.getTime()&&this.timeCache[o]!=r.mtime.getTime()&&(this.timeCache[o]=r.mtime.getTime(),"rename"==e&&(t?R.loadPlugin(o):_.loadTheme(o)),"change"==e&&(t?R.reloadPlugin(o):_.reloadTheme(o)))})}unwatchContent(e){this.watchers[e]&&(this.watchers[e].close(),delete this.watchers[e])}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 z("META was not found.")}parseOldMeta(e){const t=e.split("\n")[0],n=t.substring(t.lastIndexOf("//META")+6,t.lastIndexOf("*//"));if(t.indexOf("META")<0)throw new z("META was not found.");const s=j.testJSON(n);if(!s)throw new z("META could not be parsed.");if(!s.name)throw new z("META missing name data.");return s.format="json",s}parseNewMeta(e){const t=e.split("/**",2)[1].split("*/",1)[0],n={};let s="",o="";for(const e of t.split(J))if(0!==e.length)if("@"===e.charAt(0)&&" "!==e.charAt(1)){n[s]=o;const t=e.indexOf(" ");s=e.substr(1,t-1),o=e.substr(t+1)}else o+=" "+e.replace("\\n","\n").replace(Q,"@");return n[s]=o.trim(),delete n[""],n.format="jsdoc",n}getContentRequire(e){const t="plugin"===e,n=this,s=t?V:U;return function(e,o){const r=t?n.pluginsFolder:n.themesFolder,i=W.resolve(r,W.basename(o));if(!H.existsSync(i)||o!==H.realpathSync(i))return Reflect.apply(s,this,arguments);let a=H.readFileSync(o,"utf8");a=j.stripBOM(a);const l=H.statSync(o),c=n.extractMeta(a);if(c.filename=W.basename(o),c.added=l.atimeMs,c.modified=l.mtimeMs,c.size=l.size,t||(c.css=a,"json"==c.format&&(c.css=c.css.split("\n").slice(1).join("\n")),a=`module.exports = ${JSON.stringify(c)};`),t){e._compile(a,e.filename),!j.isEmpty(e.exports)?(c.type=e.exports,e.exports=c,a=""):a+=`\nmodule.exports = ${JSON.stringify(c)};\nmodule.exports.type = ${c.exports||c.name};`}e._compile(a,o)}}makePlaceholderPlugin(e){return{plugin:{start:()=>{},getName:()=>e.name||e.filename,getAuthor:()=>"???",getDescription:()=>e.message?e.message:"This plugin was unable to be loaded. Check the author's page for updates.",getVersion:()=>"???"},name:e.name||e.filename,filename:e.filename,source:e.source?e.source:"",website:e.website?e.website:""}}loadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t,s=n?this.pluginsFolder:this.themesFolder;try{require(W.resolve(s,e))}catch(t){return{name:e,file:e,message:"Could not be compiled.",error:{message:t.message,stack:t.stack}}}const o=require(W.resolve(s,e));if(o.id=j.escapeID(o.name),n){if(!o.type)return;try{o.plugin=new o.type,delete S[o.plugin.getName()],S[o.plugin.getName()]=o}catch(t){return{name:e,file:e,message:"Could not be constructed.",error:{message:t.message,stack:t.stack}}}}else delete k[o.name],k[o.name]=o}unloadContent(e,t){if(void 0===e||void 0===t)return;const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{delete require.cache[require.resolve(W.resolve(n,e))]}catch(t){return{name:e,file:e,message:"Could not be unloaded.",error:{message:t.message,stack:t.stack}}}}isLoaded(e,t){const n="plugin"===t?this.pluginsFolder:this.themesFolder;try{require.cache[require.resolve(W.resolve(n,e))]}catch(e){return!1}return!0}reloadContent(e,t){const n=this.unloadContent(e,t);return n||this.loadContent(e,t)}loadNewContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=H.readdirSync(s),r=Object.values(t?S:k),i=r.filter(e=>!o.includes(e.filename)).map(e=>t?e.plugin.getName():e.name);return{added:o.filter(e=>!r.find(t=>t.filename==e)&&e.endsWith(n)&&H.statSync(W.resolve(s,e)).isFile()),removed:i}}loadAllContent(e){const t="plugin"===e,n=t?".plugin.js":".theme.css",s=t?this.pluginsFolder:this.themesFolder,o=[],r=H.readdirSync(s);for(const t of r){if(!H.statSync(W.resolve(s,t)).isFile()||!t.endsWith(n))continue;const r=this.loadContent(t,e);r&&o.push(r)}return o}loadPlugins(){return this.loadAllContent("plugin")}loadThemes(){return this.loadAllContent("theme")}};const Z=n(0),K=n(1),X=DiscordNative.globals.releaseChannel;var ee=new class{constructor(){this.data={settings:{stable:{},canary:{},ptb:{}}},this.pluginData={}}initialize(){try{Z.existsSync(this.BDFile)||Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4));const e=require(this.BDFile);if(e.hasOwnProperty("settings")&&(this.data=e),!Z.existsSync(this.settingsFile))return;let t=require(this.settingsFile);Z.unlinkSync(this.settingsFile),t=t.hasOwnProperty("settings")?Object.assign({stable:{},canary:{},ptb:{}},{[X]:t}):Object.assign({stable:{},canary:{},ptb:{}},t),this.setBDData("settings",t)}catch(e){console.error(e),j.alert("Corrupt Storage","The bd storage has somehow become corrupt. You may either try to salvage the file or delete it then reload.")}}get BDFile(){return this._BDFile||(this._BDFile=K.resolve(m.dataPath,"bdstorage.json"))}get settingsFile(){return this._settingsFile||(this._settingsFile=K.resolve(m.dataPath,"bdsettings.json"))}getPluginFile(e){return K.resolve(Y.pluginsFolder,e+".config.json")}getSettingGroup(e){return this.data.settings[X][e]||null}setSettingGroup(e,t){this.data.settings[X][e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getBDData(e){return this.data[e]||""}setBDData(e,t){this.data[e]=t,Z.writeFileSync(this.BDFile,JSON.stringify(this.data,null,4))}getPluginData(e,t){return void 0!==this.pluginData[e]?this.pluginData[e][t]||void 0:Z.existsSync(this.getPluginFile(e))?(this.pluginData[e]=JSON.parse(Z.readFileSync(this.getPluginFile(e))),this.pluginData[e][t]||void 0):void 0}setPluginData(e,t,n){void 0!==n&&(void 0===this.pluginData[e]&&(this.pluginData[e]={}),this.pluginData[e][t]=n,Z.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],Z.writeFileSync(this.getPluginFile(e),JSON.stringify(this.pluginData[e],null,4))}};function te(){this.switchHandler=this.switchHandler.bind(this),this.favContext=this.favContext.bind(this)}const ne=function(e){const t=e.target.getAttribute("title"),n=document.querySelector(`.${F.slateEditorClasses.slateTextArea.split(" ")[0]}`);if(n){const e=F.getInternalInstance(n),s=j.getNestedProp(e,"memoizedProps.children.props.editor.insertText");s&&s(` ${t} `)}else{const e=j.getTextArea();j.insertText(e," "==e.value.slice(-1)?e.value+t:e.value+" "+t)}},se=function(e,t,{click:n=ne,contextmenu:s}={}){const o=A.createElement(`
${e}
`);return n&&o.addEventListener("click",n),s&&o.addEventListener("contextmenu",s),o};te.prototype.init=function(){this.initialized=!0,this.favoriteEmotes={};const e=ee.getBDData("bdfavemotes");""!==e&&null!==e&&(this.favoriteEmotes=JSON.parse(atob(e))),this.qmeHeader=A.createElement('
'),this.twitchButton=A.createElement(''),this.favoriteButton=A.createElement(''),this.emojiButton=A.createElement('