void>>();\n private globalListeners = new Set<(newData: T, path: string) => void>();\n\n /**\n * The store object. Making changes to this object will trigger the applicable change listeners\n */\n public declare store: T;\n /**\n * The plain data. Changes to this object will not trigger any change listeners\n */\n public declare plain: T;\n\n public constructor(plain: T, options: SettingsStoreOptions = {}) {\n this.plain = plain;\n this.store = this.makeProxy(plain);\n Object.assign(this, options);\n }\n\n private makeProxy(object: any, root: T = object, path: string = \"\") {\n const self = this;\n\n return new Proxy(object, {\n get(target, key: string) {\n let v = target[key];\n\n if (!(key in target) && self.getDefaultValue) {\n v = self.getDefaultValue({\n target,\n key,\n root,\n path\n });\n }\n\n if (typeof v === \"object\" && v !== null && !Array.isArray(v))\n return self.makeProxy(v, root, `${path}${path && \".\"}${key}`);\n\n return v;\n },\n set(target, key: string, value) {\n if (target[key] === value) return true;\n\n Reflect.set(target, key, value);\n const setPath = `${path}${path && \".\"}${key}`;\n\n self.globalListeners.forEach(cb => cb(value, setPath));\n self.pathListeners.get(setPath)?.forEach(cb => cb(value));\n\n return true;\n }\n });\n }\n\n /**\n * Set the data of the store.\n * This will update this.store and this.plain (and old references to them will be stale! Avoid storing them in variables)\n *\n * Additionally, all global listeners (and those for pathToNotify, if specified) will be called with the new data\n * @param value New data\n * @param pathToNotify Optional path to notify instead of globally. Used to transfer path via ipc\n */\n public setData(value: T, pathToNotify?: string) {\n if (this.readOnly) throw new Error(\"SettingsStore is read-only\");\n\n this.plain = value;\n this.store = this.makeProxy(value);\n\n if (pathToNotify) {\n let v = value;\n\n const path = pathToNotify.split(\".\");\n for (const p of path) {\n if (!v) {\n console.warn(\n `Settings#setData: Path ${pathToNotify} does not exist in new data. Not dispatching update`\n );\n return;\n }\n v = v[p];\n }\n\n this.pathListeners.get(pathToNotify)?.forEach(cb => cb(v));\n }\n\n this.markAsChanged();\n }\n\n /**\n * Add a global change listener, that will fire whenever any setting is changed\n *\n * @param data The new data. This is either the new value set on the path, or the new root object if it was changed\n * @param path The path of the setting that was changed. Empty string if the root object was changed\n */\n public addGlobalChangeListener(cb: (data: any, path: string) => void) {\n this.globalListeners.add(cb);\n }\n\n /**\n * Add a scoped change listener that will fire whenever a setting matching the specified path is changed.\n *\n * For example if path is `\"foo.bar\"`, the listener will fire on\n * ```js\n * Setting.store.foo.bar = \"hi\"\n * ```\n * but not on\n * ```js\n * Setting.store.foo.baz = \"hi\"\n * ```\n * @param path\n * @param cb\n */\n public addChangeListener>(\n path: P,\n cb: (data: ResolvePropDeep) => void\n ) {\n const listeners = this.pathListeners.get(path as string) ?? new Set();\n listeners.add(cb);\n this.pathListeners.set(path as string, listeners);\n }\n\n /**\n * Remove a global listener\n * @see {@link addGlobalChangeListener}\n */\n public removeGlobalChangeListener(cb: (data: any, path: string) => void) {\n this.globalListeners.delete(cb);\n }\n\n /**\n * Remove a scoped listener\n * @see {@link addChangeListener}\n */\n public removeChangeListener(path: LiteralUnion, cb: (data: any) => void) {\n const listeners = this.pathListeners.get(path as string);\n if (!listeners) return;\n\n listeners.delete(cb);\n if (!listeners.size) this.pathListeners.delete(path as string);\n }\n\n /**\n * Call all global change listeners\n */\n public markAsChanged() {\n this.globalListeners.forEach(cb => cb(this.plain, \"\"));\n }\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { app } from \"electron\";\nimport { join } from \"path\";\n\nexport const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (\n process.env.DISCORD_USER_DATA_DIR\n ? join(process.env.DISCORD_USER_DATA_DIR, \"..\", \"VencordData\")\n : join(app.getPath(\"userData\"), \"..\", \"Vencord\")\n);\nexport const SETTINGS_DIR = join(DATA_DIR, \"settings\");\nexport const THEMES_DIR = join(DATA_DIR, \"themes\");\nexport const QUICKCSS_PATH = join(SETTINGS_DIR, \"quickCss.css\");\nexport const SETTINGS_FILE = join(SETTINGS_DIR, \"settings.json\");\nexport const NATIVE_SETTINGS_FILE = join(SETTINGS_DIR, \"native-settings.json\");\nexport const ALLOWED_PROTOCOLS = [\n \"https:\",\n \"http:\",\n \"steam:\",\n \"spotify:\",\n \"com.epicgames.launcher:\",\n];\n\nexport const IS_VANILLA = /* @__PURE__ */ process.argv.includes(\"--vanilla\");\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { RendererSettings } from \"@main/settings\";\nimport { app } from \"electron\";\n\napp.on(\"browser-window-created\", (_, win) => {\n win.webContents.on(\"frame-created\", (_, { frame }) => {\n frame.once(\"dom-ready\", () => {\n if (frame.url.startsWith(\"https://www.youtube.com/\")) {\n const settings = RendererSettings.store.plugins?.FixYoutubeEmbeds;\n if (!settings?.enabled) return;\n\n frame.executeJavaScript(`\n new MutationObserver(() => {\n if(\n document.querySelector('div.ytp-error-content-wrap-subreason a[href*=\"www.youtube.com/watch?v=\"]')\n ) location.reload()\n }).observe(document.body, { childList: true, subtree:true });\n `);\n }\n });\n });\n});\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { IpcMainInvokeEvent } from \"electron\";\nimport { request } from \"https\";\n\n// These links don't support CORS, so this has to be native\nconst validRedirectUrls = /^https:\\/\\/(spotify\\.link|s\\.team)\\/.+$/;\n\nfunction getRedirect(url: string) {\n return new Promise((resolve, reject) => {\n const req = request(new URL(url), { method: \"HEAD\" }, res => {\n resolve(\n res.headers.location\n ? getRedirect(res.headers.location)\n : url\n );\n });\n req.on(\"error\", reject);\n req.end();\n });\n}\n\nexport async function resolveRedirect(_: IpcMainInvokeEvent, url: string) {\n if (!validRedirectUrls.test(url)) return url;\n\n return getRedirect(url);\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { app } from \"electron\";\nimport { readFile } from \"fs/promises\";\nimport { basename, normalize } from \"path\";\n\nexport async function readRecording(_, filePath: string) {\n filePath = normalize(filePath);\n const filename = basename(filePath);\n const discordBaseDirWithTrailingSlash = normalize(app.getPath(\"userData\") + \"/\");\n console.log(filename, discordBaseDirWithTrailingSlash, filePath);\n if (filename !== \"recording.ogg\" || !filePath.startsWith(discordBaseDirWithTrailingSlash)) return null;\n\n try {\n const buf = await readFile(filePath);\n return new Uint8Array(buf.buffer);\n } catch {\n return null;\n }\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { createSocket, Socket } from \"dgram\";\n\nlet xsoSocket: Socket;\n\nexport function sendToOverlay(_, data: any) {\n data.icon = Buffer.from(data.icon).toString(\"base64\");\n const json = JSON.stringify(data);\n xsoSocket ??= createSocket(\"udp4\");\n xsoSocket.send(json, 42069, \"127.0.0.1\");\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n/**\n * Returns a new function that will call the wrapped function\n * after the specified delay. If the function is called again\n * within the delay, the timer will be reset.\n * @param func The function to wrap\n * @param delay The delay in milliseconds\n */\nexport function debounce(func: T, delay = 300): T {\n let timeout: NodeJS.Timeout;\n return function (...args: any[]) {\n clearTimeout(timeout);\n timeout = setTimeout(() => { func(...args); }, delay);\n } as any;\n}\n", "export default \"PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KICAgIDxoZWFkPgogICAgICAgIDxtZXRhIGNoYXJzZXQ9InV0Zi04IiAvPgogICAgICAgIDx0aXRsZT5WZW5jb3JkIFF1aWNrQ1NTIEVkaXRvcjwvdGl0bGU+CiAgICAgICAgPGxpbmsKICAgICAgICAgICAgcmVsPSJzdHlsZXNoZWV0IgogICAgICAgICAgICBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9tb25hY28tZWRpdG9yLzAuNDAuMC9taW4vdnMvZWRpdG9yL2VkaXRvci5tYWluLm1pbi5jc3MiCiAgICAgICAgICAgIGludGVncml0eT0ic2hhNTEyLU1Pb1EwMmg4MGhrbGNjZkxyWEZZa0N6RytXVmpPUmZsT3A5WnA4ZGx0aWFSUCszNUxZbk80TEtPa2xSNjRvTUdmR2dKRExPOFdKcGtNMW81Z1pYWVpRPT0iCiAgICAgICAgICAgIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiCiAgICAgICAgICAgIHJlZmVycmVycG9saWN5PSJuby1yZWZlcnJlciIKICAgICAgICAvPgogICAgICAgIDxzdHlsZT4KICAgICAgICAgICAgaHRtbCwKICAgICAgICAgICAgYm9keSwKICAgICAgICAgICAgI2NvbnRhaW5lciB7CiAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMCU7CiAgICAgICAgICAgICAgICBtYXJnaW46IDA7CiAgICAgICAgICAgICAgICBwYWRkaW5nOiAwOwogICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgfQogICAgICAgIDwvc3R5bGU+CiAgICA8L2hlYWQ+CgogICAgPGJvZHk+CiAgICAgICAgPGRpdiBpZD0iY29udGFpbmVyIj48L2Rpdj4KICAgICAgICA8c2NyaXB0CiAgICAgICAgICAgIHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvbW9uYWNvLWVkaXRvci8wLjQwLjAvbWluL3ZzL2xvYWRlci5taW4uanMiCiAgICAgICAgICAgIGludGVncml0eT0ic2hhNTEyLVF6TXBYZUNQY2lBSFA0d2JZbFYyUFlnclFjYUVrRFFVanprUFU0eG5qeVZTRDlUMzYvdWRhbXh0TkJxYjRxSzQvYk1RTVBaOGF5ckJlOWhyR2RCRmpRPT0iCiAgICAgICAgICAgIGNyb3Nzb3JpZ2luPSJhbm9ueW1vdXMiCiAgICAgICAgICAgIHJlZmVycmVycG9saWN5PSJuby1yZWZlcnJlciIKICAgICAgICA+PC9zY3JpcHQ+CgogICAgICAgIDxzY3JpcHQ+CiAgICAgICAgICAgIHJlcXVpcmUuY29uZmlnKHsKICAgICAgICAgICAgICAgIHBhdGhzOiB7CiAgICAgICAgICAgICAgICAgICAgdnM6ICJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9tb25hY28tZWRpdG9yLzAuNDAuMC9taW4vdnMiLAogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICByZXF1aXJlKFsidnMvZWRpdG9yL2VkaXRvci5tYWluIl0sICgpID0+IHsKICAgICAgICAgICAgICAgIGdldEN1cnJlbnRDc3MoKS50aGVuKChjc3MpID0+IHsKICAgICAgICAgICAgICAgICAgICB2YXIgZWRpdG9yID0gbW9uYWNvLmVkaXRvci5jcmVhdGUoCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJjb250YWluZXIiKSwKICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGNzcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlOiAiY3NzIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lOiBnZXRUaGVtZSgpLAogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICAgICAgICBlZGl0b3Iub25EaWRDaGFuZ2VNb2RlbENvbnRlbnQoKCkgPT4KICAgICAgICAgICAgICAgICAgICAgICAgc2V0Q3NzKGVkaXRvci5nZXRWYWx1ZSgpKQogICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoInJlc2l6ZSIsICgpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWFrZSBtb25hY28gcmUtbGF5b3V0CiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5sYXlvdXQoKTsKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICA8L3NjcmlwdD4KICAgIDwvYm9keT4KPC9odG1sPgo=\"", "/* eslint-disable simple-header/header */\n\n/*!\n * BetterDiscord addon meta parser\n * Copyright 2023 BetterDiscord contributors\n * Copyright 2023 Vendicated and Vencord contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst splitRegex = /[^\\S\\r\\n]*?\\r?(?:\\r\\n|\\n)[^\\S\\r\\n]*?\\*[^\\S\\r\\n]?/;\nconst escapedAtRegex = /^\\\\@/;\n\nexport interface UserThemeHeader {\n fileName: string;\n name: string;\n author: string;\n description: string;\n version?: string;\n license?: string;\n source?: string;\n website?: string;\n invite?: string;\n}\n\nfunction makeHeader(fileName: string, opts: Partial = {}): UserThemeHeader {\n return {\n fileName,\n name: opts.name ?? fileName.replace(/\\.css$/i, \"\"),\n author: opts.author ?? \"Unknown Author\",\n description: opts.description ?? \"A Discord Theme.\",\n version: opts.version,\n license: opts.license,\n source: opts.source,\n website: opts.website,\n invite: opts.invite\n };\n}\n\nexport function stripBOM(fileContent: string) {\n if (fileContent.charCodeAt(0) === 0xFEFF) {\n fileContent = fileContent.slice(1);\n }\n return fileContent;\n}\n\nexport function getThemeInfo(css: string, fileName: string): UserThemeHeader {\n if (!css) return makeHeader(fileName);\n\n const block = css.split(\"/**\", 2)?.[1]?.split(\"*/\", 1)?.[0];\n if (!block) return makeHeader(fileName);\n\n const header: Partial = {};\n let field = \"\";\n let accum = \"\";\n for (const line of block.split(splitRegex)) {\n if (line.length === 0) continue;\n if (line.charAt(0) === \"@\" && line.charAt(1) !== \" \") {\n header[field] = accum.trim();\n const l = line.indexOf(\" \");\n field = line.substring(1, l);\n accum = line.substring(l + 1);\n }\n else {\n accum += \" \" + line.replace(\"\\\\n\", \"\\n\").replace(escapedAtRegex, \"@\");\n }\n }\n header[field] = accum.trim();\n delete header[\"\"];\n return makeHeader(fileName, header);\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2023 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { type BrowserWindow, shell } from \"electron\";\n\nexport function makeLinksOpenExternally(win: BrowserWindow) {\n win.webContents.setWindowOpenHandler(({ url }) => {\n switch (url) {\n case \"about:blank\":\n case \"https://discord.com/popout\":\n case \"https://ptb.discord.com/popout\":\n case \"https://canary.discord.com/popout\":\n return { action: \"allow\" };\n }\n\n try {\n var { protocol } = new URL(url);\n } catch {\n return { action: \"deny\" };\n }\n\n switch (protocol) {\n case \"http:\":\n case \"https:\":\n case \"mailto:\":\n case \"steam:\":\n case \"spotify:\":\n shell.openExternal(url);\n }\n\n return { action: \"deny\" };\n });\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { session } from \"electron\";\nimport { unzip } from \"fflate\";\nimport { constants as fsConstants } from \"fs\";\nimport { access, mkdir, rm, writeFile } from \"fs/promises\";\nimport { join } from \"path\";\n\nimport { DATA_DIR } from \"./constants\";\nimport { crxToZip } from \"./crxToZip\";\nimport { get } from \"./simpleGet\";\n\nconst extensionCacheDir = join(DATA_DIR, \"ExtensionCache\");\n\nasync function extract(data: Buffer, outDir: string) {\n await mkdir(outDir, { recursive: true });\n return new Promise((resolve, reject) => {\n unzip(data, (err, files) => {\n if (err) return void reject(err);\n Promise.all(Object.keys(files).map(async f => {\n // Signature stuff\n // 'Cannot load extension with file or directory name\n // _metadata. Filenames starting with \"_\" are reserved for use by the system.';\n if (f.startsWith(\"_metadata/\")) return;\n\n if (f.endsWith(\"/\")) return void mkdir(join(outDir, f), { recursive: true });\n\n const pathElements = f.split(\"/\");\n const name = pathElements.pop()!;\n const directories = pathElements.join(\"/\");\n const dir = join(outDir, directories);\n\n if (directories) {\n await mkdir(dir, { recursive: true });\n }\n\n await writeFile(join(dir, name), files[f]);\n }))\n .then(() => resolve())\n .catch(err => {\n rm(outDir, { recursive: true, force: true });\n reject(err);\n });\n });\n });\n}\n\nexport async function installExt(id: string) {\n const extDir = join(extensionCacheDir, `${id}`);\n\n try {\n await access(extDir, fsConstants.F_OK);\n } catch (err) {\n const url = id === \"fmkadmapgofadopljbjfkapdkoienihi\"\n // React Devtools v4.25\n // v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843\n // Unfortunately, Google does not serve old versions, so this is the only way\n ? \"https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip\"\n : `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=32`;\n const buf = await get(url, {\n headers: {\n \"User-Agent\": \"Vencord (https://github.com/Vendicated/Vencord)\"\n }\n });\n await extract(crxToZip(buf), extDir).catch(console.error);\n }\n\n session.defaultSession.loadExtension(extDir);\n}\n", "import { createRequire } from 'module';\nvar require = createRequire('/');\n// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\n// Mediocre shim\nvar Worker;\nvar workerAdd = \";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global\";\ntry {\n Worker = require('worker_threads').Worker;\n}\ncatch (e) {\n}\nvar wk = Worker ? function (c, _, msg, transfer, cb) {\n var done = false;\n var w = new Worker(c + workerAdd, { eval: true })\n .on('error', function (e) { return cb(e, null); })\n .on('message', function (m) { return cb(null, m); })\n .on('exit', function (c) {\n if (c && !done)\n cb(new Error('exited with code ' + c), null);\n });\n w.postMessage(msg, transfer);\n w.terminate = function () {\n done = true;\n return Worker.prototype.terminate.call(w);\n };\n return w;\n} : function (_, __, ___, ____, cb) {\n setImmediate(function () { return cb(new Error('async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)'), null); });\n var NOP = function () { };\n return {\n terminate: NOP,\n postMessage: NOP\n };\n};\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, u32 = Uint32Array;\n// fixed length extra bits\nvar fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\n// see fleb note\nvar fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n var b = new u16(31);\n for (var i = 0; i < 31; ++i) {\n b[i] = start += 1 << eb[i - 1];\n }\n // numbers here are at max 18 bits\n var r = new u32(b[30]);\n for (var i = 1; i < 30; ++i) {\n for (var j = b[i]; j < b[i + 1]; ++j) {\n r[j] = ((j - b[i]) << 5) | i;\n }\n }\n return [b, r];\n};\nvar _a = freb(fleb, 2), fl = _a[0], revfl = _a[1];\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b[0], revfd = _b[1];\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n // reverse table algorithm from SO\n var x = ((i & 0xAAAA) >>> 1) | ((i & 0x5555) << 1);\n x = ((x & 0xCCCC) >>> 2) | ((x & 0x3333) << 2);\n x = ((x & 0xF0F0) >>> 4) | ((x & 0x0F0F) << 4);\n rev[i] = (((x & 0xFF00) >>> 8) | ((x & 0x00FF) << 8)) >>> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n var s = cd.length;\n // index\n var i = 0;\n // u16 \"map\": index -> # of codes with bit length = index\n var l = new u16(mb);\n // length of cd must be 288 (total # of codes)\n for (; i < s; ++i) {\n if (cd[i])\n ++l[cd[i] - 1];\n }\n // u16 \"map\": index -> minimum code for bit length = index\n var le = new u16(mb);\n for (i = 0; i < mb; ++i) {\n le[i] = (le[i - 1] + l[i - 1]) << 1;\n }\n var co;\n if (r) {\n // u16 \"map\": index -> number of actual bits, symbol for code\n co = new u16(1 << mb);\n // bits to remove for reverser\n var rvb = 15 - mb;\n for (i = 0; i < s; ++i) {\n // ignore 0 lengths\n if (cd[i]) {\n // num encoding both symbol and bits read\n var sv = (i << 4) | cd[i];\n // free bits\n var r_1 = mb - cd[i];\n // start value\n var v = le[cd[i] - 1]++ << r_1;\n // m is end value\n for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n // every 16 bit value starting with the code yields the same result\n co[rev[v] >>> rvb] = sv;\n }\n }\n }\n }\n else {\n co = new u16(s);\n for (i = 0; i < s; ++i) {\n if (cd[i]) {\n co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);\n }\n }\n }\n return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n var m = a[0];\n for (var i = 1; i < a.length; ++i) {\n if (a[i] > m)\n m = a[i];\n }\n return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n var o = (p / 8) | 0;\n return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n if (s == null || s < 0)\n s = 0;\n if (e == null || e > v.length)\n e = v.length;\n // can't use .constructor in case user-supplied\n var n = new (v.BYTES_PER_ELEMENT == 2 ? u16 : v.BYTES_PER_ELEMENT == 4 ? u32 : u8)(e - s);\n n.set(v.subarray(s, e));\n return n;\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n UnexpectedEOF: 0,\n InvalidBlockType: 1,\n InvalidLengthLiteral: 2,\n InvalidDistance: 3,\n StreamFinished: 4,\n NoStreamHandler: 5,\n InvalidHeader: 6,\n NoCallback: 7,\n InvalidUTF8: 8,\n ExtraFieldTooLong: 9,\n InvalidDate: 10,\n FilenameTooLong: 11,\n StreamFinishing: 12,\n InvalidZipData: 13,\n UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n 'unexpected EOF',\n 'invalid block type',\n 'invalid length/literal',\n 'invalid distance',\n 'stream finished',\n 'no stream handler',\n ,\n 'no callback',\n 'invalid UTF-8 data',\n 'extra field too long',\n 'date not in range 1980-2099',\n 'filename too long',\n 'stream finishing',\n 'invalid zip data'\n // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n var e = new Error(msg || ec[ind]);\n e.code = ind;\n if (Error.captureStackTrace)\n Error.captureStackTrace(e, err);\n if (!nt)\n throw e;\n return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, buf, st) {\n // source length\n var sl = dat.length;\n if (!sl || (st && st.f && !st.l))\n return buf || new u8(0);\n // have to estimate size\n var noBuf = !buf || st;\n // no state\n var noSt = !st || st.i;\n if (!st)\n st = {};\n // Assumes roughly 33% compression ratio average\n if (!buf)\n buf = new u8(sl * 3);\n // ensure buffer can fit at least l elements\n var cbuf = function (l) {\n var bl = buf.length;\n // need to increase size to fit\n if (l > bl) {\n // Double or set to necessary, whichever is greater\n var nbuf = new u8(Math.max(bl * 2, l));\n nbuf.set(buf);\n buf = nbuf;\n }\n };\n // last chunk bitpos bytes\n var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n // total bits\n var tbts = sl * 8;\n do {\n if (!lm) {\n // BFINAL - this is only 1 when last chunk is next\n final = bits(dat, pos, 1);\n // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n var type = bits(dat, pos + 1, 3);\n pos += 3;\n if (!type) {\n // go to end of byte boundary\n var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n if (t > sl) {\n if (noSt)\n err(0);\n break;\n }\n // ensure size\n if (noBuf)\n cbuf(bt + l);\n // Copy over uncompressed data\n buf.set(dat.subarray(s, t), bt);\n // Get new bitpos, update byte count\n st.b = bt += l, st.p = pos = t * 8, st.f = final;\n continue;\n }\n else if (type == 1)\n lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n else if (type == 2) {\n // literal lengths\n var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n var tl = hLit + bits(dat, pos + 5, 31) + 1;\n pos += 14;\n // length+distance tree\n var ldt = new u8(tl);\n // code length tree\n var clt = new u8(19);\n for (var i = 0; i < hcLen; ++i) {\n // use index map to get real code\n clt[clim[i]] = bits(dat, pos + i * 3, 7);\n }\n pos += hcLen * 3;\n // code lengths bits\n var clb = max(clt), clbmsk = (1 << clb) - 1;\n // code lengths map\n var clm = hMap(clt, clb, 1);\n for (var i = 0; i < tl;) {\n var r = clm[bits(dat, pos, clbmsk)];\n // bits read\n pos += r & 15;\n // symbol\n var s = r >>> 4;\n // code length to copy\n if (s < 16) {\n ldt[i++] = s;\n }\n else {\n // copy count\n var c = 0, n = 0;\n if (s == 16)\n n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n else if (s == 17)\n n = 3 + bits(dat, pos, 7), pos += 3;\n else if (s == 18)\n n = 11 + bits(dat, pos, 127), pos += 7;\n while (n--)\n ldt[i++] = c;\n }\n }\n // length tree distance tree\n var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n // max length bits\n lbt = max(lt);\n // max dist bits\n dbt = max(dt);\n lm = hMap(lt, lbt, 1);\n dm = hMap(dt, dbt, 1);\n }\n else\n err(1);\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n }\n // Make sure the buffer can hold this + the largest possible addition\n // Maximum chunk size (practically, theoretically infinite) is 2^17;\n if (noBuf)\n cbuf(bt + 131072);\n var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n var lpos = pos;\n for (;; lpos = pos) {\n // bits read, code\n var c = lm[bits16(dat, pos) & lms], sym = c >>> 4;\n pos += c & 15;\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (!c)\n err(2);\n if (sym < 256)\n buf[bt++] = sym;\n else if (sym == 256) {\n lpos = pos, lm = null;\n break;\n }\n else {\n var add = sym - 254;\n // no extra bits needed if less\n if (sym > 264) {\n // index\n var i = sym - 257, b = fleb[i];\n add = bits(dat, pos, (1 << b) - 1) + fl[i];\n pos += b;\n }\n // dist\n var d = dm[bits16(dat, pos) & dms], dsym = d >>> 4;\n if (!d)\n err(3);\n pos += d & 15;\n var dt = fd[dsym];\n if (dsym > 3) {\n var b = fdeb[dsym];\n dt += bits16(dat, pos) & ((1 << b) - 1), pos += b;\n }\n if (pos > tbts) {\n if (noSt)\n err(0);\n break;\n }\n if (noBuf)\n cbuf(bt + 131072);\n var end = bt + add;\n for (; bt < end; bt += 4) {\n buf[bt] = buf[bt - dt];\n buf[bt + 1] = buf[bt + 1 - dt];\n buf[bt + 2] = buf[bt + 2 - dt];\n buf[bt + 3] = buf[bt + 3 - dt];\n }\n bt = end;\n }\n }\n st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n if (lm)\n final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n } while (!final);\n return bt == buf.length ? buf : slc(buf, 0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n v <<= p & 7;\n var o = (p / 8) | 0;\n d[o] |= v;\n d[o + 1] |= v >>> 8;\n d[o + 2] |= v >>> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n // Need extra info to make a tree\n var t = [];\n for (var i = 0; i < d.length; ++i) {\n if (d[i])\n t.push({ s: i, f: d[i] });\n }\n var s = t.length;\n var t2 = t.slice();\n if (!s)\n return [et, 0];\n if (s == 1) {\n var v = new u8(t[0].s + 1);\n v[t[0].s] = 1;\n return [v, 1];\n }\n t.sort(function (a, b) { return a.f - b.f; });\n // after i2 reaches last ind, will be stopped\n // freq must be greater than largest possible number of symbols\n t.push({ s: -1, f: 25001 });\n var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n // efficient algorithm from UZIP.js\n // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n // symbols that combined have high freq, will start processing i2 (high-freq,\n // non-composite) symbols instead\n // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n while (i1 != s - 1) {\n l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n }\n var maxSym = t2[0].s;\n for (var i = 1; i < s; ++i) {\n if (t2[i].s > maxSym)\n maxSym = t2[i].s;\n }\n // code lengths\n var tr = new u16(maxSym + 1);\n // max bits in tree\n var mbt = ln(t[i1 - 1], tr, 0);\n if (mbt > mb) {\n // more algorithms from UZIP.js\n // TODO: find out how this code works (debt)\n // ind debt\n var i = 0, dt = 0;\n // left cost\n var lft = mbt - mb, cst = 1 << lft;\n t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n for (; i < s; ++i) {\n var i2_1 = t2[i].s;\n if (tr[i2_1] > mb) {\n dt += cst - (1 << (mbt - tr[i2_1]));\n tr[i2_1] = mb;\n }\n else\n break;\n }\n dt >>>= lft;\n while (dt > 0) {\n var i2_2 = t2[i].s;\n if (tr[i2_2] < mb)\n dt -= 1 << (mb - tr[i2_2]++ - 1);\n else\n ++i;\n }\n for (; i >= 0 && dt; --i) {\n var i2_3 = t2[i].s;\n if (tr[i2_3] == mb) {\n --tr[i2_3];\n ++dt;\n }\n }\n mbt = mb;\n }\n return [new u8(tr), mbt];\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n return n.s == -1\n ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n var s = c.length;\n // Note that the semicolon was intentional\n while (s && !c[--s])\n ;\n var cl = new u16(++s);\n // ind num streak\n var cli = 0, cln = c[0], cls = 1;\n var w = function (v) { cl[cli++] = v; };\n for (var i = 1; i <= s; ++i) {\n if (c[i] == cln && i != s)\n ++cls;\n else {\n if (!cln && cls > 2) {\n for (; cls > 138; cls -= 138)\n w(32754);\n if (cls > 2) {\n w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n cls = 0;\n }\n }\n else if (cls > 3) {\n w(cln), --cls;\n for (; cls > 6; cls -= 6)\n w(8304);\n if (cls > 2)\n w(((cls - 3) << 5) | 8208), cls = 0;\n }\n while (cls--)\n w(cln);\n cls = 1;\n cln = c[i];\n }\n }\n return [cl.subarray(0, cli), s];\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n var l = 0;\n for (var i = 0; i < cl.length; ++i)\n l += cf[i] * cl[i];\n return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n // no need to write 00 as type: TypedArray defaults to 0\n var s = dat.length;\n var o = shft(pos + 2);\n out[o] = s & 255;\n out[o + 1] = s >>> 8;\n out[o + 2] = out[o] ^ 255;\n out[o + 3] = out[o + 1] ^ 255;\n for (var i = 0; i < s; ++i)\n out[o + i + 4] = dat[i];\n return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n wbits(out, p++, final);\n ++lf[256];\n var _a = hTree(lf, 15), dlt = _a[0], mlb = _a[1];\n var _b = hTree(df, 15), ddt = _b[0], mdb = _b[1];\n var _c = lc(dlt), lclt = _c[0], nlc = _c[1];\n var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];\n var lcfreq = new u16(19);\n for (var i = 0; i < lclt.length; ++i)\n lcfreq[lclt[i] & 31]++;\n for (var i = 0; i < lcdt.length; ++i)\n lcfreq[lcdt[i] & 31]++;\n var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];\n var nlcc = 19;\n for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n ;\n var flen = (bl + 5) << 3;\n var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);\n if (flen <= ftlen && flen <= dtlen)\n return wfblk(out, p, dat.subarray(bs, bs + bl));\n var lm, ll, dm, dl;\n wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n if (dtlen < ftlen) {\n lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n var llm = hMap(lct, mlcb, 0);\n wbits(out, p, nlc - 257);\n wbits(out, p + 5, ndc - 1);\n wbits(out, p + 10, nlcc - 4);\n p += 14;\n for (var i = 0; i < nlcc; ++i)\n wbits(out, p + 3 * i, lct[clim[i]]);\n p += 3 * nlcc;\n var lcts = [lclt, lcdt];\n for (var it = 0; it < 2; ++it) {\n var clct = lcts[it];\n for (var i = 0; i < clct.length; ++i) {\n var len = clct[i] & 31;\n wbits(out, p, llm[len]), p += lct[len];\n if (len > 15)\n wbits(out, p, (clct[i] >>> 5) & 127), p += clct[i] >>> 12;\n }\n }\n }\n else {\n lm = flm, ll = flt, dm = fdm, dl = fdt;\n }\n for (var i = 0; i < li; ++i) {\n if (syms[i] > 255) {\n var len = (syms[i] >>> 18) & 31;\n wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n if (len > 7)\n wbits(out, p, (syms[i] >>> 23) & 31), p += fleb[len];\n var dst = syms[i] & 31;\n wbits16(out, p, dm[dst]), p += dl[dst];\n if (dst > 3)\n wbits16(out, p, (syms[i] >>> 5) & 8191), p += fdeb[dst];\n }\n else {\n wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];\n }\n }\n wbits16(out, p, lm[256]);\n return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, lst) {\n var s = dat.length;\n var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n // writing to this writes to the output buffer\n var w = o.subarray(pre, o.length - post);\n var pos = 0;\n if (!lvl || s < 8) {\n for (var i = 0; i <= s; i += 65535) {\n // end\n var e = i + 65535;\n if (e >= s) {\n // write final block\n w[pos >> 3] = lst;\n }\n pos = wfblk(w, pos + 1, dat.subarray(i, e));\n }\n }\n else {\n var opt = deo[lvl - 1];\n var n = opt >>> 13, c = opt & 8191;\n var msk_1 = (1 << plvl) - 1;\n // prev 2-byte val map curr 2-byte val map\n var prev = new u16(32768), head = new u16(msk_1 + 1);\n var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n // 24576 is an arbitrary number of maximum symbols per block\n // 424 buffer for last block\n var syms = new u32(25000);\n // length/literal freq distance freq\n var lf = new u16(288), df = new u16(32);\n // l/lcnt exbits index l/lind waitdx bitpos\n var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;\n for (; i < s; ++i) {\n // hash value\n // deopt when i > s - 3 - at end, deopt acceptable\n var hv = hsh(i);\n // index mod 32768 previous index mod\n var imod = i & 32767, pimod = head[hv];\n prev[imod] = pimod;\n head[hv] = imod;\n // We always should modify head and prev, but only add symbols if\n // this data is not yet processed (\"wait\" for wait index)\n if (wi <= i) {\n // bytes remaining\n var rem = s - i;\n if ((lc_1 > 7000 || li > 24576) && rem > 423) {\n pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n li = lc_1 = eb = 0, bs = i;\n for (var j = 0; j < 286; ++j)\n lf[j] = 0;\n for (var j = 0; j < 30; ++j)\n df[j] = 0;\n }\n // len dist chain\n var l = 2, d = 0, ch_1 = c, dif = (imod - pimod) & 32767;\n if (rem > 2 && hv == hsh(i - dif)) {\n var maxn = Math.min(n, rem) - 1;\n var maxd = Math.min(32767, i);\n // max possible length\n // not capped at dif because decompressors implement \"rolling\" index population\n var ml = Math.min(258, rem);\n while (dif <= maxd && --ch_1 && imod != pimod) {\n if (dat[i + l] == dat[i + l - dif]) {\n var nl = 0;\n for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n ;\n if (nl > l) {\n l = nl, d = dif;\n // break out early when we reach \"nice\" (we are satisfied enough)\n if (nl > maxn)\n break;\n // now, find the rarest 2-byte sequence within this\n // length of literals and search for that instead.\n // Much faster than just using the start\n var mmd = Math.min(dif, nl - 2);\n var md = 0;\n for (var j = 0; j < mmd; ++j) {\n var ti = (i - dif + j + 32768) & 32767;\n var pti = prev[ti];\n var cd = (ti - pti + 32768) & 32767;\n if (cd > md)\n md = cd, pimod = ti;\n }\n }\n }\n // check the previous match\n imod = pimod, pimod = prev[imod];\n dif += (imod - pimod + 32768) & 32767;\n }\n }\n // d will be nonzero only when a match was found\n if (d) {\n // store both dist and len data in one Uint32\n // Make sure this is recognized as a len/dist with 28th bit (2^28)\n syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n var lin = revfl[l] & 31, din = revfd[d] & 31;\n eb += fleb[lin] + fdeb[din];\n ++lf[257 + lin];\n ++df[din];\n wi = i + l;\n ++lc_1;\n }\n else {\n syms[li++] = dat[i];\n ++lf[dat[i]];\n }\n }\n }\n pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n // this is the easiest way to avoid needing to maintain state\n if (!lst && pos & 7)\n pos = wfblk(w, pos + 1, et);\n }\n return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n var t = new Int32Array(256);\n for (var i = 0; i < 256; ++i) {\n var c = i, k = 9;\n while (--k)\n c = ((c & 1) && -306674912) ^ (c >>> 1);\n t[i] = c;\n }\n return t;\n})();\n// CRC32\nvar crc = function () {\n var c = -1;\n return {\n p: function (d) {\n // closures have awful performance\n var cr = c;\n for (var i = 0; i < d.length; ++i)\n cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n c = cr;\n },\n d: function () { return ~c; }\n };\n};\n// Alder32\nvar adler = function () {\n var a = 1, b = 0;\n return {\n p: function (d) {\n // closures have awful performance\n var n = a, m = b;\n var l = d.length | 0;\n for (var i = 0; i != l;) {\n var e = Math.min(i + 2655, l);\n for (; i < e; ++i)\n m += n += d[i];\n n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n }\n a = n, b = m;\n },\n d: function () {\n a %= 65521, b %= 65521;\n return (a & 255) << 24 | (a >>> 8) << 16 | (b & 255) << 8 | (b >>> 8);\n }\n };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, !st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n var o = {};\n for (var k in a)\n o[k] = a[k];\n for (var k in b)\n o[k] = b[k];\n return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n var dt = fn();\n var st = fn.toString();\n var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n for (var i = 0; i < dt.length; ++i) {\n var v = dt[i], k = ks[i];\n if (typeof v == 'function') {\n fnStr += ';' + k + '=';\n var st_1 = v.toString();\n if (v.prototype) {\n // for global objects\n if (st_1.indexOf('[native code]') != -1) {\n var spInd = st_1.indexOf(' ', 8) + 1;\n fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n }\n else {\n fnStr += st_1;\n for (var t in v.prototype)\n fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n }\n }\n else\n fnStr += st_1;\n }\n else\n td[k] = v;\n }\n return [fnStr, td];\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n var tl = [];\n for (var k in v) {\n if (v[k].buffer) {\n tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n }\n }\n return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n var _a;\n if (!ch[id]) {\n var fnStr = '', td_1 = {}, m = fns.length - 1;\n for (var i = 0; i < m; ++i)\n _a = wcln(fns[i], fnStr, td_1), fnStr = _a[0], td_1 = _a[1];\n ch[id] = wcln(fns[m], fnStr, td_1);\n }\n var td = mrg({}, ch[id][1]);\n return wk(ch[id][0] + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, u32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gu8]; };\nvar bDflt = function () { return [u8, u16, u32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zlv]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get u8\nvar gu8 = function (o) { return o && o.size && new u8(o.size); };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n var w = wrkr(fns, init, id, function (err, dat) {\n w.terminate();\n cb(err, dat);\n });\n w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id) {\n var t;\n var w = wrkr(fns, init, id, function (err, dat) {\n if (err)\n w.terminate(), strm.ondata.call(strm, err);\n else {\n if (dat[1])\n w.terminate();\n strm.ondata.call(strm, err, dat[0], dat[1]);\n }\n });\n w.postMessage(opts);\n strm.push = function (d, f) {\n if (!strm.ondata)\n err(5);\n if (t)\n strm.ondata(err(4, 0, 1), null, !!f);\n w.postMessage([d, t = f], [d.buffer]);\n };\n strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n for (; v; ++b)\n d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n var fn = o.filename;\n c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n if (o.mtime != 0)\n wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n if (fn) {\n c[3] = 8;\n for (var i = 0; i <= fn.length; ++i)\n c[i + 10] = fn.charCodeAt(i);\n }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n err(6, 'invalid gzip data');\n var flg = d[3];\n var st = 10;\n if (flg & 4)\n st += d[10] | (d[11] << 8) + 2;\n for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n ;\n return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n var l = d.length;\n return ((d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16) | (d[l - 1] << 24)) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + ((o.filename && (o.filename.length + 1)) || 0); };\n// zlib header\nvar zlh = function (c, o) {\n var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n c[0] = 120, c[1] = (fl << 6) | (fl ? (32 - 2 * fl) : 1);\n};\n// zlib valid\nvar zlv = function (d) {\n if ((d[0] & 15) != 8 || (d[0] >>> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n err(6, 'invalid zlib data');\n if (d[1] & 32)\n err(6, 'invalid zlib data: preset dictionaries not supported');\n};\nfunction AsyncCmpStrm(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n return opts;\n}\n// zlib footer: -4 to -0 is Adler32\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n function Deflate(opts, cb) {\n if (!cb && typeof opts == 'function')\n cb = opts, opts = {};\n this.ondata = cb;\n this.o = opts || {};\n }\n Deflate.prototype.p = function (c, f) {\n this.ondata(dopt(c, this.o, 0, 0, !f), f);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Deflate.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.d = final;\n this.p(chunk, final || false);\n };\n return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n function AsyncDeflate(opts, cb) {\n astrmify([\n bDflt,\n function () { return [astrm, Deflate]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Deflate(ev.data);\n onmessage = astrm(strm);\n }, 6);\n }\n return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n /**\n * Creates an inflation stream\n * @param cb The callback to call whenever data is inflated\n */\n function Inflate(cb) {\n this.s = {};\n this.p = new u8(0);\n this.ondata = cb;\n }\n Inflate.prototype.e = function (c) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n var l = this.p.length;\n var n = new u8(l + c.length);\n n.set(this.p), n.set(c, l), this.p = n;\n };\n Inflate.prototype.c = function (final) {\n this.d = this.s.i = final || false;\n var bts = this.s.b;\n var dt = inflt(this.p, this.o, this.s);\n this.ondata(slc(dt, bts, this.s.b), this.d);\n this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n };\n /**\n * Pushes a chunk to be inflated\n * @param chunk The chunk to push\n * @param final Whether this is the final chunk\n */\n Inflate.prototype.push = function (chunk, final) {\n this.e(chunk), this.c(final);\n };\n return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous inflation stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncInflate(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n function () { return [astrm, Inflate]; }\n ], this, 0, function () {\n var strm = new Inflate();\n onmessage = astrm(strm);\n }, 7);\n }\n return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt\n ], function (ev) { return pbf(inflateSync(ev.data[0], gu8(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, out) {\n return inflt(data, out);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n function Gzip(opts, cb) {\n this.c = crc();\n this.l = 0;\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be GZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gzip.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Gzip.prototype.p = function (c, f) {\n this.c.p(c);\n this.l += c.length;\n var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, !f);\n if (this.v)\n gzh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n this.ondata(raw, f);\n };\n return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n function AsyncGzip(opts, cb) {\n astrmify([\n bDflt,\n gze,\n function () { return [astrm, Deflate, Gzip]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Gzip(ev.data);\n onmessage = astrm(strm);\n }, 8);\n }\n return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n gze,\n function () { return [gzipSync]; }\n ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n if (!opts)\n opts = {};\n var c = crc(), l = data.length;\n c.p(data);\n var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n /**\n * Creates a GUNZIP stream\n * @param cb The callback to call whenever data is inflated\n */\n function Gunzip(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be GUNZIPped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Gunzip.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n var s = this.p.length > 3 ? gzs(this.p) : 4;\n if (s >= this.p.length && !final)\n return;\n this.p = this.p.subarray(s), this.v = 0;\n }\n if (final) {\n if (this.p.length < 8)\n err(6, 'invalid gzip data');\n this.p = this.p.subarray(0, -8);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous GUNZIP stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncGunzip(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n guze,\n function () { return [astrm, Inflate, Gunzip]; }\n ], this, 0, function () {\n var strm = new Gunzip();\n onmessage = astrm(strm);\n }, 9);\n }\n return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n guze,\n function () { return [gunzipSync]; }\n ], function (ev) { return pbf(gunzipSync(ev.data[0])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, out) {\n return inflt(data.subarray(gzs(data), -8), out || new u8(gzl(data)));\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n function Zlib(opts, cb) {\n this.c = adler();\n this.v = 1;\n Deflate.call(this, opts, cb);\n }\n /**\n * Pushes a chunk to be zlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Zlib.prototype.push = function (chunk, final) {\n Deflate.prototype.push.call(this, chunk, final);\n };\n Zlib.prototype.p = function (c, f) {\n this.c.p(c);\n var raw = dopt(c, this.o, this.v && 2, f && 4, !f);\n if (this.v)\n zlh(raw, this.o), this.v = 0;\n if (f)\n wbytes(raw, raw.length - 4, this.c.d());\n this.ondata(raw, f);\n };\n return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n function AsyncZlib(opts, cb) {\n astrmify([\n bDflt,\n zle,\n function () { return [astrm, Deflate, Zlib]; }\n ], this, AsyncCmpStrm.call(this, opts, cb), function (ev) {\n var strm = new Zlib(ev.data);\n onmessage = astrm(strm);\n }, 10);\n }\n return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bDflt,\n zle,\n function () { return [zlibSync]; }\n ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n if (!opts)\n opts = {};\n var a = adler();\n a.p(data);\n var d = dopt(data, opts, 2, 4);\n return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n /**\n * Creates a Zlib decompression stream\n * @param cb The callback to call whenever data is inflated\n */\n function Unzlib(cb) {\n this.v = 1;\n Inflate.call(this, cb);\n }\n /**\n * Pushes a chunk to be unzlibbed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzlib.prototype.push = function (chunk, final) {\n Inflate.prototype.e.call(this, chunk);\n if (this.v) {\n if (this.p.length < 2 && !final)\n return;\n this.p = this.p.subarray(2), this.v = 0;\n }\n if (final) {\n if (this.p.length < 4)\n err(6, 'invalid zlib data');\n this.p = this.p.subarray(0, -4);\n }\n // necessary to prevent TS from using the closure value\n // This allows for workerization to function correctly\n Inflate.prototype.c.call(this, final);\n };\n return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous Zlib decompression stream\n * @param cb The callback to call whenever data is deflated\n */\n function AsyncUnzlib(cb) {\n this.ondata = cb;\n astrmify([\n bInflt,\n zule,\n function () { return [astrm, Inflate, Unzlib]; }\n ], this, 0, function () {\n var strm = new Unzlib();\n onmessage = astrm(strm);\n }, 11);\n }\n return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return cbify(data, opts, [\n bInflt,\n zule,\n function () { return [unzlibSync]; }\n ], function (ev) { return pbf(unzlibSync(ev.data[0], gu8(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, out) {\n return inflt((zlv(data), data.subarray(2, -4)), out);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n /**\n * Creates a decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function Decompress(cb) {\n this.G = Gunzip;\n this.I = Inflate;\n this.Z = Unzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Decompress.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (!this.s) {\n if (this.p && this.p.length) {\n var n = new u8(this.p.length + chunk.length);\n n.set(this.p), n.set(chunk, this.p.length);\n }\n else\n this.p = chunk;\n if (this.p.length > 2) {\n var _this_1 = this;\n var cb = function () { _this_1.ondata.apply(_this_1, arguments); };\n this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n ? new this.G(cb)\n : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n ? new this.I(cb)\n : new this.Z(cb);\n this.s.push(this.p, final);\n this.p = null;\n }\n }\n else\n this.s.push(chunk, final);\n };\n return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n /**\n * Creates an asynchronous decompression stream\n * @param cb The callback to call whenever data is decompressed\n */\n function AsyncDecompress(cb) {\n this.G = AsyncGunzip;\n this.I = AsyncInflate;\n this.Z = AsyncUnzlib;\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be decompressed\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncDecompress.prototype.push = function (chunk, final) {\n Decompress.prototype.push.call(this, chunk, final);\n };\n return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzip(data, opts, cb)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflate(data, opts, cb)\n : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, out) {\n return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n ? gunzipSync(data, out)\n : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n ? inflateSync(data, out)\n : unzlibSync(data, out);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n for (var k in d) {\n var val = d[k], n = p + k, op = o;\n if (Array.isArray(val))\n op = mrg(o, val[1]), val = val[0];\n if (val instanceof u8)\n t[n] = [val, op];\n else {\n t[n += '/'] = [new u8(0), op];\n fltn(val, n, t, o);\n }\n }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n td.decode(et, { stream: true });\n tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n for (var r = '', i = 0;;) {\n var c = d[i++];\n var eb = (c > 127) + (c > 223) + (c > 239);\n if (i + eb > d.length)\n return [r, slc(d, i - 1)];\n if (!eb)\n r += String.fromCharCode(c);\n else if (eb == 3) {\n c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n }\n else if (eb & 1)\n r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n else\n r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is decoded\n */\n function DecodeUTF8(cb) {\n this.ondata = cb;\n if (tds)\n this.t = new TextDecoder();\n else\n this.p = et;\n }\n /**\n * Pushes a chunk to be decoded from UTF-8 binary\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n DecodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n final = !!final;\n if (this.t) {\n this.ondata(this.t.decode(chunk, { stream: true }), final);\n if (final) {\n if (this.t.decode().length)\n err(8);\n this.t = null;\n }\n return;\n }\n if (!this.p)\n err(4);\n var dat = new u8(this.p.length + chunk.length);\n dat.set(this.p);\n dat.set(chunk, this.p.length);\n var _a = dutf8(dat), ch = _a[0], np = _a[1];\n if (final) {\n if (np.length)\n err(8);\n this.p = null;\n }\n else\n this.p = np;\n this.ondata(ch, final);\n };\n return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n /**\n * Creates a UTF-8 decoding stream\n * @param cb The callback to call whenever data is encoded\n */\n function EncodeUTF8(cb) {\n this.ondata = cb;\n }\n /**\n * Pushes a chunk to be encoded to UTF-8\n * @param chunk The string data to push\n * @param final Whether this is the last chunk\n */\n EncodeUTF8.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n if (this.d)\n err(4);\n this.ondata(strToU8(chunk), this.d = final || false);\n };\n return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n if (latin1) {\n var ar_1 = new u8(str.length);\n for (var i = 0; i < str.length; ++i)\n ar_1[i] = str.charCodeAt(i);\n return ar_1;\n }\n if (te)\n return te.encode(str);\n var l = str.length;\n var ar = new u8(str.length + (str.length >> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n * not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n if (latin1) {\n var r = '';\n for (var i = 0; i < dat.length; i += 16384)\n r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n return r;\n }\n else if (td)\n return td.decode(dat);\n else {\n var _a = dutf8(dat), out = _a[0], ext = _a[1];\n if (ext.length)\n err(8);\n return out;\n }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n ;\n return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n var le = 0;\n if (ex) {\n for (var k in ex) {\n var l = ex[k].length;\n if (l > 65535)\n err(9);\n le += l + 4;\n }\n }\n return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n var fl = fn.length, ex = f.extra, col = co && co.length;\n var exl = exfl(ex);\n wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n if (ce != null)\n d[b++] = 20, d[b++] = f.os;\n d[b] = 20, b += 2; // spec compliance? what's that?\n d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n if (y < 0 || y > 119)\n err(10);\n wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >>> 1)), b += 4;\n if (c != -1) {\n wbytes(d, b, f.crc);\n wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n wbytes(d, b + 8, f.size);\n }\n wbytes(d, b + 12, fl);\n wbytes(d, b + 14, exl), b += 16;\n if (ce != null) {\n wbytes(d, b, col);\n wbytes(d, b + 6, f.attrs);\n wbytes(d, b + 10, ce), b += 14;\n }\n d.set(fn, b);\n b += fl;\n if (exl) {\n for (var k in ex) {\n var exf = ex[k], l = exf.length;\n wbytes(d, b, +k);\n wbytes(d, b + 2, l);\n d.set(exf, b + 4), b += 4 + l;\n }\n }\n if (col)\n d.set(co, b), b += col;\n return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n wbytes(o, b, 0x6054B50); // skip disk\n wbytes(o, b + 8, c);\n wbytes(o, b + 10, c);\n wbytes(o, b + 12, d);\n wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n /**\n * Creates a pass-through stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n */\n function ZipPassThrough(filename) {\n this.filename = filename;\n this.c = crc();\n this.size = 0;\n this.compression = 0;\n }\n /**\n * Processes a chunk and pushes to the output stream. You can override this\n * method in a subclass for custom behavior, but by default this passes\n * the data through. You must call this.ondata(err, chunk, final) at some\n * point in this method.\n * @param chunk The chunk to process\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.process = function (chunk, final) {\n this.ondata(null, chunk, final);\n };\n /**\n * Pushes a chunk to be added. If you are subclassing this with a custom\n * compression algorithm, note that you must push data from the source\n * file only, pre-compression.\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipPassThrough.prototype.push = function (chunk, final) {\n if (!this.ondata)\n err(5);\n this.c.p(chunk);\n this.size += chunk.length;\n if (final)\n this.crc = this.c.d();\n this.process(chunk, final || false);\n };\n return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function ZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new Deflate(opts, function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n }\n ZipDeflate.prototype.process = function (chunk, final) {\n try {\n this.d.push(chunk, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n ZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE stream that can be added to ZIP archives\n * @param filename The filename to associate with this data stream\n * @param opts The compression options\n */\n function AsyncZipDeflate(filename, opts) {\n var _this_1 = this;\n if (!opts)\n opts = {};\n ZipPassThrough.call(this, filename);\n this.d = new AsyncDeflate(opts, function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.compression = 8;\n this.flag = dbf(opts.level);\n this.terminate = this.d.terminate;\n }\n AsyncZipDeflate.prototype.process = function (chunk, final) {\n this.d.push(chunk, final);\n };\n /**\n * Pushes a chunk to be deflated\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n AsyncZipDeflate.prototype.push = function (chunk, final) {\n ZipPassThrough.prototype.push.call(this, chunk, final);\n };\n return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n /**\n * Creates an empty ZIP archive to which files can be added\n * @param cb The callback to call whenever data for the generated ZIP archive\n * is available\n */\n function Zip(cb) {\n this.ondata = cb;\n this.u = [];\n this.d = 1;\n }\n /**\n * Adds a file to the ZIP archive\n * @param file The file stream to add\n */\n Zip.prototype.add = function (file) {\n var _this_1 = this;\n if (!this.ondata)\n err(5);\n // finishing or finished\n if (this.d & 2)\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n else {\n var f = strToU8(file.filename), fl_1 = f.length;\n var com = file.comment, o = com && strToU8(com);\n var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n var hl_1 = fl_1 + exfl(file.extra) + 30;\n if (fl_1 > 65535)\n this.ondata(err(11, 0, 1), null, false);\n var header = new u8(hl_1);\n wzh(header, 0, file, f, u, -1);\n var chks_1 = [header];\n var pAll_1 = function () {\n for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n var chk = chks_2[_i];\n _this_1.ondata(null, chk, false);\n }\n chks_1 = [];\n };\n var tr_1 = this.d;\n this.d = 0;\n var ind_1 = this.u.length;\n var uf_1 = mrg(file, {\n f: f,\n u: u,\n o: o,\n t: function () {\n if (file.terminate)\n file.terminate();\n },\n r: function () {\n pAll_1();\n if (tr_1) {\n var nxt = _this_1.u[ind_1 + 1];\n if (nxt)\n nxt.r();\n else\n _this_1.d = 1;\n }\n tr_1 = 1;\n }\n });\n var cl_1 = 0;\n file.ondata = function (err, dat, final) {\n if (err) {\n _this_1.ondata(err, dat, final);\n _this_1.terminate();\n }\n else {\n cl_1 += dat.length;\n chks_1.push(dat);\n if (final) {\n var dd = new u8(16);\n wbytes(dd, 0, 0x8074B50);\n wbytes(dd, 4, file.crc);\n wbytes(dd, 8, cl_1);\n wbytes(dd, 12, file.size);\n chks_1.push(dd);\n uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n if (tr_1)\n uf_1.r();\n tr_1 = 1;\n }\n else if (tr_1)\n pAll_1();\n }\n };\n this.u.push(uf_1);\n }\n };\n /**\n * Ends the process of adding files and prepares to emit the final chunks.\n * This *must* be called after adding all desired files for the resulting\n * ZIP file to work properly.\n */\n Zip.prototype.end = function () {\n var _this_1 = this;\n if (this.d & 2) {\n this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n return;\n }\n if (this.d)\n this.e();\n else\n this.u.push({\n r: function () {\n if (!(_this_1.d & 1))\n return;\n _this_1.u.splice(-1, 1);\n _this_1.e();\n },\n t: function () { }\n });\n this.d = 3;\n };\n Zip.prototype.e = function () {\n var bt = 0, l = 0, tl = 0;\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n }\n var out = new u8(tl + 22);\n for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n var f = _c[_b];\n wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n }\n wzf(out, bt, this.u.length, tl, l);\n this.ondata(null, out, true);\n this.d = 2;\n };\n /**\n * A method to terminate any internal workers used by the stream. Subsequent\n * calls to add() will fail.\n */\n Zip.prototype.terminate = function () {\n for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n var f = _a[_i];\n f.t();\n }\n this.d = 2;\n };\n return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var r = {};\n fltn(data, '', r, opts);\n var k = Object.keys(r);\n var lft = k.length, o = 0, tot = 0;\n var slft = lft, files = new Array(lft);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var cbf = function () {\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n tot = 0;\n for (var i = 0; i < slft; ++i) {\n var f = files[i];\n try {\n var l = f.c.length;\n wzh(out, tot, f, f.f, f.u, l);\n var badd = 30 + f.f.length + exfl(f.extra);\n var loc = tot + badd;\n out.set(f.c, loc);\n wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n }\n catch (e) {\n return cbd(e, null);\n }\n }\n wzf(out, o, files.length, cdl, oe);\n cbd(null, out);\n };\n if (!lft)\n cbf();\n var _loop_1 = function (i) {\n var fn = k[i];\n var _a = r[fn], file = _a[0], p = _a[1];\n var c = crc(), size = file.length;\n c.p(file);\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n var compression = p.level == 0 ? 0 : 8;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n var l = d.length;\n files[i] = mrg(p, {\n size: size,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n compression: compression\n });\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n if (!--lft)\n cbf();\n }\n };\n if (s > 65535)\n cbl(err(11, 0, 1), null);\n if (!compression)\n cbl(null, file);\n else if (size < 160000) {\n try {\n cbl(null, deflateSync(file, p));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(deflate(file, p, cbl));\n };\n // Cannot use lft because it can decrease\n for (var i = 0; i < slft; ++i) {\n _loop_1(i);\n }\n return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n if (!opts)\n opts = {};\n var r = {};\n var files = [];\n fltn(data, '', r, opts);\n var o = 0;\n var tot = 0;\n for (var fn in r) {\n var _a = r[fn], file = _a[0], p = _a[1];\n var compression = p.level == 0 ? 0 : 8;\n var f = strToU8(fn), s = f.length;\n var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n var exl = exfl(p.extra);\n if (s > 65535)\n err(11);\n var d = compression ? deflateSync(file, p) : file, l = d.length;\n var c = crc();\n c.p(file);\n files.push(mrg(p, {\n size: file.length,\n crc: c.d(),\n c: d,\n f: f,\n m: m,\n u: s != fn.length || (m && (com.length != ms)),\n o: o,\n compression: compression\n }));\n o += 30 + s + exl + l;\n tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n }\n var out = new u8(tot + 22), oe = o, cdl = tot - o;\n for (var i = 0; i < files.length; ++i) {\n var f = files[i];\n wzh(out, f.o, f, f.f, f.u, f.c.length);\n var badd = 30 + f.f.length + exfl(f.extra);\n out.set(f.c, f.o + badd);\n wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n }\n wzf(out, o, files.length, cdl, oe);\n return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n function UnzipPassThrough() {\n }\n UnzipPassThrough.prototype.push = function (data, final) {\n this.ondata(null, data, final);\n };\n UnzipPassThrough.compression = 0;\n return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function UnzipInflate() {\n var _this_1 = this;\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n UnzipInflate.prototype.push = function (data, final) {\n try {\n this.i.push(data, final);\n }\n catch (e) {\n this.ondata(e, null, final);\n }\n };\n UnzipInflate.compression = 8;\n return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n /**\n * Creates a DEFLATE decompression that can be used in ZIP archives\n */\n function AsyncUnzipInflate(_, sz) {\n var _this_1 = this;\n if (sz < 320000) {\n this.i = new Inflate(function (dat, final) {\n _this_1.ondata(null, dat, final);\n });\n }\n else {\n this.i = new AsyncInflate(function (err, dat, final) {\n _this_1.ondata(err, dat, final);\n });\n this.terminate = this.i.terminate;\n }\n }\n AsyncUnzipInflate.prototype.push = function (data, final) {\n if (this.i.terminate)\n data = slc(data, 0);\n this.i.push(data, final);\n };\n AsyncUnzipInflate.compression = 8;\n return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n /**\n * Creates a ZIP decompression stream\n * @param cb The callback to call whenever a file in the ZIP archive is found\n */\n function Unzip(cb) {\n this.onfile = cb;\n this.k = [];\n this.o = {\n 0: UnzipPassThrough\n };\n this.p = et;\n }\n /**\n * Pushes a chunk to be unzipped\n * @param chunk The chunk to push\n * @param final Whether this is the last chunk\n */\n Unzip.prototype.push = function (chunk, final) {\n var _this_1 = this;\n if (!this.onfile)\n err(5);\n if (!this.p)\n err(4);\n if (this.c > 0) {\n var len = Math.min(this.c, chunk.length);\n var toAdd = chunk.subarray(0, len);\n this.c -= len;\n if (this.d)\n this.d.push(toAdd, !this.c);\n else\n this.k[0].push(toAdd);\n chunk = chunk.subarray(len);\n if (chunk.length)\n return this.push(chunk, final);\n }\n else {\n var f = 0, i = 0, is = void 0, buf = void 0;\n if (!this.p.length)\n buf = chunk;\n else if (!chunk.length)\n buf = this.p;\n else {\n buf = new u8(this.p.length + chunk.length);\n buf.set(this.p), buf.set(chunk, this.p.length);\n }\n var l = buf.length, oc = this.c, add = oc && this.d;\n var _loop_2 = function () {\n var _a;\n var sig = b4(buf, i);\n if (sig == 0x4034B50) {\n f = 1, is = i;\n this_1.d = null;\n this_1.c = 0;\n var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n if (l > i + 30 + fnl + es) {\n var chks_3 = [];\n this_1.k.unshift(chks_3);\n f = 2;\n var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n if (sc_1 == 4294967295) {\n _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n }\n else if (dd)\n sc_1 = -1;\n i += es;\n this_1.c = sc_1;\n var d_1;\n var file_1 = {\n name: fn_1,\n compression: cmp_1,\n start: function () {\n if (!file_1.ondata)\n err(5);\n if (!sc_1)\n file_1.ondata(null, et, true);\n else {\n var ctr = _this_1.o[cmp_1];\n if (!ctr)\n file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n var dat = chks_4[_i];\n d_1.push(dat, false);\n }\n if (_this_1.k[0] == chks_3 && _this_1.c)\n _this_1.d = d_1;\n else\n d_1.push(et, true);\n }\n },\n terminate: function () {\n if (d_1 && d_1.terminate)\n d_1.terminate();\n }\n };\n if (sc_1 >= 0)\n file_1.size = sc_1, file_1.originalSize = su_1;\n this_1.onfile(file_1);\n }\n return \"break\";\n }\n else if (oc) {\n if (sig == 0x8074B50) {\n is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n return \"break\";\n }\n else if (sig == 0x2014B50) {\n is = i -= 4, f = 3, this_1.c = 0;\n return \"break\";\n }\n }\n };\n var this_1 = this;\n for (; i < l - 4; ++i) {\n var state_1 = _loop_2();\n if (state_1 === \"break\")\n break;\n }\n this.p = et;\n if (oc < 0) {\n var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n if (add)\n add.push(dat, !!f);\n else\n this.k[+(f == 2)].push(dat);\n }\n if (f & 2)\n return this.push(buf.subarray(i), final);\n this.p = buf.subarray(i);\n }\n if (final) {\n if (this.c)\n err(13);\n this.p = null;\n }\n };\n /**\n * Registers a decoder with the stream, allowing for files compressed with\n * the compression type provided to be expanded correctly\n * @param decoder The decoder constructor\n */\n Unzip.prototype.register = function (decoder) {\n this.o[decoder.compression] = decoder;\n };\n return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n if (!cb)\n cb = opts, opts = {};\n if (typeof cb != 'function')\n err(7);\n var term = [];\n var tAll = function () {\n for (var i = 0; i < term.length; ++i)\n term[i]();\n };\n var files = {};\n var cbd = function (a, b) {\n mt(function () { cb(a, b); });\n };\n mt(function () { cbd = cb; });\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558) {\n cbd(err(13, 0, 1), null);\n return tAll;\n }\n }\n ;\n var lft = b2(data, e + 8);\n if (lft) {\n var c = lft;\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = lft = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n var _loop_3 = function (i) {\n var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n var cbl = function (e, d) {\n if (e) {\n tAll();\n cbd(e, null);\n }\n else {\n if (d)\n files[fn] = d;\n if (!--lft)\n cbd(null, files);\n }\n };\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_1\n })) {\n if (!c_1)\n cbl(null, slc(data, b, b + sc));\n else if (c_1 == 8) {\n var infl = data.subarray(b, b + sc);\n if (sc < 320000) {\n try {\n cbl(null, inflateSync(infl, new u8(su)));\n }\n catch (e) {\n cbl(e, null);\n }\n }\n else\n term.push(inflate(infl, { size: su }, cbl));\n }\n else\n cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n }\n else\n cbl(null, null);\n };\n for (var i = 0; i < c; ++i) {\n _loop_3(i);\n }\n }\n else\n cbd(null, {});\n return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n var files = {};\n var e = data.length - 22;\n for (; b4(data, e) != 0x6054B50; --e) {\n if (!e || data.length - e > 65558)\n err(13);\n }\n ;\n var c = b2(data, e + 8);\n if (!c)\n return {};\n var o = b4(data, e + 16);\n var z = o == 4294967295 || c == 65535;\n if (z) {\n var ze = b4(data, e - 12);\n z = b4(data, ze) == 0x6064B50;\n if (z) {\n c = b4(data, ze + 32);\n o = b4(data, ze + 48);\n }\n }\n var fltr = opts && opts.filter;\n for (var i = 0; i < c; ++i) {\n var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n o = no;\n if (!fltr || fltr({\n name: fn,\n size: sc,\n originalSize: su,\n compression: c_2\n })) {\n if (!c_2)\n files[fn] = slc(data, b, b + sc);\n else if (c_2 == 8)\n files[fn] = inflateSync(data.subarray(b, b + sc), new u8(su));\n else\n err(14, 'unknown compression type ' + c_2);\n }\n }\n return files;\n}\n", "/* eslint-disable simple-header/header */\n\n/*!\n * crxToZip\n * Copyright (c) 2013 Rob Wu \n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n */\n\nexport function crxToZip(buf: Buffer) {\n function calcLength(a: number, b: number, c: number, d: number) {\n let length = 0;\n\n length += a << 0;\n length += b << 8;\n length += c << 16;\n length += d << 24 >>> 0;\n return length;\n }\n\n // 50 4b 03 04\n // This is actually a zip file\n if (buf[0] === 80 && buf[1] === 75 && buf[2] === 3 && buf[3] === 4) {\n return buf;\n }\n\n // 43 72 32 34 (Cr24)\n if (buf[0] !== 67 || buf[1] !== 114 || buf[2] !== 50 || buf[3] !== 52) {\n throw new Error(\"Invalid header: Does not start with Cr24\");\n }\n\n // 02 00 00 00\n // or\n // 03 00 00 00\n const isV3 = buf[4] === 3;\n const isV2 = buf[4] === 2;\n\n if ((!isV2 && !isV3) || buf[5] || buf[6] || buf[7]) {\n throw new Error(\"Unexpected crx format version number.\");\n }\n\n if (isV2) {\n const publicKeyLength = calcLength(buf[8], buf[9], buf[10], buf[11]);\n const signatureLength = calcLength(buf[12], buf[13], buf[14], buf[15]);\n\n // 16 = Magic number (4), CRX format version (4), lengths (2x4)\n const zipStartOffset = 16 + publicKeyLength + signatureLength;\n\n return buf.subarray(zipStartOffset, buf.length);\n }\n // v3 format has header size and then header\n const headerSize = calcLength(buf[8], buf[9], buf[10], buf[11]);\n const zipStartOffset = 12 + headerSize;\n\n return buf.subarray(zipStartOffset, buf.length);\n}\n"],
+ "mappings": "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",
+ "names": ["init_react", "__esmMin", "init_IpcEvents", "__esmMin", "init_react", "git_hash_default", "init_git_hash", "__esmMin", "init_react", "git_remote_default", "init_git_remote", "__esmMin", "init_react", "VENCORD_USER_AGENT", "init_vencordUserAgent", "__esmMin", "init_react", "init_git_hash", "init_git_remote", "git_hash_default", "git_remote_default", "get", "url", "options", "resolve", "reject", "https", "res", "statusCode", "statusMessage", "headers", "chunks", "chunk", "import_https", "init_simpleGet", "__esmMin", "init_react", "serializeErrors", "func", "e", "VENCORD_FILES", "init_common", "__esmMin", "init_react", "http_exports", "githubGet", "endpoint", "get", "API_BASE", "VENCORD_USER_AGENT", "calculateGitChanges", "fetchUpdates", "res", "git_hash_default", "c", "release", "data", "name", "browser_download_url", "VENCORD_FILES", "s", "PendingUpdates", "applyUpdates", "import_electron", "import_promises", "import_path", "init_http", "__esmMin", "init_react", "init_IpcEvents", "init_vencordUserAgent", "init_git_hash", "init_git_remote", "init_simpleGet", "init_common", "git_remote_default", "serializeErrors", "init_react", "import_electron", "import_path", "init_react", "init_react", "init_react", "init_IpcEvents", "import_electron", "init_react", "native_exports", "init_react", "init_react", "init_IpcEvents", "init_react", "SettingsStore", "plain", "options", "object", "root", "path", "self", "target", "key", "v", "value", "setPath", "cb", "pathToNotify", "p", "listeners", "import_electron", "import_fs", "init_react", "import_electron", "import_path", "DATA_DIR", "SETTINGS_DIR", "THEMES_DIR", "QUICKCSS_PATH", "SETTINGS_FILE", "NATIVE_SETTINGS_FILE", "ALLOWED_PROTOCOLS", "SETTINGS_DIR", "readSettings", "name", "file", "err", "RendererSettings", "SettingsStore", "SETTINGS_FILE", "_", "data", "pathToNotify", "NativeSettings", "NATIVE_SETTINGS_FILE", "import_electron", "_", "win", "frame", "settings", "RendererSettings", "native_exports", "init_react", "import_electron", "_", "win", "frame", "RendererSettings", "native_exports", "__export", "resolveRedirect", "init_react", "import_https", "validRedirectUrls", "getRedirect", "url", "resolve", "reject", "req", "res", "_", "native_exports", "__export", "readRecording", "init_react", "import_electron", "import_promises", "import_path", "_", "filePath", "filename", "discordBaseDirWithTrailingSlash", "buf", "native_exports", "__export", "sendToOverlay", "init_react", "import_dgram", "xsoSocket", "_", "data", "json", "pluginNatives_default", "native_exports", "PluginIpcMappings", "plugin", "methods", "pluginNatives_default", "entries", "mappings", "methodName", "method", "key", "init_react", "init_IpcEvents", "import_electron", "import_fs", "import_promises", "import_path", "init_react", "monacoWin_default", "init_react", "splitRegex", "escapedAtRegex", "makeHeader", "fileName", "opts", "stripBOM", "fileContent", "getThemeInfo", "css", "block", "header", "field", "accum", "line", "l", "init_react", "import_electron", "makeLinksOpenExternally", "win", "url", "protocol", "THEMES_DIR", "ensureSafePath", "basePath", "path", "normalizedBasePath", "newPath", "normalizedPath", "readCss", "QUICKCSS_PATH", "listThemes", "files", "themeInfo", "fileName", "data", "getThemeData", "stripBOM", "getThemeInfo", "safePath", "_", "url", "protocol", "ALLOWED_PROTOCOLS", "css", "title", "existingWindow", "w", "win", "makeLinksOpenExternally", "monacoWin_default", "init_react", "import_electron", "init_react", "import_module", "require", "Worker", "workerAdd", "wk", "c", "_", "msg", "transfer", "cb", "done", "w", "e", "m", "__", "___", "____", "NOP", "u8", "u16", "u32", "fleb", "fdeb", "clim", "freb", "eb", "start", "b", "i", "r", "j", "_a", "fl", "revfl", "_b", "fd", "revfd", "rev", "x", "hMap", "cd", "mb", "s", "l", "le", "co", "rvb", "sv", "r_1", "v", "flt", "fdt", "flrm", "hMap", "flt", "fdrm", "hMap", "fdt", "max", "a", "m", "i", "bits", "d", "p", "o", "bits16", "shft", "slc", "v", "s", "e", "u16", "u32", "u8", "ec", "err", "ind", "msg", "nt", "e", "inflt", "dat", "buf", "st", "sl", "u8", "noBuf", "noSt", "cbuf", "l", "bl", "nbuf", "final", "pos", "bt", "lm", "dm", "lbt", "dbt", "tbts", "bits", "type", "flrm", "fdrm", "hLit", "hcLen", "tl", "ldt", "clt", "i", "clim", "clb", "max", "clbmsk", "clm", "hMap", "r", "s", "c", "n", "lt", "dt", "shft", "t", "lms", "dms", "lpos", "bits16", "sym", "add", "b", "fleb", "fl", "d", "dsym", "fd", "fdeb", "end", "slc", "et", "u8", "mrg", "a", "b", "o", "k", "wcln", "fn", "fnStr", "td", "dt", "st", "ks", "i", "v", "st_1", "spInd", "t", "ch", "cbfs", "tl", "wrkr", "fns", "init", "id", "cb", "_a", "td_1", "m", "wk", "bInflt", "u8", "u16", "u32", "fleb", "fdeb", "clim", "fl", "fd", "flrm", "fdrm", "rev", "ec", "hMap", "max", "bits", "bits16", "shft", "slc", "err", "inflt", "inflateSync", "pbf", "gu8", "pbf", "msg", "gu8", "o", "u8", "cbify", "dat", "opts", "fns", "init", "id", "cb", "w", "wrkr", "err", "b2", "d", "b", "b4", "b8", "inflate", "data", "opts", "cb", "err", "cbify", "bInflt", "ev", "pbf", "inflateSync", "gu8", "out", "inflt", "td", "tds", "et", "dutf8", "d", "r", "i", "c", "eb", "slc", "strFromU8", "dat", "latin1", "i", "td", "_a", "dutf8", "out", "ext", "err", "slzh", "d", "b", "b2", "zh", "z", "fnl", "fn", "strFromU8", "es", "bs", "b4", "_a", "z64e", "sc", "su", "off", "b8", "mt", "fn", "unzip", "data", "opts", "cb", "err", "term", "tAll", "i", "files", "cbd", "a", "b", "e", "b4", "lft", "b2", "c", "o", "z", "ze", "fltr", "_loop_3", "_a", "zh", "c_1", "sc", "su", "no", "off", "slzh", "cbl", "d", "slc", "infl", "inflateSync", "u8", "inflate", "import_fs", "import_promises", "import_path", "init_react", "crxToZip", "buf", "calcLength", "a", "b", "d", "length", "isV3", "isV2", "publicKeyLength", "signatureLength", "zipStartOffset", "init_simpleGet", "extensionCacheDir", "DATA_DIR", "extract", "data", "outDir", "resolve", "reject", "unzip", "err", "files", "f", "pathElements", "name", "directories", "dir", "installExt", "id", "extDir", "fsConstants", "url", "buf", "get", "crxToZip", "unsafeUrl", "cb", "url", "theme", "safeUrl", "ensureSafePath", "THEMES_DIR", "RendererSettings", "installExt", "err", "findHeader", "headers", "headerName", "h", "parsePolicy", "policy", "result", "directive", "directiveKey", "directiveValue", "stringifyPolicy", "values", "patchCsp", "header", "csp", "responseHeaders", "resourceType"]
}
diff --git a/vesktop/vencordDist/vencordDesktopPreload.js b/vesktop/vencordDist/vencordDesktopPreload.js
index b6d22eb..6c44a80 100644
--- a/vesktop/vencordDist/vencordDesktopPreload.js
+++ b/vesktop/vencordDist/vencordDesktopPreload.js
@@ -1,7 +1,7 @@
-// Vencord d73790e
+// Vencord ca18b6e
// Standalone: true
// Platform: Universal
// Updater disabled: false
-"use strict";function a(e,r=300){let n;return function(...d){clearTimeout(n),n=setTimeout(()=>{e(...d)},r)}}var s=require("electron"),m=require("fs"),S=require("path");var o=require("electron");function t(e,...r){return o.ipcRenderer.invoke(e,...r)}function c(e,...r){return o.ipcRenderer.sendSync(e,...r)}var _={},p=c("VencordGetPluginIpcMethodMap");for(let[e,r]of Object.entries(p)){let n=_[e]={};for(let[d,g]of Object.entries(r))n[d]=(...u)=>t(g,...u)}var i={themes:{uploadTheme:(e,r)=>t("VencordUploadTheme",e,r),deleteTheme:e=>t("VencordDeleteTheme",e),getThemesDir:()=>t("VencordGetThemesDir"),getThemesList:()=>t("VencordGetThemesList"),getThemeData:e=>t("VencordGetThemeData",e),getSystemValues:()=>t("VencordGetThemeSystemValues")},updater:{getUpdates:()=>t("VencordGetUpdates"),update:()=>t("VencordUpdate"),rebuild:()=>t("VencordBuild"),getRepo:()=>t("VencordGetRepo")},settings:{get:()=>c("VencordGetSettings"),set:e=>t("VencordSetSettings",e),getSettingsDir:()=>t("VencordGetSettingsDir")},quickCss:{get:()=>t("VencordGetQuickCss"),set:e=>t("VencordSetQuickCss",e),addChangeListener(e){o.ipcRenderer.on("VencordQuickCssUpdate",(r,n)=>e(n))},addThemeChangeListener(e){o.ipcRenderer.on("VencordThemeUpdate",()=>e())},openFile:()=>t("VencordOpenQuickCss"),openEditor:()=>t("VencordOpenMonacoEditor")},native:{getVersions:()=>process.versions,openExternal:e=>t("VencordOpenExternal",e)},pluginHelpers:_};s.contextBridge.exposeInMainWorld("VencordNative",i);if(location.protocol!=="data:"){let e=(0,S.join)(__dirname,"vencordDesktopRenderer.css"),r=document.createElement("style");r.id="vencord-css-core",r.textContent=(0,m.readFileSync)(e,"utf-8"),document.readyState==="complete"?document.documentElement.appendChild(r):document.addEventListener("DOMContentLoaded",()=>document.documentElement.appendChild(r),{once:!0})}else s.contextBridge.exposeInMainWorld("setCss",a(i.quickCss.set)),s.contextBridge.exposeInMainWorld("getCurrentCss",i.quickCss.get),s.contextBridge.exposeInMainWorld("getTheme",()=>"vs-dark");
+"use strict";function a(e,r=300){let n;return function(...d){clearTimeout(n),n=setTimeout(()=>{e(...d)},r)}}var s=require("electron"),m=require("fs"),S=require("path");var o=require("electron");function t(e,...r){return o.ipcRenderer.invoke(e,...r)}function c(e,...r){return o.ipcRenderer.sendSync(e,...r)}var _={},u=c("VencordGetPluginIpcMethodMap");for(let[e,r]of Object.entries(u)){let n=_[e]={};for(let[d,g]of Object.entries(r))n[d]=(...p)=>t(g,...p)}var i={themes:{uploadTheme:(e,r)=>t("VencordUploadTheme",e,r),deleteTheme:e=>t("VencordDeleteTheme",e),getThemesDir:()=>t("VencordGetThemesDir"),getThemesList:()=>t("VencordGetThemesList"),getThemeData:e=>t("VencordGetThemeData",e),getSystemValues:()=>t("VencordGetThemeSystemValues")},updater:{getUpdates:()=>t("VencordGetUpdates"),update:()=>t("VencordUpdate"),rebuild:()=>t("VencordBuild"),getRepo:()=>t("VencordGetRepo")},settings:{get:()=>c("VencordGetSettings"),set:(e,r)=>t("VencordSetSettings",e,r),getSettingsDir:()=>t("VencordGetSettingsDir")},quickCss:{get:()=>t("VencordGetQuickCss"),set:e=>t("VencordSetQuickCss",e),addChangeListener(e){o.ipcRenderer.on("VencordQuickCssUpdate",(r,n)=>e(n))},addThemeChangeListener(e){o.ipcRenderer.on("VencordThemeUpdate",()=>e())},openFile:()=>t("VencordOpenQuickCss"),openEditor:()=>t("VencordOpenMonacoEditor")},native:{getVersions:()=>process.versions,openExternal:e=>t("VencordOpenExternal",e)},pluginHelpers:_};s.contextBridge.exposeInMainWorld("VencordNative",i);if(location.protocol!=="data:"){let e=(0,S.join)(__dirname,"vencordDesktopRenderer.css"),r=document.createElement("style");r.id="vencord-css-core",r.textContent=(0,m.readFileSync)(e,"utf-8"),document.readyState==="complete"?document.documentElement.appendChild(r):document.addEventListener("DOMContentLoaded",()=>document.documentElement.appendChild(r),{once:!0})}else s.contextBridge.exposeInMainWorld("setCss",a(i.quickCss.set)),s.contextBridge.exposeInMainWorld("getCurrentCss",i.quickCss.get),s.contextBridge.exposeInMainWorld("getTheme",()=>"vs-dark");
//# sourceURL=VencordPreload
//# sourceMappingURL=vencord://vencordDesktopPreload.js.map
diff --git a/vesktop/vencordDist/vencordDesktopPreload.js.map b/vesktop/vencordDist/vencordDesktopPreload.js.map
index 2f043b2..edb579b 100644
--- a/vesktop/vencordDist/vencordDesktopPreload.js.map
+++ b/vesktop/vencordDist/vencordDesktopPreload.js.map
@@ -1,7 +1,7 @@
{
"version": 3,
- "sources": ["../src/utils/debounce.ts", "../src/preload.ts", "../src/VencordNative.ts"],
- "sourcesContent": ["/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n/**\n * Returns a new function that will call the wrapped function\n * after the specified delay. If the function is called again\n * within the delay, the timer will be reset.\n * @param func The function to wrap\n * @param delay The delay in milliseconds\n */\nexport function debounce(func: T, delay = 300): T {\n let timeout: NodeJS.Timeout;\n return function (...args: any[]) {\n clearTimeout(timeout);\n timeout = setTimeout(() => { func(...args); }, delay);\n } as any;\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { debounce } from \"@utils/debounce\";\nimport { contextBridge, webFrame } from \"electron\";\nimport { readFileSync, watch } from \"fs\";\nimport { join } from \"path\";\n\nimport VencordNative from \"./VencordNative\";\n\ncontextBridge.exposeInMainWorld(\"VencordNative\", VencordNative);\n\n// Discord\nif (location.protocol !== \"data:\") {\n // #region cssInsert\n const rendererCss = join(__dirname, IS_VESKTOP ? \"vencordDesktopRenderer.css\" : \"renderer.css\");\n\n const style = document.createElement(\"style\");\n style.id = \"vencord-css-core\";\n style.textContent = readFileSync(rendererCss, \"utf-8\");\n\n if (document.readyState === \"complete\") {\n document.documentElement.appendChild(style);\n } else {\n document.addEventListener(\"DOMContentLoaded\", () => document.documentElement.appendChild(style), {\n once: true\n });\n }\n\n if (IS_DEV) {\n // persistent means keep process running if watcher is the only thing still running\n // which we obviously don't want\n watch(rendererCss, { persistent: false }, () => {\n document.getElementById(\"vencord-css-core\")!.textContent = readFileSync(rendererCss, \"utf-8\");\n });\n }\n // #endregion\n\n if (IS_DISCORD_DESKTOP) {\n webFrame.executeJavaScript(readFileSync(join(__dirname, \"renderer.js\"), \"utf-8\"));\n require(process.env.DISCORD_PRELOAD!);\n }\n} // Monaco popout\nelse {\n contextBridge.exposeInMainWorld(\"setCss\", debounce(VencordNative.quickCss.set));\n contextBridge.exposeInMainWorld(\"getCurrentCss\", VencordNative.quickCss.get);\n // shrug\n contextBridge.exposeInMainWorld(\"getTheme\", () => \"vs-dark\");\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { IpcEvents } from \"@utils/IpcEvents\";\nimport { IpcRes } from \"@utils/types\";\nimport { ipcRenderer } from \"electron\";\nimport { PluginIpcMappings } from \"main/ipcPlugins\";\nimport type { UserThemeHeader } from \"main/themes\";\n\nfunction invoke(event: IpcEvents, ...args: any[]) {\n return ipcRenderer.invoke(event, ...args) as Promise;\n}\n\nexport function sendSync(event: IpcEvents, ...args: any[]) {\n return ipcRenderer.sendSync(event, ...args) as T;\n}\n\nconst PluginHelpers = {} as Record Promise>>;\nconst pluginIpcMap = sendSync(IpcEvents.GET_PLUGIN_IPC_METHOD_MAP);\n\nfor (const [plugin, methods] of Object.entries(pluginIpcMap)) {\n const map = PluginHelpers[plugin] = {};\n for (const [methodName, method] of Object.entries(methods)) {\n map[methodName] = (...args: any[]) => invoke(method as IpcEvents, ...args);\n }\n}\n\nexport default {\n themes: {\n uploadTheme: (fileName: string, fileData: string) => invoke(IpcEvents.UPLOAD_THEME, fileName, fileData),\n deleteTheme: (fileName: string) => invoke(IpcEvents.DELETE_THEME, fileName),\n getThemesDir: () => invoke(IpcEvents.GET_THEMES_DIR),\n getThemesList: () => invoke>(IpcEvents.GET_THEMES_LIST),\n getThemeData: (fileName: string) => invoke(IpcEvents.GET_THEME_DATA, fileName),\n getSystemValues: () => invoke>(IpcEvents.GET_THEME_SYSTEM_VALUES),\n },\n\n updater: {\n getUpdates: () => invoke[]>>(IpcEvents.GET_UPDATES),\n update: () => invoke>(IpcEvents.UPDATE),\n rebuild: () => invoke>(IpcEvents.BUILD),\n getRepo: () => invoke>(IpcEvents.GET_REPO),\n },\n\n settings: {\n get: () => sendSync(IpcEvents.GET_SETTINGS),\n set: (settings: string) => invoke(IpcEvents.SET_SETTINGS, settings),\n getSettingsDir: () => invoke(IpcEvents.GET_SETTINGS_DIR),\n },\n\n quickCss: {\n get: () => invoke(IpcEvents.GET_QUICK_CSS),\n set: (css: string) => invoke(IpcEvents.SET_QUICK_CSS, css),\n\n addChangeListener(cb: (newCss: string) => void) {\n ipcRenderer.on(IpcEvents.QUICK_CSS_UPDATE, (_, css) => cb(css));\n },\n\n addThemeChangeListener(cb: () => void) {\n ipcRenderer.on(IpcEvents.THEME_UPDATE, () => cb());\n },\n\n openFile: () => invoke(IpcEvents.OPEN_QUICKCSS),\n openEditor: () => invoke(IpcEvents.OPEN_MONACO_EDITOR),\n },\n\n native: {\n getVersions: () => process.versions as Partial,\n openExternal: (url: string) => invoke(IpcEvents.OPEN_EXTERNAL, url)\n },\n\n pluginHelpers: PluginHelpers\n};\n"],
- "mappings": ";;;;aAyBO,SAASA,EAA6BC,EAASC,EAAQ,IAAQ,CAClE,IAAIC,EACJ,OAAO,YAAaC,EAAa,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAM,CAAEF,EAAK,GAAGG,CAAI,CAAG,EAAGF,CAAK,CACxD,CACJ,CCZA,IAAAG,EAAwC,oBACxCC,EAAoC,cACpCC,EAAqB,gBCbrB,IAAAC,EAA4B,oBAI5B,SAASC,EAAgBC,KAAqBC,EAAa,CACvD,OAAO,cAAY,OAAOD,EAAO,GAAGC,CAAI,CAC5C,CAEO,SAASC,EAAkBF,KAAqBC,EAAa,CAChE,OAAO,cAAY,SAASD,EAAO,GAAGC,CAAI,CAC9C,CAEA,IAAME,EAAgB,CAAC,EACjBC,EAAeF,gCAA+D,EAEpF,OAAW,CAACG,EAAQC,CAAO,IAAK,OAAO,QAAQF,CAAY,EAAG,CAC1D,IAAMG,EAAMJ,EAAcE,GAAU,CAAC,EACrC,OAAW,CAACG,EAAYC,CAAM,IAAK,OAAO,QAAQH,CAAO,EACrDC,EAAIC,GAAc,IAAIP,IAAgBF,EAAOU,EAAqB,GAAGR,CAAI,CAEjF,CAEA,IAAOS,EAAQ,CACX,OAAQ,CACJ,YAAa,CAACC,EAAkBC,IAAqBb,uBAAqCY,EAAUC,CAAQ,EAC5G,YAAcD,GAAqBZ,uBAAqCY,CAAQ,EAChF,aAAc,IAAMZ,uBAAuC,EAC3D,cAAe,IAAMA,wBAAwD,EAC7E,aAAeY,GAAqBZ,wBAAqDY,CAAQ,EACjG,gBAAiB,IAAMZ,+BAAgE,CAC3F,EAEA,QAAS,CACL,WAAY,IAAMA,qBAAqF,EACvG,OAAQ,IAAMA,iBAAwC,EACtD,QAAS,IAAMA,gBAAuC,EACtD,QAAS,IAAMA,kBAAyC,CAC5D,EAEA,SAAU,CACN,IAAK,IAAMG,sBAAuC,EAClD,IAAMW,GAAqBd,uBAAqCc,CAAQ,EACxE,eAAgB,IAAMd,yBAAyC,CACnE,EAEA,SAAU,CACN,IAAK,IAAMA,sBAAsC,EACjD,IAAMe,GAAgBf,uBAAsCe,CAAG,EAE/D,kBAAkBC,EAA8B,CAC5C,cAAY,2BAA+B,CAACC,EAAGF,IAAQC,EAAGD,CAAG,CAAC,CAClE,EAEA,uBAAuBC,EAAgB,CACnC,cAAY,wBAA2B,IAAMA,EAAG,CAAC,CACrD,EAEA,SAAU,IAAMhB,uBAAoC,EACpD,WAAY,IAAMA,2BAAyC,CAC/D,EAEA,OAAQ,CACJ,YAAa,IAAM,QAAQ,SAC3B,aAAekB,GAAgBlB,wBAAsCkB,CAAG,CAC5E,EAEA,cAAed,CACnB,EDlDA,gBAAc,kBAAkB,gBAAiBe,CAAa,EAG9D,GAAI,SAAS,WAAa,QAAS,CAE/B,IAAMC,KAAc,QAAK,UAAwB,4BAA6C,EAExFC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,GAAK,mBACXA,EAAM,eAAc,gBAAaD,EAAa,OAAO,EAEjD,SAAS,aAAe,WACxB,SAAS,gBAAgB,YAAYC,CAAK,EAE1C,SAAS,iBAAiB,mBAAoB,IAAM,SAAS,gBAAgB,YAAYA,CAAK,EAAG,CAC7F,KAAM,EACV,CAAC,CAgBT,MAEI,gBAAc,kBAAkB,SAAUC,EAASH,EAAc,SAAS,GAAG,CAAC,EAC9E,gBAAc,kBAAkB,gBAAiBA,EAAc,SAAS,GAAG,EAE3E,gBAAc,kBAAkB,WAAY,IAAM,SAAS",
- "names": ["debounce", "func", "delay", "timeout", "args", "import_electron", "import_fs", "import_path", "import_electron", "invoke", "event", "args", "sendSync", "PluginHelpers", "pluginIpcMap", "plugin", "methods", "map", "methodName", "method", "VencordNative_default", "fileName", "fileData", "settings", "css", "cb", "_", "url", "VencordNative_default", "rendererCss", "style", "debounce"]
+ "sources": ["../src/shared/debounce.ts", "../src/preload.ts", "../src/VencordNative.ts"],
+ "sourcesContent": ["/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n/**\n * Returns a new function that will call the wrapped function\n * after the specified delay. If the function is called again\n * within the delay, the timer will be reset.\n * @param func The function to wrap\n * @param delay The delay in milliseconds\n */\nexport function debounce(func: T, delay = 300): T {\n let timeout: NodeJS.Timeout;\n return function (...args: any[]) {\n clearTimeout(timeout);\n timeout = setTimeout(() => { func(...args); }, delay);\n } as any;\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\nimport { debounce } from \"@shared/debounce\";\nimport { contextBridge, webFrame } from \"electron\";\nimport { readFileSync, watch } from \"fs\";\nimport { join } from \"path\";\n\nimport VencordNative from \"./VencordNative\";\n\ncontextBridge.exposeInMainWorld(\"VencordNative\", VencordNative);\n\n// Discord\nif (location.protocol !== \"data:\") {\n // #region cssInsert\n const rendererCss = join(__dirname, IS_VESKTOP ? \"vencordDesktopRenderer.css\" : \"renderer.css\");\n\n const style = document.createElement(\"style\");\n style.id = \"vencord-css-core\";\n style.textContent = readFileSync(rendererCss, \"utf-8\");\n\n if (document.readyState === \"complete\") {\n document.documentElement.appendChild(style);\n } else {\n document.addEventListener(\"DOMContentLoaded\", () => document.documentElement.appendChild(style), {\n once: true\n });\n }\n\n if (IS_DEV) {\n // persistent means keep process running if watcher is the only thing still running\n // which we obviously don't want\n watch(rendererCss, { persistent: false }, () => {\n document.getElementById(\"vencord-css-core\")!.textContent = readFileSync(rendererCss, \"utf-8\");\n });\n }\n // #endregion\n\n if (IS_DISCORD_DESKTOP) {\n webFrame.executeJavaScript(readFileSync(join(__dirname, \"renderer.js\"), \"utf-8\"));\n require(process.env.DISCORD_PRELOAD!);\n }\n} // Monaco popout\nelse {\n contextBridge.exposeInMainWorld(\"setCss\", debounce(VencordNative.quickCss.set));\n contextBridge.exposeInMainWorld(\"getCurrentCss\", VencordNative.quickCss.get);\n // shrug\n contextBridge.exposeInMainWorld(\"getTheme\", () => \"vs-dark\");\n}\n", "/*\n * Vencord, a Discord client mod\n * Copyright (c) 2023 Vendicated and contributors\n * SPDX-License-Identifier: GPL-3.0-or-later\n */\n\nimport { PluginIpcMappings } from \"@main/ipcPlugins\";\nimport type { UserThemeHeader } from \"@main/themes\";\nimport { IpcEvents } from \"@shared/IpcEvents\";\nimport { IpcRes } from \"@utils/types\";\nimport type { Settings } from \"api/Settings\";\nimport { ipcRenderer } from \"electron\";\n\nfunction invoke(event: IpcEvents, ...args: any[]) {\n return ipcRenderer.invoke(event, ...args) as Promise;\n}\n\nexport function sendSync(event: IpcEvents, ...args: any[]) {\n return ipcRenderer.sendSync(event, ...args) as T;\n}\n\nconst PluginHelpers = {} as Record Promise>>;\nconst pluginIpcMap = sendSync(IpcEvents.GET_PLUGIN_IPC_METHOD_MAP);\n\nfor (const [plugin, methods] of Object.entries(pluginIpcMap)) {\n const map = PluginHelpers[plugin] = {};\n for (const [methodName, method] of Object.entries(methods)) {\n map[methodName] = (...args: any[]) => invoke(method as IpcEvents, ...args);\n }\n}\n\nexport default {\n themes: {\n uploadTheme: (fileName: string, fileData: string) => invoke(IpcEvents.UPLOAD_THEME, fileName, fileData),\n deleteTheme: (fileName: string) => invoke(IpcEvents.DELETE_THEME, fileName),\n getThemesDir: () => invoke(IpcEvents.GET_THEMES_DIR),\n getThemesList: () => invoke>(IpcEvents.GET_THEMES_LIST),\n getThemeData: (fileName: string) => invoke(IpcEvents.GET_THEME_DATA, fileName),\n getSystemValues: () => invoke>(IpcEvents.GET_THEME_SYSTEM_VALUES),\n },\n\n updater: {\n getUpdates: () => invoke[]>>(IpcEvents.GET_UPDATES),\n update: () => invoke>(IpcEvents.UPDATE),\n rebuild: () => invoke>(IpcEvents.BUILD),\n getRepo: () => invoke>(IpcEvents.GET_REPO),\n },\n\n settings: {\n get: () => sendSync(IpcEvents.GET_SETTINGS),\n set: (settings: Settings, pathToNotify?: string) => invoke(IpcEvents.SET_SETTINGS, settings, pathToNotify),\n getSettingsDir: () => invoke(IpcEvents.GET_SETTINGS_DIR),\n },\n\n quickCss: {\n get: () => invoke(IpcEvents.GET_QUICK_CSS),\n set: (css: string) => invoke(IpcEvents.SET_QUICK_CSS, css),\n\n addChangeListener(cb: (newCss: string) => void) {\n ipcRenderer.on(IpcEvents.QUICK_CSS_UPDATE, (_, css) => cb(css));\n },\n\n addThemeChangeListener(cb: () => void) {\n ipcRenderer.on(IpcEvents.THEME_UPDATE, () => cb());\n },\n\n openFile: () => invoke(IpcEvents.OPEN_QUICKCSS),\n openEditor: () => invoke(IpcEvents.OPEN_MONACO_EDITOR),\n },\n\n native: {\n getVersions: () => process.versions as Partial,\n openExternal: (url: string) => invoke(IpcEvents.OPEN_EXTERNAL, url)\n },\n\n pluginHelpers: PluginHelpers\n};\n"],
+ "mappings": ";;;;aAyBO,SAASA,EAA6BC,EAASC,EAAQ,IAAQ,CAClE,IAAIC,EACJ,OAAO,YAAaC,EAAa,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAM,CAAEF,EAAK,GAAGG,CAAI,CAAG,EAAGF,CAAK,CACxD,CACJ,CCZA,IAAAG,EAAwC,oBACxCC,EAAoC,cACpCC,EAAqB,gBCVrB,IAAAC,EAA4B,oBAE5B,SAASC,EAAgBC,KAAqBC,EAAa,CACvD,OAAO,cAAY,OAAOD,EAAO,GAAGC,CAAI,CAC5C,CAEO,SAASC,EAAkBF,KAAqBC,EAAa,CAChE,OAAO,cAAY,SAASD,EAAO,GAAGC,CAAI,CAC9C,CAEA,IAAME,EAAgB,CAAC,EACjBC,EAAeF,gCAA+D,EAEpF,OAAW,CAACG,EAAQC,CAAO,IAAK,OAAO,QAAQF,CAAY,EAAG,CAC1D,IAAMG,EAAMJ,EAAcE,GAAU,CAAC,EACrC,OAAW,CAACG,EAAYC,CAAM,IAAK,OAAO,QAAQH,CAAO,EACrDC,EAAIC,GAAc,IAAIP,IAAgBF,EAAOU,EAAqB,GAAGR,CAAI,CAEjF,CAEA,IAAOS,EAAQ,CACX,OAAQ,CACJ,YAAa,CAACC,EAAkBC,IAAqBb,uBAAqCY,EAAUC,CAAQ,EAC5G,YAAcD,GAAqBZ,uBAAqCY,CAAQ,EAChF,aAAc,IAAMZ,uBAAuC,EAC3D,cAAe,IAAMA,wBAAwD,EAC7E,aAAeY,GAAqBZ,wBAAqDY,CAAQ,EACjG,gBAAiB,IAAMZ,+BAAgE,CAC3F,EAEA,QAAS,CACL,WAAY,IAAMA,qBAAqF,EACvG,OAAQ,IAAMA,iBAAwC,EACtD,QAAS,IAAMA,gBAAuC,EACtD,QAAS,IAAMA,kBAAyC,CAC5D,EAEA,SAAU,CACN,IAAK,IAAMG,sBAAyC,EACpD,IAAK,CAACW,EAAoBC,IAA0Bf,uBAAqCc,EAAUC,CAAY,EAC/G,eAAgB,IAAMf,yBAAyC,CACnE,EAEA,SAAU,CACN,IAAK,IAAMA,sBAAsC,EACjD,IAAMgB,GAAgBhB,uBAAsCgB,CAAG,EAE/D,kBAAkBC,EAA8B,CAC5C,cAAY,2BAA+B,CAACC,EAAGF,IAAQC,EAAGD,CAAG,CAAC,CAClE,EAEA,uBAAuBC,EAAgB,CACnC,cAAY,wBAA2B,IAAMA,EAAG,CAAC,CACrD,EAEA,SAAU,IAAMjB,uBAAoC,EACpD,WAAY,IAAMA,2BAAyC,CAC/D,EAEA,OAAQ,CACJ,YAAa,IAAM,QAAQ,SAC3B,aAAemB,GAAgBnB,wBAAsCmB,CAAG,CAC5E,EAEA,cAAef,CACnB,EDnDA,gBAAc,kBAAkB,gBAAiBgB,CAAa,EAG9D,GAAI,SAAS,WAAa,QAAS,CAE/B,IAAMC,KAAc,QAAK,UAAwB,4BAA6C,EAExFC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,GAAK,mBACXA,EAAM,eAAc,gBAAaD,EAAa,OAAO,EAEjD,SAAS,aAAe,WACxB,SAAS,gBAAgB,YAAYC,CAAK,EAE1C,SAAS,iBAAiB,mBAAoB,IAAM,SAAS,gBAAgB,YAAYA,CAAK,EAAG,CAC7F,KAAM,EACV,CAAC,CAgBT,MAEI,gBAAc,kBAAkB,SAAUC,EAASH,EAAc,SAAS,GAAG,CAAC,EAC9E,gBAAc,kBAAkB,gBAAiBA,EAAc,SAAS,GAAG,EAE3E,gBAAc,kBAAkB,WAAY,IAAM,SAAS",
+ "names": ["debounce", "func", "delay", "timeout", "args", "import_electron", "import_fs", "import_path", "import_electron", "invoke", "event", "args", "sendSync", "PluginHelpers", "pluginIpcMap", "plugin", "methods", "map", "methodName", "method", "VencordNative_default", "fileName", "fileData", "settings", "pathToNotify", "css", "cb", "_", "url", "VencordNative_default", "rendererCss", "style", "debounce"]
}
diff --git a/vesktop/vencordDist/vencordDesktopRenderer.css b/vesktop/vencordDist/vencordDesktopRenderer.css
index 70353f1..c916f18 100644
--- a/vesktop/vencordDist/vencordDesktopRenderer.css
+++ b/vesktop/vencordDist/vencordDesktopRenderer.css
@@ -1 +1 @@
-.vc-error-card{padding:2em;background-color:#e7828430;border:1px solid #e78284;border-radius:5px;color:var(--text-normal, white)}.vc-notification-root{all:unset;display:flex;flex-direction:column;color:var(--text-normal);background-color:var(--background-secondary-alt);border-radius:6px;overflow:hidden;cursor:pointer;width:100%}.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root){position:absolute;z-index:2147483647;right:1rem;width:25vw;min-height:10vh}.vc-notification{display:flex;flex-direction:row;padding:1.25rem;gap:1.25rem}.vc-notification-content{width:100%}.vc-notification-header{display:flex;justify-content:space-between}.vc-notification-title{color:var(--header-primary);font-size:1rem;font-weight:600;line-height:1.25rem;text-transform:uppercase}.vc-notification-close-btn{all:unset;cursor:pointer;color:var(--interactive-normal);opacity:.5;transition:opacity .2s ease-in-out,color .2s ease-in-out}.vc-notification-close-btn:hover{color:var(--interactive-hover);opacity:1}.vc-notification-icon{height:4rem;width:4rem;border-radius:6px}.vc-notification-progressbar{height:.25rem;border-radius:5px;margin-top:auto}.vc-notification-p{margin:.5rem 0 0;line-height:140%}.vc-notification-img{width:100%}.vc-notification-log-empty{height:218px;background:url(/assets/b36de980b174d7b798c89f35c116e5c6.svg) center no-repeat;margin-bottom:40px}.vc-notification-log-container{display:flex;flex-direction:column;padding:1em;overflow:hidden}.vc-notification-log-wrapper{transition:.2s ease;transition-property:height,opacity}.vc-notification-log-wrapper:not(:last-child){margin-bottom:1em}.vc-notification-log-removing{height:0!important;opacity:0;margin-bottom:1em}.vc-notification-log-body{display:flex;flex-direction:column}.vc-notification-log-timestamp{margin-left:auto;font-size:.8em;font-weight:lighter}.vc-notification-log-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-settings-tab-bar{margin-top:20px;margin-bottom:10px;border-bottom:2px solid var(--background-modifier-accent)}.vc-settings-tab-bar-item{margin-right:32px;padding-bottom:16px;margin-bottom:-2px}.vc-settings-quick-actions-card{padding:1em;display:flex;gap:1em;align-items:center;justify-content:space-evenly;flex-grow:1;flex-flow:row wrap;margin-bottom:1em}.vc-settings-donate{display:flex;flex-direction:row}.vc-settings-card{padding:1em;margin-bottom:1em}.vc-backup-restore-card{background-color:var(--info-warning-background);border-color:var(--info-warning-foreground);color:var(--info-warning-text)}.vc-settings-theme-links{display:inline-block!important;color:var(--text-normal)!important;padding:.5em;border:1px solid var(--background-modifier-accent);max-height:unset}.vc-cloud-settings-sync-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1em}.vc-cloud-erase-data-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-text-selectable,.vc-text-selectable :where([class*="text" i],[class*="title" i]){user-select:text;cursor:initial}.vc-settings-theme-grid{display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-settings-theme-card{display:flex;flex-direction:column;background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;padding:1em;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity}.vc-settings-theme-card-text{text-overflow:ellipsis;height:1.2em;margin-bottom:2px;white-space:nowrap;overflow:hidden}.vc-settings-theme-author:before{content:"by "}.vc-plugins-grid{margin-top:16px;display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-plugins-info-button{height:24px;width:24px;padding:0;background:transparent;margin-right:8px}.vc-plugins-settings-button:hover{color:var(--interactive-hover)}.vc-plugins-filter-controls{display:grid;height:40px;gap:10px;grid-template-columns:1fr 150px}.vc-plugins-badge{padding:0 6px;font-family:var(--font-display);font-weight:500;border-radius:8px;height:16px;font-size:12px;line-height:16px;color:var(--white-500);text-align:center}.vc-plugins-dep-name{margin:0 auto}.vc-plugins-info-card{padding:1em;height:8em;display:flex;flex-direction:column}.vc-plugins-info-card div{line-height:32px}.vc-plugins-restart-card{padding:1em;background:var(--info-warning-background);border:1px solid var(--info-warning-foreground);color:var(--info-warning-text)}.vc-plugins-restart-card button{margin-top:.5em}.vc-plugins-info-button svg:not(:hover,:focus){color:var(--text-muted)}.vc-open-external-icon{transform:rotate(45deg)}.vc-owner-crown-icon{color:var(--text-warning)}.vc-author-modal-root{padding:1em}.vc-author-modal-header{display:flex;align-items:center;margin-bottom:1em}.vc-author-modal-name{text-transform:none;flex-grow:0;background:var(--background-tertiary);border-radius:0 9999px 9999px 0;padding:6px .8em 6px .5em;font-size:20px;height:20px;position:relative;text-wrap:nowrap}.vc-author-modal-name:before{content:"";display:block;position:absolute;height:100%;width:16px;background:var(--background-tertiary);z-index:-1;left:-16px;top:0}.vc-author-modal-avatar{height:32px;width:32px;border-radius:50%}.vc-author-modal-links{margin-left:auto;display:flex;gap:.2em}.vc-author-modal-links img{height:32px;width:32px;border-radius:50%;border:4px solid var(--background-tertiary);box-sizing:border-box}.vc-author-modal-plugins{display:grid;gap:.5em}.vc-addon-card{background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;display:block;height:100%;padding:12px;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity;box-sizing:border-box}.vc-addon-card-disabled{opacity:.6}.vc-addon-card:hover{background-color:var(--background-tertiary);transform:translateY(-1px);box-shadow:var(--elevation-high)}.vc-addon-header{margin-top:auto;display:flex;width:100%;justify-content:flex-end;align-items:center;gap:8px;margin-bottom:.5em}.vc-addon-note{height:36px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;box-orient:vertical}.vc-addon-name-author{width:100%}.vc-addon-name{display:flex;width:100%;align-items:center;flex-grow:1;gap:8px}.vc-addon-author{font-size:.8em}.vc-addon-author:before{content:"by "}.vc-switch-slider{transition:.1s transform ease-in-out}.client-theme-settings{display:flex;flex-direction:column}.client-theme-container{display:flex;flex-direction:row;justify-content:space-between}.client-theme-settings-labels{display:flex;flex-direction:column;justify-content:flex-start}.client-theme-container>[class^=colorSwatch]>[class^=swatch]{border:thin solid var(--background-modifier-accent)!important}.client-theme-warning{color:var(--text-danger)}.vc-dearrow-toggle-off svg{filter:grayscale(1)}.vc-dearrow-toggle-on,.vc-dearrow-toggle-off{all:unset;display:inline;cursor:pointer;position:absolute;top:.75rem;right:.75rem}.vc-decor-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-decor-change-decoration-modal-content{position:relative;display:flex;border-radius:5px 5px 0 0;padding:0 16px;gap:4px}.vc-decor-change-decoration-modal-preview{display:flex;flex-direction:column;margin-top:24px;gap:8px;max-width:280px}.vc-decor-change-decoration-modal-decoration{width:80px;height:80px}.vc-decor-change-decoration-modal-footer{justify-content:space-between}.vc-decor-change-decoration-modal-footer-btn-container{display:flex;flex-direction:row-reverse}.vc-decor-create-decoration-modal-content{display:flex;flex-direction:column;gap:20px;padding:0 16px}.vc-decor-create-decoration-modal-form-preview-container{display:flex;gap:16px}.vc-decor-modal-header,.vc-decor-modal-footer{padding:16px}.vc-decor-create-decoration-modal-form{display:flex;flex-direction:column;flex-grow:1;gap:16px}.vc-decor-sectioned-grid-list-container{display:flex;flex-direction:column;overflow:hidden scroll;max-height:512px;width:352px;gap:12px}.vc-decor-sectioned-grid-list-grid{display:flex;flex-wrap:wrap;gap:8px}.vc-decor-section-remove-margin{margin-bottom:0}.messagelogger-deleted [class^=buttons]{display:none}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]){filter:grayscale(1)!important;transition:.15s filter ease-in-out}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]):hover,.messagelogger-deleted{filter:grayscale(0)!important}.theme-dark .messagelogger-edited{filter:brightness(80%)}.theme-light .messagelogger-edited{opacity:.5}.vc-permviewer-userperms-title-container{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-bottom:6px}.vc-permviewer-userperms-btns-container{display:flex;align-items:center}.vc-permviewer-userperms-sortorder-btn{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px}.vc-permviewer-userperms-permdetails-btn,.vc-permviewer-userperms-toggleperms-btn{all:unset;cursor:pointer;display:flex;align-items:center}.vc-permviewer-perms-title{flex-grow:1}.vc-permviewer-perms-no-perms{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.vc-permviewer-perms-container{display:grid;grid-template-columns:1fr 2fr;grid-template-areas:"list permissions";padding:16px 0}.vc-permviewer-perms-list{grid-area:list;display:flex;flex-direction:column;gap:2px;border-right:2px solid var(--background-modifier-active)}.vc-permviewer-perms-list-item-btn{all:unset;cursor:pointer}.vc-permviewer-perms-list-item{display:flex;align-items:center;padding:8px 5px;cursor:pointer;width:230px;border-radius:5px}.vc-permviewer-perms-list-item:hover{background-color:var(--background-modifier-hover)}.vc-permviewer-perms-list-item-active{background-color:var(--background-modifier-selected)}.vc-permviewer-perms-list-item>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.vc-permviewer-perms-role-circle{border-radius:50%;width:12px;height:12px;margin-left:3px;margin-right:11px;flex-shrink:0}.vc-permviewer-perms-user-img{border-radius:50%;width:20px;height:20px;margin-right:6px}.vc-permviewer-perms-perms{grid-area:permissions;display:flex;flex-direction:column;margin-left:5px}.vc-permviewer-perms-perms-item{position:relative;display:flex;align-items:center;padding:10px;border-bottom:2px solid var(--background-modifier-active)}.vc-permviewer-perms-perms-item:last-child{border:0}.vc-permviewer-perms-perms-item-icon{border:1px solid var(--background-modifier-selected);width:24px;height:24px;margin-right:5px}.vc-permviewer-perms-perms-item .vc-info-icon{color:var(--interactive-muted);cursor:pointer;position:absolute;right:0;scale:.9;transition:color ease-in .1s}.vc-permviewer-perms-perms-item .vc-info-icon:hover{color:var(--interactive-active)}.vc-expandableheader-center-flex{display:flex;justify-items:center;align-items:center}.vc-expandableheader-btn{all:unset;cursor:pointer;width:24px;height:24px}.vc-pip-button{color:var(--interactive-normal)}.vc-pip-button:hover{background-color:var(--background-modifier-hover);color:var(--interactive-hover)}.vc-pronoundb-compact{display:none}[class*=compact] .vc-pronoundb-compact{display:inline-block;margin-left:-2px;margin-right:.25rem}.vc-st-modal-content input{background-color:var(--input-background);color:var(--text-normal);width:95%;padding:8px 8px 8px 12px;margin:1em 0;outline:none;border:1px solid var(--input-background);border-radius:4px;font-weight:500;font-style:inherit;font-size:100%}.vc-st-format-label,.vc-st-format-label span{background-color:transparent}.vc-st-modal-content [class|=select]{margin-bottom:1em}.vc-st-modal-content [class|=select] span{background-color:var(--input-background)}.vc-st-modal-header{justify-content:space-between;align-content:center}.vc-st-modal-header h1{margin:0}.vc-st-modal-header button{padding:0}.vc-st-preview-text{margin-bottom:1em}.vc-st-button{padding:0 6px}.vc-st-button svg{transform:scale(1.1) translateY(1px)}.vc-gp-root{height:100%;user-select:text}.vc-gp-banner{width:100%;cursor:pointer}.vc-gp-header{display:flex;flex-direction:row;align-items:center;gap:.5em;margin:.5em}.vc-gp-header img{width:48px;height:48px;cursor:pointer}.vc-gp-name-and-description{display:flex;flex-direction:column;gap:.2em}.vc-gp-name{margin:0}.vc-gp-tab-bar{border-bottom:2px solid var(--background-modifier-accent);margin:20px 12px 0;display:flex;gap:40px;align-items:stretch;flex-direction:row}.vc-gp-tab{border-bottom:2px solid transparent;color:var(--interactive-normal);cursor:pointer;height:39px;line-height:14px}.vc-gp-tab-content{margin:1em}.vc-gp-tab:where(.vc-gp-selected,:hover,:focus){border-bottom-color:var(--interactive-active)}.vc-gp-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1em}.vc-gp-server-info-pair{color:var(--text-normal)}.vc-gp-server-info-pair [class^=timestamp]{margin-left:0}.vc-gp-owner{display:flex;align-items:center;gap:.2em}.vc-gp-owner img{height:20px;border-radius:50%;cursor:pointer}.vc-gp-scroller{width:100%;max-height:500px}.vc-gp-scroller [class^=listRow]{margin:1px 0}.vc-gp-scroller [class^=listRow]:hover{background-color:var(--background-modifier-hover)}.shiki-container{border:4px;background-color:var(--background-secondary)}.shiki-root{border-radius:4px}.shiki-root code{display:block;overflow-x:auto;padding:.5em;position:relative;font-size:.875rem;line-height:1.125rem;text-indent:0;white-space:pre-wrap;background:transparent;border:none}.shiki-devicon{margin-right:8px;user-select:none}.shiki-plain code{padding-top:8px}.shiki-btns{font-size:1em;position:absolute;right:0;bottom:0;opacity:0}.shiki-root:hover .shiki-btns{opacity:1}.shiki-btn{border-radius:4px 4px 0 0;padding:4px 8px;user-select:none}.shiki-btn~.shiki-btn{margin-left:4px}.shiki-btn:last-child{border-radius:4px 0}.shiki-spinner-container{align-items:center;background-color:#0009;display:flex;position:absolute;justify-content:center;inset:0}.shiki-preview{margin-bottom:2em}.shiki-lang{padding:0 5px;margin-bottom:6px;font-weight:700;text-transform:capitalize;display:flex;align-items:center}.shiki-table{border-collapse:collapse;width:100%}.shiki-table tr{height:19px;width:100%}.shiki-root td:first-child{border-right:1px solid transparent;padding-left:5px;padding-right:8px;user-select:none}.shiki-root td:last-child{padding-left:8px;word-break:break-word;width:100%}.vc-user-connection{all:unset;display:inline-block;cursor:pointer}.vc-sc-tooltip{display:inline-flex;gap:.25em;align-items:center}.shc-lock-screen-outer-container{overflow:hidden scroll;flex:1 1 auto;height:100%;width:100%}.shc-lock-screen-container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:100%}.shc-lock-screen-container>*{margin:5px}.shc-lock-screen-logo{width:180px;height:180px}.shc-lock-screen-heading-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-heading-container>*{margin:inherit}.shc-lock-screen-heading-nsfw-icon{color:var(--text-normal)}.shc-lock-screen-topic-container{color:var(--text-normal);background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container{background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container>*{margin:inherit}.shc-lock-screen-tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}.shc-evenodd-fill-current-color{fill-rule:evenodd;fill:currentcolor}.shc-hidden-channel-icon{margin-left:6px;z-index:0;cursor:not-allowed}.shc-lock-screen-default-emoji-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-default-emoji-container>[class^=emojiContainer]{background:var(--bg-overlay-3, var(--background-secondary));border-radius:8px;padding:5px 6px;margin-left:5px}.shc-lock-screen-allowed-users-and-roles-container{display:flex;flex-direction:column;align-items:center;background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-allowed-users-and-roles-container-title{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn{all:unset;margin-left:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn{all:unset;margin-right:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container>[class^=members]{margin-left:10px;flex-wrap:wrap;justify-content:center}.vc-smyn-suffix{color:var(--text-muted)}.vc-smyn-suffix:before{content:"("}.vc-smyn-suffix:after{content:")"}#vc-spotify-player{padding:.375rem .5rem;border-bottom:1px solid var(--background-modifier-accent);--vc-spotify-green: #1db954}.theme-light #vc-spotify-player{background:var(--bg-overlay-3, var(--background-secondary-alt))}.theme-dark #vc-spotify-player{background:var(--bg-overlay-1, var(--background-secondary-alt))}.vc-spotify-button{background:none;color:var(--interactive-normal);padding:0;width:32px;height:32px;border-radius:100%;display:flex;justify-content:center;align-items:center}.vc-spotify-button:hover{color:var(--interactive-hover);background-color:var(--background-modifier-selected)}.vc-spotify-button svg{height:24px;width:24px}[class*=vc-spotify-shuffle]>svg,[class*=vc-spotify-repeat]>svg{width:22px;height:22px}.vc-spotify-button svg path{width:100%;height:100%}.vc-spotify-shuffle-on,.vc-spotify-repeat-context,.vc-spotify-repeat-track,.vc-spotify-shuffle-on:hover,.vc-spotify-repeat-context:hover,.vc-spotify-repeat-track:hover{color:var(--vc-spotify-green)}.vc-spotify-tooltip-text{overflow:hidden;white-space:nowrap;padding-right:.2em;max-width:100%;margin:unset}.vc-spotify-repeat-1{font-size:70%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vc-spotify-button-row{justify-content:center}#vc-spotify-info-wrapper{display:flex;flex-direction:row;align-items:center;height:3em;gap:.5em}#vc-spotify-info-wrapper img{height:90%;object-fit:contain}#vc-spotify-album-expanded-wrapper img{width:100%;object-fit:contain}#vc-spotify-titles{display:flex;flex-direction:column;padding:.2rem;justify-content:center;align-items:flex-start;align-content:flex-start;overflow:hidden}#vc-spotify-song-title{color:var(--header-primary);font-size:14px;font-weight:600}.vc-spotify-ellipoverflow{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.vc-spotify-artist,.vc-spotify-album{font-size:12px;text-decoration:none;color:var(--header-secondary)}.vc-spotify-comma{color:var(--header-secondary)}.vc-spotify-artist[role=link]:hover,#vc-spotify-album-title[role=link]:hover,#vc-spotify-song-title[role=link]:hover{text-decoration:underline;cursor:pointer}#vc-spotify-album-image{border-radius:3px;transition:filter .2s}#vc-spotify-album-image:hover{filter:brightness(1.2);cursor:pointer}#vc-spotify-progress-bar{position:relative;color:var(--text-normal);width:100%;margin:.5em 0 5px}#vc-spotify-progress-bar>[class^=slider]{flex-grow:1;width:100%;padding:0!important}#vc-spotify-progress-bar>[class^=slider] [class^=bar-]{height:4px!important}#vc-spotify-progress-bar>[class^=slider] [class^=grabber]{height:10px!important;width:10px!important;background-color:var(--interactive-normal);border-color:var(--interactive-normal);color:var(--interactive-normal)}#vc-spotify-progress-text{margin:0}.vc-spotify-progress-time{font-size:12px;top:10px;position:absolute}.vc-spotify-time-left{left:0}.vc-spotify-time-right{right:0}.vc-spotify-fallback{padding:.5em;color:var(--text-normal)}.vc-trans-modal-content{padding:1em}.vc-trans-modal-header{justify-content:space-between;align-content:center}.vc-trans-modal-header h1{margin:0}.vc-trans-accessory{color:var(--text-muted);margin-top:.5em;font-style:italic;font-weight:400}.vc-trans-accessory svg{margin-right:.25em}.vc-trans-dismiss{all:unset;cursor:pointer;color:var(--text-link)}.vc-trans-dismiss:is(:hover,:focus){text-decoration:underline}.vc-trans-auto-translate{color:var(--green-360)}.vc-uvs-button>div{white-space:normal!important}.vc-uvs-button{width:100%;margin:auto;height:unset}.vc-uvs-header{color:var(--header-primary);margin-bottom:6px}.vc-uvs-modal-margin{margin:0 12px}.vc-uvs-modal-margin div{margin-bottom:0!important}.vc-uvs-popout-margin-self>[class^=section]{padding-top:0;padding-bottom:12px}.vc-toolbox-btn,.vc-toolbox-btn>svg{-webkit-app-region:no-drag}.vc-toolbox-btn>svg{color:var(--interactive-normal)}.vc-toolbox-btn[class*=selected]>svg{color:var(--interactive-active)}.vc-toolbox-btn:hover>svg{color:var(--interactive-hover)}.vc-vmsg-modal{padding:1em}.vc-vmsg-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5em;margin-bottom:1em}.vc-vmsg-modal audio{width:100%}.vc-vmsg-preview{color:var(--text-normal);border-radius:24px;background-color:var(--background-secondary);position:relative;display:flex;align-items:center;padding:0 16px;height:48px}.vc-vmsg-preview-indicator{background:var(--button-secondary-background);width:16px;height:16px;border-radius:50%;transition:background .2s ease-in-out}.vc-vmsg-preview-recording .vc-vmsg-preview-indicator{background:var(--status-danger)}.vc-vmsg-preview-time{opacity:.8;margin:0 .5em;font-size:80%;font-family:var(--font-code)}.vc-vmsg-preview-label{opacity:.5;letter-spacing:.125em;font-weight:600;flex:1;text-align:center}
+.vc-error-card{padding:2em;background-color:#e7828430;border:1px solid #e78284;border-radius:5px;color:var(--text-normal, white)}.vc-notification-root{all:unset;display:flex;flex-direction:column;color:var(--text-normal);background-color:var(--background-secondary-alt);border-radius:6px;overflow:hidden;cursor:pointer;width:100%}.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root){position:absolute;z-index:2147483647;right:1rem;width:25vw;min-height:10vh}.vc-notification{display:flex;flex-direction:row;padding:1.25rem;gap:1.25rem}.vc-notification-content{width:100%}.vc-notification-header{display:flex;justify-content:space-between}.vc-notification-title{color:var(--header-primary);font-size:1rem;font-weight:600;line-height:1.25rem;text-transform:uppercase}.vc-notification-close-btn{all:unset;cursor:pointer;color:var(--interactive-normal);opacity:.5;transition:opacity .2s ease-in-out,color .2s ease-in-out}.vc-notification-close-btn:hover{color:var(--interactive-hover);opacity:1}.vc-notification-icon{height:4rem;width:4rem;border-radius:6px}.vc-notification-progressbar{height:.25rem;border-radius:5px;margin-top:auto}.vc-notification-p{margin:.5rem 0 0;line-height:140%}.vc-notification-img{width:100%}.vc-notification-log-empty{height:218px;background:url(/assets/b36de980b174d7b798c89f35c116e5c6.svg) center no-repeat;margin-bottom:40px}.vc-notification-log-container{display:flex;flex-direction:column;padding:1em;overflow:hidden}.vc-notification-log-wrapper{transition:.2s ease;transition-property:height,opacity}.vc-notification-log-wrapper:not(:last-child){margin-bottom:1em}.vc-notification-log-removing{height:0!important;opacity:0;margin-bottom:1em}.vc-notification-log-body{display:flex;flex-direction:column}.vc-notification-log-timestamp{margin-left:auto;font-size:.8em;font-weight:lighter}.vc-notification-log-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-settings-tab-bar{margin-top:20px;margin-bottom:10px;border-bottom:2px solid var(--background-modifier-accent)}.vc-settings-tab-bar-item{margin-right:32px;padding-bottom:16px;margin-bottom:-2px}.vc-settings-quick-actions-card{padding:1em;display:flex;gap:1em;align-items:center;justify-content:space-evenly;flex-grow:1;flex-flow:row wrap;margin-bottom:1em}.vc-settings-donate{display:flex;flex-direction:row}.vc-settings-card{padding:1em;margin-bottom:1em}.vc-backup-restore-card{background-color:var(--info-warning-background);border-color:var(--info-warning-foreground);color:var(--info-warning-text)}.vc-settings-theme-links{display:inline-block!important;color:var(--text-normal)!important;padding:.5em;border:1px solid var(--background-modifier-accent);max-height:unset}.vc-cloud-settings-sync-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:1em}.vc-cloud-erase-data-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-text-selectable,.vc-text-selectable :where([class*="text" i],[class*="title" i]){user-select:text;cursor:initial}.vc-settings-theme-grid{display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-settings-theme-card{display:flex;flex-direction:column;background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;padding:1em;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity}.vc-settings-theme-card-text{text-overflow:ellipsis;height:1.2em;margin-bottom:2px;white-space:nowrap;overflow:hidden}.vc-settings-theme-author:before{content:"by "}.vc-plugins-grid{margin-top:16px;display:grid;grid-gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.vc-plugins-info-button{height:24px;width:24px;padding:0;background:transparent;margin-right:8px}.vc-plugins-settings-button:hover{color:var(--interactive-hover)}.vc-plugins-filter-controls{display:grid;height:40px;gap:10px;grid-template-columns:1fr 150px}.vc-plugins-badge{padding:0 6px;font-family:var(--font-display);font-weight:500;border-radius:8px;height:16px;font-size:12px;line-height:16px;color:var(--white-500);text-align:center}.vc-plugins-dep-name{margin:0 auto}.vc-plugins-info-card{padding:1em;height:8em;display:flex;flex-direction:column}.vc-plugins-info-card div{line-height:32px}.vc-plugins-restart-card{padding:1em;background:var(--info-warning-background);border:1px solid var(--info-warning-foreground);color:var(--info-warning-text)}.vc-plugins-restart-card button{margin-top:.5em}.vc-plugins-info-button svg:not(:hover,:focus){color:var(--text-muted)}.vc-open-external-icon{transform:rotate(45deg)}.vc-owner-crown-icon{color:var(--text-warning)}.vc-author-modal-root{padding:1em}.vc-author-modal-header{display:flex;align-items:center;margin-bottom:1em}.vc-author-modal-name{text-transform:none;flex-grow:0;background:var(--background-tertiary);border-radius:0 9999px 9999px 0;padding:6px .8em 6px .5em;font-size:20px;height:20px;position:relative;text-wrap:nowrap}.vc-author-modal-name:before{content:"";display:block;position:absolute;height:100%;width:16px;background:var(--background-tertiary);z-index:-1;left:-16px;top:0}.vc-author-modal-avatar{height:32px;width:32px;border-radius:50%}.vc-author-modal-links{margin-left:auto;display:flex;gap:.2em}.vc-author-modal-links img{height:32px;width:32px;border-radius:50%;border:4px solid var(--background-tertiary);box-sizing:border-box}.vc-author-modal-plugins{display:grid;gap:.5em}.vc-addon-card{background-color:var(--background-secondary-alt);color:var(--interactive-active);border-radius:8px;display:block;height:100%;padding:12px;width:100%;transition:.1s ease-out;transition-property:box-shadow,transform,background,opacity;box-sizing:border-box}.vc-addon-card-disabled{opacity:.6}.vc-addon-card:hover{background-color:var(--background-tertiary);transform:translateY(-1px);box-shadow:var(--elevation-high)}.vc-addon-header{margin-top:auto;display:flex;width:100%;justify-content:flex-end;align-items:center;gap:8px;margin-bottom:.5em}.vc-addon-note{height:36px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;box-orient:vertical}.vc-addon-name-author{width:100%}.vc-addon-name{display:flex;width:100%;align-items:center;flex-grow:1;gap:8px}.vc-addon-author{font-size:.8em}.vc-addon-author:before{content:"by "}.vc-switch-slider{transition:.1s transform ease-in-out}.client-theme-settings{display:flex;flex-direction:column}.client-theme-container{display:flex;flex-direction:row;justify-content:space-between}.client-theme-settings-labels{display:flex;flex-direction:column;justify-content:flex-start}.client-theme-container>[class^=colorSwatch]>[class^=swatch]{border:thin solid var(--background-modifier-accent)!important}.client-theme-warning *{color:var(--text-danger)}.client-theme-contrast-warning{background-color:var(--background-primary);padding:.5rem;border-radius:.5rem;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.vc-dearrow-toggle-off svg{filter:grayscale(1)}.vc-dearrow-toggle-on,.vc-dearrow-toggle-off{all:unset;display:inline;cursor:pointer;position:absolute;top:.75rem;right:.75rem}.vc-decor-danger-btn{color:var(--white-500);background-color:var(--button-danger-background)}.vc-decor-change-decoration-modal-content{position:relative;display:flex;border-radius:5px 5px 0 0;padding:0 16px;gap:4px}.vc-decor-change-decoration-modal-preview{display:flex;flex-direction:column;margin-top:24px;gap:8px;max-width:280px}.vc-decor-change-decoration-modal-decoration{width:80px;height:80px}.vc-decor-change-decoration-modal-footer{justify-content:space-between}.vc-decor-change-decoration-modal-footer-btn-container{display:flex;flex-direction:row-reverse}.vc-decor-create-decoration-modal-content{display:flex;flex-direction:column;gap:20px;padding:0 16px}.vc-decor-create-decoration-modal-form-preview-container{display:flex;gap:16px}.vc-decor-modal-header,.vc-decor-modal-footer{padding:16px}.vc-decor-create-decoration-modal-form{display:flex;flex-direction:column;flex-grow:1;gap:16px}.vc-decor-sectioned-grid-list-container{display:flex;flex-direction:column;overflow:hidden scroll;max-height:512px;width:352px;gap:12px}.vc-decor-sectioned-grid-list-grid{display:flex;flex-wrap:wrap;gap:8px}.vc-decor-section-remove-margin{margin-bottom:0}.vc-chatbar-button{display:flex;align-items:center}.vc-membercount-widget{display:flex;align-content:center;--color-online: var(--green-360);--color-total: var(--primary-400)}.vc-membercount-tooltip{margin-top:.25em;margin-left:2px}.vc-membercount-member-list{justify-content:center;margin-top:1em;padding-inline:1em}.vc-membercount-online{color:var(--color-online)}.vc-membercount-total{color:var(--color-total)}.vc-membercount-online-dot{background-color:var(--color-online);display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:.5em}.vc-membercount-total-dot{display:inline-block;width:6px;height:6px;border-radius:50%;border:3px solid var(--color-total);margin:0 .5em 0 1em}.messagelogger-deleted [class^=buttons]{display:none}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]){filter:grayscale(1)!important;transition:.15s filter ease-in-out}.messagelogger-deleted :is(video,.emoji,[data-type="sticker"],iframe,.messagelogger-deleted-attachment,[class|="inlineMediaEmbed"]):hover,.messagelogger-deleted{filter:grayscale(0)!important}.theme-dark .messagelogger-edited{filter:brightness(80%)}.theme-light .messagelogger-edited{opacity:.5}.vc-permviewer-userperms-title-container{display:flex;justify-content:space-between;align-items:center;margin-top:10px;margin-bottom:6px}.vc-permviewer-userperms-btns-container{display:flex;align-items:center}.vc-permviewer-userperms-sortorder-btn{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px}.vc-permviewer-userperms-permdetails-btn,.vc-permviewer-userperms-toggleperms-btn{all:unset;cursor:pointer;display:flex;align-items:center}.vc-permviewer-perms-title{flex-grow:1}.vc-permviewer-perms-no-perms{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center}.vc-permviewer-perms-container{display:grid;grid-template-columns:1fr 2fr;grid-template-areas:"list permissions";padding:16px 0}.vc-permviewer-perms-list{grid-area:list;display:flex;flex-direction:column;gap:2px;border-right:2px solid var(--background-modifier-active)}.vc-permviewer-perms-list-item-btn{all:unset;cursor:pointer}.vc-permviewer-perms-list-item{display:flex;align-items:center;padding:8px 5px;cursor:pointer;width:230px;border-radius:5px}.vc-permviewer-perms-list-item:hover{background-color:var(--background-modifier-hover)}.vc-permviewer-perms-list-item-active{background-color:var(--background-modifier-selected)}.vc-permviewer-perms-list-item>div{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.vc-permviewer-perms-role-circle{border-radius:50%;width:12px;height:12px;margin-left:3px;margin-right:11px;flex-shrink:0}.vc-permviewer-perms-user-img{border-radius:50%;width:20px;height:20px;margin-right:6px}.vc-permviewer-perms-perms{grid-area:permissions;display:flex;flex-direction:column;margin-left:5px}.vc-permviewer-perms-perms-item{position:relative;display:flex;align-items:center;padding:10px;border-bottom:2px solid var(--background-modifier-active)}.vc-permviewer-perms-perms-item:last-child{border:0}.vc-permviewer-perms-perms-item-icon{border:1px solid var(--background-modifier-selected);width:24px;height:24px;margin-right:5px}.vc-permviewer-perms-perms-item .vc-info-icon{color:var(--interactive-muted);cursor:pointer;position:absolute;right:0;scale:.9;transition:color ease-in .1s}.vc-permviewer-perms-perms-item .vc-info-icon:hover{color:var(--interactive-active)}.vc-expandableheader-center-flex{display:flex;justify-items:center;align-items:center}.vc-expandableheader-btn{all:unset;cursor:pointer;width:24px;height:24px}.vc-pip-button{color:var(--interactive-normal)}.vc-pip-button:hover{background-color:var(--background-modifier-hover);color:var(--interactive-hover)}.vc-pindms-section-container{box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-transform:uppercase;font-size:12px;line-height:16px;letter-spacing:.02em;font-family:var(--font-display);font-weight:600;flex:1 1 auto;color:var(--channels-default);cursor:pointer}.vc-pindms-modal-content{display:grid;justify-content:center;padding:1rem;gap:1.5rem}.vc-pindms-modal-content [class^=defaultContainer]{display:none}.vc-pindms-collapse-icon{width:16px;height:16px;color:var(--interactive-normal);transform:rotate(90deg)}.vc-pindms-collapsed .vc-pindms-collapse-icon{transform:rotate(0)}.vc-pronoundb-compact{display:none}[class*=compact] .vc-pronoundb-compact{display:inline-block;margin-left:-2px;margin-right:.25rem}[class|=section]:not([class|="lastSection"])+.vc-rdb-view{margin-top:12px}.vc-rdb-badge{vertical-align:middle;margin-left:4px}.vc-rdb-input{margin-top:6px;margin-bottom:12px;resize:none;overflow:hidden;background:transparent;border:1px solid var(--profile-message-input-border-color)}.vc-rdb-modal-footer>div{width:100%;margin:6px 16px}.vc-rdb-input>div>div{padding-left:0!important}.vc-rdb-placeholder{margin-bottom:4px;font-weight:700;font-style:italic;color:var(--text-muted)}.vc-rdb-input *{font-size:14px}.vc-rdb-modal-footer{padding:0}.vc-rdb-modal-footer .vc-rdb-input{margin-bottom:0;background:var(--input-background)}.vc-rdb-modal-footer [class|=pageControlContainer]{margin-top:0}.vc-rdb-modal-header{flex-grow:1}.vc-rdb-modal-reviews{margin-top:16px}.vc-rdb-review{padding-top:8px!important;padding-bottom:8px!important;padding-right:32px!important}.vc-rdb-review:hover{background:var(--background-message-hover)!important;border-radius:8px}.vc-rdb-review-comment img{vertical-align:text-top}.vc-rdb-review-comment{overflow-y:hidden;margin-top:1px;margin-bottom:8px;color:var(--text-normal);font-size:15px}.vc-rdb-blocked-badge{cursor:pointer}.vc-rdb-block-modal-header{display:flex;justify-content:space-between;align-items:center}.vc-rdb-block-modal{padding:1em;display:grid;gap:.75em}.vc-rdb-button-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media (max-width: 600px){.vc-rdb-button-grid{grid-template-columns:1fr}}.vc-rdb-block-modal-row{display:flex;height:2em;gap:.5em;align-items:center}.vc-rdb-block-modal-row img{border-radius:50%;height:2em;width:2em}.vc-rdb-block-modal img:before{content:"";display:block;width:100%;height:100%;background-color:var(--background-modifier-accent)}.vc-rdb-block-modal-username{flex-grow:1}.vc-rdb-block-modal-unblock{cursor:pointer}.vc-st-modal-content input{background-color:var(--input-background);color:var(--text-normal);width:95%;padding:8px 8px 8px 12px;margin:1em 0;outline:none;border:1px solid var(--input-background);border-radius:4px;font-weight:500;font-style:inherit;font-size:100%}.vc-st-format-label,.vc-st-format-label span{background-color:transparent}.vc-st-modal-content [class|=select]{margin-bottom:1em}.vc-st-modal-content [class|=select] span{background-color:var(--input-background)}.vc-st-modal-header{justify-content:space-between;align-content:center}.vc-st-modal-header h1{margin:0}.vc-st-modal-header button{padding:0}.vc-st-preview-text{margin-bottom:1em}.vc-st-button svg{transform:scale(1.1) translateY(1px)}.vc-gp-root{height:100%;user-select:text}.vc-gp-banner{cursor:pointer;aspect-ratio:auto 240 / 135;height:334px;width:100%;object-fit:cover;overflow:clip;overflow-clip-margin:content-box}.vc-gp-header{display:flex;flex-direction:row;align-items:center;gap:.5em;margin:.5em}.vc-gp-header img{width:48px;height:48px;cursor:pointer}.vc-gp-name-and-description{display:flex;flex-direction:column;gap:.2em}.vc-gp-name{margin:0}.vc-gp-tab-bar{border-bottom:2px solid var(--background-modifier-accent);margin:20px 12px 0;display:flex;gap:40px;align-items:stretch;flex-direction:row}.vc-gp-tab{border-bottom:2px solid transparent;color:var(--interactive-normal);cursor:pointer;height:39px;line-height:14px}.vc-gp-tab-content{margin:1em}.vc-gp-tab:where(.vc-gp-selected,:hover,:focus){border-bottom-color:var(--interactive-active)}.vc-gp-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1em}.vc-gp-server-info-pair{color:var(--text-normal)}.vc-gp-server-info-pair [class^=timestamp]{margin-left:0}.vc-gp-owner{display:flex;align-items:center;gap:.2em}.vc-gp-owner img{height:20px;border-radius:50%;cursor:pointer}.vc-gp-scroller{width:100%;max-height:500px}.vc-gp-scroller [class^=listRow]{margin:1px 0}.vc-gp-scroller [class^=listRow]:hover{background-color:var(--background-modifier-hover)}.shiki-container{border:4px;background-color:var(--background-secondary)}.shiki-root{border-radius:4px}.shiki-root code{display:block;overflow-x:auto;padding:.5em;position:relative;font-size:.875rem;line-height:1.125rem;text-indent:0;white-space:pre-wrap;background:transparent;border:none}.shiki-devicon{margin-right:8px;user-select:none}.shiki-plain code{padding-top:8px}.shiki-btns{font-size:1em;position:absolute;right:0;bottom:0;opacity:0}.shiki-root:hover .shiki-btns{opacity:1}.shiki-btn{border-radius:4px 4px 0 0;padding:4px 8px;user-select:none}.shiki-btn~.shiki-btn{margin-left:4px}.shiki-btn:last-child{border-radius:4px 0}.shiki-spinner-container{align-items:center;background-color:#0009;display:flex;position:absolute;justify-content:center;inset:0}.shiki-preview{margin-bottom:2em}.shiki-lang{padding:0 5px;margin-bottom:6px;font-weight:700;text-transform:capitalize;display:flex;align-items:center}.shiki-table{border-collapse:collapse;width:100%}.shiki-table tr{height:19px;width:100%}.shiki-root td:first-child{border-right:1px solid transparent;padding-left:5px;padding-right:8px;user-select:none}.shiki-root td:last-child{padding-left:8px;word-break:break-word;width:100%}.vc-user-connection{all:unset;display:inline-block;cursor:pointer}.vc-sc-tooltip{display:inline-flex;gap:.25em;align-items:center}.shc-lock-screen-outer-container{overflow:hidden scroll;flex:1 1 auto;height:100%;width:100%}.shc-lock-screen-container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:100%}.shc-lock-screen-container>*{margin:5px}.shc-lock-screen-logo{width:180px;height:180px}.shc-lock-screen-heading-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-heading-container>*{margin:inherit}.shc-lock-screen-heading-nsfw-icon{color:var(--text-normal)}.shc-lock-screen-topic-container{color:var(--text-normal);background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container{background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-tags-container>*{margin:inherit}.shc-lock-screen-tags{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px}.shc-evenodd-fill-current-color{fill-rule:evenodd;fill:currentcolor}.shc-hidden-channel-icon{margin-left:6px;z-index:0;cursor:not-allowed}.shc-lock-screen-default-emoji-container{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-default-emoji-container>[class^=emojiContainer]{background:var(--bg-overlay-3, var(--background-secondary));border-radius:8px;padding:5px 6px;margin-left:5px}.shc-lock-screen-allowed-users-and-roles-container{display:flex;flex-direction:column;align-items:center;background:var(--bg-overlay-3, var(--background-secondary));border-radius:5px;padding:10px;max-width:70vw}.shc-lock-screen-allowed-users-and-roles-container-title{display:flex;flex-direction:row;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn{all:unset;margin-left:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-toggle-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn{all:unset;margin-right:5px;cursor:pointer;display:flex;align-items:center}.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn>svg{color:var(--text-normal)}.shc-lock-screen-allowed-users-and-roles-container>[class^=members]{margin-left:10px;flex-wrap:wrap;justify-content:center}.vc-smyn-suffix{color:var(--text-muted)}.vc-smyn-suffix:before{content:"("}.vc-smyn-suffix:after{content:")"}#vc-spotify-player{padding:.375rem .5rem;border-bottom:1px solid var(--background-modifier-accent);--vc-spotify-green: #1db954}.theme-light #vc-spotify-player{background:var(--bg-overlay-3, var(--background-secondary-alt))}.theme-dark #vc-spotify-player{background:var(--bg-overlay-1, var(--background-secondary-alt))}.vc-spotify-button{background:none;color:var(--interactive-normal);padding:0;width:32px;height:32px;border-radius:100%;display:flex;justify-content:center;align-items:center}.vc-spotify-button:hover{color:var(--interactive-hover);background-color:var(--background-modifier-selected)}.vc-spotify-button svg{height:24px;width:24px}[class*=vc-spotify-shuffle]>svg,[class*=vc-spotify-repeat]>svg{width:22px;height:22px}.vc-spotify-button svg path{width:100%;height:100%}.vc-spotify-shuffle-on,.vc-spotify-repeat-context,.vc-spotify-repeat-track,.vc-spotify-shuffle-on:hover,.vc-spotify-repeat-context:hover,.vc-spotify-repeat-track:hover{color:var(--vc-spotify-green)}.vc-spotify-tooltip-text{overflow:hidden;white-space:nowrap;padding-right:.2em;max-width:100%;margin:unset}.vc-spotify-repeat-1{font-size:70%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.vc-spotify-button-row{justify-content:center}#vc-spotify-info-wrapper{display:flex;flex-direction:row;align-items:center;height:3em;gap:.5em}#vc-spotify-info-wrapper img{height:90%;object-fit:contain}#vc-spotify-album-expanded-wrapper img{width:100%;object-fit:contain}#vc-spotify-titles{display:flex;flex-direction:column;padding:.2rem;justify-content:center;align-items:flex-start;align-content:flex-start;overflow:hidden}#vc-spotify-song-title{color:var(--header-primary);font-size:14px;font-weight:600}.vc-spotify-ellipoverflow{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.vc-spotify-artist,.vc-spotify-album{font-size:12px;text-decoration:none;color:var(--header-secondary)}.vc-spotify-comma{color:var(--header-secondary)}.vc-spotify-artist[role=link]:hover,#vc-spotify-album-title[role=link]:hover,#vc-spotify-song-title[role=link]:hover{text-decoration:underline;cursor:pointer}#vc-spotify-album-image{border-radius:3px;transition:filter .2s}#vc-spotify-album-image:hover{filter:brightness(1.2);cursor:pointer}#vc-spotify-progress-bar{position:relative;color:var(--text-normal);width:100%;margin:.5em 0 5px}#vc-spotify-progress-bar>[class^=slider]{flex-grow:1;width:100%;padding:0!important}#vc-spotify-progress-bar>[class^=slider] [class^=bar-]{height:4px!important}#vc-spotify-progress-bar>[class^=slider] [class^=grabber]{height:10px!important;width:10px!important;margin-top:4px;background-color:var(--interactive-normal);border-color:var(--interactive-normal);color:var(--interactive-normal);opacity:0;transition:opacity .1s}#vc-spotify-progress-bar:hover>[class^=slider] [class^=grabber]{opacity:1}#vc-spotify-progress-text{margin:0}.vc-spotify-progress-time{font-size:12px;top:10px;position:absolute}.vc-spotify-time-left{left:0}.vc-spotify-time-right{right:0}.vc-spotify-fallback{padding:.5em;color:var(--text-normal)}.vc-trans-modal-content{padding:1em}.vc-trans-modal-header{justify-content:space-between;align-content:center}.vc-trans-modal-header h1{margin:0}.vc-trans-accessory{color:var(--text-muted);margin-top:.5em;font-style:italic;font-weight:400}.vc-trans-accessory svg{margin-right:.25em}.vc-trans-dismiss{all:unset;cursor:pointer;color:var(--text-link)}.vc-trans-dismiss:is(:hover,:focus){text-decoration:underline}.vc-trans-auto-translate{color:var(--green-360)}.vc-trans-chat-button{scale:1.085}.vc-uvs-button>div{white-space:normal!important}.vc-uvs-button{width:100%;margin:auto;height:unset}.vc-uvs-header{color:var(--header-primary);margin-bottom:6px}.vc-uvs-modal-margin{margin:0 12px}.vc-uvs-modal-margin div{margin-bottom:0!important}.vc-uvs-popout-margin-self>[class^=section]{padding-top:0;padding-bottom:12px}.vc-toolbox-btn,.vc-toolbox-btn>svg{-webkit-app-region:no-drag}.vc-toolbox-btn>svg{color:var(--interactive-normal)}.vc-toolbox-btn[class*=selected]>svg{color:var(--interactive-active)}.vc-toolbox-btn:hover>svg{color:var(--interactive-hover)}.vc-vmsg-modal{padding:1em}.vc-vmsg-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5em;margin-bottom:1em}.vc-vmsg-modal audio{width:100%}.vc-vmsg-preview{color:var(--text-normal);border-radius:24px;background-color:var(--background-secondary);position:relative;display:flex;align-items:center;padding:0 16px;height:48px}.vc-vmsg-preview-indicator{background:var(--button-secondary-background);width:16px;height:16px;border-radius:50%;transition:background .2s ease-in-out}.vc-vmsg-preview-recording .vc-vmsg-preview-indicator{background:var(--status-danger)}.vc-vmsg-preview-time{opacity:.8;margin:0 .5em;font-size:80%;font-family:var(--font-code)}.vc-vmsg-preview-label{opacity:.5;letter-spacing:.125em;font-weight:600;flex:1;text-align:center}
diff --git a/vesktop/vencordDist/vencordDesktopRenderer.css.map b/vesktop/vencordDist/vencordDesktopRenderer.css.map
index ad56e64..706ccfc 100644
--- a/vesktop/vencordDist/vencordDesktopRenderer.css.map
+++ b/vesktop/vencordDist/vencordDesktopRenderer.css.map
@@ -1,7 +1,7 @@
{
"version": 3,
- "sources": ["../src/components/ErrorCard.css", "../src/api/Notifications/styles.css", "../src/components/VencordSettings/settingsStyles.css", "../src/components/VencordSettings/themesStyles.css", "../src/components/PluginSettings/styles.css", "../src/components/iconStyles.css", "../src/components/PluginSettings/contributorModal.css", "../src/components/VencordSettings/addonCard.css", "../src/components/Switch.css", "../src/plugins/clientTheme/clientTheme.css", "../src/plugins/dearrow/styles.css", "../src/plugins/decor/ui/styles.css", "../src/plugins/messageLogger/messageLogger.css", "../src/plugins/permissionsViewer/styles.css", "../src/components/ExpandableHeader.css", "../src/plugins/pictureInPicture/styles.css", "../src/plugins/pronoundb/styles.css", "../src/plugins/sendTimestamps/styles.css", "../src/plugins/serverProfile/styles.css", "../src/plugins/shikiCodeblocks.desktop/shiki.css", "../src/plugins/showConnections/styles.css", "../src/plugins/showHiddenChannels/style.css", "../src/plugins/showMeYourName/styles.css", "../src/plugins/spotifyControls/spotifyStyles.css", "../src/plugins/translate/styles.css", "../src/plugins/userVoiceShow/components/VoiceChannelSection.css", "../src/plugins/vencordToolbox/index.css", "../src/plugins/voiceMessages/styles.css"],
- "sourcesContent": [".vc-error-card {\n padding: 2em;\n background-color: #e7828430;\n border: 1px solid #e78284;\n border-radius: 5px;\n color: var(--text-normal, white);\n}\n", ".vc-notification-root {\n /* clear default button styles */\n all: unset;\n display: flex;\n flex-direction: column;\n color: var(--text-normal);\n background-color: var(--background-secondary-alt);\n border-radius: 6px;\n overflow: hidden;\n cursor: pointer;\n width: 100%;\n}\n\n.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root) {\n position: absolute;\n z-index: 2147483647;\n right: 1rem;\n width: 25vw;\n min-height: 10vh;\n}\n\n.vc-notification {\n display: flex;\n flex-direction: row;\n padding: 1.25rem;\n gap: 1.25rem;\n}\n\n.vc-notification-content {\n width: 100%;\n}\n\n.vc-notification-header {\n display: flex;\n justify-content: space-between;\n}\n\n.vc-notification-title {\n color: var(--header-primary);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.25rem;\n text-transform: uppercase;\n}\n\n.vc-notification-close-btn {\n all: unset;\n cursor: pointer;\n color: var(--interactive-normal);\n opacity: 0.5;\n transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;\n}\n\n.vc-notification-close-btn:hover {\n color: var(--interactive-hover);\n opacity: 1;\n}\n\n.vc-notification-icon {\n height: 4rem;\n width: 4rem;\n border-radius: 6px;\n}\n\n.vc-notification-progressbar {\n height: 0.25rem;\n border-radius: 5px;\n margin-top: auto;\n}\n\n.vc-notification-p {\n margin: 0.5rem 0 0;\n line-height: 140%;\n}\n\n.vc-notification-img {\n width: 100%;\n}\n\n.vc-notification-log-empty {\n height: 218px;\n background: url(\"/assets/b36de980b174d7b798c89f35c116e5c6.svg\") center no-repeat;\n margin-bottom: 40px;\n}\n\n.vc-notification-log-container {\n display: flex;\n flex-direction: column;\n padding: 1em;\n overflow: hidden;\n}\n\n.vc-notification-log-wrapper {\n transition: 200ms ease;\n transition-property: height, opacity;\n}\n\n.vc-notification-log-wrapper:not(:last-child) {\n margin-bottom: 1em;\n}\n\n.vc-notification-log-removing {\n height: 0 !important;\n opacity: 0;\n margin-bottom: 1em;\n}\n\n.vc-notification-log-body {\n display: flex;\n flex-direction: column;\n}\n\n.vc-notification-log-timestamp {\n margin-left: auto;\n font-size: 0.8em;\n font-weight: lighter;\n}\n\n.vc-notification-log-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n", ".vc-settings-tab-bar {\n margin-top: 20px;\n margin-bottom: 10px;\n border-bottom: 2px solid var(--background-modifier-accent);\n}\n\n.vc-settings-tab-bar-item {\n margin-right: 32px;\n padding-bottom: 16px;\n margin-bottom: -2px;\n}\n\n.vc-settings-quick-actions-card {\n padding: 1em;\n display: flex;\n gap: 1em;\n align-items: center;\n justify-content: space-evenly;\n flex-grow: 1;\n flex-flow: row wrap;\n margin-bottom: 1em;\n}\n\n.vc-settings-donate {\n display: flex;\n flex-direction: row;\n}\n\n.vc-settings-card {\n padding: 1em;\n margin-bottom: 1em;\n}\n\n.vc-backup-restore-card {\n background-color: var(--info-warning-background);\n border-color: var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-settings-theme-links {\n /* Needed to fix bad themes that hide certain textarea elements for whatever eldritch reason */\n display: inline-block !important;\n color: var(--text-normal) !important;\n padding: 0.5em;\n border: 1px solid var(--background-modifier-accent);\n max-height: unset;\n}\n\n.vc-cloud-settings-sync-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 1em;\n}\n\n.vc-cloud-erase-data-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n\n.vc-text-selectable,\n.vc-text-selectable :where([class*=\"text\" i], [class*=\"title\" i]) {\n /* make text selectable, silly discord makes the entirety of settings not selectable */\n user-select: text;\n\n /* discord also sets cursor: default which prevents the cursor from showing as text */\n cursor: initial;\n}\n", ".vc-settings-theme-grid {\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-settings-theme-card {\n display: flex;\n flex-direction: column;\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n padding: 1em;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n}\n\n.vc-settings-theme-card-text {\n text-overflow: ellipsis;\n height: 1.2em;\n margin-bottom: 2px;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-settings-theme-author::before {\n content: \"by \";\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n.vc-plugins-grid {\n margin-top: 16px;\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-plugins-info-button {\n height: 24px;\n width: 24px;\n padding: 0;\n background: transparent;\n margin-right: 8px;\n}\n\n.vc-plugins-settings-button:hover {\n color: var(--interactive-hover);\n}\n\n.vc-plugins-filter-controls {\n display: grid;\n height: 40px;\n gap: 10px;\n grid-template-columns: 1fr 150px;\n}\n\n.vc-plugins-badge {\n padding: 0 6px;\n font-family: var(--font-display);\n font-weight: 500;\n border-radius: 8px;\n height: 16px;\n font-size: 12px;\n line-height: 16px;\n color: var(--white-500);\n text-align: center;\n}\n\n.vc-plugins-dep-name {\n margin: 0 auto;\n}\n\n.vc-plugins-info-card {\n padding: 1em;\n height: 8em;\n display: flex;\n flex-direction: column;\n}\n\n.vc-plugins-info-card div {\n line-height: 32px;\n}\n\n.vc-plugins-restart-card {\n padding: 1em;\n background: var(--info-warning-background);\n border: 1px solid var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-plugins-restart-card button {\n margin-top: 0.5em;\n}\n\n.vc-plugins-info-button svg:not(:hover, :focus) {\n color: var(--text-muted);\n}\n", ".vc-open-external-icon {\n transform: rotate(45deg);\n}\n\n.vc-owner-crown-icon {\n color: var(--text-warning);\n}\n", ".vc-author-modal-root {\n padding: 1em;\n}\n\n.vc-author-modal-header {\n display: flex;\n align-items: center;\n margin-bottom: 1em;\n}\n\n.vc-author-modal-name {\n text-transform: none;\n flex-grow: 0;\n background: var(--background-tertiary);\n border-radius: 0 9999px 9999px 0;\n padding: 6px 0.8em 6px 0.5em;\n font-size: 20px;\n height: 20px;\n position: relative;\n text-wrap: nowrap;\n}\n\n.vc-author-modal-name::before {\n content: \"\";\n display: block;\n position: absolute;\n height: 100%;\n width: 16px;\n background: var(--background-tertiary);\n z-index: -1;\n left: -16px;\n top: 0;\n}\n\n.vc-author-modal-avatar {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n}\n\n.vc-author-modal-links {\n margin-left: auto;\n display: flex;\n gap: 0.2em;\n}\n\n.vc-author-modal-links img {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n border: 4px solid var(--background-tertiary);\n box-sizing: border-box\n}\n\n.vc-author-modal-plugins {\n display: grid;\n gap: 0.5em;\n}\n", ".vc-addon-card {\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n display: block;\n height: 100%;\n padding: 12px;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n box-sizing: border-box;\n}\n\n.vc-addon-card-disabled {\n opacity: 0.6;\n}\n\n.vc-addon-card:hover {\n background-color: var(--background-tertiary);\n transform: translateY(-1px);\n box-shadow: var(--elevation-high);\n}\n\n.vc-addon-header {\n margin-top: auto;\n display: flex;\n width: 100%;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n margin-bottom: 0.5em;\n}\n\n.vc-addon-note {\n height: 36px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n /* stylelint-disable-next-line property-no-unknown */\n box-orient: vertical;\n}\n\n.vc-addon-name-author {\n width: 100%;\n}\n\n.vc-addon-name {\n display: flex;\n width: 100%;\n align-items: center;\n flex-grow: 1;\n gap: 8px;\n}\n\n.vc-addon-author {\n font-size: 0.8em;\n}\n\n.vc-addon-author::before {\n content: \"by \";\n}\n", ".vc-switch-slider {\n transition: 100ms transform ease-in-out;\n}\n", ".client-theme-settings {\n display: flex;\n flex-direction: column;\n}\n\n.client-theme-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n.client-theme-settings-labels {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n}\n\n.client-theme-container > [class^=\"colorSwatch\"] > [class^=\"swatch\"] {\n border: thin solid var(--background-modifier-accent) !important;\n}\n\n.client-theme-warning {\n color: var(--text-danger);\n}\n", ".vc-dearrow-toggle-off svg {\n filter: grayscale(1);\n}\n\n.vc-dearrow-toggle-on, .vc-dearrow-toggle-off {\n all: unset;\n display: inline;\n cursor: pointer;\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n}\n", ".vc-decor-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n\n.vc-decor-change-decoration-modal-content {\n position: relative;\n display: flex;\n border-radius: 5px 5px 0 0;\n padding: 0 16px;\n gap: 4px;\n}\n\n.vc-decor-change-decoration-modal-preview {\n display: flex;\n flex-direction: column;\n margin-top: 24px;\n gap: 8px;\n max-width: 280px;\n}\n\n.vc-decor-change-decoration-modal-decoration {\n width: 80px;\n height: 80px;\n}\n\n.vc-decor-change-decoration-modal-footer {\n justify-content: space-between;\n}\n\n.vc-decor-change-decoration-modal-footer-btn-container {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.vc-decor-create-decoration-modal-content {\n display: flex;\n flex-direction: column;\n gap: 20px;\n padding: 0 16px;\n}\n\n.vc-decor-create-decoration-modal-form-preview-container {\n display: flex;\n gap: 16px;\n}\n\n.vc-decor-modal-header {\n padding: 16px;\n}\n\n.vc-decor-modal-footer {\n padding: 16px;\n}\n\n.vc-decor-create-decoration-modal-form {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: 16px;\n}\n\n.vc-decor-sectioned-grid-list-container {\n display: flex;\n flex-direction: column;\n overflow: hidden scroll;\n max-height: 512px;\n width: 352px; /* ((80 + 8 (grid gap)) * desired columns) (scrolled takes the extra 8 padding off conveniently) */\n gap: 12px;\n}\n\n.vc-decor-sectioned-grid-list-grid {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.vc-decor-section-remove-margin {\n margin-bottom: 0;\n}\n", ".messagelogger-deleted [class^=\"buttons\"] {\n display: none;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n) {\n filter: grayscale(1) !important;\n transition: 150ms filter ease-in-out;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n):hover,\n.messagelogger-deleted {\n filter: grayscale(0) !important;\n}\n\n.theme-dark .messagelogger-edited {\n filter: brightness(80%);\n}\n\n.theme-light .messagelogger-edited {\n opacity: 0.5;\n}\n", "/* User Permissions Component */\n\n.vc-permviewer-userperms-title-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n margin-bottom: 6px;\n}\n\n.vc-permviewer-userperms-btns-container {\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-sortorder-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n\n.vc-permviewer-userperms-permdetails-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-toggleperms-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n/* RolesAndUsersPermissions Component */\n\n.vc-permviewer-perms-title {\n flex-grow: 1;\n}\n\n.vc-permviewer-perms-no-perms {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n\n.vc-permviewer-perms-container {\n display: grid;\n grid-template-columns: 1fr 2fr;\n grid-template-areas: \"list permissions\";\n padding: 16px 0;\n}\n\n.vc-permviewer-perms-list {\n grid-area: list;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border-right: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-list-item-btn {\n all: unset;\n cursor: pointer;\n}\n\n.vc-permviewer-perms-list-item {\n display: flex;\n align-items: center;\n padding: 8px 5px;\n cursor: pointer;\n width: 230px;\n border-radius: 5px;\n}\n\n.vc-permviewer-perms-list-item:hover {\n background-color: var(--background-modifier-hover);\n}\n\n.vc-permviewer-perms-list-item-active {\n background-color: var(--background-modifier-selected);\n}\n\n.vc-permviewer-perms-list-item > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-permviewer-perms-role-circle {\n border-radius: 50%;\n width: 12px;\n height: 12px;\n margin-left: 3px;\n margin-right: 11px;\n flex-shrink: 0;\n}\n\n.vc-permviewer-perms-user-img {\n border-radius: 50%;\n width: 20px;\n height: 20px;\n margin-right: 6px;\n}\n\n.vc-permviewer-perms-perms {\n grid-area: permissions;\n display: flex;\n flex-direction: column;\n margin-left: 5px;\n}\n\n.vc-permviewer-perms-perms-item {\n position: relative;\n display: flex;\n align-items: center;\n padding: 10px;\n border-bottom: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-perms-item:last-child {\n border: 0;\n}\n\n.vc-permviewer-perms-perms-item-icon {\n border: 1px solid var(--background-modifier-selected);\n width: 24px;\n height: 24px;\n margin-right: 5px;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon {\n color: var(--interactive-muted);\n cursor: pointer;\n position: absolute;\n right: 0;\n scale: 0.9;\n transition: color ease-in 0.1s;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon:hover {\n color: var(--interactive-active);\n}\n", ".vc-expandableheader-center-flex {\n display: flex;\n justify-items: center;\n align-items: center;\n}\n\n.vc-expandableheader-btn {\n all: unset;\n cursor: pointer;\n width: 24px;\n height: 24px;\n}\n", ".vc-pip-button {\n color: var(--interactive-normal);\n}\n\n.vc-pip-button:hover {\n background-color: var(--background-modifier-hover);\n color: var(--interactive-hover);\n}\n", ".vc-pronoundb-compact {\n display: none;\n}\n\n[class*=\"compact\"] .vc-pronoundb-compact {\n display: inline-block;\n margin-left: -2px;\n margin-right: 0.25rem;\n}\n", ".vc-st-modal-content input {\n background-color: var(--input-background);\n color: var(--text-normal);\n width: 95%;\n padding: 8px 8px 8px 12px;\n margin: 1em 0;\n outline: none;\n border: 1px solid var(--input-background);\n border-radius: 4px;\n font-weight: 500;\n font-style: inherit;\n font-size: 100%;\n}\n\n.vc-st-format-label,\n.vc-st-format-label span {\n background-color: transparent;\n}\n\n.vc-st-modal-content [class|=\"select\"] {\n margin-bottom: 1em;\n}\n\n.vc-st-modal-content [class|=\"select\"] span {\n background-color: var(--input-background);\n}\n\n.vc-st-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-st-modal-header h1 {\n margin: 0;\n}\n\n.vc-st-modal-header button {\n padding: 0;\n}\n\n.vc-st-preview-text {\n margin-bottom: 1em;\n}\n\n.vc-st-button {\n padding: 0 6px;\n}\n\n.vc-st-button svg {\n transform: scale(1.1) translateY(1px);\n}\n", ".vc-gp-root {\n height: 100%;\n user-select: text;\n}\n\n.vc-gp-banner {\n width: 100%;\n cursor: pointer;\n}\n\n.vc-gp-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5em;\n margin: 0.5em;\n}\n\n.vc-gp-header img {\n width: 48px;\n height: 48px;\n cursor: pointer;\n}\n\n.vc-gp-name-and-description {\n display: flex;\n flex-direction: column;\n gap: 0.2em;\n}\n\n.vc-gp-name {\n margin: 0;\n}\n\n.vc-gp-tab-bar {\n border-bottom: 2px solid var(--background-modifier-accent);\n margin: 20px 12px 0;\n display: flex;\n gap: 40px;\n align-items: stretch;\n flex-direction: row;\n}\n\n.vc-gp-tab {\n border-bottom: 2px solid transparent;\n color: var(--interactive-normal);\n cursor: pointer;\n height: 39px;\n line-height: 14px;\n}\n\n.vc-gp-tab-content {\n margin: 1em;\n}\n\n.vc-gp-tab:where(.vc-gp-selected, :hover, :focus) {\n border-bottom-color: var(--interactive-active);\n}\n\n.vc-gp-info {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 1em;\n}\n\n.vc-gp-server-info-pair {\n color: var(--text-normal);\n}\n\n.vc-gp-server-info-pair [class^=\"timestamp\"] {\n margin-left: 0;\n}\n\n.vc-gp-owner {\n display: flex;\n align-items: center;\n gap: 0.2em;\n}\n\n.vc-gp-owner img {\n height: 20px;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.vc-gp-scroller {\n width: 100%;\n max-height: 500px;\n}\n\n.vc-gp-scroller [class^=\"listRow\"] {\n margin: 1px 0;\n}\n\n.vc-gp-scroller [class^=\"listRow\"]:hover {\n background-color: var(--background-modifier-hover);\n}\n", ".shiki-container {\n border: 4px;\n background-color: var(--background-secondary);\n}\n\n.shiki-root {\n border-radius: 4px;\n}\n\n.shiki-root code {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n position: relative;\n font-size: 0.875rem;\n line-height: 1.125rem;\n text-indent: 0;\n white-space: pre-wrap;\n background: transparent;\n border: none;\n}\n\n.shiki-devicon {\n margin-right: 8px;\n user-select: none;\n}\n\n.shiki-plain code {\n padding-top: 8px;\n}\n\n.shiki-btns {\n font-size: 1em;\n position: absolute;\n right: 0;\n bottom: 0;\n opacity: 0;\n}\n\n.shiki-root:hover .shiki-btns {\n opacity: 1;\n}\n\n.shiki-btn {\n border-radius: 4px 4px 0 0;\n padding: 4px 8px;\n user-select: none;\n}\n\n.shiki-btn ~ .shiki-btn {\n margin-left: 4px;\n}\n\n.shiki-btn:last-child {\n border-radius: 4px 0;\n}\n\n.shiki-spinner-container {\n align-items: center;\n background-color: rgb(0 0 0 / 60%);\n display: flex;\n position: absolute;\n justify-content: center;\n inset: 0;\n}\n\n.shiki-preview {\n margin-bottom: 2em;\n}\n\n.shiki-lang {\n padding: 0 5px;\n margin-bottom: 6px;\n font-weight: bold;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n}\n\n.shiki-table {\n border-collapse: collapse;\n width: 100%;\n}\n\n.shiki-table tr {\n height: 19px;\n width: 100%;\n}\n\n.shiki-root td:first-child {\n border-right: 1px solid transparent;\n padding-left: 5px;\n padding-right: 8px;\n user-select: none;\n}\n\n.shiki-root td:last-child {\n padding-left: 8px;\n word-break: break-word;\n width: 100%;\n}\n", ".vc-user-connection {\n all: unset;\n display: inline-block;\n cursor: pointer;\n}\n\n.vc-sc-tooltip {\n display: inline-flex;\n gap: 0.25em;\n align-items: center;\n}\n", ".shc-lock-screen-outer-container {\n overflow: hidden scroll;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n}\n\n.shc-lock-screen-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n min-height: 100%;\n}\n\n.shc-lock-screen-container > * {\n margin: 5px;\n}\n\n.shc-lock-screen-logo {\n width: 180px;\n height: 180px;\n}\n\n.shc-lock-screen-heading-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-heading-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-heading-nsfw-icon {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-topic-container {\n color: var(--text-normal);\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-tags {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.shc-evenodd-fill-current-color {\n fill-rule: evenodd;\n fill: currentcolor;\n}\n\n.shc-hidden-channel-icon {\n margin-left: 6px;\n z-index: 0;\n cursor: not-allowed;\n}\n\n.shc-lock-screen-default-emoji-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-default-emoji-container > [class^=\"emojiContainer\"] {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 8px;\n padding: 5px 6px;\n margin-left: 5px;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn {\n all: unset;\n margin-left: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn {\n all: unset;\n margin-right: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container > [class^=\"members\"] {\n margin-left: 10px;\n flex-wrap: wrap;\n justify-content: center;\n}\n", ".vc-smyn-suffix {\n color: var(--text-muted);\n}\n\n.vc-smyn-suffix::before {\n content: \"(\";\n}\n\n.vc-smyn-suffix::after {\n content: \")\";\n}\n", "#vc-spotify-player {\n padding: 0.375rem 0.5rem;\n border-bottom: 1px solid var(--background-modifier-accent);\n\n --vc-spotify-green: #1db954; /* so custom themes can easily change it */\n}\n\n.theme-light #vc-spotify-player {\n background: var(--bg-overlay-3, var(--background-secondary-alt));\n}\n\n.theme-dark #vc-spotify-player {\n background: var(--bg-overlay-1, var(--background-secondary-alt));\n}\n\n.vc-spotify-button {\n background: none;\n color: var(--interactive-normal);\n padding: 0;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.vc-spotify-button:hover {\n color: var(--interactive-hover);\n background-color: var(--background-modifier-selected);\n}\n\n.vc-spotify-button svg {\n height: 24px;\n width: 24px;\n}\n\n[class*=\"vc-spotify-shuffle\"] > svg,\n[class*=\"vc-spotify-repeat\"] > svg {\n width: 22px;\n height: 22px;\n}\n\n.vc-spotify-button svg path {\n width: 100%;\n height: 100%;\n}\n\n/* .vc-spotify-button:hover {\n filter: brightness(1.3);\n} */\n\n.vc-spotify-shuffle-on,\n.vc-spotify-repeat-context,\n.vc-spotify-repeat-track,\n.vc-spotify-shuffle-on:hover,\n.vc-spotify-repeat-context:hover,\n.vc-spotify-repeat-track:hover {\n color: var(--vc-spotify-green);\n}\n\n.vc-spotify-tooltip-text {\n overflow: hidden;\n white-space: nowrap;\n padding-right: 0.2em;\n max-width: 100%;\n margin: unset;\n}\n\n.vc-spotify-repeat-1 {\n font-size: 70%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.vc-spotify-button-row {\n justify-content: center;\n}\n\n#vc-spotify-info-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 3em;\n gap: 0.5em;\n}\n\n#vc-spotify-info-wrapper img {\n height: 90%;\n object-fit: contain;\n}\n\n#vc-spotify-album-expanded-wrapper img {\n width: 100%;\n object-fit: contain;\n}\n\n#vc-spotify-titles {\n display: flex;\n flex-direction: column;\n padding: 0.2rem;\n justify-content: center;\n align-items: flex-start;\n align-content: flex-start;\n overflow: hidden;\n}\n\n#vc-spotify-song-title {\n color: var(--header-primary);\n font-size: 14px;\n font-weight: 600;\n}\n\n.vc-spotify-ellipoverflow {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n}\n\n.vc-spotify-artist,\n.vc-spotify-album {\n font-size: 12px;\n text-decoration: none;\n color: var(--header-secondary);\n}\n\n.vc-spotify-comma {\n color: var(--header-secondary);\n}\n\n.vc-spotify-artist[role=\"link\"]:hover,\n#vc-spotify-album-title[role=\"link\"]:hover,\n#vc-spotify-song-title[role=\"link\"]:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n\n#vc-spotify-album-image {\n border-radius: 3px;\n transition: filter 0.2s;\n}\n\n#vc-spotify-album-image:hover {\n filter: brightness(1.2);\n cursor: pointer;\n}\n\n#vc-spotify-progress-bar {\n position: relative;\n color: var(--text-normal);\n width: 100%;\n margin: 0.5em 0;\n margin-bottom: 5px;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] {\n flex-grow: 1;\n width: 100%;\n padding: 0 !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"bar-\"] {\n height: 4px !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"grabber\"] {\n /* these importants are necessary, it applies a width and height through inline styles */\n height: 10px !important;\n width: 10px !important;\n background-color: var(--interactive-normal);\n border-color: var(--interactive-normal);\n color: var(--interactive-normal);\n}\n\n#vc-spotify-progress-text {\n margin: 0;\n}\n\n.vc-spotify-progress-time {\n font-size: 12px;\n top: 10px;\n position: absolute;\n}\n\n.vc-spotify-time-left {\n left: 0;\n}\n\n.vc-spotify-time-right {\n right: 0;\n}\n\n.vc-spotify-fallback {\n padding: 0.5em;\n color: var(--text-normal);\n}\n", ".vc-trans-modal-content {\n padding: 1em;\n}\n\n.vc-trans-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-trans-modal-header h1 {\n margin: 0;\n}\n\n.vc-trans-accessory {\n color: var(--text-muted);\n margin-top: 0.5em;\n font-style: italic;\n font-weight: 400;\n}\n\n.vc-trans-accessory svg {\n margin-right: 0.25em;\n}\n\n.vc-trans-dismiss {\n all: unset;\n cursor: pointer;\n color: var(--text-link);\n}\n\n.vc-trans-dismiss:is(:hover, :focus) {\n text-decoration: underline;\n}\n\n.vc-trans-auto-translate {\n color: var(--green-360);\n}\n", ".vc-uvs-button>div {\n white-space: normal !important;\n}\n\n.vc-uvs-button {\n width: 100%;\n margin: auto;\n height: unset;\n}\n\n.vc-uvs-header {\n color: var(--header-primary);\n margin-bottom: 6px;\n}\n\n.vc-uvs-modal-margin {\n margin: 0 12px;\n}\n\n.vc-uvs-modal-margin div {\n margin-bottom: 0 !important;\n}\n\n.vc-uvs-popout-margin-self>[class^=\"section\"] {\n padding-top: 0;\n padding-bottom: 12px;\n}\n", ".vc-toolbox-btn,\n.vc-toolbox-btn>svg {\n -webkit-app-region: no-drag;\n}\n\n.vc-toolbox-btn>svg {\n color: var(--interactive-normal);\n}\n\n.vc-toolbox-btn[class*=\"selected\"]>svg {\n color: var(--interactive-active);\n}\n\n.vc-toolbox-btn:hover>svg {\n color: var(--interactive-hover);\n}\n", ".vc-vmsg-modal {\n padding: 1em;\n}\n\n.vc-vmsg-buttons {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 0.5em;\n margin-bottom: 1em;\n}\n\n.vc-vmsg-modal audio {\n width: 100%;\n}\n\n.vc-vmsg-preview {\n color: var(--text-normal);\n border-radius: 24px;\n background-color: var(--background-secondary);\n position: relative;\n display: flex;\n align-items: center;\n padding: 0 16px;\n height: 48px;\n}\n\n.vc-vmsg-preview-indicator {\n background: var(--button-secondary-background);\n width: 16px;\n height: 16px;\n border-radius: 50%;\n transition: background 0.2s ease-in-out;\n}\n\n.vc-vmsg-preview-recording .vc-vmsg-preview-indicator {\n background: var(--status-danger);\n}\n\n.vc-vmsg-preview-time {\n opacity: 0.8;\n margin: 0 0.5em;\n font-size: 80%;\n\n /* monospace so different digits have same size */\n font-family: var(--font-code);\n}\n\n.vc-vmsg-preview-label {\n opacity: 0.5;\n letter-spacing: 0.125em;\n font-weight: 600;\n flex: 1;\n text-align: center;\n}\n"],
- "mappings": "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",
+ "sources": ["../src/components/ErrorCard.css", "../src/api/Notifications/styles.css", "../src/components/VencordSettings/settingsStyles.css", "../src/components/VencordSettings/themesStyles.css", "../src/components/PluginSettings/styles.css", "../src/components/iconStyles.css", "../src/components/PluginSettings/contributorModal.css", "../src/components/VencordSettings/addonCard.css", "../src/components/Switch.css", "../src/plugins/clientTheme/clientTheme.css", "../src/plugins/dearrow/styles.css", "../src/plugins/decor/ui/styles.css", "../src/api/ChatButton.css", "../src/plugins/memberCount/style.css", "../src/plugins/messageLogger/messageLogger.css", "../src/plugins/permissionsViewer/styles.css", "../src/components/ExpandableHeader.css", "../src/plugins/pictureInPicture/styles.css", "../src/plugins/pinDms/styles.css", "../src/plugins/pronoundb/styles.css", "../src/plugins/reviewDB/style.css", "../src/plugins/sendTimestamps/styles.css", "../src/plugins/serverProfile/styles.css", "../src/plugins/shikiCodeblocks.desktop/shiki.css", "../src/plugins/showConnections/styles.css", "../src/plugins/showHiddenChannels/style.css", "../src/plugins/showMeYourName/styles.css", "../src/plugins/spotifyControls/spotifyStyles.css", "../src/plugins/translate/styles.css", "../src/plugins/userVoiceShow/components/VoiceChannelSection.css", "../src/plugins/vencordToolbox/index.css", "../src/plugins/voiceMessages/styles.css"],
+ "sourcesContent": [".vc-error-card {\n padding: 2em;\n background-color: #e7828430;\n border: 1px solid #e78284;\n border-radius: 5px;\n color: var(--text-normal, white);\n}\n", ".vc-notification-root {\n /* clear default button styles */\n all: unset;\n display: flex;\n flex-direction: column;\n color: var(--text-normal);\n background-color: var(--background-secondary-alt);\n border-radius: 6px;\n overflow: hidden;\n cursor: pointer;\n width: 100%;\n}\n\n.vc-notification-root:not(.vc-notification-log-wrapper > .vc-notification-root) {\n position: absolute;\n z-index: 2147483647;\n right: 1rem;\n width: 25vw;\n min-height: 10vh;\n}\n\n.vc-notification {\n display: flex;\n flex-direction: row;\n padding: 1.25rem;\n gap: 1.25rem;\n}\n\n.vc-notification-content {\n width: 100%;\n}\n\n.vc-notification-header {\n display: flex;\n justify-content: space-between;\n}\n\n.vc-notification-title {\n color: var(--header-primary);\n font-size: 1rem;\n font-weight: 600;\n line-height: 1.25rem;\n text-transform: uppercase;\n}\n\n.vc-notification-close-btn {\n all: unset;\n cursor: pointer;\n color: var(--interactive-normal);\n opacity: 0.5;\n transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;\n}\n\n.vc-notification-close-btn:hover {\n color: var(--interactive-hover);\n opacity: 1;\n}\n\n.vc-notification-icon {\n height: 4rem;\n width: 4rem;\n border-radius: 6px;\n}\n\n.vc-notification-progressbar {\n height: 0.25rem;\n border-radius: 5px;\n margin-top: auto;\n}\n\n.vc-notification-p {\n margin: 0.5rem 0 0;\n line-height: 140%;\n}\n\n.vc-notification-img {\n width: 100%;\n}\n\n.vc-notification-log-empty {\n height: 218px;\n background: url(\"/assets/b36de980b174d7b798c89f35c116e5c6.svg\") center no-repeat;\n margin-bottom: 40px;\n}\n\n.vc-notification-log-container {\n display: flex;\n flex-direction: column;\n padding: 1em;\n overflow: hidden;\n}\n\n.vc-notification-log-wrapper {\n transition: 200ms ease;\n transition-property: height, opacity;\n}\n\n.vc-notification-log-wrapper:not(:last-child) {\n margin-bottom: 1em;\n}\n\n.vc-notification-log-removing {\n height: 0 !important;\n opacity: 0;\n margin-bottom: 1em;\n}\n\n.vc-notification-log-body {\n display: flex;\n flex-direction: column;\n}\n\n.vc-notification-log-timestamp {\n margin-left: auto;\n font-size: 0.8em;\n font-weight: lighter;\n}\n\n.vc-notification-log-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n", ".vc-settings-tab-bar {\n margin-top: 20px;\n margin-bottom: 10px;\n border-bottom: 2px solid var(--background-modifier-accent);\n}\n\n.vc-settings-tab-bar-item {\n margin-right: 32px;\n padding-bottom: 16px;\n margin-bottom: -2px;\n}\n\n.vc-settings-quick-actions-card {\n padding: 1em;\n display: flex;\n gap: 1em;\n align-items: center;\n justify-content: space-evenly;\n flex-grow: 1;\n flex-flow: row wrap;\n margin-bottom: 1em;\n}\n\n.vc-settings-donate {\n display: flex;\n flex-direction: row;\n}\n\n.vc-settings-card {\n padding: 1em;\n margin-bottom: 1em;\n}\n\n.vc-backup-restore-card {\n background-color: var(--info-warning-background);\n border-color: var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-settings-theme-links {\n /* Needed to fix bad themes that hide certain textarea elements for whatever eldritch reason */\n display: inline-block !important;\n color: var(--text-normal) !important;\n padding: 0.5em;\n border: 1px solid var(--background-modifier-accent);\n max-height: unset;\n}\n\n.vc-cloud-settings-sync-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 1em;\n}\n\n.vc-cloud-erase-data-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n\n.vc-text-selectable,\n.vc-text-selectable :where([class*=\"text\" i], [class*=\"title\" i]) {\n /* make text selectable, silly discord makes the entirety of settings not selectable */\n user-select: text;\n\n /* discord also sets cursor: default which prevents the cursor from showing as text */\n cursor: initial;\n}\n", ".vc-settings-theme-grid {\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-settings-theme-card {\n display: flex;\n flex-direction: column;\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n padding: 1em;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n}\n\n.vc-settings-theme-card-text {\n text-overflow: ellipsis;\n height: 1.2em;\n margin-bottom: 2px;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-settings-theme-author::before {\n content: \"by \";\n}\n", "/*\n * Vencord, a modification for Discord's desktop app\n * Copyright (c) 2022 Vendicated and contributors\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n*/\n\n.vc-plugins-grid {\n margin-top: 16px;\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));\n}\n\n.vc-plugins-info-button {\n height: 24px;\n width: 24px;\n padding: 0;\n background: transparent;\n margin-right: 8px;\n}\n\n.vc-plugins-settings-button:hover {\n color: var(--interactive-hover);\n}\n\n.vc-plugins-filter-controls {\n display: grid;\n height: 40px;\n gap: 10px;\n grid-template-columns: 1fr 150px;\n}\n\n.vc-plugins-badge {\n padding: 0 6px;\n font-family: var(--font-display);\n font-weight: 500;\n border-radius: 8px;\n height: 16px;\n font-size: 12px;\n line-height: 16px;\n color: var(--white-500);\n text-align: center;\n}\n\n.vc-plugins-dep-name {\n margin: 0 auto;\n}\n\n.vc-plugins-info-card {\n padding: 1em;\n height: 8em;\n display: flex;\n flex-direction: column;\n}\n\n.vc-plugins-info-card div {\n line-height: 32px;\n}\n\n.vc-plugins-restart-card {\n padding: 1em;\n background: var(--info-warning-background);\n border: 1px solid var(--info-warning-foreground);\n color: var(--info-warning-text);\n}\n\n.vc-plugins-restart-card button {\n margin-top: 0.5em;\n}\n\n.vc-plugins-info-button svg:not(:hover, :focus) {\n color: var(--text-muted);\n}\n", ".vc-open-external-icon {\n transform: rotate(45deg);\n}\n\n.vc-owner-crown-icon {\n color: var(--text-warning);\n}\n", ".vc-author-modal-root {\n padding: 1em;\n}\n\n.vc-author-modal-header {\n display: flex;\n align-items: center;\n margin-bottom: 1em;\n}\n\n.vc-author-modal-name {\n text-transform: none;\n flex-grow: 0;\n background: var(--background-tertiary);\n border-radius: 0 9999px 9999px 0;\n padding: 6px 0.8em 6px 0.5em;\n font-size: 20px;\n height: 20px;\n position: relative;\n text-wrap: nowrap;\n}\n\n.vc-author-modal-name::before {\n content: \"\";\n display: block;\n position: absolute;\n height: 100%;\n width: 16px;\n background: var(--background-tertiary);\n z-index: -1;\n left: -16px;\n top: 0;\n}\n\n.vc-author-modal-avatar {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n}\n\n.vc-author-modal-links {\n margin-left: auto;\n display: flex;\n gap: 0.2em;\n}\n\n.vc-author-modal-links img {\n height: 32px;\n width: 32px;\n border-radius: 50%;\n border: 4px solid var(--background-tertiary);\n box-sizing: border-box\n}\n\n.vc-author-modal-plugins {\n display: grid;\n gap: 0.5em;\n}\n", ".vc-addon-card {\n background-color: var(--background-secondary-alt);\n color: var(--interactive-active);\n border-radius: 8px;\n display: block;\n height: 100%;\n padding: 12px;\n width: 100%;\n transition: 0.1s ease-out;\n transition-property: box-shadow, transform, background, opacity;\n box-sizing: border-box;\n}\n\n.vc-addon-card-disabled {\n opacity: 0.6;\n}\n\n.vc-addon-card:hover {\n background-color: var(--background-tertiary);\n transform: translateY(-1px);\n box-shadow: var(--elevation-high);\n}\n\n.vc-addon-header {\n margin-top: auto;\n display: flex;\n width: 100%;\n justify-content: flex-end;\n align-items: center;\n gap: 8px;\n margin-bottom: 0.5em;\n}\n\n.vc-addon-note {\n height: 36px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n line-clamp: 2;\n -webkit-box-orient: vertical;\n /* stylelint-disable-next-line property-no-unknown */\n box-orient: vertical;\n}\n\n.vc-addon-name-author {\n width: 100%;\n}\n\n.vc-addon-name {\n display: flex;\n width: 100%;\n align-items: center;\n flex-grow: 1;\n gap: 8px;\n}\n\n.vc-addon-author {\n font-size: 0.8em;\n}\n\n.vc-addon-author::before {\n content: \"by \";\n}\n", ".vc-switch-slider {\n transition: 100ms transform ease-in-out;\n}\n", ".client-theme-settings {\n display: flex;\n flex-direction: column;\n}\n\n.client-theme-container {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n.client-theme-settings-labels {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n}\n\n.client-theme-container > [class^=\"colorSwatch\"] > [class^=\"swatch\"] {\n border: thin solid var(--background-modifier-accent) !important;\n}\n\n.client-theme-warning * {\n color: var(--text-danger);\n}\n\n.client-theme-contrast-warning {\n background-color: var(--background-primary);\n padding: 0.5rem;\n border-radius: .5rem;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n", ".vc-dearrow-toggle-off svg {\n filter: grayscale(1);\n}\n\n.vc-dearrow-toggle-on, .vc-dearrow-toggle-off {\n all: unset;\n display: inline;\n cursor: pointer;\n position: absolute;\n top: 0.75rem;\n right: 0.75rem;\n}\n", ".vc-decor-danger-btn {\n color: var(--white-500);\n background-color: var(--button-danger-background);\n}\n\n.vc-decor-change-decoration-modal-content {\n position: relative;\n display: flex;\n border-radius: 5px 5px 0 0;\n padding: 0 16px;\n gap: 4px;\n}\n\n.vc-decor-change-decoration-modal-preview {\n display: flex;\n flex-direction: column;\n margin-top: 24px;\n gap: 8px;\n max-width: 280px;\n}\n\n.vc-decor-change-decoration-modal-decoration {\n width: 80px;\n height: 80px;\n}\n\n.vc-decor-change-decoration-modal-footer {\n justify-content: space-between;\n}\n\n.vc-decor-change-decoration-modal-footer-btn-container {\n display: flex;\n flex-direction: row-reverse;\n}\n\n.vc-decor-create-decoration-modal-content {\n display: flex;\n flex-direction: column;\n gap: 20px;\n padding: 0 16px;\n}\n\n.vc-decor-create-decoration-modal-form-preview-container {\n display: flex;\n gap: 16px;\n}\n\n.vc-decor-modal-header {\n padding: 16px;\n}\n\n.vc-decor-modal-footer {\n padding: 16px;\n}\n\n.vc-decor-create-decoration-modal-form {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: 16px;\n}\n\n.vc-decor-sectioned-grid-list-container {\n display: flex;\n flex-direction: column;\n overflow: hidden scroll;\n max-height: 512px;\n width: 352px; /* ((80 + 8 (grid gap)) * desired columns) (scrolled takes the extra 8 padding off conveniently) */\n gap: 12px;\n}\n\n.vc-decor-sectioned-grid-list-grid {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.vc-decor-section-remove-margin {\n margin-bottom: 0;\n}\n", ".vc-chatbar-button {\n display: flex;\n align-items: center;\n}\n", ".vc-membercount-widget {\n display: flex;\n align-content: center;\n\n --color-online: var(--green-360);\n --color-total: var(--primary-400);\n}\n\n.vc-membercount-tooltip {\n margin-top: 0.25em;\n margin-left: 2px;\n}\n\n.vc-membercount-member-list {\n justify-content: center;\n margin-top: 1em;\n padding-inline: 1em;\n}\n\n.vc-membercount-online {\n color: var(--color-online);\n}\n\n.vc-membercount-total {\n color: var(--color-total);\n}\n\n.vc-membercount-online-dot {\n background-color: var(--color-online);\n display: inline-block;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n margin-right: 0.5em;\n}\n\n.vc-membercount-total-dot {\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n border: 3px solid var(--color-total);\n margin: 0 0.5em 0 1em;\n}\n", ".messagelogger-deleted [class^=\"buttons\"] {\n display: none;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n) {\n filter: grayscale(1) !important;\n transition: 150ms filter ease-in-out;\n}\n\n.messagelogger-deleted\n:is(\n video,\n .emoji,\n [data-type=\"sticker\"],\n iframe,\n .messagelogger-deleted-attachment,\n [class|=\"inlineMediaEmbed\"]\n):hover,\n.messagelogger-deleted {\n filter: grayscale(0) !important;\n}\n\n.theme-dark .messagelogger-edited {\n filter: brightness(80%);\n}\n\n.theme-light .messagelogger-edited {\n opacity: 0.5;\n}\n", "/* User Permissions Component */\n\n.vc-permviewer-userperms-title-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n margin-bottom: 6px;\n}\n\n.vc-permviewer-userperms-btns-container {\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-sortorder-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n\n.vc-permviewer-userperms-permdetails-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.vc-permviewer-userperms-toggleperms-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n/* RolesAndUsersPermissions Component */\n\n.vc-permviewer-perms-title {\n flex-grow: 1;\n}\n\n.vc-permviewer-perms-no-perms {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n}\n\n.vc-permviewer-perms-container {\n display: grid;\n grid-template-columns: 1fr 2fr;\n grid-template-areas: \"list permissions\";\n padding: 16px 0;\n}\n\n.vc-permviewer-perms-list {\n grid-area: list;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border-right: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-list-item-btn {\n all: unset;\n cursor: pointer;\n}\n\n.vc-permviewer-perms-list-item {\n display: flex;\n align-items: center;\n padding: 8px 5px;\n cursor: pointer;\n width: 230px;\n border-radius: 5px;\n}\n\n.vc-permviewer-perms-list-item:hover {\n background-color: var(--background-modifier-hover);\n}\n\n.vc-permviewer-perms-list-item-active {\n background-color: var(--background-modifier-selected);\n}\n\n.vc-permviewer-perms-list-item > div {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.vc-permviewer-perms-role-circle {\n border-radius: 50%;\n width: 12px;\n height: 12px;\n margin-left: 3px;\n margin-right: 11px;\n flex-shrink: 0;\n}\n\n.vc-permviewer-perms-user-img {\n border-radius: 50%;\n width: 20px;\n height: 20px;\n margin-right: 6px;\n}\n\n.vc-permviewer-perms-perms {\n grid-area: permissions;\n display: flex;\n flex-direction: column;\n margin-left: 5px;\n}\n\n.vc-permviewer-perms-perms-item {\n position: relative;\n display: flex;\n align-items: center;\n padding: 10px;\n border-bottom: 2px solid var(--background-modifier-active);\n}\n\n.vc-permviewer-perms-perms-item:last-child {\n border: 0;\n}\n\n.vc-permviewer-perms-perms-item-icon {\n border: 1px solid var(--background-modifier-selected);\n width: 24px;\n height: 24px;\n margin-right: 5px;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon {\n color: var(--interactive-muted);\n cursor: pointer;\n position: absolute;\n right: 0;\n scale: 0.9;\n transition: color ease-in 0.1s;\n}\n\n.vc-permviewer-perms-perms-item .vc-info-icon:hover {\n color: var(--interactive-active);\n}\n", ".vc-expandableheader-center-flex {\n display: flex;\n justify-items: center;\n align-items: center;\n}\n\n.vc-expandableheader-btn {\n all: unset;\n cursor: pointer;\n width: 24px;\n height: 24px;\n}\n", ".vc-pip-button {\n color: var(--interactive-normal);\n}\n\n.vc-pip-button:hover {\n background-color: var(--background-modifier-hover);\n color: var(--interactive-hover);\n}\n", ".vc-pindms-section-container {\n box-sizing: border-box;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n text-transform: uppercase;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: .02em;\n font-family: var(--font-display);\n font-weight: 600;\n flex: 1 1 auto;\n color: var(--channels-default);\n cursor: pointer;\n}\n\n.vc-pindms-modal-content {\n display: grid;\n justify-content: center;\n padding: 1rem;\n gap: 1.5rem;\n}\n\n.vc-pindms-modal-content [class^=\"defaultContainer\"] {\n display: none;\n}\n\n.vc-pindms-collapse-icon {\n width: 16px;\n height: 16px;\n color: var(--interactive-normal);\n transform: rotate(90deg)\n}\n\n.vc-pindms-collapsed .vc-pindms-collapse-icon {\n transform: rotate(0deg);\n}\n", ".vc-pronoundb-compact {\n display: none;\n}\n\n[class*=\"compact\"] .vc-pronoundb-compact {\n display: inline-block;\n margin-left: -2px;\n margin-right: 0.25rem;\n}\n", "[class|=\"section\"]:not([class|=\"lastSection\"]) + .vc-rdb-view {\n margin-top: 12px;\n}\n\n.vc-rdb-badge {\n vertical-align: middle;\n margin-left: 4px;\n}\n\n.vc-rdb-input {\n margin-top: 6px;\n margin-bottom: 12px;\n resize: none;\n overflow: hidden;\n background: transparent;\n border: 1px solid var(--profile-message-input-border-color);\n}\n\n.vc-rdb-modal-footer > div {\n width: 100%;\n margin: 6px 16px;\n}\n\n/* When input becomes disabled(while sending review), input adds unneccesary padding to left, this prevents it */\n.vc-rdb-input > div > div {\n padding-left: 0 !important;\n}\n\n.vc-rdb-placeholder {\n margin-bottom: 4px;\n font-weight: bold;\n font-style: italic;\n color: var(--text-muted);\n}\n\n.vc-rdb-input * {\n font-size: 14px;\n}\n\n.vc-rdb-modal-footer {\n padding: 0;\n}\n\n.vc-rdb-modal-footer .vc-rdb-input {\n margin-bottom: 0;\n background: var(--input-background);\n}\n\n.vc-rdb-modal-footer [class|=\"pageControlContainer\"] {\n margin-top: 0;\n}\n\n.vc-rdb-modal-header {\n flex-grow: 1;\n}\n\n.vc-rdb-modal-reviews {\n margin-top: 16px;\n}\n\n.vc-rdb-review {\n padding-top: 8px !important;\n padding-bottom: 8px !important;\n padding-right: 32px !important;\n}\n\n.vc-rdb-review:hover {\n background: var(--background-message-hover) !important;\n border-radius: 8px;\n}\n\n.vc-rdb-review-comment img {\n vertical-align: text-top;\n}\n\n.vc-rdb-review-comment {\n overflow-y: hidden;\n margin-top: 1px;\n margin-bottom: 8px;\n color: var(--text-normal);\n font-size: 15px;\n}\n\n.vc-rdb-blocked-badge {\n cursor: pointer;\n}\n\n.vc-rdb-block-modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.vc-rdb-block-modal {\n padding: 1em;\n display: grid;\n gap: 0.75em;\n}\n\n.vc-rdb-button-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 10px;\n}\n\n/* stylelint-disable-next-line media-feature-range-notation */\n@media (max-width: 600px) {\n .vc-rdb-button-grid {\n grid-template-columns: 1fr;\n }\n}\n\n.vc-rdb-block-modal-row {\n display: flex;\n height: 2em;\n gap: 0.5em;\n align-items: center;\n}\n\n.vc-rdb-block-modal-row img {\n border-radius: 50%;\n height: 2em;\n width: 2em;\n}\n\n.vc-rdb-block-modal img::before {\n content: \"\";\n display: block;\n width: 100%;\n height: 100%;\n background-color: var(--background-modifier-accent);\n}\n\n.vc-rdb-block-modal-username {\n flex-grow: 1;\n}\n\n.vc-rdb-block-modal-unblock {\n cursor: pointer;\n}\n", ".vc-st-modal-content input {\n background-color: var(--input-background);\n color: var(--text-normal);\n width: 95%;\n padding: 8px 8px 8px 12px;\n margin: 1em 0;\n outline: none;\n border: 1px solid var(--input-background);\n border-radius: 4px;\n font-weight: 500;\n font-style: inherit;\n font-size: 100%;\n}\n\n.vc-st-format-label,\n.vc-st-format-label span {\n background-color: transparent;\n}\n\n.vc-st-modal-content [class|=\"select\"] {\n margin-bottom: 1em;\n}\n\n.vc-st-modal-content [class|=\"select\"] span {\n background-color: var(--input-background);\n}\n\n.vc-st-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-st-modal-header h1 {\n margin: 0;\n}\n\n.vc-st-modal-header button {\n padding: 0;\n}\n\n.vc-st-preview-text {\n margin-bottom: 1em;\n}\n\n.vc-st-button svg {\n transform: scale(1.1) translateY(1px);\n}\n", ".vc-gp-root {\n height: 100%;\n user-select: text;\n}\n\n.vc-gp-banner {\n cursor: pointer;\n aspect-ratio: auto 240 / 135;\n height: 334px;\n width: 100%;\n object-fit: cover;\n overflow: clip;\n overflow-clip-margin: content-box;\n}\n\n.vc-gp-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5em;\n margin: 0.5em;\n}\n\n.vc-gp-header img {\n width: 48px;\n height: 48px;\n cursor: pointer;\n}\n\n.vc-gp-name-and-description {\n display: flex;\n flex-direction: column;\n gap: 0.2em;\n}\n\n.vc-gp-name {\n margin: 0;\n}\n\n.vc-gp-tab-bar {\n border-bottom: 2px solid var(--background-modifier-accent);\n margin: 20px 12px 0;\n display: flex;\n gap: 40px;\n align-items: stretch;\n flex-direction: row;\n}\n\n.vc-gp-tab {\n border-bottom: 2px solid transparent;\n color: var(--interactive-normal);\n cursor: pointer;\n height: 39px;\n line-height: 14px;\n}\n\n.vc-gp-tab-content {\n margin: 1em;\n}\n\n.vc-gp-tab:where(.vc-gp-selected, :hover, :focus) {\n border-bottom-color: var(--interactive-active);\n}\n\n.vc-gp-info {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 1em;\n}\n\n.vc-gp-server-info-pair {\n color: var(--text-normal);\n}\n\n.vc-gp-server-info-pair [class^=\"timestamp\"] {\n margin-left: 0;\n}\n\n.vc-gp-owner {\n display: flex;\n align-items: center;\n gap: 0.2em;\n}\n\n.vc-gp-owner img {\n height: 20px;\n border-radius: 50%;\n cursor: pointer;\n}\n\n.vc-gp-scroller {\n width: 100%;\n max-height: 500px;\n}\n\n.vc-gp-scroller [class^=\"listRow\"] {\n margin: 1px 0;\n}\n\n.vc-gp-scroller [class^=\"listRow\"]:hover {\n background-color: var(--background-modifier-hover);\n}\n", ".shiki-container {\n border: 4px;\n background-color: var(--background-secondary);\n}\n\n.shiki-root {\n border-radius: 4px;\n}\n\n.shiki-root code {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n position: relative;\n font-size: 0.875rem;\n line-height: 1.125rem;\n text-indent: 0;\n white-space: pre-wrap;\n background: transparent;\n border: none;\n}\n\n.shiki-devicon {\n margin-right: 8px;\n user-select: none;\n}\n\n.shiki-plain code {\n padding-top: 8px;\n}\n\n.shiki-btns {\n font-size: 1em;\n position: absolute;\n right: 0;\n bottom: 0;\n opacity: 0;\n}\n\n.shiki-root:hover .shiki-btns {\n opacity: 1;\n}\n\n.shiki-btn {\n border-radius: 4px 4px 0 0;\n padding: 4px 8px;\n user-select: none;\n}\n\n.shiki-btn ~ .shiki-btn {\n margin-left: 4px;\n}\n\n.shiki-btn:last-child {\n border-radius: 4px 0;\n}\n\n.shiki-spinner-container {\n align-items: center;\n background-color: rgb(0 0 0 / 60%);\n display: flex;\n position: absolute;\n justify-content: center;\n inset: 0;\n}\n\n.shiki-preview {\n margin-bottom: 2em;\n}\n\n.shiki-lang {\n padding: 0 5px;\n margin-bottom: 6px;\n font-weight: bold;\n text-transform: capitalize;\n display: flex;\n align-items: center;\n}\n\n.shiki-table {\n border-collapse: collapse;\n width: 100%;\n}\n\n.shiki-table tr {\n height: 19px;\n width: 100%;\n}\n\n.shiki-root td:first-child {\n border-right: 1px solid transparent;\n padding-left: 5px;\n padding-right: 8px;\n user-select: none;\n}\n\n.shiki-root td:last-child {\n padding-left: 8px;\n word-break: break-word;\n width: 100%;\n}\n", ".vc-user-connection {\n all: unset;\n display: inline-block;\n cursor: pointer;\n}\n\n.vc-sc-tooltip {\n display: inline-flex;\n gap: 0.25em;\n align-items: center;\n}\n", ".shc-lock-screen-outer-container {\n overflow: hidden scroll;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n}\n\n.shc-lock-screen-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n min-height: 100%;\n}\n\n.shc-lock-screen-container > * {\n margin: 5px;\n}\n\n.shc-lock-screen-logo {\n width: 180px;\n height: 180px;\n}\n\n.shc-lock-screen-heading-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-heading-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-heading-nsfw-icon {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-topic-container {\n color: var(--text-normal);\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-tags-container > * {\n margin: inherit;\n}\n\n.shc-lock-screen-tags {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.shc-evenodd-fill-current-color {\n fill-rule: evenodd;\n fill: currentcolor;\n}\n\n.shc-hidden-channel-icon {\n margin-left: 6px;\n z-index: 0;\n cursor: not-allowed;\n}\n\n.shc-lock-screen-default-emoji-container {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-default-emoji-container > [class^=\"emojiContainer\"] {\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 8px;\n padding: 5px 6px;\n margin-left: 5px;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n background: var(--bg-overlay-3, var(--background-secondary));\n border-radius: 5px;\n padding: 10px;\n max-width: 70vw;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn {\n all: unset;\n margin-left: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-toggle-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn {\n all: unset;\n margin-right: 5px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.shc-lock-screen-allowed-users-and-roles-container-permdetails-btn > svg {\n color: var(--text-normal);\n}\n\n.shc-lock-screen-allowed-users-and-roles-container > [class^=\"members\"] {\n margin-left: 10px;\n flex-wrap: wrap;\n justify-content: center;\n}\n", ".vc-smyn-suffix {\n color: var(--text-muted);\n}\n\n.vc-smyn-suffix::before {\n content: \"(\";\n}\n\n.vc-smyn-suffix::after {\n content: \")\";\n}\n", "#vc-spotify-player {\n padding: 0.375rem 0.5rem;\n border-bottom: 1px solid var(--background-modifier-accent);\n\n --vc-spotify-green: #1db954; /* so custom themes can easily change it */\n}\n\n.theme-light #vc-spotify-player {\n background: var(--bg-overlay-3, var(--background-secondary-alt));\n}\n\n.theme-dark #vc-spotify-player {\n background: var(--bg-overlay-1, var(--background-secondary-alt));\n}\n\n.vc-spotify-button {\n background: none;\n color: var(--interactive-normal);\n padding: 0;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.vc-spotify-button:hover {\n color: var(--interactive-hover);\n background-color: var(--background-modifier-selected);\n}\n\n.vc-spotify-button svg {\n height: 24px;\n width: 24px;\n}\n\n[class*=\"vc-spotify-shuffle\"] > svg,\n[class*=\"vc-spotify-repeat\"] > svg {\n width: 22px;\n height: 22px;\n}\n\n.vc-spotify-button svg path {\n width: 100%;\n height: 100%;\n}\n\n/* .vc-spotify-button:hover {\n filter: brightness(1.3);\n} */\n\n.vc-spotify-shuffle-on,\n.vc-spotify-repeat-context,\n.vc-spotify-repeat-track,\n.vc-spotify-shuffle-on:hover,\n.vc-spotify-repeat-context:hover,\n.vc-spotify-repeat-track:hover {\n color: var(--vc-spotify-green);\n}\n\n.vc-spotify-tooltip-text {\n overflow: hidden;\n white-space: nowrap;\n padding-right: 0.2em;\n max-width: 100%;\n margin: unset;\n}\n\n.vc-spotify-repeat-1 {\n font-size: 70%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.vc-spotify-button-row {\n justify-content: center;\n}\n\n#vc-spotify-info-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 3em;\n gap: 0.5em;\n}\n\n#vc-spotify-info-wrapper img {\n height: 90%;\n object-fit: contain;\n}\n\n#vc-spotify-album-expanded-wrapper img {\n width: 100%;\n object-fit: contain;\n}\n\n#vc-spotify-titles {\n display: flex;\n flex-direction: column;\n padding: 0.2rem;\n justify-content: center;\n align-items: flex-start;\n align-content: flex-start;\n overflow: hidden;\n}\n\n#vc-spotify-song-title {\n color: var(--header-primary);\n font-size: 14px;\n font-weight: 600;\n}\n\n.vc-spotify-ellipoverflow {\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n}\n\n.vc-spotify-artist,\n.vc-spotify-album {\n font-size: 12px;\n text-decoration: none;\n color: var(--header-secondary);\n}\n\n.vc-spotify-comma {\n color: var(--header-secondary);\n}\n\n.vc-spotify-artist[role=\"link\"]:hover,\n#vc-spotify-album-title[role=\"link\"]:hover,\n#vc-spotify-song-title[role=\"link\"]:hover {\n text-decoration: underline;\n cursor: pointer;\n}\n\n#vc-spotify-album-image {\n border-radius: 3px;\n transition: filter 0.2s;\n}\n\n#vc-spotify-album-image:hover {\n filter: brightness(1.2);\n cursor: pointer;\n}\n\n#vc-spotify-progress-bar {\n position: relative;\n color: var(--text-normal);\n width: 100%;\n margin: 0.5em 0;\n margin-bottom: 5px;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] {\n flex-grow: 1;\n width: 100%;\n padding: 0 !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"bar-\"] {\n height: 4px !important;\n}\n\n#vc-spotify-progress-bar > [class^=\"slider\"] [class^=\"grabber\"] {\n /* these importants are necessary, it applies a width and height through inline styles */\n height: 10px !important;\n width: 10px !important;\n margin-top: 4px;\n background-color: var(--interactive-normal);\n border-color: var(--interactive-normal);\n color: var(--interactive-normal);\n opacity: 0;\n transition: opacity 0.1s;\n}\n\n#vc-spotify-progress-bar:hover > [class^=\"slider\"] [class^=\"grabber\"] {\n opacity: 1;\n}\n\n#vc-spotify-progress-text {\n margin: 0;\n}\n\n.vc-spotify-progress-time {\n font-size: 12px;\n top: 10px;\n position: absolute;\n}\n\n.vc-spotify-time-left {\n left: 0;\n}\n\n.vc-spotify-time-right {\n right: 0;\n}\n\n.vc-spotify-fallback {\n padding: 0.5em;\n color: var(--text-normal);\n}\n", ".vc-trans-modal-content {\n padding: 1em;\n}\n\n.vc-trans-modal-header {\n justify-content: space-between;\n align-content: center;\n}\n\n.vc-trans-modal-header h1 {\n margin: 0;\n}\n\n.vc-trans-accessory {\n color: var(--text-muted);\n margin-top: 0.5em;\n font-style: italic;\n font-weight: 400;\n}\n\n.vc-trans-accessory svg {\n margin-right: 0.25em;\n}\n\n.vc-trans-dismiss {\n all: unset;\n cursor: pointer;\n color: var(--text-link);\n}\n\n.vc-trans-dismiss:is(:hover, :focus) {\n text-decoration: underline;\n}\n\n.vc-trans-auto-translate {\n color: var(--green-360);\n}\n\n.vc-trans-chat-button {\n scale: 1.085;\n}\n", ".vc-uvs-button>div {\n white-space: normal !important;\n}\n\n.vc-uvs-button {\n width: 100%;\n margin: auto;\n height: unset;\n}\n\n.vc-uvs-header {\n color: var(--header-primary);\n margin-bottom: 6px;\n}\n\n.vc-uvs-modal-margin {\n margin: 0 12px;\n}\n\n.vc-uvs-modal-margin div {\n margin-bottom: 0 !important;\n}\n\n.vc-uvs-popout-margin-self>[class^=\"section\"] {\n padding-top: 0;\n padding-bottom: 12px;\n}\n", ".vc-toolbox-btn,\n.vc-toolbox-btn>svg {\n -webkit-app-region: no-drag;\n}\n\n.vc-toolbox-btn>svg {\n color: var(--interactive-normal);\n}\n\n.vc-toolbox-btn[class*=\"selected\"]>svg {\n color: var(--interactive-active);\n}\n\n.vc-toolbox-btn:hover>svg {\n color: var(--interactive-hover);\n}\n", ".vc-vmsg-modal {\n padding: 1em;\n}\n\n.vc-vmsg-buttons {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 0.5em;\n margin-bottom: 1em;\n}\n\n.vc-vmsg-modal audio {\n width: 100%;\n}\n\n.vc-vmsg-preview {\n color: var(--text-normal);\n border-radius: 24px;\n background-color: var(--background-secondary);\n position: relative;\n display: flex;\n align-items: center;\n padding: 0 16px;\n height: 48px;\n}\n\n.vc-vmsg-preview-indicator {\n background: var(--button-secondary-background);\n width: 16px;\n height: 16px;\n border-radius: 50%;\n transition: background 0.2s ease-in-out;\n}\n\n.vc-vmsg-preview-recording .vc-vmsg-preview-indicator {\n background: var(--status-danger);\n}\n\n.vc-vmsg-preview-time {\n opacity: 0.8;\n margin: 0 0.5em;\n font-size: 80%;\n\n /* monospace so different digits have same size */\n font-family: var(--font-code);\n}\n\n.vc-vmsg-preview-label {\n opacity: 0.5;\n letter-spacing: 0.125em;\n font-weight: 600;\n flex: 1;\n text-align: center;\n}\n"],
+ "mappings": "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",
"names": []
}
diff --git a/vesktop/vencordDist/vencordDesktopRenderer.js b/vesktop/vencordDist/vencordDesktopRenderer.js
index 79aacc5..acc2fc0 100644
--- a/vesktop/vencordDist/vencordDesktopRenderer.js
+++ b/vesktop/vencordDist/vencordDesktopRenderer.js
@@ -1,74 +1,90 @@
-// Vencord d73790e
+// Vencord ca18b6e
// Standalone: true
// Platform: Universal
// Updater disabled: false
-"use strict";var Vencord=(()=>{var MM=Object.create;var Sa=Object.defineProperty;var PM=Object.getOwnPropertyDescriptor;var IM=Object.getOwnPropertyNames;var AM=Object.getPrototypeOf,NM=Object.prototype.hasOwnProperty;var Zr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var o in t)Sa(e,o,{get:t[o],enumerable:!0})},Gh=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of IM(t))!NM.call(e,i)&&i!==o&&Sa(e,i,{get:()=>t[i],enumerable:!(r=PM(t,i))||r.enumerable});return e};var ba=(e,t,o)=>(o=e!=null?MM(AM(e)):{},Gh(t||!e||!e.__esModule?Sa(o,"default",{value:e,enumerable:!0}):o,e)),En=e=>Gh(Sa({},"__esModule",{value:!0}),e);var f,n,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Ve=g(()=>{"use strict";a();ie=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var Hh,z,it=g(()=>{"use strict";a();Hh="",z={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;z[`${e}${t}`]=o,Hh+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Hh,id:"vencord-margins"})),{once:!0})});function _n(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Ft(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[Yi]:void 0,[Xr](){return!s[Yi]&&t>i++&&(s[Yi]=e(),!s[Yi]&&t===i&&console.error("Lazy factory failed:",e)),s[Yi]}});return new Proxy(s,{...Ta,get(l,c,u){return!o&&r?Ft(()=>Reflect.get(l[Xr](),c,u),t,!0):Reflect.get(l[Xr](),c,u)}})}var zh,Ta,Xr,Yi,qo=g(()=>{"use strict";a();zh=["arguments","caller","prototype"],Ta={},Xr=Symbol.for("vencord.lazy.get"),Yi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Ta[e]=(t,...o)=>Reflect[e](t[Xr](),...o);Ta.ownKeys=e=>{let t=e[Xr](),o=Reflect.ownKeys(t);for(let r of zh)o.includes(r)||o.push(r);return o};Ta.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&zh.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[Xr](),t);return o&&Object.defineProperty(e,t,o),o}});function It(e,t=5){let o=_n(e,t),r=i=>{let s=o()??CM;return n(s,{...i})};return r.$$vencordInternal=o,r}var CM,Gc=g(()=>{"use strict";a();qo();CM=()=>null});function ln(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function xa(e,t){let o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",o):(...r)=>e(...r).replaceAll("$self",o)}function Hc(e,t){if(e.get){let o=e.get;e.get=function(){return t(o.call(this))}}else e.value&&(e.value=t(e.value));return e}function Zi(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Hc(o.match,ln),o.replace=Hc(o.replace,r=>xa(r,t)),Object.defineProperties(e,o)}var Jr=g(()=>{"use strict";a()});var kM,Ko,wa=g(()=>{"use strict";a();Ve();kM=(e,t,o)=>t,Ko=kM});function Pa(e){if(cn!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>Qt=t]),e.pop(),Qt?(cn=Qt.c,!0):!1}function On(e,...t){let o=new Error(`webpack.${e} found no module`);Qr.error(o,"Filter:",t)}function Sr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in cn){let r=cn[o];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function Wh(...e){let t=Ia(...e);return t?Qt.m[t]:null}function No(e,t){return Ft(e,t)}function Wc(e,t){return It(e,t)}function Vt(e){return Ft(()=>Ao(e))}function Ji(...e){let t=Ao(Ae.byProps(...e),{isIndirect:!0});return t||On("findByProps",...e),t}function P(...e){return Ft(()=>Ji(...e))}function qh(...e){let t=Ao(Ae.byCode(...e),{isIndirect:!0});return t||On("findByCode",...e),t}function un(...e){return Ft(()=>qh(...e))}function Kh(e){let t=Ao(Ae.byStoreName(e),{isIndirect:!0});return t||On("findStore",e),t}function Re(e){return Ft(()=>Kh(e))}function qc(...e){let t=Ao(Ae.componentByCode(...e),{isIndirect:!0});return t||On("findComponentByCode",...e),t}function Kc(e){return It(()=>{let t=Ao(e,{isIndirect:!0});return t||On("findComponent",e),t})}function je(...e){return It(()=>{let t=Ao(Ae.componentByCode(...e),{isIndirect:!0});return t||On("findComponentByCode",...e),t})}function pn(...e){return It(()=>{let t=Ao(Ae.byProps(...e),{isIndirect:!0});return t||On("findExportedComponent",...e),t[e[0]]})}async function Yh(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){let o=Wh(...e);if(!o){let s=new Error("extractAndLoadChunks: Couldn't find module factory");Qr.warn(s,"Code:",e,"Matcher:",t);return}let r=o.toString().match(ln(t));if(!r){let s=new Error("extractAndLoadChunks: Couldn't find entry point id in module factory code");Qr.warn(s,"Code:",e,"Matcher:",t);return}let[,i]=r;if(!i||!Number(i)){let s=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the entry point, or the entry point returned wasn't a number");Qr.warn(s,"Code:",e,"Matcher:",t);return}return await Qt.el(i),Qt(i)}function Aa(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){return()=>Yh(e,t)}function ft(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=Ae.byProps(e);else if(Array.isArray(e))e=Ae.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[r,i]=Ao(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i);jh.set(e,t)}function DM(e){jc.add(e)}function LM(e){jc.delete(e)}function Yc(...e){let t={},o=Qt.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let l of e)if(typeof l=="string"&&!s.includes(l)||l instanceof RegExp&&!l.test(s))continue e;t[r]=i}return t}function Na(e){let t=Qt.m[e];if(!t)return null;let o=`
+"use strict";var Vencord=(()=>{var kP=Object.create;var qa=Object.defineProperty;var NP=Object.getOwnPropertyDescriptor;var DP=Object.getOwnPropertyNames;var LP=Object.getPrototypeOf,EP=Object.prototype.hasOwnProperty;var fi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qe=(e,t)=>{for(var o in t)qa(e,o,{get:t[o],enumerable:!0})},a1=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of DP(t))!EP.call(e,i)&&i!==o&&qa(e,i,{get:()=>t[i],enumerable:!(r=NP(t,i))||r.enumerable});return e};var Ka=(e,t,o)=>(o=e!=null?kP(LP(e)):{},a1(t||!e||!e.__esModule?qa(o,"default",{value:e,enumerable:!0}):o,e)),Xn=e=>a1(qa({},"__esModule",{value:!0}),e);var f,n,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var oe,Ke=g(()=>{"use strict";a();oe=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var l1,j,ot=g(()=>{"use strict";a();l1="",j={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;j[`${e}${t}`]=o,l1+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:l1,id:"vencord-margins"})),{once:!0})});function Jn(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Ot(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[hs]:void 0,[gi](){return!s[hs]&&t>i++&&(s[hs]=e(),!s[hs]&&t===i&&console.error("Lazy factory failed:",e)),s[hs]}});return new Proxy(s,{...Ya,get(l,c,u){return!o&&r?Ot(()=>Reflect.get(l[gi](),c,u),t,!0):Reflect.get(l[gi](),c,u)}})}var c1,Ya,gi,hs,Uo=g(()=>{"use strict";a();c1=["arguments","caller","prototype"],Ya={},gi=Symbol.for("vencord.lazy.get"),hs=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Ya[e]=(t,...o)=>Reflect[e](t[gi](),...o);Ya.ownKeys=e=>{let t=e[gi](),o=Reflect.ownKeys(t);for(let r of c1)o.includes(r)||o.push(r);return o};Ya.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&c1.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[gi](),t);return o&&Object.defineProperty(e,t,o),o}});function bt(e,t=5){let o=Jn(e,t),r=i=>{let s=o()??OP;return n(s,{...i})};return r.$$vencordInternal=o,r}var OP,Cu=g(()=>{"use strict";a();Uo();OP=()=>null});function bn(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Za(e,t){let o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",o):(...r)=>e(...r).replaceAll("$self",o)}function Ru(e,t){if(e.get){let o=e.get;e.get=function(){return t(o.call(this))}}else e.value&&(e.value=t(e.value));return e}function ys(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Ru(o.match,bn),o.replace=Ru(o.replace,r=>Za(r,t)),Object.defineProperties(e,o)}var hi=g(()=>{"use strict";a()});var _P,an,Xa=g(()=>{"use strict";a();Ke();_P=(e,t,o)=>t,an=_P});function Qa(e){if(ln!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>io=t]),e.pop(),io?(ln=io.c,!0):!1}function Qn(e,...t){let o=new Error(`webpack.${e} found no module`);yi.error(o,"Filter:",t)}function Nr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in ln){let r=ln[o];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function p1(...e){let t=Va(...e);return t?io.m[t]:null}function go(e,t){return Ot(e,t)}function Du(e,t){return bt(e,t)}function so(e){return Ot(()=>$o(e))}function Lr(...e){let t=$o(Ce.byProps(...e),{isIndirect:!0});return t||Qn("findByProps",...e),t}function x(...e){return Ot(()=>Lr(...e))}function d1(...e){let t=$o(Ce.byCode(...e),{isIndirect:!0});return t||Qn("findByCode",...e),t}function Go(...e){return Ot(()=>d1(...e))}function m1(e){let t=$o(Ce.byStoreName(e),{isIndirect:!0});return t||Qn("findStore",e),t}function Re(e){return Ot(()=>m1(e))}function Lu(...e){let t=$o(Ce.componentByCode(...e),{isIndirect:!0});return t||Qn("findComponentByCode",...e),t}function Eu(e){return bt(()=>{let t=$o(e,{isIndirect:!0});return t||Qn("findComponent",e),t})}function Ne(...e){return bt(()=>{let t=$o(Ce.componentByCode(...e),{isIndirect:!0});return t||Qn("findComponentByCode",...e),t})}function Tn(...e){return bt(()=>{let t=$o(Ce.byProps(...e),{isIndirect:!0});return t||Qn("findExportedComponent",...e),t[e[0]]})}async function f1(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){let o=p1(...e);if(!o){let s=new Error("extractAndLoadChunks: Couldn't find module factory");yi.warn(s,"Code:",e,"Matcher:",t);return}let r=o.toString().match(bn(t));if(!r){let s=new Error("extractAndLoadChunks: Couldn't find entry point id in module factory code");yi.warn(s,"Code:",e,"Matcher:",t);return}let[,i]=r;if(!i||!Number(i)){let s=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the entry point, or the entry point returned wasn't a number");yi.warn(s,"Code:",e,"Matcher:",t);return}return await io.el(i),io(i)}function vi(e,t=/\.el\("(.+?)"\)(?<=(\i)\.el.+?)\.then\(\2\.bind\(\2,"\1"\)\)/){return()=>f1(e,t)}function gt(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=Ce.byProps(e);else if(Array.isArray(e))e=Ce.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(ln!=null){let[r,i]=$o(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}u1.set(e,t)}function FP(e){Nu.add(e)}function UP(e){Nu.delete(e)}function Ou(...e){let t={},o=io.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let l of e)if(typeof l=="string"&&!s.includes(l)||l instanceof RegExp&&!l.test(s))continue e;t[r]=i}return t}function el(e){let t=io.m[e];if(!t)return null;let o=`
// [EXTRACTED] WebpackModule${e}
// WARNING: This module was extracted to be more easily readable.
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
0,${t.toString()}
//# sourceURL=ExtractedWebpackModule${e}
-`;return(0,eval)(o)}var Qr,Ma,zc,Qt,cn,Ae,jh,jc,Ao,Xi,Ia,RM,j=g(()=>{"use strict";a();qo();Gc();Ve();Jr();wa();Qr=new ie("Webpack"),zc=new Promise(e=>Ma=e),Ae={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let o=Function.prototype.toString.call(t);for(let r of e)if(!o.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ae.byCode(...e);return o=>t(o)?!0:o.$$typeof?o.type?t(o.type):o.render?t(o.render):!1:!1}},jh=new Map,jc=new Set;Ao=Ko("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in cn){let s=cn[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,i]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,i]:l}}}return o||On("find",t),r?[null,null]:null});Xi=Ko("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return Ao(t[0]);let r=t,i=0,s=Array(o);e:for(let l in cn){let c=cn[l];if(!!c?.exports)for(let u=0;u{"use strict";a();Uo();Cu();Ke();hi();Xa();yi=new oe("Webpack"),ku=new Promise(e=>Ja=e),Ce={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let o=Function.prototype.toString.call(t);for(let r of e)if(!o.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ce.byCode(...e);return o=>t(o)?!0:o.$$typeof?o.type&&o.type.render?t(o.type.render):o.type?t(o.type):o.render?t(o.render):!1:!1}},u1=new Map,Nu=new Set;$o=an("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in ln){let s=ln[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,i]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,i]:l}}}return o||Qn("find",t),r?[null,null]:null});Dr=an("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return $o(t[0]);let r=t,i=0,s=Array(o);e:for(let l in ln){let c=ln[l];if(!!c?.exports)for(let u=0;u{"use strict";a();j();Ca=Vt(e=>e.image&&e.modal&&!e.applicationIcon),St=P("buttonWrapper","buttonContent")});function ka(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=It(()=>o);return ft(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function Et(e,t){ft(Ae.byStoreName(e),t,{isIndirect:!0})}var Zc=g(()=>{"use strict";a();ut();j()});var S,At,C,gt,ee,ot,Ra,J,ho,Da,br,eo,Qi,Xh,Co,Jh,Vr,ei,ti,Vi,oi,Yo,_M,es,Qh=g(()=>{"use strict";a();j();Zc();S={},oi=ka("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),Yo=ka("Timestamp",Ae.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),_M=ka("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:es}=P("OAuth2AuthorizeModal");ft(["FormItem","Button"],e=>{({useToken:Vi,Card:At,Button:C,FormSwitch:gt,Tooltip:ee,TextInput:ot,TextArea:Ra,Text:J,Select:ho,SearchableSelect:Da,Slider:br,ButtonLooks:eo,TabBar:Co,Popout:Qi,Dialog:Xh,Paginator:Jh,ScrollerThin:Vr,Clickable:ei,Avatar:ti}=e),S=e})});var G,Ut,Vh=g(()=>{"use strict";a();j();G={};ft(["MenuItem","MenuSliderControl"],e=>G=e);Ut=P("closeContextMenu","openContextMenu")});var _,Y,pe,bt,to,ni,La,Tr,ey=g(()=>{"use strict";a();j();Tr=P("createPortal","render");ft("useState",e=>{_=e,{useEffect:pe,useState:Y,useMemo:bt,useRef:to,useReducer:ni,useCallback:La}=_})});var Xc,ri,ts,ty=g(()=>{"use strict";a();j();Xc=P("MessageDisplayCompact"),ri=P("ShowCurrentGame"),ts=P("PreloadedUserSettingsActionCreators")});var Jc,Qc,ko,Vc,_e,ii,xr,Zo,OM,de,U,po,be,mo,Q,Oe,st,Ro,os,ns,Ye,oy=g(()=>{"use strict";a();j();Zc();Jc=P("connectStores"),Qc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(Qc||{}),Vc=P("openPrivateChannel"),{useStateFromStores:Ye}=P("useStateFromStores");Et("DraftStore",e=>ns=e);Et("UserStore",e=>U=e);Et("UserProfileStore",e=>po=e);Et("ChannelStore",e=>Q=e);Et("SelectedChannelStore",e=>be=e);Et("SelectedGuildStore",e=>mo=e);Et("GuildStore",e=>de=e);Et("GuildMemberStore",e=>Oe=e);Et("RelationshipStore",e=>st=e);Et("PermissionStore",e=>_e=e);Et("PresenceStore",e=>Zo=e);Et("ReadStateStore",e=>xr=e);Et("GuildChannelStore",e=>ii=e);Et("MessageStore",e=>ko=e);Et("WindowStore",e=>os=e);Et("EmojiStore",e=>Ro=e)});var ny={};var ry=g(()=>{"use strict";a()});var iy={};var sy=g(()=>{"use strict";a()});var ay={};var ly=g(()=>{"use strict";a()});function oo(e,t=cy.MESSAGE){oe.show({id:oe.genId(),message:e,type:t})}var O,Bn,Nt,yo,wr,Mr,et,Xo,Be,_t,cy,BM,oe,Ct,rs,Pr,$t,Do,dn,xe,Ir,FM,eu,no,tu,ou,uy=g(()=>{"use strict";a();j();ft(["dispatch","subscribe"],e=>{O=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ma()};e.subscribe("CONNECTION_OPEN",t)});ft(["ComponentDispatch","ComponentDispatcher"],e=>Bn=e.ComponentDispatch);Nt=P("getAPIBaseURL","get"),yo=P("parseTwoDigitYear"),wr=P("highlight","registerLanguage"),Mr=P("debounce","cloneDeep"),et=Vt(e=>e.Messages?.["en-US"]);ft(["fromTimestamp","extractTimestamp"],e=>Xo=e);ft("parseTopic",e=>Be=e);ft(["show","close"],e=>_t=e);cy={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},BM={TOP:0,BOTTOM:1},oe={Type:cy,Position:BM,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};ft("showToast",e=>{oe.show=e.showToast,oe.pop=e.popToast});Ct=P("getUser","fetchCurrentUser"),rs=P("showUploadFileSizeExceededError","promptToUpload"),Pr=P("fetchAssetIds","getAssetImage"),$t=P("SUPPORTS_COPY","copy"),Do=P("transitionTo","replaceWith","transitionToGuild");ft(["open","saveAccountChanges"],e=>dn=e);({Permissions:xe}=Vt(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint")),Ir=un("will be removed in v4"),FM=Ae.byCode("[zustand persist middleware]"),{persist:eu}=Vt(e=>e.persist&&FM(e.persist)),no=P("editMessage","sendMessage"),tu=P("openUserProfileModal","closeUserProfileModal"),ou=P("resolveInvite")});var nu={};ze(nu,{Alerts:()=>_t,ApplicationAssetUtils:()=>Pr,Avatar:()=>ti,Button:()=>C,ButtonLooks:()=>eo,ButtonWrapperClasses:()=>St,Card:()=>At,ChannelStore:()=>Q,Clickable:()=>ei,Clipboard:()=>$t,ComponentDispatch:()=>Bn,ComponentTypes:()=>ny,ContextMenuApi:()=>Ut,Dialog:()=>Xh,DraftStore:()=>ns,DraftType:()=>Qc,EmojiStore:()=>Ro,Flex:()=>_M,Flux:()=>Jc,FluxDispatcher:()=>O,Forms:()=>S,GuildChannelStore:()=>ii,GuildMemberStore:()=>Oe,GuildStore:()=>de,InviteActions:()=>ou,MaskedLink:()=>oi,Menu:()=>G,MenuTypes:()=>iy,MessageActions:()=>no,MessageStore:()=>ko,ModalImageClasses:()=>Ca,NavigationRouter:()=>Do,OAuth2AuthorizeModal:()=>es,Paginator:()=>Jh,Parser:()=>Be,PermissionStore:()=>_e,PermissionsBits:()=>xe,PoggerModeSettingsStore:()=>OM,Popout:()=>Qi,PresenceStore:()=>Zo,PrivateChannelsStore:()=>Vc,React:()=>_,ReactDOM:()=>Tr,ReadStateStore:()=>xr,RelationshipStore:()=>st,RestAPI:()=>Nt,ScrollerThin:()=>Vr,SearchableSelect:()=>Da,Select:()=>ho,SelectedChannelStore:()=>be,SelectedGuildStore:()=>mo,SettingsRouter:()=>dn,Slider:()=>br,SnowflakeUtils:()=>Xo,StatusSettingsStores:()=>ri,Switch:()=>gt,TabBar:()=>Co,Text:()=>J,TextAndImagesSettingsStores:()=>Xc,TextArea:()=>Ra,TextInput:()=>ot,Timestamp:()=>Yo,Toasts:()=>oe,Tooltip:()=>ee,UploadHandler:()=>rs,UserProfileActions:()=>tu,UserProfileStore:()=>po,UserSettingsActionCreators:()=>ts,UserStore:()=>U,UserUtils:()=>Ct,UtilTypes:()=>ay,WindowStore:()=>os,hljs:()=>wr,i18n:()=>et,lodash:()=>Mr,moment:()=>yo,showToast:()=>oo,useCallback:()=>La,useEffect:()=>pe,useMemo:()=>bt,useReducer:()=>ni,useRef:()=>to,useState:()=>Y,useStateFromStores:()=>Ye,useToken:()=>Vi,zustandCreate:()=>Ir,zustandPersist:()=>eu});var x=g(()=>{"use strict";a();Zh();Qh();Vh();ey();ty();oy();ry();sy();ly();uy()});var fo,si=g(()=>{a();fo="d73790e"});var Ea,py=g(()=>{a();Ea="Vendicated/Vencord"});var Jo,UM,ru,_a,m,ai,A=g(()=>{"use strict";a();si();py();Jo="webpackChunkdiscord_app",UM="Vencord.Webpack.Common.React",ru=`Vencord/${fo}${Ea?` (https://github.com/${Ea})`:""}`,_a="1026515880080842772",m=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"ActuallyTheSun",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},Strencher:{name:"Strencher",id:415849376598982656n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"Luna <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Lumap:{name:"lumap",id:635383782576357407n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},ant0n:{name:"ant0n",id:145224646868860928n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Grzesiek11:{name:"Grzesiek11",id:368475654662127616n}}),ai=(()=>Object.freeze(Object.fromEntries(Object.entries(m).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function Ar(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},Ar(e[o],r)):e[o]??=r}return e}function te(...e){return e.filter(Boolean).join(" ")}function Fn(e){return new Promise(t=>setTimeout(t,e))}function vo(e,t="Copied to clipboard!"){$t.SUPPORTS_COPY?$t.copy(e):t="Your browser does not support copying to clipboard",oe.show({message:t,id:oe.genId(),type:oe.Type.SUCCESS})}function $M(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function is(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function iu(e){try{return new URL(e)}catch{return null}}function ss(e){return e}var su,GM,as,Pe=g(()=>{"use strict";a();x();A();su=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};GM=navigator.userAgent.includes("Mobi"),as=e=>Object.hasOwn(ai,e)});function at(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=Y({value:o.fallbackValue,error:null,pending:!0});return pe(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Un(e){let t=ni(o=>o+1,0);return e?t:t[1]}function ls({interval:e=1e3,deps:t=[]}){let[o,r]=Y(0),i=bt(()=>Date.now(),t);return pe(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var HM,au,ut=g(()=>{"use strict";a();x();Pe();Gc();HM=()=>null,au=(e=!1)=>{let t=_.useRef(null),[o,r]=Y(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(su(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},o]}});var dy=g(()=>{});function So(e){return n("div",{...e,className:te(e.className,"vc-error-card")},e.children)}var li=g(()=>{"use strict";a();dy();Pe()});var zM,my,fy,lu,B,ae=g(()=>{"use strict";a();Ve();it();ut();x();li();zM="#e78284",my=new ie("React ErrorBoundary",zM),fy={},lu=It(()=>class extends _.PureComponent{state={error:fy,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
-`);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),my.error(`A component threw an Error
-`,t),my.error("Component Stack",o.componentStack)}render(){if(this.state.error===fy)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(So,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:z.top8},this.state.stack)))}});lu.wrap=(e,t)=>o=>n(lu,{...t,wrappedProps:o},n(e,{...o}));B=lu});function Oa(){return n("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},n("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var cu=g(()=>{"use strict";a()});function cs(e){return n(C,{...e,look:C.Looks.LINK,color:C.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(Oa,null),"Donate")}var uu=g(()=>{"use strict";a();x();cu()});function ce(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var kt=g(()=>{"use strict";a()});function us(e,t){return Ba.openModalLazy(e,t)}function we(e,t,o){return Ba.openModal(e,t,o)}function mn(e,t){return Ba.closeModal(e,t)}function Qo(){return Ba.closeAllModals()}var Lo,Eo,pu,Ne,Xe,We,pt,Tt,Ba,nt=g(()=>{"use strict";a();j();ut();Lo=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Lo||{}),Eo=P("ModalRoot","ModalCloseButton"),pu=pn("ImageModal"),Ne=It(()=>Eo.ModalRoot),Xe=It(()=>Eo.ModalHeader),We=It(()=>Eo.ModalContent),pt=It(()=>Eo.ModalFooter),Tt=It(()=>Eo.ModalCloseButton),Ba=P("openModalLazy")});function y(e){return e}var w=g(()=>{"use strict";a()});async function gy(e=!1){du={};let t={};e&&(t.cache="no-cache"),du=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var jM,WM,du,mu,hy=g(()=>{"use strict";a();Ua();uu();ae();kt();cu();A();it();Pe();nt();w();x();jM="https://vencord.dev/assets/favicon.png",WM={description:"Vencord Contributor",image:jM,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>as(e.id),link:"https://github.com/Vendicated/Vencord"},du={};mu=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[m.Megu,m.Ven,m.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await gy(!0),oe.show({id:oe.genId(),message:"Successfully refetched badges!",type:oe.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(WM),await gy()},renderBadgeComponent:B.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return du[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=we(r=>n(B,{noop:!0,onError:()=>{mn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Eo.ModalRoot,{...r},n(Eo.ModalHeader,null,n(ce,{style:{width:"100%",justifyContent:"center"}},n(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(Oa,null),"Vencord Donor"))),n(Eo.ModalContent,null,n(ce,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(S.FormText,null,"This Badge is a special perk for Vencord Donors"),n(S.FormText,{className:z.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(Eo.ModalFooter,null,n(ce,{style:{width:"100%",justifyContent:"center"}},n(cs,null))))))}}))}})});var fu,yy=g(()=>{"use strict";a();A();w();fu=y({name:"CommandsAPI",authors:[m.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var gu,vy=g(()=>{"use strict";a();A();w();gu=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[m.Nuckyz,m.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var hu,Sy=g(()=>{"use strict";a();A();w();hu=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[m.TheSun,m.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var yu,by=g(()=>{"use strict";a();A();w();yu=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[m.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var vu,Ty=g(()=>{"use strict";a();A();w();vu=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[m.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var Su,xy=g(()=>{"use strict";a();A();w();Su=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[m.Arjix,m.hunt,m.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i,s,l)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var bu,wy=g(()=>{"use strict";a();A();w();bu=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[m.KingFish,m.Ven,m.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let o=e.match(/message:(.{1,3}),/)?.[1];if(!o)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${o},${t}),${e}`}}}]})});var Tu,My=g(()=>{"use strict";a();A();w();Tu=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[m.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var xu,Py=g(()=>{"use strict";a();A();w();xu=y({name:"ServerListAPI",authors:[m.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var wu,Iy=g(()=>{"use strict";a();A();w();wu=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[m.Cyn,m.Ven,m.Nuckyz,m.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});var Pu={};ze(Pu,{_patchContextMenu:()=>YM,addContextMenuPatch:()=>ue,addGlobalContextMenuPatch:()=>qM,findGroupChildrenByChildId:()=>dt,globalPatches:()=>$a,navPatches:()=>ps,removeContextMenuPatch:()=>fe,removeGlobalContextMenuPatch:()=>KM});function ue(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=ps.get(o);r||(r=new Set,ps.set(o,r)),r.add(t)}}function qM(e){$a.add(e)}function fe(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>ps.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function KM(e){return $a.delete(e)}function dt(e,t,o){for(let r of t){if(r==null)continue;if(Array.isArray(e)&&e.some(s=>r.props?.id===s)||r.props?.id===e)return o??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=dt(e,i,i);if(s!==null)return s}}return null}function YM(e){e.contextMenuApiArguments??=[];let t=ps.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{let r=o(e.children,...e.contextMenuApiArguments);Mu.has(e)||r?.()}catch(r){Ay.error(`Patch for ${e.navId} errored,`,r)}for(let o of $a)try{let r=o(e.navId,e.children,...e.contextMenuApiArguments);Mu.has(e)||r?.()}catch(r){Ay.error("Global patch errored,",r)}Mu.add(e)}var Ay,ps,$a,Mu,Rt=g(()=>{"use strict";a();Ve();Ay=new ie("ContextMenu"),ps=new Map,$a=new Set;Mu=new WeakSet});function ro(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var Nr=g(()=>{"use strict";a()});var Cr,Ga=g(()=>{"use strict";a();({localStorage:Cr}=window)});var _o,ci=g(()=>{"use strict";a();_o=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var Ny=g(()=>{});var Ha,Iu=g(()=>{"use strict";a();Ny();$();ae();Pe();x();Ha=B.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:p,className:d,dismissOnClick:h}){let{timeout:v,position:T}=mt(["notifications.timeout","notifications.position"]).notifications,N=Ye([os],()=>os.isFocused()),[b,I]=Y(!1),[k,M]=Y(0),F=bt(()=>Date.now(),[v,b,N]);pe(()=>{if(b||!N||v===0||p)return void M(0);let X=setInterval(()=>{let Z=Date.now()-F;Z>=v?c():M(Z)},10);return()=>clearInterval(X)},[v,b,N]);let H=k/v;return n("button",{className:te("vc-notification-root",d),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:X=>{X.preventDefault(),X.stopPropagation(),c()},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:X=>{X.preventDefault(),X.stopPropagation(),c()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),u&&n("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!p&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-H)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var fn={};ze(fn,{clear:()=>QM,createStore:()=>Cy,del:()=>Nu,delMany:()=>JM,entries:()=>tP,get:()=>Dt,getMany:()=>XM,keys:()=>VM,promisifyRequest:()=>zt,set:()=>io,setMany:()=>ZM,update:()=>kr,values:()=>eP});function zt(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Cy(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=zt(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Oo(){return Au||(Au=Cy("VencordData","VencordStore")),Au}function Dt(e,t=Oo()){return t("readonly",o=>zt(o.get(e)))}function io(e,t,o=Oo()){return o("readwrite",r=>(r.put(t,e),zt(r.transaction)))}function ZM(e,t=Oo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),zt(o.transaction)))}function XM(e,t=Oo()){return t("readonly",o=>Promise.all(e.map(r=>zt(o.get(r)))))}function kr(e,t,o=Oo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(zt(r.transaction))}catch(l){s(l)}}}))}function Nu(e,t=Oo()){return t("readwrite",o=>(o.delete(e),zt(o.transaction)))}function JM(e,t=Oo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),zt(o.transaction)))}function QM(e=Oo()){return e("readwrite",t=>(t.clear(),zt(t.transaction)))}function Cu(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},zt(e.transaction)}function VM(e=Oo()){return e("readonly",t=>{if(t.getAllKeys)return zt(t.getAllKeys());let o=[];return Cu(t,r=>o.push(r.key)).then(()=>o)})}function eP(e=Oo()){return e("readonly",t=>{if(t.getAll)return zt(t.getAll());let o=[];return Cu(t,r=>o.push(r.value)).then(()=>o)})}function tP(e=Oo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([zt(t.getAllKeys()),zt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>Cu(r,i=>o.push([i.key,i.value])).then(()=>o))})}var Au,Vo=g(()=>{"use strict";a();});var Du={};ze(Du,{classNameFactory:()=>Fe,classNameToSelector:()=>Ry,compileStyle:()=>Ru,disableStyle:()=>jt,enableStyle:()=>xt,isStyleEnabled:()=>ku,requireStyle:()=>ds,setStyleClassNames:()=>nP,styleMap:()=>ky,toggleStyle:()=>oP});function ds(e){let t=ky.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function xt(e){let t=ds(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Ru(t),document.head.appendChild(t.dom),!0)}function jt(e){let t=ds(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var ky,oP,ku,nP,Ru,Ry,Fe,rt=g(()=>{"use strict";a();ky=window.VencordStyles??=new Map;oP=e=>ku(e)?jt(e):xt(e),ku=e=>ds(e).dom?.isConnected??!1,nP=(e,t,o=!0)=>{let r=ds(e);r.classNames=t,o&&ku(r.name)&&Ru(r)},Ru=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?Ry(r):t})},Ry=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),Fe=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});var Dy,Ly=g(()=>{a();Dy=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,o)=>(o&=63,o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o>62?t+="-":t+="_",t),"")});async function _y(e){if(e.noPersist)return;let t=E.notifications.logLimit;t!==0&&(await kr(za,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:p,...d}=e;return r.unshift({...d,timestamp:Date.now(),id:Dy()}),r.length>t&&t!==200&&(r.length=t),r}),ms.forEach(o=>o()))}async function rP(e){let t=await Ey(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await io(za,t),ms.forEach(r=>r()))}function iP(){let[e,t]=ni(s=>s+1,0);pe(()=>(ms.add(t),()=>void ms.delete(t)),[]);let[o,r,i]=at(Ey,{fallbackValue:[],deps:[e]});return[o,i]}function sP({data:e}){let[t,o]=Y(!1),r=_.useRef(null);return pe(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:ui("wrapper",{removing:t}),ref:r},n(Ha,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>rP(e.timestamp),200))},richBody:n("div",{className:ui("body")},e.body,n(Yo,{timestamp:yo(e.timestamp),className:ui("timestamp")}))}))}function aP({log:e,pending:t}){return!e.length&&!t?n("div",{className:ui("container")},n("div",{className:ui("empty")}),n(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:ui("container")},e.map(o=>n(sP,{data:o,key:o.id})))}function lP({modalProps:e,close:t}){let[o,r]=iP();return n(Ne,{...e,size:"large"},n(Xe,null,n(J,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(Tt,{onClick:t})),n(We,null,n(aP,{log:o,pending:r})),n(pt,null,n(C,{disabled:o.length===0,onClick:()=>{_t.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await io(za,[]),ms.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function ja(){let e=we(t=>n(lP,{modalProps:t,close:()=>mn(e)}))}var za,Ey,ui,ms,Wa=g(()=>{"use strict";a();Vo();$();rt();nt();ut();x();Ly();Iu();za="notification-log",Ey=async()=>await Dt(za)??[],ui=Fe("vc-notification-log-"),ms=new Set});function pP(){if(!Lu){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),Lu=Tr.createRoot(e)}return Lu}function dP(e,t){let o=pP();return new Promise(r=>{o.render(n(Ha,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function mP(){if(typeof Notification>"u")return!1;let{useNative:e}=E.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Oy(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function De(e){if(_y(e),mP()&&await Oy()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:r,image:i});c.onclick=s,c.onclose=l}else cP.push(()=>dP(e,uP++))}var cP,Lu,uP,By=g(()=>{"use strict";a();$();ci();x();Iu();Wa();cP=new _o,uP=42});var Eu={};ze(Eu,{requestPermission:()=>Oy,showNotification:()=>De});var $n=g(()=>{"use strict";a();By()});function qy(e,t){return wP(e,t||{},0,0)}function Ky(e,t){return bP(e,t)}var Wt,so,qa,Ka,Ya,Fu,Gy,Hy,zy,Uu,jy,fP,Fy,$u,gn,Ue,en,Hn,Ue,Ue,Ue,Ue,hs,Ue,gP,hP,yP,vP,_u,Bo,Ou,zu,Wy,SP,Gn,bP,hn,fs,Bu,Gu,Uy,gs,Hu,$y,TP,ju,xP,wP,MP,PP,Yy=g(()=>{a();Wt=Uint8Array,so=Uint16Array,qa=Uint32Array,Ka=new Wt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ya=new Wt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Fu=new Wt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gy=function(e,t){for(var o=new so(31),r=0;r<31;++r)o[r]=t+=1<>>1|(Ue&21845)<<1,gn=(gn&52428)>>>2|(gn&13107)<<2,gn=(gn&61680)>>>4|(gn&3855)<<4,$u[Ue]=((gn&65280)>>>8|(gn&255)<<8)>>>1;en=function(e,t,o){for(var r=e.length,i=0,s=new so(t);i>>u]=p}else for(c=new so(r),i=0;i>>15-e[i]);return c},Hn=new Wt(288);for(Ue=0;Ue<144;++Ue)Hn[Ue]=8;for(Ue=144;Ue<256;++Ue)Hn[Ue]=9;for(Ue=256;Ue<280;++Ue)Hn[Ue]=7;for(Ue=280;Ue<288;++Ue)Hn[Ue]=8;hs=new Wt(32);for(Ue=0;Ue<32;++Ue)hs[Ue]=5;gP=en(Hn,9,0),hP=en(Hn,9,1),yP=en(hs,5,0),vP=en(hs,5,1),_u=function(e){for(var t=e[0],o=1;ot&&(t=e[o]);return t},Bo=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Ou=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},zu=function(e){return(e+7)/8|0},Wy=function(e,t,o){(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length);var r=new(e.BYTES_PER_ELEMENT==2?so:e.BYTES_PER_ELEMENT==4?qa:Wt)(o-t);return r.set(e.subarray(t,o)),r},SP=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Gn=function(e,t,o){var r=new Error(t||SP[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Gn),!o)throw r;return r},bP=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new Wt(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new Wt(r*3));var l=function(fr){var Dn=t.length;if(fr>Dn){var Ln=new Wt(Math.max(Dn*2,fr));Ln.set(t),t=Ln}},c=o.f||0,u=o.p||0,p=o.b||0,d=o.l,h=o.d,v=o.m,T=o.n,N=r*8;do{if(!d){c=Bo(e,u,1);var b=Bo(e,u+1,3);if(u+=3,b)if(b==1)d=hP,h=vP,v=9,T=5;else if(b==2){var F=Bo(e,u,31)+257,H=Bo(e,u+10,15)+4,X=F+Bo(e,u+5,31)+1;u+=14;for(var Z=new Wt(X),q=new Wt(19),L=0;L>>4;if(I<16)Z[L++]=I;else{var Le=0,he=0;for(I==16?(he=3+Bo(e,u,3),u+=2,Le=Z[L-1]):I==17?(he=3+Bo(e,u,7),u+=3):I==18&&(he=11+Bo(e,u,127),u+=7);he--;)Z[L++]=Le}}var Se=Z.subarray(0,F),Ie=Z.subarray(F);v=_u(Se),T=_u(Ie),d=en(Se,v,1),h=en(Ie,T,1)}else Gn(1);else{var I=zu(u)+4,k=e[I-4]|e[I-3]<<8,M=I+k;if(M>r){s&&Gn(0);break}i&&l(p+k),t.set(e.subarray(I,M),p),o.b=p+=k,o.p=u=M*8,o.f=c;continue}if(u>N){s&&Gn(0);break}}i&&l(p+131072);for(var ke=(1<>>4;if(u+=Le&15,u>N){s&&Gn(0);break}if(Le||Gn(2),yt<256)t[p++]=yt;else if(yt==256){ge=u,d=null;break}else{var tt=yt-254;if(yt>264){var L=yt-257,Ee=Ka[L];tt=Bo(e,u,(1<>>4;Jt||Gn(3),u+=Jt&15;var Ie=fP[Mt];if(Mt>3){var Ee=Ya[Mt];Ie+=Ou(e,u)&(1<N){s&&Gn(0);break}i&&l(p+131072);for(var vt=p+tt;p>>8},fs=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8,e[r+2]|=o>>>16},Bu=function(e,t){for(var o=[],r=0;rv&&(v=s[r].s);var T=new so(v+1),N=Gu(o[d-1],T,0);if(N>t){var r=0,b=0,I=N-t,k=1<t)b+=k-(1<>>=I;b>0;){var F=s[r].s;T[F]=0&&b;--r){var H=s[r].s;T[H]==t&&(--T[H],++b)}N=t}return[new Wt(T),N]},Gu=function(e,t,o){return e.s==-1?Math.max(Gu(e.l,t,o+1),Gu(e.r,t,o+1)):t[e.s]=o},Uy=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new so(++t),r=0,i=e[0],s=1,l=function(u){o[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[o.subarray(0,r),t]},gs=function(e,t){for(var o=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!re[Fu[le-1]];--le);var Le=p+5<<3,he=gs(i,Hn)+gs(s,hs)+l,Se=gs(i,v)+gs(s,b)+l+14+3*le+gs(q,re)+(2*q[16]+3*q[17]+7*q[18]);if(Le<=he&&Le<=Se)return Hu(t,d,e.subarray(u,u+p));var Ie,ke,Te,ge;if(hn(t,d,1+(Se15&&(hn(t,d,Jt[L]>>>5&127),d+=Jt[L]>>>12)}}else Ie=gP,ke=Hn,Te=yP,ge=hs;for(var L=0;L255){var Mt=r[L]>>>18&31;fs(t,d,Ie[Mt+257]),d+=ke[Mt+257],Mt>7&&(hn(t,d,r[L]>>>23&31),d+=Ka[Mt]);var vt=r[L]&31;fs(t,d,Te[vt]),d+=ge[vt],vt>3&&(fs(t,d,r[L]>>>5&8191),d+=Ya[vt])}else fs(t,d,Ie[r[L]]),d+=ke[r[L]];return fs(t,d,Ie[256]),d+ke[256]},TP=new qa([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ju=new Wt(0),xP=function(e,t,o,r,i,s){var l=e.length,c=new Wt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),p=0;if(!t||l<8)for(var d=0;d<=l;d+=65535){var h=d+65535;h>=l&&(u[p>>3]=s),p=Hu(u,p+1,e.subarray(d,h))}else{for(var v=TP[t-1],T=v>>>13,N=v&8191,b=(1<7e3||re>24576)&&Ie>423){p=$y(e,u,0,X,Z,q,V,re,le,d-le,p),re=L=V=0,le=d;for(var ke=0;ke<286;++ke)Z[ke]=0;for(var ke=0;ke<30;++ke)q[ke]=0}var Te=2,ge=0,yt=N,tt=he-Se&32767;if(Ie>2&&Le==H(d-tt))for(var Ee=Math.min(T,Ie)-1,Jt=Math.min(32767,d),Mt=Math.min(258,Ie);tt<=Jt&&--yt&&he!=Se;){if(e[d+Te]==e[d+Te-tt]){for(var vt=0;vtTe){if(Te=vt,ge=tt,vt>Ee)break;for(var fr=Math.min(tt,vt-2),Dn=0,ke=0;keDn&&(Dn=Bt,Se=Ln)}}}he=Se,Se=I[he],tt+=he-Se+32768&32767}if(ge){X[re++]=268435456|Uu[Te]<<18|Fy[ge];var hr=Uu[Te]&31,R=Fy[ge]&31;V+=Ka[hr]+Ya[R],++Z[257+hr],++q[R],Me=d+Te,++L}else X[re++]=e[d],++Z[e[d]]}}p=$y(e,u,s,X,Z,q,V,re,le,d-le,p),!s&&p&7&&(p=Hu(u,p+1,ju))}return Wy(c,0,r+zu(p)+i)},wP=function(e,t,o,r,i){return xP(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,o,r,!i)};MP=typeof TextDecoder<"u"&&new TextDecoder,PP=0;try{MP.decode(ju,{stream:!0}),PP=1}catch{}});async function Zy(){let e=await Dt("Vencord_cloudSecret")??{},t=Wu();return e[t]?(await kr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${ys()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${ys()}`]}async function IP(e){await kr("Vencord_cloudSecret",t=>(t??={},t[`${Wu()}:${ys()}`]=e,t))}async function qu(){await kr("Vencord_cloudSecret",e=>(e??={},delete e[`${Wu()}:${ys()}`],e))}async function Xy(){if(await Zy()!==void 0){E.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",zn()));var{clientId:e,redirectUri:t}=await o.json()}catch{De({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),E.cloud.authenticated=!1;return}we(o=>n(es,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){E.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:new Headers({Accept:"application/json"})}),{secret:s}=await i.json();s?(Za.info("Authorized with secret"),await IP(s),De({title:"Cloud Integration",body:"Cloud integrations enabled!"}),E.cloud.authenticated=!0):(De({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),E.cloud.authenticated=!1)}catch(i){Za.error("Failed to authorize",i),De({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),E.cloud.authenticated=!1}}}))}async function pi(){let e=await Zy();return window.btoa(`${e}:${ys()}`)}var Za,zn,Wu,ys,Ku=g(()=>{"use strict";a();Vo();$n();$();x();Ve();nt();Za=new ie("Cloud","#39b7e0"),zn=()=>new URL(E.cloud.url),Wu=()=>zn().origin,ys=()=>{let e=U.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function go(){window.VesktopNative.app.relaunch()}function Xa(e){window.VesktopNative.fileManager.showItemInFolder(e)}var jn=g(()=>{"use strict";a()});function Ja(e){let t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),setImmediate(()=>{URL.revokeObjectURL(t.href),document.body.removeChild(t)})}function Qa(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var Va=g(()=>{"use strict";a()});async function Jy(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(tn,t.settings),await VencordNative.settings.set(JSON.stringify(t.settings,null,4)),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Qy({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),o=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:o},null,e?void 0:4)}async function Vy(){let e="vencord-settings-backup.json",t=await Qy(),o=new TextEncoder().encode(t);Ja(new File([o],e,{type:"application/json"}))}async function tv(e=!0){if(!1){if(t)try{}catch(o){}}else{let t=await Qa("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await Jy(o.result),e&&AP()}catch(r){new ie("SettingsSync").error(r),e&&NP(r)}},o.readAsText(t)}}async function di(e){let t=await Qy({minify:!0});try{let o=await fetch(new URL("/v1/settings",zn()),{method:"PUT",headers:new Headers({Authorization:await pi(),"Content-Type":"application/octet-stream"}),body:qy(new TextEncoder().encode(t))});if(!o.ok){Fo.error(`Failed to sync up, API returned ${o.status}`),De({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();tn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(tn,null,4)),Fo.info("Settings uploaded to cloud successfully"),e&&De({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){Fo.error("Failed to sync up",o),De({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function el(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",zn()),{method:"GET",headers:new Headers({Authorization:await pi(),Accept:"application/octet-stream","If-None-Match":E.cloud.settingsSyncVersion.toString()})});if(o.status===404)return Fo.info("No settings on the cloud"),e&&De({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return Fo.info("Settings up to date"),e&&De({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return Fo.error(`Failed to sync down, API returned ${o.status}`),De({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=E.cloud.settingsSyncVersion;if(!t&&r{"use strict";a();$n();$();x();Yy();Ku();Ve();jn();Va();ev=(e,t)=>oe.show({type:e,message:t,id:oe.genId()}),AP=()=>ev(oe.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),NP=e=>ev(oe.Type.FAILURE,`Failed to import settings: ${String(e)}`);Fo=new ie("Cloud:Settings","#39b7e0")});var Zu={};ze(Zu,{PlainSettings:()=>tn,Settings:()=>E,addSettingsListener:()=>Ss,definePluginSettings:()=>D,migratePluginSettings:()=>kP,useSettings:()=>mt});function Yu(e,t=e,o=""){return rv[o]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(o==="plugins"&&i in Ge)return r[i]=Yu({enabled:Ge[i].required??Ge[i].enabledByDefault??!1},t,`plugins.${i}`);if(o.startsWith("plugins.")){let l=o.slice(8);if(l in Ge){let c=Ge[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(p=>p.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?Yu(s,t,`${o}${o&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${o}${o&&"."}${i}`;delete rv[l];for(let c of tl)(!c._paths||c._paths.includes(l))&&c(s,l);return tn.cloud.settingsSyncVersion=Date.now(),Cr.Vencord_settingsDirty=!0,CP(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function mt(e){let[,t]=_.useReducer(()=>({}),{}),o=e?(r,i)=>e.includes(i)&&t():t;return _.useEffect(()=>(tl.add(o),()=>void tl.delete(o)),[]),E}function Ss(e,t){e&&(t._paths??=[]).push(e),tl.add(t)}function kP(e,...t){let{plugins:o}=Wn;if(!(e in o)){for(let r of t)if(r in o){iv.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],VencordNative.settings.set(JSON.stringify(Wn,null,4));break}}}function D(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return E.plugins[o.pluginName]},use:r=>mt(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var iv,nv,Wn,CP,tl,rv,tn,E,$=g(()=>{"use strict";a();Nr();Ga();Ve();Pe();vs();w();x();Rr();iv=new ie("Settings"),nv={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:void 0,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}};try{Wn=JSON.parse(VencordNative.settings.get()),Ar(Wn,nv)}catch(e){Wn=Ar({},nv),iv.error(`An error occurred while loading the settings. Corrupt settings file?
-`,e)}CP=ro(async()=>{E.cloud.settingsSync&&E.cloud.authenticated&&(await di(),delete Cr.Vencord_settingsDirty)},6e4),tl=new Set,rv={};tn=Wn,E=Yu(Wn)});var sv=g(()=>{});var av=g(()=>{});var Ju={};ze(Ju,{UpdateLogger:()=>Dr,changes:()=>qn,checkForUpdates:()=>fi,getRepo:()=>Xu,isNewer:()=>bs,isOutdated:()=>Kn,maybePromptToUpdate:()=>Ts,update:()=>gi,updateError:()=>mi});async function ol(e){let t=await e;if(t.ok)return t.value;throw mi=t.error,t.error}async function fi(){return qn=await ol(VencordNative.updater.getUpdates()),qn.some(e=>e.hash===fo)?(bs=!0,Kn=!1):Kn=qn.length>0}async function gi(){if(!Kn)return!0;let e=await ol(VencordNative.updater.update());if(e&&(Kn=!1,!await ol(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Ts(e,t=!1){try{if(await fi()){let r=confirm(e);if(r&&bs)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await gi(),go())}}catch(o){Dr.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Dr,Kn,bs,mi,qn,Xu,Lr=g(()=>{"use strict";a();si();Ve();jn();Dr=new ie("Updater","white"),Kn=!1,bs=!1;Xu=()=>ol(VencordNative.updater.getRepo())});function lv(){Ts("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var cv=g(()=>{"use strict";a();Lr()});function Qu(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Vu=g(()=>{"use strict";a()});function bo({title:e,children:t}){return n(S.FormSection,null,n(J,{variant:"heading-lg/semibold",tag:"h2",className:z.bottom16},e),t)}function To(e,t){return B.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:RP})}var RP,Yn=g(()=>{"use strict";a();sv();av();ae();cv();it();Vu();x();RP=Qu(lv)});var mv={};ze(mv,{default:()=>_P});function DP(){let[e,,t]=at(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=mt(),r=_.useMemo(()=>Math.random()>.5?pv:dv,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=!1;_.useEffect(()=>{o.macosTranslucency===!0&&!o.macosVibrancyStyle&&(o.macosVibrancyStyle="sidebar",o.macosTranslucency=void 0)},[]);let c=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1];return n(bo,{title:"Vencord Settings"},n(EP,{image:r}),n(S.FormSection,{title:"Quick Actions"},n(At,{className:uv("quick-actions-card")},n(_.Fragment,null,n(C,{onClick:go,size:C.Sizes.SMALL},"Restart Client"),n(C,{onClick:()=>VencordNative.quickCss.openEditor(),size:C.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),n(C,{onClick:()=>Xa(e),size:C.Sizes.SMALL,disabled:t},"Open Settings Folder"),n(C,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:C.Sizes.SMALL,disabled:t},"Open in GitHub")))),n(S.FormDivider,null),n(S.FormSection,{className:z.top16,title:"Settings",tag:"h5"},n(S.FormText,{className:z.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),c.map(u=>u&&n(gt,{key:u.key,value:o[u.key],onChange:p=>o[u.key]=p,note:u.note},u.title))),l&&n(f,null,n(S.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(ho,{className:z.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",default:!o.macosTranslucency,value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar (old value for transparent windows)",value:"sidebar",default:o.macosTranslucency},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:u=>o.macosVibrancyStyle=u,isSelected:u=>o.macosVibrancyStyle===u,serialize:ss})),typeof Notification<"u"&&n(LP,{settings:o.notifications}))}function LP({settings:e}){return n(f,null,n(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(So,{style:{padding:"1em"},className:z.bottom8},n(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(S.FormText,{className:z.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(ho,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:ss}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Position"),n(ho,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:ss}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Timeout"),n(S.FormText,{className:z.bottom16},"Set to 0s to never automatically time out"),n(br,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(S.FormTitle,{tag:"h5",className:z.top16+" "+z.bottom8},"Notification Log Limit"),n(S.FormText,{className:z.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(br,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}),n(C,{onClick:ja,disabled:e.logLimit===0},"Open Notification Log"))}function EP({image:e}){return n(At,{className:uv("card","donate")},n("div",null,n(S.FormTitle,{tag:"h5"},"Support the Project"),n(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(cs,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===dv?"pixelated":void 0,marginLeft:"auto",transform:e===pv?"rotate(10deg)":void 0}}))}var uv,pv,dv,_P,fv=g(()=>{"use strict";a();Wa();$();rt();uu();li();it();Pe();jn();ut();x();Yn();uv=Fe("vc-settings-"),pv="https://cdn.discordapp.com/emojis/1026533090627174460.png",dv="https://media.discordapp.net/stickers/1039992459209490513.png";_P=To(DP,"Vencord Settings")});var gv=g(()=>{});var np={};ze(np,{currentNotice:()=>xs,nextNotice:()=>hv,noticesQueue:()=>tp,popNotice:()=>op,showNotice:()=>ws});function op(){ep.dismiss()}function hv(){xs=tp.shift(),xs&&ep.show(...xs,"VencordNotice")}function ws(e,t,o){tp.push(["GENERIC",e,t,o]),xs||hv()}var ep,tp,xs,nl=g(()=>{"use strict";a();j();ft(e=>e.show&&e.dismiss&&!e.suppressAll,e=>ep=e);tp=[],xs=null});var yv=g(()=>{});function qt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:te(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function hi({height:e=24,width:t=24,className:o}){return n(qt,{height:e,width:t,className:te(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function rl(e){return n(qt,{...e,className:te(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),n("path",{d:"M15 5H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})))}function Ms(e){return n(qt,{...e,className:te(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function Er(e){return n(qt,{...e,className:te(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function il(e){return n(qt,{...e,className:te(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function vv(e){return n(qt,{"aria-label":et.Messages.GUILD_OWNER,...e,className:te(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Sv(e){return n(qt,{...e,className:te(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function sl(e){return n(qt,{...e,className:te(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function al(e){return n(qt,{...e,className:te(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function bv(e){return n(qt,{...e,className:te(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function Tv(e){return n(qt,{...e,className:te(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function rp(e){return n(qt,{...e,className:te(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function ll(e){return n(qt,{...e,className:te(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function xv(e){return n(qt,{...e,className:te(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{"fill-rule":"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function wv(e){return n(qt,{...e,className:te(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}var Lt=g(()=>{"use strict";a();yv();Pe();x()});function Mv(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ps(e,t,o=!1){let r=yo.duration(e,t),i=zP.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;uu==="days");if(l!==-1){let u=i[l],p=u.amount%7;p===0?i.splice(l,1):u.amount=p}let c="";for(;i.length;){let{amount:u,unit:p}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${Mv(p,u===1,o)}`)}return c.length?c:`0 ${Mv(t,!1,o)}`}function jP(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i2?r+=", ":o-i>1&&(r+=" and ");return r}function Is(e,t){let o="```";return`${o}${t||""}
+`));return yi.warn(o),null});BP=[]});var tl,ol,g1=g(()=>{"use strict";a();H();tl=so(e=>e.image&&e.modal&&!e.applicationIcon),ol=x("buttonWrapper","buttonContent")});function nl(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=bt(()=>o);return gt(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function $t(e,t){gt(Ce.byStoreName(e),t,{isIndirect:!0})}var _u=g(()=>{"use strict";a();lt();H()});var S,Tt,k,wt,ne,Je,rl,V,Io,il,Er,sl,vs,h1,Ho,al,Si,bi,Ti,ll,Ss,Vn,Po,GP,bs,y1=g(()=>{"use strict";a();H();_u();S={},Vn=nl("MaskedLink",Ce.componentByCode("MASKED_LINK)")),Po=nl("Timestamp",Ce.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),GP=nl("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:bs}=x("OAuth2AuthorizeModal");gt(["FormItem","Button"],e=>{({useToken:Ss,Card:Tt,Button:k,FormSwitch:wt,Tooltip:ne,TextInput:Je,TextArea:rl,Text:V,Select:Io,SearchableSelect:il,Slider:Er,ButtonLooks:sl,TabBar:Ho,Popout:vs,Dialog:h1,Paginator:al,ScrollerThin:Si,Clickable:bi,Avatar:Ti,FocusLock:ll}=e),S=e})});var L,Yt,v1=g(()=>{"use strict";a();H();L={};gt(["MenuItem","MenuSliderControl"],e=>L=e);Yt=x("closeContextMenu","openContextMenu")});var U,W,se,Rt,xt,wi,cl,Or,S1=g(()=>{"use strict";a();H();Or=x("createPortal","render");gt("useState",e=>{U=e,{useEffect:se,useState:W,useMemo:Rt,useRef:xt,useReducer:wi,useCallback:cl}=U})});var Ts,xi,ws,b1=g(()=>{"use strict";a();H();Ts=x("MessageDisplayCompact"),xi=x("ShowCurrentGame"),ws=x("PreloadedUserSettingsActionCreators")});var xs,Bu,zo,Ms,_e,wn,_r,cn,HP,ae,E,ho,Ie,yo,ee,Ge,it,jo,Is,Ps,Be,T1=g(()=>{"use strict";a();H();_u();xs=x("connectStores"),Bu=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(Bu||{}),Ms=x("openPrivateChannel"),{useStateFromStores:Be}=x("useStateFromStores");$t("DraftStore",e=>Ps=e);$t("UserStore",e=>E=e);$t("UserProfileStore",e=>ho=e);$t("ChannelStore",e=>ee=e);$t("SelectedChannelStore",e=>Ie=e);$t("SelectedGuildStore",e=>yo=e);$t("GuildStore",e=>ae=e);$t("GuildMemberStore",e=>Ge=e);$t("RelationshipStore",e=>it=e);$t("PermissionStore",e=>_e=e);$t("PresenceStore",e=>cn=e);$t("ReadStateStore",e=>_r=e);$t("GuildChannelStore",e=>wn=e);$t("MessageStore",e=>zo=e);$t("WindowStore",e=>Is=e);$t("EmojiStore",e=>jo=e)});var w1={};var x1=g(()=>{"use strict";a()});var M1={};var I1=g(()=>{"use strict";a()});var P1={};var A1=g(()=>{"use strict";a()});function Mt(e,t=C1.MESSAGE){X.show({id:X.genId(),message:e,type:t})}var B,Wo,_t,Fu,Br,Fr,Ye,un,Pe,et,C1,zP,X,Bt,As,Ur,Ft,qo,$r,me,Gr,jP,Uu,ao,$u,Gu,Gt,R1=g(()=>{"use strict";a();H();gt(["dispatch","subscribe"],e=>{B=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ja()};e.subscribe("CONNECTION_OPEN",t)});gt(["ComponentDispatch","ComponentDispatcher"],e=>Wo=e.ComponentDispatch);_t=go(()=>{let e=Lr("getAPIBaseURL");return e.HTTP??e}),Fu=x("parseTwoDigitYear"),Br=x("highlight","registerLanguage"),Fr=x("debounce","cloneDeep"),Ye=so(e=>e.Messages?.["en-US"]);gt(["fromTimestamp","extractTimestamp"],e=>un=e);gt("parseTopic",e=>Pe=e);gt(["show","close"],e=>et=e);C1={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},zP={TOP:0,BOTTOM:1},X={Type:C1,Position:zP,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};gt("showToast",e=>{X.show=e.showToast,X.pop=e.popToast});Bt=x("getUser","fetchCurrentUser"),As=x("showUploadFileSizeExceededError","promptToUpload"),Ur=x("fetchAssetIds","getAssetImage"),Ft=x("SUPPORTS_COPY","copy"),qo=x("transitionTo","replaceWith","transitionToGuild");gt(["open","saveAccountChanges"],e=>$r=e);({Permissions:me}=so(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint")),Gr=Go("will be removed in v4"),jP=Ce.byCode("[zustand persist middleware]"),{persist:Uu}=so(e=>e.persist&&jP(e.persist)),ao=x("editMessage","sendMessage"),$u=x("openUserProfileModal","closeUserProfileModal"),Gu=x("resolveInvite"),Gt=x("getGuildBannerURL","getUserAvatarURL")});var Hu={};qe(Hu,{Alerts:()=>et,ApplicationAssetUtils:()=>Ur,Avatar:()=>Ti,Button:()=>k,ButtonLooks:()=>sl,ButtonWrapperClasses:()=>ol,Card:()=>Tt,ChannelStore:()=>ee,Clickable:()=>bi,Clipboard:()=>Ft,ComponentDispatch:()=>Wo,ComponentTypes:()=>w1,ContextMenuApi:()=>Yt,Dialog:()=>h1,DraftStore:()=>Ps,DraftType:()=>Bu,EmojiStore:()=>jo,Flex:()=>GP,Flux:()=>xs,FluxDispatcher:()=>B,FocusLock:()=>ll,Forms:()=>S,GuildChannelStore:()=>wn,GuildMemberStore:()=>Ge,GuildStore:()=>ae,IconUtils:()=>Gt,InviteActions:()=>Gu,MaskedLink:()=>Vn,Menu:()=>L,MenuTypes:()=>M1,MessageActions:()=>ao,MessageStore:()=>zo,ModalImageClasses:()=>tl,NavigationRouter:()=>qo,OAuth2AuthorizeModal:()=>bs,Paginator:()=>al,Parser:()=>Pe,PermissionStore:()=>_e,PermissionsBits:()=>me,PoggerModeSettingsStore:()=>HP,Popout:()=>vs,PresenceStore:()=>cn,PrivateChannelsStore:()=>Ms,React:()=>U,ReactDOM:()=>Or,ReadStateStore:()=>_r,RelationshipStore:()=>it,RestAPI:()=>_t,ScrollerThin:()=>Si,SearchableSelect:()=>il,Select:()=>Io,SelectedChannelStore:()=>Ie,SelectedGuildStore:()=>yo,SettingsRouter:()=>$r,Slider:()=>Er,SnowflakeUtils:()=>un,StatusSettingsStores:()=>xi,Switch:()=>wt,TabBar:()=>Ho,Text:()=>V,TextAndImagesSettingsStores:()=>Ts,TextArea:()=>rl,TextInput:()=>Je,Timestamp:()=>Po,Toasts:()=>X,Tooltip:()=>ne,UploadHandler:()=>As,UserProfileActions:()=>$u,UserProfileStore:()=>ho,UserSettingsActionCreators:()=>ws,UserStore:()=>E,UserUtils:()=>Bt,UtilTypes:()=>P1,WindowStore:()=>Is,hljs:()=>Br,i18n:()=>Ye,lodash:()=>Fr,moment:()=>Fu,showToast:()=>Mt,useCallback:()=>cl,useEffect:()=>se,useMemo:()=>Rt,useReducer:()=>wi,useRef:()=>xt,useState:()=>W,useStateFromStores:()=>Be,useToken:()=>Ss,zustandCreate:()=>Gr,zustandPersist:()=>Uu});var T=g(()=>{"use strict";a();g1();y1();v1();S1();b1();T1();x1();I1();A1();R1()});var pn,WP,ul,m,Mi,P=g(()=>{"use strict";a();pn="webpackChunkdiscord_app",WP="Vencord.Webpack.Common.React",ul="1026515880080842772",m=Object.freeze({Nobody:{name:"Nobody",id:0n},Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Trwy:{name:"trey",id:354427199023218689n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},fawn:{name:"fawn",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"ActuallyTheSun",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"Luna <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},ant0n:{name:"ant0n",id:145224646868860928n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Mopi:{name:"Mopi",id:1022189106614243350n},Grzesiek11:{name:"Grzesiek11",id:368475654662127616n},Samwich:{name:"Samwich",id:976176454511509554n},coolelectronics:{name:"coolelectronics",id:696392247205298207n},Av32000:{name:"Av32000",id:593436735380127770n},Kyuuhachi:{name:"Kyuuhachi",id:236588665420251137n},Elvyra:{name:"Elvyra",id:708275751816003615n},Inbestigator:{name:"Inbestigator",id:761777382041714690n},newwares:{name:"newwares",id:421405303951851520n}}),Mi=(()=>Object.freeze(Object.fromEntries(Object.entries(m).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function Ii(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},Ii(e[o],r)):e[o]??=r}return e}function Q(...e){return e.filter(Boolean).join(" ")}function Ko(e){return new Promise(t=>setTimeout(t,e))}function Ao(e,t="Copied to clipboard!"){Ft.SUPPORTS_COPY?Ft.copy(e):t="Your browser does not support copying to clipboard",X.show({message:t,id:X.genId(),type:X.Type.SUCCESS})}function qP(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cs(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function zu(e){try{return new URL(e)}catch{return null}}function Rs(e){return e}var ju,KP,ks,we=g(()=>{"use strict";a();T();P();ju=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};KP=navigator.userAgent.includes("Mobi"),ks=e=>Object.hasOwn(Mi,e)});function st(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=W({value:o.fallbackValue,error:null,pending:!0});return se(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Co(e){let t=wi(o=>o+1,0);return e?t:t[1]}function Ns({interval:e=1e3,deps:t=[]}){let[o,r]=W(0),i=Rt(()=>Date.now(),t);return se(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var YP,Wu,lt=g(()=>{"use strict";a();T();we();Cu();YP=()=>null,Wu=(e=!1)=>{let t=U.useRef(null),[o,r]=W(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(ju(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},o]}});var k1=g(()=>{});function Ro(e){return n("div",{...e,className:Q(e.className,"vc-error-card")},e.children)}var Pi=g(()=>{"use strict";a();k1();we()});var ZP,N1,D1,qu,_,le=g(()=>{"use strict";a();Ke();ot();lt();T();Pi();ZP="#e78284",N1=new oe("React ErrorBoundary",ZP),D1={},qu=bt(()=>class extends U.PureComponent{state={error:D1,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
+`);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),N1.error(`A component threw an Error
+`,t),N1.error("Component Stack",o.componentStack)}render(){if(this.state.error===D1)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(Ro,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:j.top8},this.state.stack)))}});qu.wrap=(e,t)=>o=>n(qu,{...t,wrappedProps:o},n(e,{...o}));_=qu});function pl(){return n("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},n("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var Ku=g(()=>{"use strict";a()});function Ds(e){return n(k,{...e,look:k.Looks.LINK,color:k.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(pl,null),"Donate")}var Yu=g(()=>{"use strict";a();T();Ku()});function fe(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var Ut=g(()=>{"use strict";a()});function Hr(e,t){return dl.openModalLazy(e,t)}function de(e,t,o){return dl.openModal(e,t,o)}function xn(e,t){return dl.closeModal(e,t)}function dn(){return dl.closeAllModals()}var ko,Yo,Zu,ye,Le,ke,ct,pt,dl,Ze=g(()=>{"use strict";a();H();lt();ko=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(ko||{}),Yo=x("ModalRoot","ModalCloseButton"),Zu=Tn("ImageModal"),ye=bt(()=>Yo.ModalRoot),Le=bt(()=>Yo.ModalHeader),ke=bt(()=>Yo.ModalContent),ct=bt(()=>Yo.ModalFooter),pt=bt(()=>Yo.ModalCloseButton),dl=x("openModalLazy")});function y(e){return e}var I=g(()=>{"use strict";a()});async function L1(e=!1){Xu={};let t={};e&&(t.cache="no-cache"),Xu=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var XP,JP,Xu,Ju,E1=g(()=>{"use strict";a();fl();Yu();le();Ut();Ku();P();ot();we();Ze();I();T();XP="https://vencord.dev/assets/favicon.png",JP={description:"Vencord Contributor",image:XP,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>ks(e.id),link:"https://github.com/Vendicated/Vencord"},Xu={};Ju=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[m.Megu,m.Ven,m.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await L1(!0),X.show({id:X.genId(),message:"Successfully refetched badges!",type:X.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(JP),await L1()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return Xu[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=de(r=>n(_,{noop:!0,onError:()=>{xn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Yo.ModalRoot,{...r},n(Yo.ModalHeader,null,n(fe,{style:{width:"100%",justifyContent:"center"}},n(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(pl,null),"Vencord Donor"))),n(Yo.ModalContent,null,n(fe,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(S.FormText,null,"This Badge is a special perk for Vencord Donors"),n(S.FormText,{className:j.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(Yo.ModalFooter,null,n(fe,{style:{width:"100%",justifyContent:"center"}},n(Ds,null))))))}}))}})});var Qu,O1=g(()=>{"use strict";a();P();I();Qu=y({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[m.Ven],patches:[{find:'location:"ChannelTextAreaButtons"',replacement:{match:/if\(!\i\.isMobile\)\{(?=.+?&&(\i)\.push\(.{0,50}"gift")/,replace:"$&Vencord.Api.ChatButtons._injectButtons($1,arguments[0]);"}}]})});var Vu,_1=g(()=>{"use strict";a();P();I();Vu=y({name:"CommandsAPI",authors:[m.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var ep,B1=g(()=>{"use strict";a();P();I();ep=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[m.Nuckyz,m.Ven,m.Kyuuhachi],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?=let{navId:)(?<=function \i\((\i)\).+?)/,replace:"$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var tp,F1=g(()=>{"use strict";a();P();I();tp=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[m.TheSun,m.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var op,U1=g(()=>{"use strict";a();P();I();op=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[m.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var np,$1=g(()=>{"use strict";a();P();I();np=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[m.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var rp,G1=g(()=>{"use strict";a();P();I();rp=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[m.Arjix,m.hunt,m.Ven],patches:[{find:".Messages.EDIT_TEXTAREA_HELP",replacement:{match:/(?<=,channel:\i\}\)\.then\().+?(?=return \i\.content!==this\.props\.message\.content&&\i\((.+?)\))/,replace:(e,t)=>`async ${e}if(await Vencord.Api.MessageEvents._handlePreEdit(${t}))return Promise.resolve({shoudClear:true,shouldRefocus:true});`}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i,s,l)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var ip,H1=g(()=>{"use strict";a();P();I();ip=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[m.KingFish,m.Ven,m.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let o=e.match(/message:(.{1,3}),/)?.[1];if(!o)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${o},${t}),${e}`}}}]})});var sp,z1=g(()=>{"use strict";a();P();I();sp=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[m.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var ap,j1=g(()=>{"use strict";a();P();I();ap=y({name:"ServerListAPI",authors:[m.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var lp,W1=g(()=>{"use strict";a();P();I();lp=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[m.Cyn,m.Ven,m.Nuckyz,m.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});function lo(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var zr=g(()=>{"use strict";a()});var gl,q1=g(()=>{"use strict";a();gl=class{pathListeners=new Map;globalListeners=new Set;constructor(t,o={}){this.plain=t,this.store=this.makeProxy(t),Object.assign(this,o)}makeProxy(t,o=t,r=""){let i=this;return new Proxy(t,{get(s,l){let c=s[l];return!(l in s)&&i.getDefaultValue&&(c=i.getDefaultValue({target:s,key:l,root:o,path:r})),typeof c=="object"&&c!==null&&!Array.isArray(c)?i.makeProxy(c,o,`${r}${r&&"."}${l}`):c},set(s,l,c){if(s[l]===c)return!0;Reflect.set(s,l,c);let u=`${r}${r&&"."}${l}`;return i.globalListeners.forEach(p=>p(c,u)),i.pathListeners.get(u)?.forEach(p=>p(c)),!0}})}setData(t,o){if(this.readOnly)throw new Error("SettingsStore is read-only");if(this.plain=t,this.store=this.makeProxy(t),o){let r=t,i=o.split(".");for(let s of i){if(!r){console.warn(`Settings#setData: Path ${o} does not exist in new data. Not dispatching update`);return}r=r[s]}this.pathListeners.get(o)?.forEach(s=>s(r))}this.markAsChanged()}addGlobalChangeListener(t){this.globalListeners.add(t)}addChangeListener(t,o){let r=this.pathListeners.get(t)??new Set;r.add(o),this.pathListeners.set(t,r)}removeGlobalChangeListener(t){this.globalListeners.delete(t)}removeChangeListener(t,o){let r=this.pathListeners.get(t);!r||(r.delete(o),r.size||this.pathListeners.delete(t))}markAsChanged(){this.globalListeners.forEach(t=>t(this.plain,""))}}});var jr,hl=g(()=>{"use strict";a();({localStorage:jr}=window)});var vo,Wr=g(()=>{"use strict";a();vo=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var K1=g(()=>{});var yl,cp=g(()=>{"use strict";a();K1();$();le();we();T();yl=_.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:p,className:d,dismissOnClick:h}){let{timeout:v,position:b}=St(["notifications.timeout","notifications.position"]).notifications,M=Be([Is],()=>Is.isFocused()),[w,C]=W(!1),[R,A]=W(0),F=Rt(()=>Date.now(),[v,w,M]);se(()=>{if(w||!M||v===0||p)return void A(0);let Y=setInterval(()=>{let J=Date.now()-F;J>=v?c():A(J)},10);return()=>clearInterval(Y)},[v,w,M]);let z=R/v;return n("button",{className:Q("vc-notification-root",d),style:b==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:Y=>{Y.preventDefault(),Y.stopPropagation(),c()},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),c()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),u&&n("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!p&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-z)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var mn={};qe(mn,{clear:()=>tA,createStore:()=>Y1,del:()=>pp,delMany:()=>eA,entries:()=>rA,get:()=>dt,getMany:()=>VP,keys:()=>oA,promisifyRequest:()=>Zt,set:()=>kt,setMany:()=>QP,update:()=>qr,values:()=>nA});function Zt(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Y1(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=Zt(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Zo(){return up||(up=Y1("VencordData","VencordStore")),up}function dt(e,t=Zo()){return t("readonly",o=>Zt(o.get(e)))}function kt(e,t,o=Zo()){return o("readwrite",r=>(r.put(t,e),Zt(r.transaction)))}function QP(e,t=Zo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),Zt(o.transaction)))}function VP(e,t=Zo()){return t("readonly",o=>Promise.all(e.map(r=>Zt(o.get(r)))))}function qr(e,t,o=Zo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Zt(r.transaction))}catch(l){s(l)}}}))}function pp(e,t=Zo()){return t("readwrite",o=>(o.delete(e),Zt(o.transaction)))}function eA(e,t=Zo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),Zt(o.transaction)))}function tA(e=Zo()){return e("readwrite",t=>(t.clear(),Zt(t.transaction)))}function dp(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},Zt(e.transaction)}function oA(e=Zo()){return e("readonly",t=>{if(t.getAllKeys)return Zt(t.getAllKeys());let o=[];return dp(t,r=>o.push(r.key)).then(()=>o)})}function nA(e=Zo()){return e("readonly",t=>{if(t.getAll)return Zt(t.getAll());let o=[];return dp(t,r=>o.push(r.value)).then(()=>o)})}function rA(e=Zo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Zt(t.getAllKeys()),Zt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>dp(r,i=>o.push([i.key,i.value])).then(()=>o))})}var up,Xo=g(()=>{"use strict";a();});var gp={};qe(gp,{classNameFactory:()=>ve,classNameToSelector:()=>X1,compileStyle:()=>fp,disableStyle:()=>Xt,enableStyle:()=>Nt,isStyleEnabled:()=>mp,requireStyle:()=>Ls,setStyleClassNames:()=>sA,styleMap:()=>Z1,toggleStyle:()=>iA});function Ls(e){let t=Z1.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Nt(e){let t=Ls(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),fp(t),document.head.appendChild(t.dom),!0)}function Xt(e){let t=Ls(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Z1,iA,mp,sA,fp,X1,ve,Qe=g(()=>{"use strict";a();Z1=window.VencordStyles??=new Map;iA=e=>mp(e)?Xt(e):Nt(e),mp=e=>Ls(e).dom?.isConnected??!1,sA=(e,t,o=!0)=>{let r=Ls(e);r.classNames=t,o&&mp(r.name)&&fp(r)},fp=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?X1(r):t})},X1=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),ve=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});var J1,Q1=g(()=>{a();J1=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,o)=>(o&=63,o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o>62?t+="-":t+="_",t),"")});async function ev(e){if(e.noPersist)return;let t=G.notifications.logLimit;t!==0&&(await qr(vl,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:p,...d}=e;return r.unshift({...d,timestamp:Date.now(),id:J1()}),r.length>t&&t!==200&&(r.length=t),r}),Es.forEach(o=>o()))}async function aA(e){let t=await V1(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await kt(vl,t),Es.forEach(r=>r()))}function lA(){let[e,t]=wi(s=>s+1,0);se(()=>(Es.add(t),()=>void Es.delete(t)),[]);let[o,r,i]=st(V1,{fallbackValue:[],deps:[e]});return[o,i]}function cA({data:e}){let[t,o]=W(!1),r=U.useRef(null);return se(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:Ai("wrapper",{removing:t}),ref:r},n(yl,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>aA(e.timestamp),200))},richBody:n("div",{className:Ai("body")},e.body,n(Po,{timestamp:new Date(e.timestamp),className:Ai("timestamp")}))}))}function uA({log:e,pending:t}){return!e.length&&!t?n("div",{className:Ai("container")},n("div",{className:Ai("empty")}),n(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:Ai("container")},e.map(o=>n(cA,{data:o,key:o.id})))}function pA({modalProps:e,close:t}){let[o,r]=lA();return n(ye,{...e,size:"large"},n(Le,null,n(V,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(pt,{onClick:t})),n(ke,null,n(uA,{log:o,pending:r})),n(ct,null,n(k,{disabled:o.length===0,onClick:()=>{et.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await kt(vl,[]),Es.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function Sl(){let e=de(t=>n(pA,{modalProps:t,close:()=>xn(e)}))}var vl,V1,Ai,Es,bl=g(()=>{"use strict";a();Xo();$();Qe();Ze();lt();T();Q1();cp();vl="notification-log",V1=async()=>await dt(vl)??[],Ai=ve("vc-notification-log-"),Es=new Set});function fA(){if(!hp){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),hp=Or.createRoot(e)}return hp}function gA(e,t){let o=fA();return new Promise(r=>{o.render(n(yl,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function hA(){if(typeof Notification>"u")return!1;let{useNative:e}=G.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function tv(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Fe(e){if(ev(e),hA()&&await tv()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:r,image:i});c.onclick=s,c.onclose=l}else dA.push(()=>gA(e,mA++))}var dA,hp,mA,ov=g(()=>{"use strict";a();$();Wr();T();cp();bl();dA=new vo,mA=42});var yp={};qe(yp,{requestPermission:()=>tv,showNotification:()=>Fe});var er=g(()=>{"use strict";a();ov()});function pv(e,t){return PA(e,t||{},0,0)}function dv(e,t){return xA(e,t)}var Jt,co,Tl,wl,xl,Tp,sv,av,lv,wp,cv,yA,nv,xp,Mn,He,fn,or,He,He,He,He,Bs,He,vA,SA,bA,TA,vp,Jo,Sp,Pp,uv,wA,tr,xA,In,Os,bp,Mp,rv,_s,Ip,iv,MA,Ap,IA,PA,AA,CA,mv=g(()=>{a();Jt=Uint8Array,co=Uint16Array,Tl=Uint32Array,wl=new Jt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xl=new Jt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Tp=new Jt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sv=function(e,t){for(var o=new co(31),r=0;r<31;++r)o[r]=t+=1<>>1|(He&21845)<<1,Mn=(Mn&52428)>>>2|(Mn&13107)<<2,Mn=(Mn&61680)>>>4|(Mn&3855)<<4,xp[He]=((Mn&65280)>>>8|(Mn&255)<<8)>>>1;fn=function(e,t,o){for(var r=e.length,i=0,s=new co(t);i>>u]=p}else for(c=new co(r),i=0;i>>15-e[i]);return c},or=new Jt(288);for(He=0;He<144;++He)or[He]=8;for(He=144;He<256;++He)or[He]=9;for(He=256;He<280;++He)or[He]=7;for(He=280;He<288;++He)or[He]=8;Bs=new Jt(32);for(He=0;He<32;++He)Bs[He]=5;vA=fn(or,9,0),SA=fn(or,9,1),bA=fn(Bs,5,0),TA=fn(Bs,5,1),vp=function(e){for(var t=e[0],o=1;ot&&(t=e[o]);return t},Jo=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Sp=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},Pp=function(e){return(e+7)/8|0},uv=function(e,t,o){(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length);var r=new(e.BYTES_PER_ELEMENT==2?co:e.BYTES_PER_ELEMENT==4?Tl:Jt)(o-t);return r.set(e.subarray(t,o)),r},wA=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],tr=function(e,t,o){var r=new Error(t||wA[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,tr),!o)throw r;return r},xA=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new Jt(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new Jt(r*3));var l=function(Pr){var Yn=t.length;if(Pr>Yn){var Zn=new Jt(Math.max(Yn*2,Pr));Zn.set(t),t=Zn}},c=o.f||0,u=o.p||0,p=o.b||0,d=o.l,h=o.d,v=o.m,b=o.n,M=r*8;do{if(!d){c=Jo(e,u,1);var w=Jo(e,u+1,3);if(u+=3,w)if(w==1)d=SA,h=TA,v=9,b=5;else if(w==2){var F=Jo(e,u,31)+257,z=Jo(e,u+10,15)+4,Y=F+Jo(e,u+5,31)+1;u+=14;for(var J=new Jt(Y),Z=new Jt(19),O=0;O>>4;if(C<16)J[O++]=C;else{var Ue=0,be=0;for(C==16?(be=3+Jo(e,u,3),u+=2,Ue=J[O-1]):C==17?(be=3+Jo(e,u,7),u+=3):C==18&&(be=11+Jo(e,u,127),u+=7);be--;)J[O++]=Ue}}var Me=J.subarray(0,F),De=J.subarray(F);v=vp(Me),b=vp(De),d=fn(Me,v,1),h=fn(De,b,1)}else tr(1);else{var C=Pp(u)+4,R=e[C-4]|e[C-3]<<8,A=C+R;if(A>r){s&&tr(0);break}i&&l(p+R),t.set(e.subarray(C,A),p),o.b=p+=R,o.p=u=A*8,o.f=c;continue}if(u>M){s&&tr(0);break}}i&&l(p+131072);for(var Oe=(1<>>4;if(u+=Ue&15,u>M){s&&tr(0);break}if(Ue||tr(2),At<256)t[p++]=At;else if(At==256){he=u,d=null;break}else{var at=At-254;if(At>264){var O=At-257,$e=wl[O];at=Jo(e,u,(1<<$e)-1)+lv[O],u+=$e}var ro=h[Sp(e,u)&Ae],Lt=ro>>>4;ro||tr(3),u+=ro&15;var De=yA[Lt];if(Lt>3){var $e=xl[Lt];De+=Sp(e,u)&(1<<$e)-1,u+=$e}if(u>M){s&&tr(0);break}i&&l(p+131072);for(var Ct=p+at;p>>8},Os=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8,e[r+2]|=o>>>16},bp=function(e,t){for(var o=[],r=0;rv&&(v=s[r].s);var b=new co(v+1),M=Mp(o[d-1],b,0);if(M>t){var r=0,w=0,C=M-t,R=1<t)w+=R-(1<>>=C;w>0;){var F=s[r].s;b[F]=0&&w;--r){var z=s[r].s;b[z]==t&&(--b[z],++w)}M=t}return[new Jt(b),M]},Mp=function(e,t,o){return e.s==-1?Math.max(Mp(e.l,t,o+1),Mp(e.r,t,o+1)):t[e.s]=o},rv=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new co(++t),r=0,i=e[0],s=1,l=function(u){o[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return[o.subarray(0,r),t]},_s=function(e,t){for(var o=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!re[Tp[ue-1]];--ue);var Ue=p+5<<3,be=_s(i,or)+_s(s,Bs)+l,Me=_s(i,v)+_s(s,w)+l+14+3*ue+_s(Z,re)+(2*Z[16]+3*Z[17]+7*Z[18]);if(Ue<=be&&Ue<=Me)return Ip(t,d,e.subarray(u,u+p));var De,Oe,Ae,he;if(In(t,d,1+(Me15&&(In(t,d,ro[O]>>>5&127),d+=ro[O]>>>12)}}else De=vA,Oe=or,Ae=bA,he=Bs;for(var O=0;O255){var Lt=r[O]>>>18&31;Os(t,d,De[Lt+257]),d+=Oe[Lt+257],Lt>7&&(In(t,d,r[O]>>>23&31),d+=wl[Lt]);var Ct=r[O]&31;Os(t,d,Ae[Ct]),d+=he[Ct],Ct>3&&(Os(t,d,r[O]>>>5&8191),d+=xl[Ct])}else Os(t,d,De[r[O]]),d+=Oe[r[O]];return Os(t,d,De[256]),d+Oe[256]},MA=new Tl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ap=new Jt(0),IA=function(e,t,o,r,i,s){var l=e.length,c=new Jt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),p=0;if(!t||l<8)for(var d=0;d<=l;d+=65535){var h=d+65535;h>=l&&(u[p>>3]=s),p=Ip(u,p+1,e.subarray(d,h))}else{for(var v=MA[t-1],b=v>>>13,M=v&8191,w=(1<7e3||re>24576)&&De>423){p=iv(e,u,0,Y,J,Z,te,re,ue,d-ue,p),re=O=te=0,ue=d;for(var Oe=0;Oe<286;++Oe)J[Oe]=0;for(var Oe=0;Oe<30;++Oe)Z[Oe]=0}var Ae=2,he=0,At=M,at=be-Me&32767;if(De>2&&Ue==z(d-at))for(var $e=Math.min(b,De)-1,ro=Math.min(32767,d),Lt=Math.min(258,De);at<=ro&&--At&&be!=Me;){if(e[d+Ae]==e[d+Ae-at]){for(var Ct=0;CtAe){if(Ae=Ct,he=at,Ct>$e)break;for(var Pr=Math.min(at,Ct-2),Yn=0,Oe=0;OeYn&&(Yn=zt,Me=Zn)}}}be=Me,Me=C[be],at+=be-Me+32768&32767}if(he){Y[re++]=268435456|wp[Ae]<<18|nv[he];var Cr=wp[Ae]&31,D=nv[he]&31;te+=wl[Cr]+xl[D],++J[257+Cr],++Z[D],Se=d+Ae,++O}else Y[re++]=e[d],++J[e[d]]}}p=iv(e,u,s,Y,J,Z,te,re,ue,d-ue,p),!s&&p&7&&(p=Ip(u,p+1,Ap))}return uv(c,0,r+Pp(p)+i)},PA=function(e,t,o,r,i){return IA(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,o,r,!i)};AA=typeof TextDecoder<"u"&&new TextDecoder,CA=0;try{AA.decode(Ap,{stream:!0}),CA=1}catch{}});async function fv(){let e=await dt("Vencord_cloudSecret")??{},t=Cp();return e[t]?(await qr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Fs()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Fs()}`]}async function RA(e){await qr("Vencord_cloudSecret",t=>(t??={},t[`${Cp()}:${Fs()}`]=e,t))}async function Rp(){await qr("Vencord_cloudSecret",e=>(e??={},delete e[`${Cp()}:${Fs()}`],e))}async function gv(){if(await fv()!==void 0){G.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",nr()));var{clientId:e,redirectUri:t}=await o.json()}catch{Fe({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),G.cloud.authenticated=!1;return}de(o=>n(bs,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){G.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(Ml.info("Authorized with secret"),await RA(s),Fe({title:"Cloud Integration",body:"Cloud integrations enabled!"}),G.cloud.authenticated=!0):(Fe({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),G.cloud.authenticated=!1)}catch(i){Ml.error("Failed to authorize",i),Fe({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),G.cloud.authenticated=!1}}}))}async function Ci(){let e=await fv();return window.btoa(`${e}:${Fs()}`)}var Ml,nr,Cp,Fs,kp=g(()=>{"use strict";a();Xo();er();$();T();Ke();Ze();Ml=new oe("Cloud","#39b7e0"),nr=()=>new URL(G.cloud.url),Cp=()=>nr().origin,Fs=()=>{let e=E.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function So(){window.VesktopNative.app.relaunch()}function Il(e){window.VesktopNative.fileManager.showItemInFolder(e)}var rr=g(()=>{"use strict";a()});function Pl(e){let t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),setImmediate(()=>{URL.revokeObjectURL(t.href),document.body.removeChild(t)})}function Al(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var Cl=g(()=>{"use strict";a()});async function hv(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(Pn,t.settings),await VencordNative.settings.set(t.settings),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function yv({minify:e}={}){let t=VencordNative.settings.get(),o=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:o},null,e?void 0:4)}async function vv(){let e="vencord-settings-backup.json",t=await yv(),o=new TextEncoder().encode(t);Pl(new File([o],e,{type:"application/json"}))}async function bv(e=!0){if(!1){if(t)try{}catch(o){}}else{let t=await Al("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await hv(o.result),e&&kA()}catch(r){new oe("SettingsSync").error(r),e&&NA(r)}},o.readAsText(t)}}async function Ri(e){let t=await yv({minify:!0});try{let o=await fetch(new URL("/v1/settings",nr()),{method:"PUT",headers:{Authorization:await Ci(),"Content-Type":"application/octet-stream"},body:pv(new TextEncoder().encode(t))});if(!o.ok){Qo.error(`Failed to sync up, API returned ${o.status}`),Fe({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();Pn.cloud.settingsSyncVersion=r,VencordNative.settings.set(Pn),Qo.info("Settings uploaded to cloud successfully"),e&&Fe({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){Qo.error("Failed to sync up",o),Fe({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function Rl(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",nr()),{method:"GET",headers:{Authorization:await Ci(),Accept:"application/octet-stream","If-None-Match":G.cloud.settingsSyncVersion.toString()}});if(o.status===404)return Qo.info("No settings on the cloud"),e&&Fe({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return Qo.info("Settings up to date"),e&&Fe({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return Qo.error(`Failed to sync down, API returned ${o.status}`),Fe({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=G.cloud.settingsSyncVersion;if(!t&&r{"use strict";a();er();$();T();mv();kp();Ke();rr();Cl();Sv=(e,t)=>X.show({type:e,message:t,id:X.genId()}),kA=()=>Sv(X.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),NA=e=>Sv(X.Type.FAILURE,`Failed to import settings: ${String(e)}`);Qo=new oe("Cloud:Settings","#39b7e0")});var Dp={};qe(Dp,{PlainSettings:()=>Pn,Settings:()=>G,SettingsStore:()=>jt,definePluginSettings:()=>N,migratePluginSettings:()=>$s,useSettings:()=>St});function St(e){let[,t]=U.useReducer(()=>({}),{});return U.useEffect(()=>e?(e.forEach(o=>jt.addChangeListener(o,t)),()=>e.forEach(o=>jt.removeChangeListener(o,t))):(jt.addGlobalChangeListener(t),()=>jt.removeGlobalChangeListener(t)),[]),jt.store}function $s(e,...t){let{plugins:o}=jt.plain;if(!(e in o)){for(let r of t)if(r in o){DA.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],jt.markAsChanged();break}}}function N(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return G.plugins[o.pluginName]},use:r=>St(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var DA,LA,Np,EA,jt,Pn,G,$=g(()=>{"use strict";a();zr();q1();hl();Ke();we();Us();I();T();Kr();DA=new oe("Settings"),LA={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}},Np=VencordNative.settings.get();Ii(Np,LA);EA=lo(async()=>{G.cloud.settingsSync&&G.cloud.authenticated&&(await Ri(),delete jr.Vencord_settingsDirty)},6e4),jt=new gl(Np,{readOnly:!0,getDefaultValue({target:e,key:t,path:o}){let r=e[t];if(!ze)return r;if(o==="plugins"&&t in ze)return e[t]={enabled:ze[t].required??ze[t].enabledByDefault??!1};if(o.startsWith("plugins.")){let i=o.slice(8);if(i in ze){let s=ze[i].options?.[t];if(!s)return r;if("default"in s)return e[t]=s.default;if(s.type===4){let l=s.options.find(c=>c.default);return l&&(e[t]=l.value),l?.value}}}return r}});jt.addGlobalChangeListener((e,t)=>{jt.plain.cloud.settingsSyncVersion=Date.now(),jr.Vencord_settingsDirty=!0,EA(),VencordNative.settings.set(jt.plain,t)});Pn=Np,G=jt.store});var No,ki=g(()=>{a();No="ca18b6e"});var wv=g(()=>{});var xv=g(()=>{});var Ep={};qe(Ep,{UpdateLogger:()=>Yr,changes:()=>ir,checkForUpdates:()=>Di,getRepo:()=>Lp,isNewer:()=>Gs,isOutdated:()=>sr,maybePromptToUpdate:()=>Hs,update:()=>Li,updateError:()=>Ni});async function kl(e){let t=await e;if(t.ok)return t.value;throw Ni=t.error,t.error}async function Di(){return ir=await kl(VencordNative.updater.getUpdates()),ir.some(e=>e.hash===No)?(Gs=!0,sr=!1):sr=ir.length>0}async function Li(){if(!sr)return!0;let e=await kl(VencordNative.updater.update());if(e&&(sr=!1,!await kl(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Hs(e,t=!1){try{if(await Di()){let r=confirm(e);if(r&&Gs)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Li(),So())}}catch(o){Yr.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Yr,sr,Gs,Ni,ir,Lp,Zr=g(()=>{"use strict";a();ki();Ke();rr();Yr=new oe("Updater","white"),sr=!1,Gs=!1;Lp=()=>kl(VencordNative.updater.getRepo())});function Mv(){Hs("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var Iv=g(()=>{"use strict";a();Zr()});function Op(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var _p=g(()=>{"use strict";a()});function Do({title:e,children:t}){return n(S.FormSection,null,n(V,{variant:"heading-lg/semibold",tag:"h2",className:j.bottom16},e),t)}function Lo(e,t){return _.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:OA})}var OA,ar=g(()=>{"use strict";a();wv();xv();le();Iv();ot();_p();T();OA=Op(Mv)});var Rv={};qe(Rv,{default:()=>UA});function _A(){let[e,,t]=st(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=St(),r=U.useMemo(()=>Math.random()>.5?Av:Cv,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=!1,c=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},{key:"transparent",title:"Enable window transparency.",note:"You need a theme that supports transparency or this will do nothing. Will stop the window from being resizable. Requires a full restart"},i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1];return n(Do,{title:"Vencord Settings"},n(FA,{image:r}),n(S.FormSection,{title:"Quick Actions"},n(Tt,{className:Pv("quick-actions-card")},n(U.Fragment,null,n(k,{onClick:So,size:k.Sizes.SMALL},"Restart Client"),n(k,{onClick:()=>VencordNative.quickCss.openEditor(),size:k.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),n(k,{onClick:()=>Il(e),size:k.Sizes.SMALL,disabled:t},"Open Settings Folder"),n(k,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:k.Sizes.SMALL,disabled:t},"Open in GitHub")))),n(S.FormDivider,null),n(S.FormSection,{className:j.top16,title:"Settings",tag:"h5"},n(S.FormText,{className:j.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),c.map(u=>u&&n(wt,{key:u.key,value:o[u.key],onChange:p=>o[u.key]=p,note:u.note},u.title))),l&&n(f,null,n(S.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(Io,{className:j.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar",value:"sidebar"},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:u=>o.macosVibrancyStyle=u,isSelected:u=>o.macosVibrancyStyle===u,serialize:Rs})),typeof Notification<"u"&&n(BA,{settings:o.notifications}))}function BA({settings:e}){return n(f,null,n(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(Ro,{style:{padding:"1em"},className:j.bottom8},n(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(S.FormText,{className:j.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(Io,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:Rs}),n(S.FormTitle,{tag:"h5",className:j.top16+" "+j.bottom8},"Notification Position"),n(Io,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:Rs}),n(S.FormTitle,{tag:"h5",className:j.top16+" "+j.bottom8},"Notification Timeout"),n(S.FormText,{className:j.bottom16},"Set to 0s to never automatically time out"),n(Er,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(S.FormTitle,{tag:"h5",className:j.top16+" "+j.bottom8},"Notification Log Limit"),n(S.FormText,{className:j.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(Er,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}),n(k,{onClick:Sl,disabled:e.logLimit===0},"Open Notification Log"))}function FA({image:e}){return n(Tt,{className:Pv("card","donate")},n("div",null,n(S.FormTitle,{tag:"h5"},"Support the Project"),n(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(Ds,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===Cv?"pixelated":void 0,marginLeft:"auto",transform:e===Av?"rotate(10deg)":void 0}}))}var Pv,Av,Cv,UA,kv=g(()=>{"use strict";a();bl();$();Qe();Yu();Pi();ot();we();rr();lt();T();ar();Pv=ve("vc-settings-"),Av="https://cdn.discordapp.com/emojis/1026533090627174460.png",Cv="https://media.discordapp.net/stickers/1039992459209490513.png";UA=Lo(_A,"Vencord Settings")});var Nv=g(()=>{});var $p={};qe($p,{currentNotice:()=>zs,nextNotice:()=>Dv,noticesQueue:()=>Fp,popNotice:()=>Up,showNotice:()=>js});function Up(){Bp.dismiss()}function Dv(){zs=Fp.shift(),zs&&Bp.show(...zs,"VencordNotice")}function js(e,t,o){Fp.push(["GENERIC",e,t,o]),zs||Dv()}var Bp,Fp,zs,Nl=g(()=>{"use strict";a();H();gt(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Bp=e);Fp=[],zs=null});var Lv=g(()=>{});function Qt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:Q(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ei({height:e=24,width:t=24,className:o}){return n(Qt,{height:e,width:t,className:Q(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function Dl(e){return n(Qt,{...e,className:Q(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),n("path",{d:"M15 5H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})))}function Xr(e){return n(Qt,{...e,className:Q(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function Jr(e){return n(Qt,{...e,className:Q(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function Ll(e){return n(Qt,{...e,className:Q(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function Ev(e){return n(Qt,{"aria-label":Ye.Messages.GUILD_OWNER,...e,className:Q(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Ov(e){return n(Qt,{...e,className:Q(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function El(e){return n(Qt,{...e,className:Q(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function Ol(e){return n(Qt,{...e,className:Q(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function _v(e){return n(Qt,{...e,className:Q(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function Bv(e){return n(Qt,{...e,className:Q(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function Gp(e){return n(Qt,{...e,className:Q(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function Oi(e){return n(Qt,{...e,className:Q(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function Fv(e){return n(Qt,{...e,className:Q(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{"fill-rule":"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function Uv(e){return n(Qt,{...e,className:Q(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}var It=g(()=>{"use strict";a();Lv();we();T()});function $v(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ws(e,t,o=!1){let r=Fu.duration(e,t),i=KA.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;uu==="days");if(l!==-1){let u=i[l],p=u.amount%7;p===0?i.splice(l,1):u.amount=p}let c="";for(;i.length;){let{amount:u,unit:p}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${$v(p,u===1,o)}`)}return c.length?c:`0 ${$v(t,!1,o)}`}function YA(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i2?r+=", ":o-i>1&&(r+=" and ");return r}function qs(e,t){let o="```";return`${o}${t||""}
${e.replaceAll("```","\\`\\`\\`")}
-${o}`}var ip,OP,BP,sp,FP,UP,$P,GP,HP,yn,zP,vn=g(()=>{"use strict";a();x();ip=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),OP=e=>e.toLowerCase().split("_"),BP=e=>e.toLowerCase().split("-"),sp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),FP=e=>e.toLowerCase().split(" "),UP=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),$P=e=>e.join("_").toUpperCase(),GP=e=>e.join("-").toLowerCase(),HP=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),yn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),zP=["years","months","weeks","days","hours","minutes","seconds"]});function As(){return`-${Xo.fromTimestamp(Date.now())}`}function me(e,t){let o=WP.createBotMessage({channelId:e,content:"",embeds:[]});return no.receiveMessage(e,Ar(t,o)),t}function lt(e,t,o){return e.find(r=>r.name===t)?.value||o}var WP,ap=g(()=>{"use strict";a();Pe();j();x();WP=P("createBotMessage")});var Sn,Uo,lp,cl=g(()=>{"use strict";a();Sn=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(Sn||{}),Uo=(s=>(s[s.BUILT_IN=0]="BUILT_IN",s[s.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",s[s.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",s[s.BOT=3]="BOT",s[s.PLACEHOLDER=4]="PLACEHOLDER",s))(Uo||{}),lp=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(lp||{})});var pp={};ze(pp,{ApplicationCommandInputType:()=>Uo,ApplicationCommandOptionType:()=>Sn,ApplicationCommandType:()=>lp,BUILT_IN:()=>Zn,OptionalMessageOption:()=>Xn,RequiredMessageOption:()=>Ns,_handleCommand:()=>KP,_init:()=>qP,commands:()=>cp,findOption:()=>lt,generateId:()=>As,prepareOption:()=>up,registerCommand:()=>yi,sendBotMessage:()=>me,unregisterCommand:()=>Cs});function up(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===Pv?r[o]=Xn:t===Iv&&(r[o]=Ns),t.choices?.forEach(i=>i.displayName||=i.name),up(r[o])}),e}function YP(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};yi(r,t)})}function yi(e,t){if(!Zn){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Zn.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${Zn.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,up(e),e.options?.[0]?.type===1){YP(e,t);return}cp[e.name]=e,Zn.push(e)}function Cs(e){let t=Zn.findIndex(o=>o.name===e);return t===-1?!1:(Zn.splice(t,1),delete cp[e],!0)}var Zn,cp,Pv,Iv,Xn,Ns,qP,KP,ao=g(()=>{"use strict";a();vn();ap();cl();ap();cl();cp={},Pv=Symbol("OptionalMessageOption"),Iv=Symbol("RequiredMessageOption"),Xn=Pv,Ns=Iv,qP=function(e){try{Zn=e,Xn=e.find(t=>t.name==="shrug").options[0],Ns=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},KP=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),me(o.channel.id,{content:`${s}:
-${Is(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function Av({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var dp=g(()=>{"use strict";a()});function Nv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=_.useState(l??!1),[p,d]=_.useState(null);_.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;typeof T=="string"?d(T):T?(d(null),u(v),i(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(gt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},yn(ip(r))),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Cv=g(()=>{"use strict";a();vn();x()});function kv({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var Rv=g(()=>{"use strict";a()});function mp({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=_.useState(`${t[r]??e.default??0}`),[p,d]=_.useState(null);_.useEffect(()=>{s(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;d(null),typeof T=="string"?d(T):T||d("Invalid input provided."),e.type===1&&BigInt(v)>=ZP?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ot,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var ZP,Dv=g(()=>{"use strict";a();w();x();ZP=BigInt(Number.MAX_SAFE_INTEGER)});function Lv({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=_.useState(l??null),[p,d]=_.useState(null);_.useEffect(()=>{i(p!==null)},[p]);function h(v){let T=e.isValid?.call(o,v)??!0;typeof T=="string"?d(T):T?(d(null),u(v),r(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ho,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Ev=g(()=>{"use strict";a();x()});function $o(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function _v({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=_.useState(null);_.useEffect(()=>{s(c!==null)},[c]);function p(d){let h=e.isValid?.call(o,d)??!0;typeof h=="string"?u(h):h?(u(null),i(d)):u("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(br,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:p,onValueRender:d=>String(d.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var fp=g(()=>{"use strict";a();x()});function Ov({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=_.useState(t[r]??e.default??null),[u,p]=_.useState(null);_.useEffect(()=>{s(u!==null)},[u]);function d(h){let v=e.isValid?.call(o,h)??!0;p(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ot,{type:"text",value:l,onChange:d,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),u&&n(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Bv=g(()=>{"use strict";a();x()});var ks=g(()=>{"use strict";a();dp();Cv();Rv();Dv();Ev();fp();Bv()});var Fv=g(()=>{});async function _r(e){let{invite:t}=await ou.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return O.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;O.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),O.subscribe("INVITE_MODAL_CLOSE",r=()=>{O.unsubscribe("INVITE_MODAL_CLOSE",r),O.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function vi(){return Q.getChannel(be.getChannelId())}function gp(){return de.getGuild(vi()?.guild_id)}function XP(e){Vc.openPrivateChannel(e)}function Jn(){return ts.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function bn(e){Bn.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function JP(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return no.sendMessage(e,i,o,r)}function Go(e,t){return we(o=>n(Ne,{...o,className:Ca.modal,size:"dynamic"},n(pu,{className:Ca.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(oi,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Ho(e){if(!await Ct.getUser(e))throw new Error("No such user: "+e);let o=mo.getGuildId();tu.openUserProfileModal({userId:e,guildId:o,channelId:be.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function hp(e,t){let o=po.getUserProfile(e);if(o)return o;O.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await Nt.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return O.dispatch({type:"USER_UPDATE",user:r.user}),await O.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&O.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),po.getUserProfile(e)}function Tn(e){return e.discriminator==="0"?e.username:e.tag}var Rs,ct=g(()=>{"use strict";a();x();nt();Rs=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Rs||{})});function Uv(e){we(t=>n(Ne,{...t},n(B,null,n(We,{className:Si("root")},n(rI,{user:e})))))}function oI(){let e=Jn()===2?eI:tI;return n("img",{src:e,alt:"GitHub"})}function nI(){let e=Jn()===2?VP:QP;return n("img",{src:e,alt:"Website"})}function rI({user:e}){mt();let t=Ye([po],()=>po.getUserProfile(e.id));pe(()=>{!t&&!e.bot&&e.id&&hp(e.id)},[e.id]);let o=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=bt(()=>{let s=Object.values(Ge);return(ai[e.id]?s.filter(c=>c.authors.includes(ai[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return n(f,null,n("div",{className:Si("header")},n("img",{className:Si("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(S.FormTitle,{tag:"h2",className:Si("name")},e.username),n("div",{className:Si("links")},r&&n(oi,{href:"https://"+r},n(nI,null)),o&&n(oi,{href:`https://github.com/${o}`},n(oI,null)))),n("div",{className:Si("plugins")},i.map(s=>n(ul,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>oo("Restart to apply changes!")}))))}var QP,VP,eI,tI,Si,$v=g(()=>{"use strict";a();Fv();$();rt();ae();A();ct();nt();x();Rr();yp();QP="/assets/e1e96d89e192de1997f73730db26e94f.svg",VP="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",eI="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",tI="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",Si=Fe("vc-author-modal-")});function Gv(e){let t=new sI({username:e.username,id:e.id??As(),avatar:e.avatar,bot:!0});return O.dispatch({type:"USER_UPDATE",user:t}),t}function Sp({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=_.useState([]),l=mt().plugins[e.name],[c,u]=_.useState({}),[p,d]=_.useState({}),[h,v]=_.useState(null),T=()=>Object.values(p).every(M=>!M),N=Boolean(l&&e.options&&!is(e.options));_.useEffect(()=>{(async()=>{for(let M of e.authors.slice(0,6)){let F=M.id?await Ct.getUser(`${M.id}`).catch(()=>Gv({username:M.name})):Gv({username:M.name});s(H=>[...H,F])}})()},[]);async function b(){if(!e.options){o();return}if(e.beforeSave){let F=await Promise.resolve(e.beforeSave(c));if(F!==!0){v(F);return}}let M=!1;for(let[F,H]of Object.entries(c)){let X=e.options[F];l[F]=H,X?.onChange?.(H),X?.restartNeeded&&(M=!0)}M&&t(),o()}function I(){if(!N||!e.options)return n(S.FormText,null,"There are no settings for this plugin.");{let M=Object.entries(e.options).map(([F,H])=>{if(H.hidden)return null;function X(L){u(V=>({...V,[F]:L}))}function Z(L){d(V=>({...V,[F]:L}))}let q=aI[H.type];return n(q,{id:F,key:F,option:H,onChange:X,onError:Z,pluginSettings:l,definedSettings:e.settings})});return n(ce,{flexDirection:"column",style:{gap:12,marginBottom:16}},M)}}function k(M,F){let H=e.authors.length-F,X=e.authors.length-H,Z=X+e.authors.length-F;return n(ee,{text:e.authors.slice(X,Z).map(q=>q.name).join(", ")},({onMouseEnter:q,onMouseLeave:L})=>n("div",{className:vp.moreUsers,onMouseEnter:q,onMouseLeave:L},"+",H))}return n(Ne,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Xe,{separator:!1},n(J,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(Tt,{onClick:o})),n(We,null,n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"About ",e.name),n(S.FormText,null,e.description),n(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(iI,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:k,renderUser:M=>n(ei,{className:vp.clickableAvatar,onClick:()=>Uv(M)},n("img",{className:vp.avatar,src:M.getAvatarURL(void 0,80,!0),alt:M.username,title:M.username}))}))),!!e.settingsAboutComponent&&n("div",{className:te(z.bottom8,"vc-text-selectable")},n(S.FormSection,null,n(B,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:c})))),n(S.FormSection,{className:z.bottom16},n(S.FormTitle,{tag:"h3"},"Settings"),I())),N&&n(pt,null,n(ce,{flexDirection:"column",style:{width:"100%"}},n(ce,{style:{marginLeft:"auto"}},n(C,{onClick:o,size:C.Sizes.SMALL,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel"),n(ee,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:M,onMouseLeave:F})=>n(C,{size:C.Sizes.SMALL,color:C.Colors.BRAND,onClick:b,onMouseEnter:M,onMouseLeave:F,disabled:!T()},"Save & Close"))),h&&n(J,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var iI,vp,sI,aI,Hv=g(()=>{"use strict";a();ao();$();ae();kt();qo();it();Pe();nt();w();j();x();ks();$v();iI=je("defaultRenderUser","showDefaultAvatarsForNullUsers"),vp=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),sI=Ft(()=>U.getCurrentUser().constructor);aI={[0]:Ov,[1]:mp,[2]:mp,[3]:Nv,[4]:Lv,[5]:_v,[6]:kv}});var zv=g(()=>{});var jv=g(()=>{});function Wv({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:te(pl.container,"default-colors",e?pl.checked:void 0),style:{backgroundColor:e?bp:Tp,opacity:o?.3:1}},n("svg",{className:pl.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(f,null,n("path",{fill:bp,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:bp,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:Tp,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:Tp,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:pl.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var bp,Tp,pl,qv=g(()=>{"use strict";a();jv();Pe();j();bp="var(--green-360)",Tp="var(--primary-400)",pl=P("slider","input","container")});function dl({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:p,onMouseLeave:d}){return n("div",{className:bi("card",{"card-disabled":e}),onMouseEnter:p,onMouseLeave:d},n("div",{className:bi("header")},n("div",{className:bi("name-author")},n(J,{variant:"text-md/bold",className:bi("name")},o,t&&n(Av,{text:"NEW",color:"#ED4245"})),!!s&&n(J,{variant:"text-md/normal",className:bi("author")},s)),r,n(Wv,{checked:l,onChange:c,disabled:e})),n(J,{className:bi("note"),variant:"text-sm/normal"},u),i)}var bi,xp=g(()=>{"use strict";a();zv();rt();dp();qv();x();bi=Fe("vc-addon-")});var Ds,wp=g(()=>{"use strict";a();Ds=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var Ap={};ze(Ap,{PMLogger:()=>lI,isPluginEnabled:()=>Pp,patches:()=>Yv,plugins:()=>cI,startAllPlugins:()=>Ls,startDependenciesRecursive:()=>ml,startPlugin:()=>Es,stopPlugin:()=>Ip});function Pp(e){return(Ge[e]?.required||Ge[e]?.isDependency||Mp[e]?.enabled)??!1}function ml(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!E.plugins[r].enabled){if(ml(Ge[r]),E.plugins[r].enabled=!0,Ge[r].patches){lo.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}Es(Ge[r])||o.push(r)}}),{restartNeeded:t,failures:o}}var lo,lI,cI,Yv,Mp,Zv,Ls,Es,Ip,fl=g(()=>{"use strict";a();ao();$();Ve();w();x();Rr();wa();lo=new ie("PluginManager","#a6d189"),lI=lo,cI=Ge,Yv=[],Mp=E.plugins;Zv=Object.values(Ge);for(let e of Zv)Mp[e.name]?.enabled&&e.dependencies?.forEach(t=>{let o=Ge[t];if(o)Mp[t].enabled=!0,o.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);lo.warn(r)}});for(let e of Zv){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,o]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.patches&&Pp(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),Yv.push(t)}Ls=Ko("startAllPlugins",function(t){lo.info(`Starting plugins (stage ${t})`);for(let o in Ge)if(Pp(o)){if((Ge[o].startAt??"WebpackReady")!==t)continue;Es(Ge[o])}});Es=Ko("startPlugin",function(t){let{name:o,commands:r,flux:i}=t;if(t.start){if(lo.info("Starting plugin",o),t.started)return lo.warn(`${o} already started`),!1;try{t.start(),t.started=!0}catch(s){return lo.error(`Failed to start ${o}
-`,s),!1}}if(r?.length){lo.info("Registering commands of plugin",o);for(let s of r)try{yi(s,o)}catch(l){return lo.error(`Failed to register command ${s.name}
-`,l),!1}}if(i)for(let s in i)O.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Ip=Ko("stopPlugin",function(t){let{name:o,commands:r,flux:i}=t;if(t.stop){if(lo.info("Stopping plugin",o),!t.started)return lo.warn(`${o} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return lo.error(`Failed to stop ${o}
-`,s),!1}}if(r?.length){lo.info("Unregistering commands of plugin",o);for(let s of r)try{Cs(s.name)}catch(l){return lo.error(`Failed to unregister command ${s.name}
-`,l),!1}}if(i)for(let s in i)O.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function pI(e){oe.show({message:e,type:oe.Type.FAILURE,id:oe.genId(),options:{position:oe.Position.BOTTOM}})}function dI({required:e}){return n(At,{className:Or("info-card",{"restart-card":e})},e?n(f,null,n(S.FormTitle,{tag:"h5"},"Restart required!"),n(S.FormText,{className:Or("dep-text")},"Restart now to apply new plugins and their settings"),n(C,{color:C.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):n(f,null,n(S.FormTitle,{tag:"h5"},"Plugin Management"),n(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function ul({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=E.plugins[e.name],c=()=>l.enabled??!1;function u(){us(async()=>d=>n(Sp,{...d,plugin:e,onRestartNeeded:()=>o(e.name)}))}function p(){let d=c();if(!d){let{restartNeeded:v,failures:T}=ml(e);if(T.length){Xv.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),ws("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!d,o(e.name);return}if(d&&!e.started){l.enabled=!d;return}if(!(d?Ip(e):Es(e))){l.enabled=!1;let v=`Error while ${d?"stopping":"starting"} plugin ${e.name}`;Xv.error(v),pI(v);return}l.enabled=!d}return n(dl,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>u(),className:te(uI.button,Or("info-button"))},e.options&&!is(e.options)?n(Tv,null):n(il,null))})}function Np(){let e=mt(),t=_.useMemo(()=>new Ds,[]);_.useEffect(()=>()=>void(t.hasChanges&&_t.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((v,T)=>n(f,null,T>0&&", ",Be.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=_.useMemo(()=>{let v={};for(let T in Ge){let N=Ge[T].dependencies;if(N)for(let b of N)v[b]??=[],v[b].push(T)}return v},[]),r=_.useMemo(()=>Object.values(Ge).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=_.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!p?.includes(v.name))return!1;if(!i.value.length)return!0;let N=i.value.toLowerCase();return v.name.toLowerCase().includes(N)||v.description.toLowerCase().includes(N)||v.tags?.some(b=>b.toLowerCase().includes(N))},[p]=at(()=>Dt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,N={},b=Object.values(r).map(k=>k.name),I=[];for(let{name:k}of r)(N[k]=v?.[k]??T)+60*60*24*2>T&&I.push(k);return io("Vencord_existingPlugins",N),Mr.isEqual(I,b)?[]:I})),d,h;if(r?.length){d=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||o[v.name]?.some(N=>e.plugins[N].enabled)){let N=v.required?"This plugin is required for Vencord to function.":mI(o[v.name]?.filter(b=>e.plugins[b].enabled));h.push(n(ee,{text:N,key:v.name},({onMouseLeave:b,onMouseEnter:I})=>n(ul,{onMouseLeave:b,onMouseEnter:I,onRestartNeeded:k=>t.handleChange(k),disabled:!0,plugin:v})))}else d.push(n(ul,{onRestartNeeded:N=>t.handleChange(N),disabled:!1,plugin:v,isNew:p?.includes(v.name),key:v.name}))}}else d=h=n(J,{variant:"text-md/normal"},"No plugins meet search criteria.");return n(bo,{title:"Plugins"},n(dI,{required:t.hasChanges}),n(S.FormTitle,{tag:"h5",className:te(z.top20,z.bottom8)},"Filters"),n("div",{className:Or("filter-controls")},n(ot,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:z.bottom20}),n("div",{className:Jv.inputWrapper},n(ho,{className:Jv.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===i.status,closeOnSelect:!0}))),n(S.FormTitle,{className:z.top20},"Plugins"),n("div",{className:Or("grid")},d),n(S.FormDivider,{className:z.top20}),n(S.FormTitle,{tag:"h5",className:te(z.top20,z.bottom8)},"Required Plugins"),n("div",{className:Or("grid")},h))}function mI(e){return n(_.Fragment,null,n(S.FormText,null,"This plugin is required by:"),e.map(t=>n(S.FormText,{className:Or("dep-text")},t)))}var Or,Xv,Jv,uI,yp=g(()=>{"use strict";a();gv();Vo();nl();$();rt();Lt();Hv();xp();Yn();wp();Ve();it();Pe();nt();ut();j();x();Rr();fl();Or=Fe("vc-plugins-"),Xv=new ie("PluginSettings","#a6d189"),Jv=P("inputDefault","inputWrapper"),uI=P("button","disabled","enabled")});var Qv={};ze(Qv,{default:()=>fI});var fI,Vv=g(()=>{"use strict";a();yp();Yn();fI=To(Np,"Plugins")});function qe(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var xo=g(()=>{"use strict";a()});var e1={};ze(e1,{default:()=>TI});function yI({link:e}){let[t,o,r]=at(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(S.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function vI({themeLinks:e}){return e.length?n(f,null,n(S.FormTitle,{className:z.top20,tag:"h5"},"Validator"),n(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(At,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(yI,{link:t}))))):null}function SI({theme:e,enabled:t,onChange:o,onDelete:r}){return n(dl,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(ce,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(qe,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(qe,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&_r(e.invite).catch(()=>oo("Invalid or expired invite"))}},"Discord Server"))})}function bI(){let e=mt(["themeLinks","enabledThemes"]),t=to(null),[o,r]=Y(0),[i,s]=Y(e.themeLinks.join(`
-`)),[l,c]=Y(null),[u,,p]=at(VencordNative.themes.getThemesDir);pe(()=>{d()},[]);async function d(){let I=await VencordNative.themes.getThemesList();c(I)}function h(I,k){if(k){if(e.enabledThemes.includes(I))return;e.enabledThemes=[...e.enabledThemes,I]}else e.enabledThemes=e.enabledThemes.filter(M=>M!==I)}async function v(I){if(I.stopPropagation(),I.preventDefault(),!I.currentTarget?.files?.length)return;let{files:k}=I.currentTarget,M=Array.from(k,F=>{let{name:H}=F;if(!!H.endsWith(".css"))return new Promise((X,Z)=>{let q=new FileReader;q.onload=()=>{VencordNative.themes.uploadTheme(H,q.result).then(X).catch(Z)},q.readAsText(F)})});await Promise.all(M),d()}function T(){return n(f,null,n(At,{className:"vc-settings-card"},n(S.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(qe,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(qe,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(S.FormSection,{title:"Local Themes"},n(At,{className:"vc-settings-quick-actions-card"},n(f,null,n(C,{onClick:()=>Xa(u),size:C.Sizes.SMALL,disabled:p},"Open Themes Folder"),n(C,{onClick:d,size:C.Sizes.SMALL},"Load missing Themes"),n(C,{onClick:()=>VencordNative.quickCss.openEditor(),size:C.Sizes.SMALL},"Edit QuickCSS"))),n("div",{className:hI("grid")},l?.map(I=>n(SI,{key:I.fileName,enabled:e.enabledThemes.includes(I.fileName),onChange:k=>h(I.fileName,k),onDelete:async()=>{h(I.fileName,!1),await VencordNative.themes.deleteTheme(I.fileName),d()},theme:I})))))}function N(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(I=>I.trim()).filter(Boolean))]}function b(){return n(f,null,n(At,{className:"vc-settings-card vc-text-selectable"},n(S.FormTitle,{tag:"h5"},"Paste links to css files here"),n(S.FormText,null,"One link per line"),n(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(S.FormSection,{title:"Online Themes",tag:"h5"},n(Ra,{value:i,onChange:s,className:te(gI.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:N,rows:10}),n(vI,{themeLinks:e.themeLinks})))}return n(bo,{title:"Themes"},n(Co,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(Co.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(Co.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&T(),o===1&&b())}var J6,Q6,gI,hI,TI,t1=g(()=>{"use strict";a();$();rt();kt();Lt();xo();ct();it();Pe();jn();ut();j();x();xp();Yn();J6=P("resolveInvite"),Q6=Vt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),gI=Vt(e=>typeof e.textarea=="string"),hI=Fe("vc-settings-theme-");TI=To(bI,"Themes")});var i1={};ze(i1,{default:()=>PI});function o1(e,t){return async()=>{e(!0);try{await t()}catch(r){if(Dr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var o=`Command \`${s}\` not found.
+${o}`}var Hp,$A,GA,zp,HA,zA,jA,WA,qA,An,KA,Cn=g(()=>{"use strict";a();T();Hp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),$A=e=>e.toLowerCase().split("_"),GA=e=>e.toLowerCase().split("-"),zp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),HA=e=>e.toLowerCase().split(" "),zA=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),jA=e=>e.join("_").toUpperCase(),WA=e=>e.join("-").toLowerCase(),qA=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),An=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),KA=["years","months","weeks","days","hours","minutes","seconds"]});function Ks(){return`-${un.fromTimestamp(Date.now())}`}function ge(e,t){let o=ZA.createBotMessage({channelId:e,content:"",embeds:[]});return ao.receiveMessage(e,Ii(t,o)),t}function ht(e,t,o){return e.find(r=>r.name===t)?.value||o}var ZA,jp=g(()=>{"use strict";a();we();H();T();ZA=x("createBotMessage")});var Rn,Vo,Wp,_l=g(()=>{"use strict";a();Rn=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(Rn||{}),Vo=(s=>(s[s.BUILT_IN=0]="BUILT_IN",s[s.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",s[s.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",s[s.BOT=3]="BOT",s[s.PLACEHOLDER=4]="PLACEHOLDER",s))(Vo||{}),Wp=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Wp||{})});var Yp={};qe(Yp,{ApplicationCommandInputType:()=>Vo,ApplicationCommandOptionType:()=>Rn,ApplicationCommandType:()=>Wp,BUILT_IN:()=>lr,OptionalMessageOption:()=>cr,RequiredMessageOption:()=>Ys,_handleCommand:()=>JA,_init:()=>XA,commands:()=>qp,findOption:()=>ht,generateId:()=>Ks,prepareOption:()=>Kp,registerCommand:()=>_i,sendBotMessage:()=>ge,unregisterCommand:()=>Zs});function Kp(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===Gv?r[o]=cr:t===Hv&&(r[o]=Ys),t.choices?.forEach(i=>i.displayName||=i.name),Kp(r[o])}),e}function QA(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};_i(r,t)})}function _i(e,t){if(!lr){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(lr.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${lr.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Kp(e),e.options?.[0]?.type===1){QA(e,t);return}qp[e.name]=e,lr.push(e)}function Zs(e){let t=lr.findIndex(o=>o.name===e);return t===-1?!1:(lr.splice(t,1),delete qp[e],!0)}var lr,qp,Gv,Hv,cr,Ys,XA,JA,uo=g(()=>{"use strict";a();Cn();jp();_l();jp();_l();qp={},Gv=Symbol("OptionalMessageOption"),Hv=Symbol("RequiredMessageOption"),cr=Gv,Ys=Hv,XA=function(e){try{lr=e,cr=e.find(t=>t.name==="shrug").options[0],Ys=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},JA=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),ge(o.channel.id,{content:`${s}:
+${qs(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function zv({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Zp=g(()=>{"use strict";a()});function jv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=U.useState(l??!1),[p,d]=U.useState(null);U.useEffect(()=>{s(p!==null)},[p]);function h(v){let b=e.isValid?.call(o,v)??!0;typeof b=="string"?d(b):b?(d(null),u(v),i(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(wt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},An(Hp(r))),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Wv=g(()=>{"use strict";a();Cn();T()});function qv({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var Kv=g(()=>{"use strict";a()});function Xp({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=U.useState(`${t[r]??e.default??0}`),[p,d]=U.useState(null);U.useEffect(()=>{s(p!==null)},[p]);function h(v){let b=e.isValid?.call(o,v)??!0;d(null),typeof b=="string"?d(b):b||d("Invalid input provided."),e.type===1&&BigInt(v)>=VA?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Je,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var VA,Yv=g(()=>{"use strict";a();I();T();VA=BigInt(Number.MAX_SAFE_INTEGER)});function Zv({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=U.useState(l??null),[p,d]=U.useState(null);U.useEffect(()=>{i(p!==null)},[p]);function h(v){let b=e.isValid?.call(o,v)??!0;typeof b=="string"?d(b):b?(d(null),u(v),r(v)):d("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Io,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),p&&n(S.FormText,{style:{color:"var(--text-danger)"}},p))}var Xv=g(()=>{"use strict";a();T()});function en(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function Jv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=U.useState(null);U.useEffect(()=>{s(c!==null)},[c]);function p(d){let h=e.isValid?.call(o,d)??!0;typeof h=="string"?u(h):h?(u(null),i(d)):u("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Er,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:p,onValueRender:d=>String(d.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Jp=g(()=>{"use strict";a();T()});function Qv({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=U.useState(t[r]??e.default??null),[u,p]=U.useState(null);U.useEffect(()=>{s(u!==null)},[u]);function d(h){let v=e.isValid?.call(o,h)??!0;p(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Je,{type:"text",value:l,onChange:d,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),u&&n(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Vv=g(()=>{"use strict";a();T()});var Xs=g(()=>{"use strict";a();Zp();Wv();Kv();Yv();Xv();Jp();Vv()});var e0=g(()=>{});async function Qr(e){let{invite:t}=await Gu.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return B.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;B.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),B.subscribe("INVITE_MODAL_CLOSE",r=()=>{B.unsubscribe("INVITE_MODAL_CLOSE",r),B.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function Bi(){return ee.getChannel(Ie.getChannelId())}function Js(){return ae.getGuild(Bi()?.guild_id)}function eC(e){Ms.openPrivateChannel(e)}function Fi(){return ws.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function kn(e){Wo.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function tC(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return ao.sendMessage(e,i,o,r)}function tn(e,t){return de(o=>n(ye,{...o,className:tl.modal,size:"dynamic"},n(Zu,{className:tl.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(Vn,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function bo(e){if(!await Bt.getUser(e))throw new Error("No such user: "+e);let o=yo.getGuildId();$u.openUserProfileModal({userId:e,guildId:o,channelId:Ie.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Qp(e,t){let o=ho.getUserProfile(e);if(o)return o;B.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await _t.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return B.dispatch({type:"USER_UPDATE",user:r.user}),await B.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&B.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),ho.getUserProfile(e)}function Nn(e){return e.discriminator==="0"?e.username:e.tag}var Bl,mt=g(()=>{"use strict";a();T();Ze();Bl=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Bl||{})});function t0(e){de(t=>n(ye,{...t},n(_,null,n(ke,{className:Ui("root")},n(lC,{user:e})))))}function sC(){let e=Fi()===2?rC:iC;return n("img",{src:e,alt:"GitHub"})}function aC(){let e=Fi()===2?nC:oC;return n("img",{src:e,alt:"Website"})}function lC({user:e}){St();let t=Be([ho],()=>ho.getUserProfile(e.id));se(()=>{!t&&!e.bot&&e.id&&Qp(e.id)},[e.id]);let o=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=Rt(()=>{let s=Object.values(ze);return(Mi[e.id]?s.filter(c=>c.authors.includes(Mi[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return n(f,null,n("div",{className:Ui("header")},n("img",{className:Ui("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(S.FormTitle,{tag:"h2",className:Ui("name")},e.username),n("div",{className:Ui("links")},r&&n(Vn,{href:"https://"+r},n(aC,null)),o&&n(Vn,{href:`https://github.com/${o}`},n(sC,null)))),n("div",{className:Ui("plugins")},i.map(s=>n(Fl,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>Mt("Restart to apply changes!")}))))}var oC,nC,rC,iC,Ui,o0=g(()=>{"use strict";a();e0();$();Qe();le();P();mt();Ze();T();Kr();Vp();oC="/assets/e1e96d89e192de1997f73730db26e94f.svg",nC="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",rC="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",iC="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",Ui=ve("vc-author-modal-")});function n0(e){let t=new uC({username:e.username,id:e.id??Ks(),avatar:e.avatar,bot:!0});return B.dispatch({type:"USER_UPDATE",user:t}),t}function Qs({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=U.useState([]),l=St().plugins[e.name],[c,u]=U.useState({}),[p,d]=U.useState({}),[h,v]=U.useState(null),b=()=>Object.values(p).every(A=>!A),M=Boolean(l&&e.options&&!Cs(e.options));U.useEffect(()=>{(async()=>{for(let A of e.authors.slice(0,6)){let F=A.id?await Bt.getUser(`${A.id}`).catch(()=>n0({username:A.name})):n0({username:A.name});s(z=>[...z,F])}})()},[]);async function w(){if(!e.options){o();return}if(e.beforeSave){let F=await Promise.resolve(e.beforeSave(c));if(F!==!0){v(F);return}}let A=!1;for(let[F,z]of Object.entries(c)){let Y=e.options[F];l[F]=z,Y?.onChange?.(z),Y?.restartNeeded&&(A=!0)}A&&t(),o()}function C(){if(!M||!e.options)return n(S.FormText,null,"There are no settings for this plugin.");{let A=Object.entries(e.options).map(([F,z])=>{if(z.hidden)return null;function Y(O){u(te=>({...te,[F]:O}))}function J(O){d(te=>({...te,[F]:O}))}let Z=pC[z.type];return n(Z,{id:F,key:F,option:z,onChange:Y,onError:J,pluginSettings:l,definedSettings:e.settings})});return n(fe,{flexDirection:"column",style:{gap:12,marginBottom:16}},A)}}function R(A,F){let z=e.authors.length-F,Y=e.authors.length-z,J=Y+e.authors.length-F;return n(ne,{text:e.authors.slice(Y,J).map(Z=>Z.name).join(", ")},({onMouseEnter:Z,onMouseLeave:O})=>n("div",{className:ed.moreUsers,onMouseEnter:Z,onMouseLeave:O},"+",z))}return n(ye,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Le,{separator:!1},n(V,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(pt,{onClick:o})),n(ke,null,n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"About ",e.name),n(S.FormText,null,e.description),n(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(cC,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:R,renderUser:A=>n(bi,{className:ed.clickableAvatar,onClick:()=>t0(A)},n("img",{className:ed.avatar,src:A.getAvatarURL(void 0,80,!0),alt:A.username,title:A.username}))}))),!!e.settingsAboutComponent&&n("div",{className:Q(j.bottom8,"vc-text-selectable")},n(S.FormSection,null,n(_,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:c})))),n(S.FormSection,{className:j.bottom16},n(S.FormTitle,{tag:"h3"},"Settings"),C())),M&&n(ct,null,n(fe,{flexDirection:"column",style:{width:"100%"}},n(fe,{style:{marginLeft:"auto"}},n(k,{onClick:o,size:k.Sizes.SMALL,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel"),n(ne,{text:"You must fix all errors before saving",shouldShow:!b()},({onMouseEnter:A,onMouseLeave:F})=>n(k,{size:k.Sizes.SMALL,color:k.Colors.BRAND,onClick:w,onMouseEnter:A,onMouseLeave:F,disabled:!b()},"Save & Close"))),h&&n(V,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var cC,ed,uC,pC,td=g(()=>{"use strict";a();uo();$();le();Ut();Uo();ot();we();Ze();I();H();T();Xs();o0();cC=Ne("defaultRenderUser","showDefaultAvatarsForNullUsers"),ed=x("moreUsers","emptyUser","avatarContainer","clickableAvatar"),uC=Ot(()=>E.getCurrentUser().constructor);pC={[0]:Qv,[1]:Xp,[2]:Xp,[3]:jv,[4]:Zv,[5]:Jv,[6]:qv}});var r0=g(()=>{});var i0=g(()=>{});function s0({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:Q(Ul.container,"default-colors",e?Ul.checked:void 0),style:{backgroundColor:e?od:nd,opacity:o?.3:1}},n("svg",{className:Ul.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(f,null,n("path",{fill:od,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:od,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:nd,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:nd,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:Ul.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var od,nd,Ul,a0=g(()=>{"use strict";a();i0();we();H();od="var(--green-360)",nd="var(--primary-400)",Ul=x("slider","input","container")});function $l({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:p,onMouseLeave:d}){return n("div",{className:$i("card",{"card-disabled":e}),onMouseEnter:p,onMouseLeave:d},n("div",{className:$i("header")},n("div",{className:$i("name-author")},n(V,{variant:"text-md/bold",className:$i("name")},o,t&&n(zv,{text:"NEW",color:"#ED4245"})),!!s&&n(V,{variant:"text-md/normal",className:$i("author")},s)),r,n(s0,{checked:l,onChange:c,disabled:e})),n(V,{className:$i("note"),variant:"text-sm/normal"},u),i)}var $i,rd=g(()=>{"use strict";a();r0();Qe();Zp();a0();T();$i=ve("vc-addon-")});var Vs,id=g(()=>{"use strict";a();Vs=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var cd={};qe(cd,{_usePatchContextMenu:()=>fC,addContextMenuPatch:()=>ad,addGlobalContextMenuPatch:()=>dC,findGroupChildrenByChildId:()=>ut,globalPatches:()=>Gl,navPatches:()=>ea,removeContextMenuPatch:()=>ld,removeGlobalContextMenuPatch:()=>mC});function ad(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=ea.get(o);r||(r=new Set,ea.set(o,r)),r.add(t)}}function dC(e){Gl.add(e)}function ld(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>ea.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function mC(e){return Gl.delete(e)}function ut(e,t){for(let o of t){if(o==null)continue;if(Array.isArray(o)){let i=ut(e,o);if(i!==null)return i}if(Array.isArray(e)&&e.some(i=>o.props?.id===i)||o.props?.id===e)return t;let r=o.props?.children;if(r){Array.isArray(r)||(r=[r],o.props.children=r);let i=ut(e,r);if(i!==null)return i}}return null}function fC(e){e={...e,children:sd(e.children)},e.contextMenuApiArguments??=[];let t=ea.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{o(e.children,...e.contextMenuApiArguments)}catch(r){l0.error(`Patch for ${e.navId} errored,`,r)}for(let o of Gl)try{o(e.navId,e.children,...e.contextMenuApiArguments)}catch(r){l0.error("Global patch errored,",r)}return e}function sd(e){return Array.isArray(e)?e.map(sd):(U.isValidElement(e)&&(e=U.cloneElement(e),e?.props?.children&&(e.type!==L.MenuControlItem||e.type===L.MenuControlItem&&e.props.control!=null)&&(e.props.children=sd(e.props.children))),e)}var l0,ea,Gl,Eo=g(()=>{"use strict";a();Ke();T();l0=new oe("ContextMenu"),ea=new Map,Gl=new Set});var md={};qe(md,{PMLogger:()=>gC,isPluginEnabled:()=>pd,patches:()=>c0,plugins:()=>hC,startAllPlugins:()=>ta,startDependenciesRecursive:()=>zl,startPlugin:()=>oa,stopPlugin:()=>dd});function pd(e){return(ze[e]?.required||ze[e]?.isDependency||ud[e]?.enabled)??!1}function zl(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!G.plugins[r].enabled){if(zl(ze[r]),G.plugins[r].enabled=!0,ze[r].patches){po.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}oa(ze[r])||o.push(r)}}),{restartNeeded:t,failures:o}}var po,gC,hC,c0,ud,u0,ta,oa,dd,jl=g(()=>{"use strict";a();uo();Eo();$();Ke();I();T();Kr();Xa();po=new oe("PluginManager","#a6d189"),gC=po,hC=ze,c0=[],ud=G.plugins;u0=Object.values(ze);for(let e of u0)ud[e.name]?.enabled&&e.dependencies?.forEach(t=>{let o=ze[t];if(o)ud[t].enabled=!0,o.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);po.warn(r)}});for(let e of u0){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,o]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.patches&&pd(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),c0.push(t)}ta=an("startAllPlugins",function(t){po.info(`Starting plugins (stage ${t})`);for(let o in ze)if(pd(o)){if((ze[o].startAt??"WebpackReady")!==t)continue;oa(ze[o])}});oa=an("startPlugin",function(t){let{name:o,commands:r,flux:i,contextMenus:s}=t;if(t.start){if(po.info("Starting plugin",o),t.started)return po.warn(`${o} already started`),!1;try{t.start(),t.started=!0}catch(l){return po.error(`Failed to start ${o}
+`,l),!1}}if(r?.length){po.info("Registering commands of plugin",o);for(let l of r)try{_i(l,o)}catch(c){return po.error(`Failed to register command ${l.name}
+`,c),!1}}if(i)for(let l in i)B.subscribe(l,i[l]);if(s)for(let l in s)ad(l,s[l]);return!0},e=>`startPlugin ${e.name}`),dd=an("stopPlugin",function(t){let{name:o,commands:r,flux:i,contextMenus:s}=t;if(t.stop){if(po.info("Stopping plugin",o),!t.started)return po.warn(`${o} already stopped`),!1;try{t.stop(),t.started=!1}catch(l){return po.error(`Failed to stop ${o}
+`,l),!1}}if(r?.length){po.info("Unregistering commands of plugin",o);for(let l of r)try{Zs(l.name)}catch(c){return po.error(`Failed to unregister command ${l.name}
+`,c),!1}}if(i)for(let l in i)B.unsubscribe(l,i[l]);if(s)for(let l in s)ld(l,s[l]);return!0},e=>`stopPlugin ${e.name}`)});function vC(e){X.show({message:e,type:X.Type.FAILURE,id:X.genId(),options:{position:X.Position.BOTTOM}})}function SC({required:e}){return n(Tt,{className:Vr("info-card",{"restart-card":e})},e?n(f,null,n(S.FormTitle,{tag:"h5"},"Restart required!"),n(S.FormText,{className:Vr("dep-text")},"Restart now to apply new plugins and their settings"),n(k,{color:k.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):n(f,null,n(S.FormTitle,{tag:"h5"},"Plugin Management"),n(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Fl({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=G.plugins[e.name],c=()=>l.enabled??!1;function u(){Hr(async()=>d=>n(Qs,{...d,plugin:e,onRestartNeeded:()=>o(e.name)}))}function p(){let d=c();if(!d){let{restartNeeded:v,failures:b}=zl(e);if(b.length){p0.error(`Failed to start dependencies for ${e.name}: ${b.join(", ")}`),js("Failed to start dependencies: "+b.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!d,o(e.name);return}if(d&&!e.started){l.enabled=!d;return}if(!(d?dd(e):oa(e))){l.enabled=!1;let v=`Error while ${d?"stopping":"starting"} plugin ${e.name}`;p0.error(v),vC(v);return}l.enabled=!d}return n($l,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>u(),className:Q(yC.button,Vr("info-button"))},e.options&&!Cs(e.options)?n(Bv,null):n(Ll,null))})}function fd(){let e=St(),t=U.useMemo(()=>new Vs,[]);U.useEffect(()=>()=>void(t.hasChanges&&et.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((v,b)=>n(f,null,b>0&&", ",Pe.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=U.useMemo(()=>{let v={};for(let b in ze){let M=ze[b].dependencies;if(M)for(let w of M)v[w]??=[],v[w].push(b)}return v},[]),r=U.useMemo(()=>Object.values(ze).sort((v,b)=>v.name.localeCompare(b.name)),[]),[i,s]=U.useState({value:"",status:0}),l=v=>s(b=>({...b,value:v})),c=v=>s(b=>({...b,status:v})),u=v=>{let b=e.plugins[v.name]?.enabled;if(b&&i.status===2||!b&&i.status===1||i.status===3&&!p?.includes(v.name))return!1;if(!i.value.length)return!0;let M=i.value.toLowerCase();return v.name.toLowerCase().includes(M)||v.description.toLowerCase().includes(M)||v.tags?.some(w=>w.toLowerCase().includes(M))},[p]=st(()=>dt("Vencord_existingPlugins").then(v=>{let b=Date.now()/1e3,M={},w=Object.values(r).map(R=>R.name),C=[];for(let{name:R}of r)(M[R]=v?.[R]??b)+60*60*24*2>b&&C.push(R);return kt("Vencord_existingPlugins",M),Fr.isEqual(C,w)?[]:C})),d,h;if(r?.length){d=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||o[v.name]?.some(M=>e.plugins[M].enabled)){let M=v.required?"This plugin is required for Vencord to function.":bC(o[v.name]?.filter(w=>e.plugins[w].enabled));h.push(n(ne,{text:M,key:v.name},({onMouseLeave:w,onMouseEnter:C})=>n(Fl,{onMouseLeave:w,onMouseEnter:C,onRestartNeeded:R=>t.handleChange(R),disabled:!0,plugin:v})))}else d.push(n(Fl,{onRestartNeeded:M=>t.handleChange(M),disabled:!1,plugin:v,isNew:p?.includes(v.name),key:v.name}))}}else d=h=n(V,{variant:"text-md/normal"},"No plugins meet search criteria.");return n(Do,{title:"Plugins"},n(SC,{required:t.hasChanges}),n(S.FormTitle,{tag:"h5",className:Q(j.top20,j.bottom8)},"Filters"),n("div",{className:Vr("filter-controls")},n(Je,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:j.bottom20}),n("div",{className:d0.inputWrapper},n(Io,{className:d0.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===i.status,closeOnSelect:!0}))),n(S.FormTitle,{className:j.top20},"Plugins"),n("div",{className:Vr("grid")},d),n(S.FormDivider,{className:j.top20}),n(S.FormTitle,{tag:"h5",className:Q(j.top20,j.bottom8)},"Required Plugins"),n("div",{className:Vr("grid")},h))}function bC(e){return n(U.Fragment,null,n(S.FormText,null,"This plugin is required by:"),e.map(t=>n(S.FormText,{className:Vr("dep-text")},t)))}var Vr,p0,d0,yC,Vp=g(()=>{"use strict";a();Nv();Xo();Nl();$();Qe();It();td();rd();ar();id();Ke();ot();we();Ze();lt();H();T();Kr();jl();Vr=ve("vc-plugins-"),p0=new oe("PluginSettings","#a6d189"),d0=x("inputDefault","inputWrapper"),yC=x("button","disabled","enabled")});var m0={};qe(m0,{default:()=>TC});var TC,f0=g(()=>{"use strict";a();Vp();ar();TC=Lo(fd,"Plugins")});function je(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var To=g(()=>{"use strict";a()});var g0={};qe(g0,{default:()=>CC});function MC({link:e}){let[t,o,r]=st(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(S.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function IC({themeLinks:e}){return e.length?n(f,null,n(S.FormTitle,{className:j.top20,tag:"h5"},"Validator"),n(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(Tt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(MC,{link:t}))))):null}function PC({theme:e,enabled:t,onChange:o,onDelete:r}){return n($l,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(fe,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(je,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(je,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&Qr(e.invite).catch(()=>Mt("Invalid or expired invite"))}},"Discord Server"))})}function AC(){let e=St(["themeLinks","enabledThemes"]),t=xt(null),[o,r]=W(0),[i,s]=W(e.themeLinks.join(`
+`)),[l,c]=W(null),[u,,p]=st(VencordNative.themes.getThemesDir);se(()=>{d()},[]);async function d(){let C=await VencordNative.themes.getThemesList();c(C)}function h(C,R){if(R){if(e.enabledThemes.includes(C))return;e.enabledThemes=[...e.enabledThemes,C]}else e.enabledThemes=e.enabledThemes.filter(A=>A!==C)}async function v(C){if(C.stopPropagation(),C.preventDefault(),!C.currentTarget?.files?.length)return;let{files:R}=C.currentTarget,A=Array.from(R,F=>{let{name:z}=F;if(!!z.endsWith(".css"))return new Promise((Y,J)=>{let Z=new FileReader;Z.onload=()=>{VencordNative.themes.uploadTheme(z,Z.result).then(Y).catch(J)},Z.readAsText(F)})});await Promise.all(A),d()}function b(){return n(f,null,n(Tt,{className:"vc-settings-card"},n(S.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(je,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(je,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(S.FormSection,{title:"Local Themes"},n(Tt,{className:"vc-settings-quick-actions-card"},n(f,null,n(k,{onClick:()=>Il(u),size:k.Sizes.SMALL,disabled:p},"Open Themes Folder"),n(k,{onClick:d,size:k.Sizes.SMALL},"Load missing Themes"),n(k,{onClick:()=>VencordNative.quickCss.openEditor(),size:k.Sizes.SMALL},"Edit QuickCSS"),Vencord.Settings.plugins.ClientTheme.enabled&&n(k,{onClick:()=>de(C=>n(Qs,{...C,plugin:Vencord.Plugins.plugins.ClientTheme,onRestartNeeded:()=>{}})),size:k.Sizes.SMALL},"Edit ClientTheme"))),n("div",{className:xC("grid")},l?.map(C=>n(PC,{key:C.fileName,enabled:e.enabledThemes.includes(C.fileName),onChange:R=>h(C.fileName,R),onDelete:async()=>{h(C.fileName,!1),await VencordNative.themes.deleteTheme(C.fileName),d()},theme:C})))))}function M(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(C=>C.trim()).filter(Boolean))]}function w(){return n(f,null,n(Tt,{className:"vc-settings-card vc-text-selectable"},n(S.FormTitle,{tag:"h5"},"Paste links to css files here"),n(S.FormText,null,"One link per line"),n(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(S.FormSection,{title:"Online Themes",tag:"h5"},n(rl,{value:i,onChange:s,className:Q(wC.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:M,rows:10}),n(IC,{themeLinks:e.themeLinks})))}return n(Do,{title:"Themes"},n(Ho,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(Ho.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(Ho.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&b(),o===1&&w())}var xU,MU,wC,xC,CC,h0=g(()=>{"use strict";a();$();Qe();Ut();It();To();td();mt();ot();we();Ze();rr();lt();H();T();rd();ar();xU=x("resolveInvite"),MU=so(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),wC=so(e=>typeof e.textarea=="string"),xC=ve("vc-settings-theme-");CC=Lo(AC,"Themes")});var b0={};qe(b0,{default:()=>DC});function y0(e,t){return async()=>{e(!0);try{await t()}catch(r){if(Yr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var o=`Command \`${s}\` not found.
Please install it and try again`;else{var o=`An error occurred while running \`${l}\`:
`;o+=c||`Code \`${i}\`. See the console for more info`}}else var o="An unknown error occurred. See the console for more info.";else var o=`An unknown error occurred (error is undefined).
-Please try again.`;_t.show({title:"Oops!",body:n(So,null,o.split(`
-`).map(i=>n("div",null,Be.parse(i))))})}finally{e(!1)}}}function n1({repo:e,hash:t,disabled:o=!1}){return n(qe,{href:`${e}/commit/${t}`,disabled:o},t)}function r1({updates:e,repo:t,repoPending:o}){return n(At,{style:{padding:"0 0.5em"}},e.map(({hash:r,author:i,message:s})=>n("div",{style:{marginTop:"0.5em",marginBottom:"0.5em"}},n("code",null,n(n1,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function xI(e){let[t,o]=_.useState(qn),[r,i]=_.useState(!1),[s,l]=_.useState(!1),c=(t?.length??0)>0;return n(f,null,!t&&mi?n(f,null,n(S.FormText,null,"Failed to check updates. Check the console for more info"),n(So,{style:{padding:"1em"}},n("p",null,mi.stderr||mi.stdout||"An unknown error occurred"))):n(S.FormText,{className:z.bottom8},c?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),c&&n(r1,{updates:t,...e}),n(ce,{className:te(z.bottom8,z.top8)},c&&n(C,{size:C.Sizes.SMALL,disabled:s||r,onClick:o1(l,async()=>{await gi()&&(o([]),await new Promise(u=>{_t.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){go(),u()},onCancel:u})}))})},"Update Now"),n(C,{size:C.Sizes.SMALL,disabled:s||r,onClick:o1(i,async()=>{await fi()?o(qn):(o([]),oe.show({message:"No updates found!",id:oe.genId(),type:oe.Type.MESSAGE,options:{position:oe.Position.BOTTOM}}))})},"Check for Updates")))}function wI(e){return n(f,null,n(S.FormText,{className:z.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(r1,{...e,updates:qn}))}function MI(){let e=mt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,o,r]=at(Xu,{fallbackValue:"Loading..."});_.useEffect(()=>{o&&Dr.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(bo,{title:"Vencord Updater"},n(S.FormTitle,{tag:"h5"},"Updater Settings"),n(gt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),n(gt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(gt,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(S.FormTitle,{tag:"h5"},"Repo"),n(S.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(qe,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(n1,{hash:fo,repo:t,disabled:r}),")"),n(S.FormDivider,{className:z.top8+" "+z.bottom8}),n(S.FormTitle,{tag:"h5"},"Updates"),bs?n(wI,{...i}):n(xI,{...i}))}var PI,s1=g(()=>{"use strict";a();$();li();kt();xo();it();Pe();jn();ut();Lr();x();si();Yn();PI=To(MI,"Updater")});function gl({value:e,onChange:t,validate:o}){let[r,i]=_.useState(e),[s,l]=_.useState();function c(u){i(u);let p=o(u);p===!0?(l(void 0),t(u)):l(p)}return n(f,null,n(ot,{type:"text",value:r,onChange:c,error:s}))}var Cp=g(()=>{"use strict";a();x()});var a1={};ze(a1,{default:()=>kI});function II(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function AI(){let e=await fetch(new URL("/v1/",zn()),{method:"DELETE",headers:new Headers({Authorization:await pi()})});if(!e.ok){Za.error(`Failed to erase data, API returned ${e.status}`),De({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}E.cloud.authenticated=!1,await qu(),De({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function NI(){let{cloud:e}=mt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(S.FormSection,{title:"Settings Sync",className:z.top16},n(S.FormText,{variant:"text-md/normal",className:z.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(gt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(C,{size:C.Sizes.SMALL,disabled:!t,onClick:()=>di(!0)},"Sync to Cloud"),n(ee,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(C,{onMouseLeave:o,onMouseEnter:r,size:C.Sizes.SMALL,color:C.Colors.RED,disabled:!t,onClick:()=>el(!0,!0)},"Sync from Cloud")),n(C,{size:C.Sizes.SMALL,color:C.Colors.RED,disabled:!t,onClick:()=>ov()},"Delete Cloud Settings")))}function CI(){let e=mt(["cloud.authenticated","cloud.url"]);return n(bo,{title:"Vencord Cloud"},n(S.FormSection,{title:"Cloud Settings",className:z.top16},n(S.FormText,{variant:"text-md/normal",className:z.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(qe,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(qe,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(gt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Xy(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(S.FormTitle,{tag:"h5"},"Backend URL"),n(S.FormText,{className:z.bottom8},"Which backend to use when using cloud integrations."),n(gl,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,qu()},validate:II}),n(C,{className:z.top8,size:C.Sizes.MEDIUM,color:C.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>_t.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:AI,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),n(S.FormDivider,{className:z.top16})),n(NI,null))}var kI,l1=g(()=>{"use strict";a();$n();$();Cp();xo();Ku();it();vs();x();Yn();kI=To(CI,"Cloud")});var c1={};ze(c1,{default:()=>DI});function RI(){return n(bo,{title:"Backup & Restore"},n(At,{className:te("vc-settings-card","vc-backup-restore-card")},n(ce,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(J,{variant:"text-md/normal",className:z.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(J,{variant:"text-md/normal",className:z.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(ce,null,n(C,{onClick:()=>tv(),size:C.Sizes.SMALL},"Import Settings"),n(C,{onClick:Vy,size:C.Sizes.SMALL},"Export Settings")))}var DI,u1=g(()=>{"use strict";a();kt();it();Pe();vs();x();Yn();DI=To(RI,"Backup & Restore")});var _s,kp=g(()=>{"use strict";a();Rt();$();A();w();x();si();_s=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[m.Ven,m.Megu],required:!0,start(){ue("user-settings-cog",e=>()=>{e.find(o=>Array.isArray(o)&&o.some(r=>r?.props?.id==="VencordSettings"))?.forEach(o=>{let r=o?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(o.props.action=()=>dn.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${o})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(E.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(fv(),En(mv)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Vv(),En(Qv)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(t1(),En(e1)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(s1(),En(i1)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(l1(),En(a1)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(u1(),En(c1)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return` (Vesktop v${VesktopNative.app.getVersion()})`},makeInfoElements(e,t){let{electronVersion:o,chromiumVersion:r,additionalInfo:i}=this;return n(f,null,n(e,{...t},"Vencord ",fo,i),o&&n(e,{...t},"Electron ",o),r&&n(e,{...t},"Chromium ",r))}})});var p1,LI,Rp,d1=g(()=>{"use strict";a();Ti();A();Pe();vn();w();Lr();x();si();Rr();kp();p1="Vencord-SupportHelper-Dismiss",LI=[_a,"1024286218801926184","1033680203433660458"],Rp=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[m.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>LI.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),o=c=>c.endsWith("API")||Ge[c].required,r=Object.keys(Ge).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!o(c)),i=Object.keys(Ge).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&o(c)),s={Vencord:`v1.6.6 \u2022 ${fo}${_s.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1704500565086)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Kn,OpenAsar:"openasar"in window};return{content:`
+Please try again.`;et.show({title:"Oops!",body:n(Ro,null,o.split(`
+`).map(i=>n("div",null,Pe.parse(i))))})}finally{e(!1)}}}function v0({repo:e,hash:t,disabled:o=!1}){return n(je,{href:`${e}/commit/${t}`,disabled:o},t)}function S0({updates:e,repo:t,repoPending:o}){return n(Tt,{style:{padding:"0 0.5em"}},e.map(({hash:r,author:i,message:s})=>n("div",{style:{marginTop:"0.5em",marginBottom:"0.5em"}},n("code",null,n(v0,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function RC(e){let[t,o]=U.useState(ir),[r,i]=U.useState(!1),[s,l]=U.useState(!1),c=(t?.length??0)>0;return n(f,null,!t&&Ni?n(f,null,n(S.FormText,null,"Failed to check updates. Check the console for more info"),n(Ro,{style:{padding:"1em"}},n("p",null,Ni.stderr||Ni.stdout||"An unknown error occurred"))):n(S.FormText,{className:j.bottom8},c?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),c&&n(S0,{updates:t,...e}),n(fe,{className:Q(j.bottom8,j.top8)},c&&n(k,{size:k.Sizes.SMALL,disabled:s||r,onClick:y0(l,async()=>{await Li()&&(o([]),await new Promise(u=>{et.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){So(),u()},onCancel:u})}))})},"Update Now"),n(k,{size:k.Sizes.SMALL,disabled:s||r,onClick:y0(i,async()=>{await Di()?o(ir):(o([]),X.show({message:"No updates found!",id:X.genId(),type:X.Type.MESSAGE,options:{position:X.Position.BOTTOM}}))})},"Check for Updates")))}function kC(e){return n(f,null,n(S.FormText,{className:j.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(S0,{...e,updates:ir}))}function NC(){let e=St(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,o,r]=st(Lp,{fallbackValue:"Loading..."});U.useEffect(()=>{o&&Yr.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(Do,{title:"Vencord Updater"},n(S.FormTitle,{tag:"h5"},"Updater Settings"),n(wt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),n(wt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(wt,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(S.FormTitle,{tag:"h5"},"Repo"),n(S.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(je,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(v0,{hash:No,repo:t,disabled:r}),")"),n(S.FormDivider,{className:j.top8+" "+j.bottom8}),n(S.FormTitle,{tag:"h5"},"Updates"),Gs?n(kC,{...i}):n(RC,{...i}))}var DC,T0=g(()=>{"use strict";a();$();Pi();Ut();To();ot();we();rr();lt();Zr();T();ki();ar();DC=Lo(NC,"Updater")});function Wl({value:e,onChange:t,validate:o}){let[r,i]=U.useState(e),[s,l]=U.useState();function c(u){i(u);let p=o(u);p===!0?(l(void 0),t(u)):l(p)}return n(f,null,n(Je,{type:"text",value:r,onChange:c,error:s}))}var gd=g(()=>{"use strict";a();T()});var w0={};qe(w0,{default:()=>BC});function LC(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function EC(){let e=await fetch(new URL("/v1/",nr()),{method:"DELETE",headers:{Authorization:await Ci()}});if(!e.ok){Ml.error(`Failed to erase data, API returned ${e.status}`),Fe({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}G.cloud.authenticated=!1,await Rp(),Fe({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function OC(){let{cloud:e}=St(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(S.FormSection,{title:"Settings Sync",className:j.top16},n(S.FormText,{variant:"text-md/normal",className:j.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(wt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(k,{size:k.Sizes.SMALL,disabled:!t,onClick:()=>Ri(!0)},"Sync to Cloud"),n(ne,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(k,{onMouseLeave:o,onMouseEnter:r,size:k.Sizes.SMALL,color:k.Colors.RED,disabled:!t,onClick:()=>Rl(!0,!0)},"Sync from Cloud")),n(k,{size:k.Sizes.SMALL,color:k.Colors.RED,disabled:!t,onClick:()=>Tv()},"Delete Cloud Settings")))}function _C(){let e=St(["cloud.authenticated","cloud.url"]);return n(Do,{title:"Vencord Cloud"},n(S.FormSection,{title:"Cloud Settings",className:j.top16},n(S.FormText,{variant:"text-md/normal",className:j.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(je,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(je,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(wt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&gv(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(S.FormTitle,{tag:"h5"},"Backend URL"),n(S.FormText,{className:j.bottom8},"Which backend to use when using cloud integrations."),n(Wl,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,Rp()},validate:LC}),n(k,{className:j.top8,size:k.Sizes.MEDIUM,color:k.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>et.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:EC,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),n(S.FormDivider,{className:j.top16})),n(OC,null))}var BC,x0=g(()=>{"use strict";a();er();$();gd();To();kp();ot();Us();T();ar();BC=Lo(_C,"Cloud")});var M0={};qe(M0,{default:()=>UC});function FC(){return n(Do,{title:"Backup & Restore"},n(Tt,{className:Q("vc-settings-card","vc-backup-restore-card")},n(fe,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(V,{variant:"text-md/normal",className:j.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(V,{variant:"text-md/normal",className:j.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(fe,null,n(k,{onClick:()=>bv(),size:k.Sizes.SMALL},"Import Settings"),n(k,{onClick:vv,size:k.Sizes.SMALL},"Export Settings")))}var UC,I0=g(()=>{"use strict";a();Ut();ot();we();Us();T();ar();UC=Lo(FC,"Backup & Restore")});var na,hd=g(()=>{"use strict";a();$();P();I();ki();na=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[m.Ven,m.Megu],required:!0,patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${o})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(G.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}},{find:"Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",replacement:{match:/(?<=function\((\i),\i\)\{)(?=let \i=Object.values\(\i.UserSettingsSections\).*?(\i)\.default\.open\()/,replace:"$2.default.open($1);return;"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(kv(),Xn(Rv)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(f0(),Xn(m0)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(h0(),Xn(g0)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(T0(),Xn(b0)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(x0(),Xn(w0)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(I0(),Xn(M0)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return` (Vesktop v${VesktopNative.app.getVersion()})`},makeInfoElements(e,t){let{electronVersion:o,chromiumVersion:r,additionalInfo:i}=this;return n(f,null,n(e,{...t},"Vencord ",No,i),o&&n(e,{...t},"Electron ",o),r&&n(e,{...t},"Chromium ",r))}})});var P0,$C,yd,A0=g(()=>{"use strict";a();ei();P();we();Cn();I();Zr();T();ki();Kr();hd();P0="Vencord-SupportHelper-Dismiss",$C=[ul,"1024286218801926184","1033680203433660458"],yd=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[m.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>$C.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),o=c=>c.endsWith("API")||ze[c].required,r=Object.keys(ze).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!o(c)),i=Object.keys(ze).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&o(c)),s={Vencord:`v1.7.3 \u2022 ${No}${na.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1711076914215)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:sr,OpenAsar:"openasar"in window};return{content:`
**Vencord Debug Info**
>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
`)}
Enabled Plugins (${r.length+i.length}):
-${Is(r.join(", ")+`
+${qs(r.join(", ")+`
`+i.join(", "))}
-`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===_a&&!as(U.getCurrentUser().id)&&Kn&&fo!==await wt.get(p1)){let t=()=>wt.set(p1,fo);_t.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var Dp,m1=g(()=>{"use strict";a();A();w();Dp=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[m.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(?<=guildBanner:\i,animate:)\i(?=}\))/,replace:"!0"}}]})});var Lp,f1=g(()=>{"use strict";a();A();w();Lp=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[m.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var EI,Ep,g1=g(()=>{"use strict";a();$();A();w();EI=/\.tar\.\w+$/,Ep=y({name:"AnonymiseFileNames",authors:[m.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>E.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>E.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=EI.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(E.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:E.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=E.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function h1(e,t){return(await Pr.fetchAssetIds(e,[t]))[0]}async function OI(e){let t={};return await _I.fetchApplicationsRPC(t,e),t.application}var _I,y1,xi,_p,v1=g(()=>{"use strict";a();nl();xo();A();w();j();x();_I=P("fetchApplicationsRPC","getRemoteIconURL");y1={};_p=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[m.Ducko],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to use arRPC"),n(S.FormText,null,n(qe,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:o}=t,r=o?.assets;if(r?.large_image&&(r.large_image=await h1(o.application_id,r.large_image)),r?.small_image&&(r.small_image=await h1(o.application_id,r.small_image)),o){let i=o.application_id;y1[i]||=await OI(i);let s=y1[i];o.name||=s.name}O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(xi&&xi.close(),xi=new WebSocket("ws://127.0.0.1:1337"),xi.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(xi.readyState===WebSocket.OPEN),1e3))){ws("Failed to connect to arRPC, is it running?","Retry",()=>{op(),this.start()});return}oe.show({message:"Connected to arRPC",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})},stop(){O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),xi?.close()}})});var Op,S1=g(()=>{"use strict";a();A();w();Op=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[m.Xinto,m.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("\d+"\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var b1,T1,BI,x1,w1=g(()=>{"use strict";a();ae();j();x();Bp();b1=Re("ChannelRTCStore"),T1=P("a","animated","useTransition"),BI=je('("guildsnav")'),x1=B.wrap(e=>{let t=Ye([wi],()=>wi.getExpandedFolders()),o=Ye([b1],()=>b1.isFullscreenInContext()),r=n(BI,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex"};return!s||!ht.store.sidebarAnim?i?n("div",{style:l},r):null:n(T1.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(T1.animated.div,{style:{...c,...l}},r))},{noop:!0})});function $I(e){return UI.getGuildFolders().find(t=>t.guildIds.includes(e))}function P1(){for(let e of wi.getExpandedFolders())Up.toggleGuildFolderExpand(e)}var FI,UI,wi,Up,M1,Fp,ht,$p,Bp=g(()=>{"use strict";a();$();A();w();j();x();w1();({GuildsTree:FI}=P("GuildsTree")),UI=Re("SortedGuildStore"),wi=Re("ExpandedGuildFolderStore"),Up=P("move","toggleGuildFolderExpand"),M1=null,Fp=!1;ht=D({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),$p=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[m.juby,m.AutumnVN,m.Nuckyz],settings:ht,patches:[{find:'("guildsnav")',predicate:()=>ht.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,o)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${o},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>ht.store.sidebar&&ht.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders()`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>ht.store.sidebar,replacement:[{predicate:()=>ht.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!ht.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!ht.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>ht.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>ht.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>ht.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>ht.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!ht.store.closeAllFolders&&!ht.store.forceOpen)&&M1!==e.guildId){M1=e.guildId;let t=$I(e.guildId);t?.folderId?ht.store.forceOpen&&!wi.isFolderExpanded(t.folderId)&&Up.toggleGuildFolderExpand(t.folderId):ht.store.closeAllFolders&&P1()}},TOGGLE_GUILD_FOLDER_EXPAND(e){ht.store.closeOthers&&!Fp&&(Fp=!0,O.wait(()=>{let t=wi.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&Up.toggleGuildFolderExpand(o);Fp=!1}))}},getGuildTree(e,t,o){if(!e||o==null)return t;let r=new FI;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===et.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(ht.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(x1,{...e}),closeFolders:P1})});var Gp,I1=g(()=>{"use strict";a();A();w();Gp=y({name:"BetterGifAltText",authors:[m.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.default\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var GI,Hp,A1=g(()=>{"use strict";a();$();A();w();j();GI=P("section","lastSection"),Hp=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[m.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>E.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return n("div",{className:GI.lastSection})}})});var zp,N1=g(()=>{"use strict";a();$();A();w();x();zp=y({name:"BetterRoleDot",authors:[m.Ven,m.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>E.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){$t.copy(e),oe.show({message:"Copied to Clipboard!",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})}})});var jp,C1=g(()=>{"use strict";a();A();w();jp=y({name:"BetterUploadButton",authors:[m.obscurity,m.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var k1,R1,D1=g(()=>{"use strict";a();j();k1=Re("ApplicationStreamPreviewStore"),R1=Re("ApplicationStreamingStore")});var HI,_1,L1,E1,Wp,O1=g(()=>{"use strict";a();Rt();Lt();A();ct();w();x();D1();HI=async({guildId:e,channelId:t,ownerId:o})=>{let r=await k1.getPreviewURL(e,t,o);!r||Go(r)},_1=(e,{userId:t})=>()=>{let o=R1.getAnyStreamForUser(t);if(!o)return;let r=n(G.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Sv,action:()=>o&&HI(o),disabled:!o});e.push(n(G.MenuSeparator,null),r)},L1=(e,{stream:t})=>_1(e,{userId:t.ownerId}),E1=(e,{user:t})=>{if(t)return _1(e,{userId:t.id})},Wp=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[m.phil],start:()=>{ue("user-context",E1),ue("stream-context",L1)},stop:()=>{fe("user-context",E1),fe("stream-context",L1)}})});function B1(){Os.textContent=`
+`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===ul&&!ks(E.getCurrentUser().id)&&sr&&No!==await yt.get(P0)){let t=()=>yt.set(P0,No);et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var vd,C0=g(()=>{"use strict";a();P();I();vd=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[m.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(?<=guildBanner:\i,animate:)\i(?=}\))/,replace:"!0"}}]})});var Sd,bd,R0=g(()=>{"use strict";a();$();P();I();Sd=N({domain:{type:3,default:!0,description:"Remove the untrusted domain popup when opening links",restartNeeded:!0},file:{type:3,default:!0,description:"Remove the 'Potentially Dangerous Download' popup when opening links",restartNeeded:!0}}),bd=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[m.zt,m.Trwy],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>Sd.store.domain},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"},predicate:()=>Sd.store.file}],settings:Sd})});var GC,HC,zC,ur,Td,k0=g(()=>{"use strict";a();$();le();P();I();H();GC=Go(".actionBarIcon)"),HC=x("popFirstFile","update"),zC=/\.tar\.\w+$/,ur=N({anonymiseByDefault:{description:"Whether to anonymise file names by default",type:3,default:!0},method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>ur.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>ur.store.method!==1}}),Td=y({name:"AnonymiseFileNames",authors:[m.fawn],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),"}},{find:"message.attachments",replacement:{match:/(\i.uploadFiles\((\i),)/,replace:"$2.forEach(f=>f.filename=$self.anonymise(f)),$1"}},{find:".Messages.ATTACHMENT_UTILITIES_SPOILER",replacement:{match:/(?<=children:\[)(?=.{10,80}tooltip:.{0,100}\i\.\i\.Messages\.ATTACHMENT_UTILITIES_SPOILER)/,replace:"arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null,"}}],settings:ur,renderIcon:_.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??ur.store.anonymiseByDefault;return n(GC,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,HC.update(t,e.id,o,{})}},r?n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M17.06 13C15.2 13 13.64 14.33 13.24 16.1C12.29 15.69 11.42 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C19.23 21 21 19.21 21 17C21 14.79 19.23 13 17.06 13M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17S5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17S8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17S15.5 14.14 17.06 14.14C18.62 14.14 19.88 15.42 19.88 17S18.61 19.86 17.06 19.86M22 10.5H2V12H22V10.5M15.53 2.63C15.31 2.14 14.75 1.88 14.22 2.05L12 2.79L9.77 2.05L9.72 2.04C9.19 1.89 8.63 2.17 8.43 2.68L6 9H18L15.56 2.68L15.53 2.63Z"})):n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{transform:"scale(-1,1)"}},n("path",{fill:"currentColor",d:"M22.11 21.46L2.39 1.73L1.11 3L6.31 8.2L6 9H7.11L8.61 10.5H2V12H10.11L13.5 15.37C13.38 15.61 13.3 15.85 13.24 16.1C12.29 15.69 11.41 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C17.66 21 18.22 20.86 18.72 20.61L20.84 22.73L22.11 21.46M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17C4.13 15.42 5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17C9.75 18.58 8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17C14.25 16.74 14.29 16.5 14.36 16.25L17.84 19.73C17.59 19.81 17.34 19.86 17.06 19.86M22 12H15.2L13.7 10.5H22V12M17.06 13C19.23 13 21 14.79 21 17C21 17.25 20.97 17.5 20.93 17.73L19.84 16.64C19.68 15.34 18.66 14.32 17.38 14.17L16.29 13.09C16.54 13.03 16.8 13 17.06 13M12.2 9L7.72 4.5L8.43 2.68C8.63 2.17 9.19 1.89 9.72 2.04L9.77 2.05L12 2.79L14.22 2.05C14.75 1.88 15.32 2.14 15.54 2.63L15.56 2.68L18 9H12.2Z"})))},{noop:!0}),anonymise(e){if((e.anonymise??ur.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=zC.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(ur.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:ur.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return ur.store.consistent+i;case 2:return Date.now()+i}}})});async function N0(e,t){return(await Ur.fetchAssetIds(e,[t]))[0]}async function WC(e){let t={};return await jC.fetchApplicationsRPC(t,e),t.application}var jC,D0,Gi,wd,L0=g(()=>{"use strict";a();Nl();To();P();I();H();T();jC=x("fetchApplicationsRPC","getRemoteIconURL");D0={};wd=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[m.Ducko],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to use arRPC"),n(S.FormText,null,n(je,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:o}=t,r=o?.assets;if(r?.large_image&&(r.large_image=await N0(o.application_id,r.large_image)),r?.small_image&&(r.small_image=await N0(o.application_id,r.small_image)),o){let i=o.application_id;D0[i]||=await WC(i);let s=D0[i];o.name||=s.name}B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(Gi&&Gi.close(),Gi=new WebSocket("ws://127.0.0.1:1337"),Gi.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(Gi.readyState===WebSocket.OPEN),1e3))){js("Failed to connect to arRPC, is it running?","Retry",()=>{Up(),this.start()});return}X.show({message:"Connected to arRPC",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})},stop(){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),Gi?.close()}})});var xd,E0=g(()=>{"use strict";a();P();I();xd=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[m.Xinto,m.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("\d+"\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var O0,_0,qC,B0,F0=g(()=>{"use strict";a();le();H();T();Md();O0=Re("ChannelRTCStore"),_0=x("a","animated","useTransition"),qC=Ne('("guildsnav")'),B0=_.wrap(e=>{let t=Be([Hi],()=>Hi.getExpandedFolders()),o=Be([O0],()=>O0.isFullscreenInContext()),r=n(qC,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex"};return!s||!Pt.store.sidebarAnim?i?n("div",{style:l},r):null:n(_0.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(_0.animated.div,{style:{...c,...l}},r))},{noop:!0})});function ZC(e){return YC.getGuildFolders().find(t=>t.guildIds.includes(e))}function $0(){for(let e of Hi.getExpandedFolders())Pd.toggleGuildFolderExpand(e)}var KC,YC,Hi,Pd,U0,Id,Pt,Ad,Md=g(()=>{"use strict";a();$();P();I();H();T();F0();({GuildsTree:KC}=x("GuildsTree")),YC=Re("SortedGuildStore"),Hi=Re("ExpandedGuildFolderStore"),Pd=x("move","toggleGuildFolderExpand"),U0=null,Id=!1;Pt=N({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),Ad=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[m.juby,m.AutumnVN,m.Nuckyz],settings:Pt,patches:[{find:'("guildsnav")',predicate:()=>Pt.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,o)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${o},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>Pt.store.sidebar&&Pt.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders()`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>Pt.store.sidebar,replacement:[{predicate:()=>Pt.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!Pt.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!Pt.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>Pt.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>Pt.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>Pt.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>Pt.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!Pt.store.closeAllFolders&&!Pt.store.forceOpen)&&U0!==e.guildId){U0=e.guildId;let t=ZC(e.guildId);t?.folderId?Pt.store.forceOpen&&!Hi.isFolderExpanded(t.folderId)&&Pd.toggleGuildFolderExpand(t.folderId):Pt.store.closeAllFolders&&$0()}},TOGGLE_GUILD_FOLDER_EXPAND(e){Pt.store.closeOthers&&!Id&&(Id=!0,B.wait(()=>{let t=Hi.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&Pd.toggleGuildFolderExpand(o);Id=!1}))}},getGuildTree(e,t,o){if(!e||o==null)return t;let r=new KC;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===Ye.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(Pt.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(B0,{...e}),closeFolders:$0})});var Cd,G0=g(()=>{"use strict";a();P();I();Cd=y({name:"BetterGifAltText",authors:[m.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.default\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var Rd,H0=g(()=>{"use strict";a();P();I();Rd=y({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[m.Samwich],patches:[{find:".GIFPickerResultTypes.SEARCH",replacement:[{match:"this.state={resultType:null}",replace:'this.state={resultType:"Favorites"}'}]}]})});var XC,kd,z0=g(()=>{"use strict";a();$();P();I();H();XC=x("section","lastSection"),kd=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[m.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>G.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return n("div",{className:XC.lastSection})}})});function JC(){return n("svg",{role:"img",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z"}))}function QC(){return n("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M 12,0 C 5.3733333,0 0,5.3733333 0,12 c 0,6.626667 5.3733333,12 12,12 1.106667,0 2,-0.893333 2,-2 0,-0.52 -0.2,-0.986667 -0.52,-1.346667 -0.306667,-0.346666 -0.506667,-0.813333 -0.506667,-1.32 0,-1.106666 0.893334,-2 2,-2 h 2.36 C 21.013333,17.333333 24,14.346667 24,10.666667 24,4.7733333 18.626667,0 12,0 Z M 4.6666667,12 c -1.1066667,0 -2,-0.893333 -2,-2 0,-1.1066667 0.8933333,-2 2,-2 1.1066666,0 2,0.8933333 2,2 0,1.106667 -0.8933334,2 -2,2 z M 8.666667,6.6666667 c -1.106667,0 -2.0000003,-0.8933334 -2.0000003,-2 0,-1.1066667 0.8933333,-2 2.0000003,-2 1.106666,0 2,0.8933333 2,2 0,1.1066666 -0.893334,2 -2,2 z m 6.666666,0 c -1.106666,0 -2,-0.8933334 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.1066666 -0.893333,2 -2,2 z m 4,5.3333333 c -1.106666,0 -2,-0.893333 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.106667 -0.893333,2 -2,2 z"}))}var j0,Nd,W0=g(()=>{"use strict";a();P();mt();I();H();T();j0=x("open","selectRole","updateGuild");Nd=y({name:"BetterRoleContext",description:"Adds options to copy role color / edit role when right clicking roles in the user profile",authors:[m.Ven],start(){Ts.DeveloperMode.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=Js();if(!o)return;let r=ae.getRole(o.id,t);!r||(r.colorString&&e.push(n(L.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>Ft.copy(r.colorString),icon:QC})),_e.getGuildPermissionProps(o).canManageRoles&&e.push(n(L.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await j0.open(o.id,"ROLES"),j0.selectRole(t)},icon:JC})))}}})});var Dd,q0=g(()=>{"use strict";a();$();P();I();T();Dd=y({name:"BetterRoleDot",authors:[m.Ven,m.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>G.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>G.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!G.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>G.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!G.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){Ft.copy(e),X.show({message:"Copied to Clipboard!",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})}})});function eR({mode:e,baseLayer:t=!1,...o}){let r=e==="HIDDEN",i=xt(null);se(()=>()=>{Wo.dispatch("LAYER_POP_START"),Wo.dispatch("LAYER_POP_COMPLETE")},[]);let s=n("div",{ref:i,"aria-hidden":r,className:VC({[K0.layer]:!0,[K0.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(ll,{containerRef:i},s)}var VC,K0,zi,Ld,Y0=g(()=>{"use strict";a();$();Qe();le();P();I();H();T();VC=ve(""),K0=x("animating","baseLayer","bg","layer","layers"),zi=N({disableFade:{description:"Disable the crossfade animation",type:3,default:!0,restartNeeded:!0},organizeMenu:{description:"Organizes the settings cog context menu into categories",type:3,default:!0},eagerLoad:{description:"Removes the loading delay when opening the menu for the first time",type:3,default:!0,restartNeeded:!0}});Ld=y({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[m.Kyuuhachi],settings:zi,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=(\i)\.contextType=\i\.AccessibilityPreferencesContext;)/,replace:"$1=$self.Layer;",predicate:()=>zi.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"\d+",name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>zi.store.eagerLoad}]},{find:"DefaultCustomContentScroller:function()",replacement:[{match:/\(0,\i\.useTransition\)\((\i)/,replace:"(_cb=>_cb(void 0,$1))||$&"},{match:/\i\.animated\.div/,replace:'"div"'}],predicate:()=>zi.store.disableFade},{find:"Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",replacement:{match:/(?<=handleOpenSettingsContextMenu.{0,250}?\i\.el\(("[^"]+")\)\.then\([^;]*?("\d+").*?Messages\.USER_SETTINGS,)(?=onClick:)/,replace:"onMouseEnter(){Vencord.Webpack.wreq.el($1).then(()=>Vencord.Webpack.wreq($2));},"},predicate:()=>zi.store.eagerLoad},{find:"Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",replacement:{match:/\(0,\i.default\)\(\)(?=\.filter\(\i=>\{let\{section:\i\}=)/,replace:"$self.wrapMenu($&)"}}],Layer(e){return n(_,{fallback:()=>e.children},n(eR,{...e}))},wrapMenu(e){if(!zi.store.organizeMenu)return e;let t=[{label:null,items:[]}];for(let o of e)o.section==="HEADER"?t.push({label:o.label,items:[]}):o.section==="DIVIDER"?t.push({label:Ye.Messages.OTHER_OPTIONS,items:[]}):t.at(-1).items.push(o);return{filter(o){for(let r of t)r.items=r.items.filter(o);return this},map(o){return t.filter(r=>r.items.length>0).map(({label:r,items:i})=>{let s=i.map(o);return r?n(L.MenuItem,{id:r.replace(/\W/,"_"),label:r,children:s,action:s[0].props.action}):s})}}}})});var Ed,Z0=g(()=>{"use strict";a();P();I();Ed=y({name:"BetterUploadButton",authors:[m.fawn,m.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var X0,J0,Q0=g(()=>{"use strict";a();H();X0=Re("ApplicationStreamPreviewStore"),J0=Re("ApplicationStreamingStore")});var tR,V0,oR,nR,Od,eS=g(()=>{"use strict";a();It();P();mt();I();T();Q0();tR=async({guildId:e,channelId:t,ownerId:o})=>{let r=await X0.getPreviewURL(e,t,o);!r||tn(r)},V0=(e,{userId:t})=>{let o=J0.getAnyStreamForUser(t);if(!o)return;let r=n(L.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Ov,action:()=>o&&tR(o),disabled:!o});e.push(n(L.MenuSeparator,null),r)},oR=(e,{stream:t})=>V0(e,{userId:t.ownerId}),nR=(e,{user:t})=>{if(t)return V0(e,{userId:t.id})},Od=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[m.phil],contextMenus:{"user-context":nR,"stream-context":oR}})});function tS(){ra.textContent=`
.vc-nsfw-img [class^=imageWrapper] img,
.vc-nsfw-img [class^=wrapperPaused] video {
- filter: blur(${E.plugins.BlurNSFW.blurAmount}px);
+ filter: blur(${G.plugins.BlurNSFW.blurAmount}px);
transition: filter 0.2s;
}
.vc-nsfw-img [class^=imageWrapper]:hover img,
.vc-nsfw-img [class^=wrapperPaused]:hover video {
filter: unset;
}
- `}var Os,qp,F1=g(()=>{"use strict";a();$();A();w();qp=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[m.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper(?=.+?channel_id:(\i)\.id)/g,replace:"$&+($1.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:B1}},start(){Os=document.createElement("style"),Os.id="VcBlurNsfw",document.head.appendChild(Os),B1()},stop(){Os?.remove()}})});function zI(e){let t=E.plugins.CallTimer.format==="human",o=d=>t?d:d.toString().padStart(2,"0"),r=d=>t?d:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),p="";return s&&(p+=`${s}d `),(l||p)&&(p+=`${o(l)}${r("h")}${i}`),(c||p||!t)&&(p+=`${o(c)}${r("m")}${i}`),p+=`${o(u)}${r("s")}`,p}var Kp,U1=g(()=>{"use strict";a();$();ae();A();ut();w();Kp=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[m.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(B,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=ls({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},zI(t)))}})});var ed={};ze(ed,{_handleClick:()=>qI,_handlePreEdit:()=>WI,_handlePreSend:()=>jI,addClickListener:()=>Qp,addPreEditListener:()=>Br,addPreSendListener:()=>Kt,removeClickListener:()=>Vp,removePreEditListener:()=>Fr,removePreSendListener:()=>Yt});async function jI(e,t,o,r){o.replyOptions=r;for(let i of Zp)try{let s=await i(e,t,o);if(s&&s.cancel===!0)return!0}catch(s){Yp.error(`MessageSendHandler: Listener encountered an unknown error
-`,s)}return!1}async function WI(e,t,o){for(let r of Xp)try{await r(e,t,o)}catch(i){Yp.error(`MessageEditHandler: Listener encountered an unknown error
-`,i)}}function Kt(e){return Zp.add(e),e}function Br(e){return Xp.add(e),e}function Yt(e){return Zp.delete(e)}function Fr(e){return Xp.delete(e)}function qI(e,t,o){e=ko.getMessage(t.id,e.id)??e;for(let r of Jp)try{r(e,t,o)}catch(i){Yp.error(`MessageClickHandler: Listener encountered an unknown error
-`,i)}}function Qp(e){return Jp.add(e),e}function Vp(e){return Jp.delete(e)}var Yp,Zp,Xp,Jp,on=g(()=>{"use strict";a();Ve();x();Yp=new ie("MessageEvents","#e5c890"),Zp=new Set,Xp=new Set;Jp=new Set});var $1,G1=g(()=>{"use strict";a();$1=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","si@youtube.com","pp@youtube.com","si@youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","share_id@reddit.com"]});var H1,KI,td,z1=g(()=>{"use strict";a();on();A();w();G1();H1=/[\\^$.*+?()[\]{}|]/g,KI=RegExp(H1.source),td=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[m.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&KI.test(e)?e.replace(H1,"\\$&"):e||""},createRules(){let e=$1;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{!o.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=Kt((e,t)=>this.onSend(t)),this.preEdit=Br((e,t,o)=>this.onSend(o))},stop(){Yt(this.preSend),Fr(this.preEdit)}})});var j1=g(()=>{});function q1(e){let t=e.toString(16).padStart(6,"0");Bs.store.color=t,K1(t)}function XI(){let e=VI(Bs.store.color)>45,t=Jn()===2;return n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(S.FormTitle,{tag:"h3"},"Theme Color"),n(S.FormText,null,"Add a color to your Discord client theme")),n(YI,{color:parseInt(Bs.store.color,16),onChange:q1,showEyeDropper:!1,suggestedColors:ZI})),e||t?n("div",null,n(S.FormDivider,{className:te(z.top8,z.bottom8)}),n(S.FormText,{className:"client-theme-warning"},"Your theme won't look good:"),e&&n(S.FormText,{className:"client-theme-warning"},"Selected color is very light"),t&&n(S.FormText,{className:"client-theme-warning"},"Light mode isn't supported")):null)}async function JI(){let e=document.querySelectorAll('link[rel="stylesheet"]'),t={};for(let i of e){let s=i.getAttribute("href");if(!s)continue;let c=await(await fetch(s)).text(),u=W1.exec(c);for(;u!==null;){let[,p,d]=u;t[p]=parseFloat(d),u=W1.exec(c)}}let o=Object.entries(t).map(([i,s])=>{let l=s-t["--primary-600-hsl"],c=l>=0?"+":"-";return`${i}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${c} ${Math.abs(l).toFixed(2)}%);`}).join(`
-`),r=document.createElement("style");r.setAttribute("id","clientThemeOffsets"),r.textContent=`:root:root {
- ${o}
- }`,document.head.appendChild(r)}function K1(e){let{hue:t,saturation:o,lightness:r}=QI(e),i=document.getElementById("clientThemeVars");i||(i=document.createElement("style"),i.setAttribute("id","clientThemeVars"),document.head.appendChild(i)),i.textContent=`:root {
+ `}var ra,_d,oS=g(()=>{"use strict";a();$();P();I();_d=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[m.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper(?=.+?channel_id:(\i)\.id)/g,replace:"$&+($1.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:tS}},start(){ra=document.createElement("style"),ra.id="VcBlurNsfw",document.head.appendChild(ra),tS()},stop(){ra?.remove()}})});function rR(e){let t=G.plugins.CallTimer.format==="human",o=d=>t?d:d.toString().padStart(2,"0"),r=d=>t?d:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),p="";return s&&(p+=`${s}d `),(l||p)&&(p+=`${o(l)}${r("h")}${i}`),(c||p||!t)&&(p+=`${o(c)}${r("m")}${i}`),p+=`${o(u)}${r("s")}`,p}var Bd,nS=g(()=>{"use strict";a();$();le();P();lt();I();Bd=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[m.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(_,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Ns({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},rR(t)))}})});var jd={};qe(jd,{_handleClick:()=>aR,_handlePreEdit:()=>sR,_handlePreSend:()=>iR,addClickListener:()=>Hd,addPreEditListener:()=>ti,addPreSendListener:()=>Vt,removeClickListener:()=>zd,removePreEditListener:()=>oi,removePreSendListener:()=>eo});async function iR(e,t,o,r){o.replyOptions=r;for(let i of Ud)try{if((await i(e,t,o))?.cancel)return!0}catch(s){Fd.error(`MessageSendHandler: Listener encountered an unknown error
+`,s)}return!1}async function sR(e,t,o){for(let r of $d)try{if((await r(e,t,o))?.cancel)return!0}catch(i){Fd.error(`MessageEditHandler: Listener encountered an unknown error
+`,i)}return!1}function Vt(e){return Ud.add(e),e}function ti(e){return $d.add(e),e}function eo(e){return Ud.delete(e)}function oi(e){return $d.delete(e)}function aR(e,t,o){e=zo.getMessage(t.id,e.id)??e;for(let r of Gd)try{r(e,t,o)}catch(i){Fd.error(`MessageClickHandler: Listener encountered an unknown error
+`,i)}}function Hd(e){return Gd.add(e),e}function zd(e){return Gd.delete(e)}var Fd,Ud,$d,Gd,gn=g(()=>{"use strict";a();Ke();T();Fd=new oe("MessageEvents","#e5c890"),Ud=new Set,$d=new Set;Gd=new Set});var rS,iS=g(()=>{"use strict";a();rS=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@*.youtube.com","kw@*.youtube.com","si@*.youtube.com","pp@*.youtube.com","si@*.youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","igsh","share_id@reddit.com"]});var sS,lR,Wd,aS=g(()=>{"use strict";a();gn();P();I();iS();sS=/[\\^$.*+?()[\]{}|]/g,lR=RegExp(sS.source),Wd=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[m.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&lR.test(e)?e.replace(sS,"\\$&"):e||""},createRules(){let e=rS;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{!o.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=Vt((e,t)=>this.onSend(t)),this.preEdit=ti((e,t,o)=>this.onSend(o))},stop(){eo(this.preSend),oi(this.preEdit)}})});var lS=g(()=>{});function fS(e){let t=e.toString(16).padStart(6,"0");ia.store.color=t,gS(t)}function cS(e){pR({theme:e})}function dR(){let e=Be([uS],()=>uS.theme),t=e==="light",o=t?"dark":"light",i=Be([pS],()=>pS.gradientPreset)!==void 0,s=SR(ia.store.color),l=!1,c=!0;return(t&&s<.26||!t&&s>.12)&&(l=!0),s<.26&&s>.12&&(c=!1),t&&s>.65&&(l=!0,c=!1),n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(S.FormTitle,{tag:"h3"},"Theme Color"),n(S.FormText,null,"Add a color to your Discord client theme")),n(cR,{color:parseInt(ia.store.color,16),onChange:fS,showEyeDropper:!1,suggestedColors:uR})),(l||i)&&n(f,null,n(S.FormDivider,{className:Q(j.top8,j.bottom8)}),n("div",{className:`client-theme-contrast-warning ${l?t?"theme-dark":"theme-light":""}`},n("div",{className:"client-theme-warning"},n(S.FormText,null,"Warning, your theme won't look good:"),l&&n(S.FormText,null,"Selected color won't contrast well with text"),i&&n(S.FormText,null,"Nitro themes aren't supported")),l&&c&&n(k,{onClick:()=>cS(o),color:k.Colors.RED},"Switch to ",o," mode"),i&&n(k,{onClick:()=>cS(e),color:k.Colors.RED},"Disable Nitro Theme"))))}function mS(e,t,o){return Object.entries(e).filter(([r])=>r.search(t)>-1).map(([r,i])=>{let s=i-e[o],l=s>=0?"+":"-";return`${r}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${l} ${Math.abs(s).toFixed(2)}%);`}).join(`
+`)}function gR(e){let t={},o=dS.exec(e);for(;o!==null;){let[,r,i]=o;t[r]=parseFloat(i),o=dS.exec(e)}Kd("clientThemeOffsets",[`.theme-light {
+ ${mS(t,mR,"--primary-345-hsl")}
+}`,`.theme-dark {
+ ${mS(t,fR,"--primary-600-hsl")}
+}`].join(`
+
+`))}function hR(e){let t=/\.theme-light[^{]*\{[^}]*var\(--white-500\)[^}]*}/gm,o=[...e.matchAll(t)].flat(),r=/^([^{]*)\{background:var\(--white-500\)/m,i=/^([^{]*)\{background-color:var\(--white-500\)/m,s=Kl(o,M=>ql(M,r)).join(`,
+`),l=Kl(o,M=>ql(M,i)).join(`,
+`),c=`${s} {
+ background: var(--primary-100)
+}`,u=`${l} {
+ background-color: var(--primary-100)
+}`,p=/\.theme-light\{([^}]*--[^:}]*(?:background|bg)[^:}]*:var\(--white-500\)[^}]*)\}/m,d=/^(--[^:]*(?:background|bg)[^:]*):var\(--white-500\)/m,h=Kl(o,M=>ql(M,p)).map(M=>M.split(";")).flat(),b=`.theme-light {
+ ${Kl(h,M=>ql(M,d)).map(M=>`${M}: var(--primary-100);`).join(`
+`)}
+}`;Kd("clientThemeLightModeFixes",[c,u,b].join(`
+
+`))}function ql(e,t){let o=e.match(t);return o===null?null:o[1]}function Kl(e,t){return e.map(t).filter(Boolean)}function gS(e){let{hue:t,saturation:o,lightness:r}=vR(e),i=document.getElementById("clientThemeVars");i||(i=Kd("clientThemeVars")),i.textContent=`:root {
--theme-h: ${t};
--theme-s: ${o}%;
--theme-l: ${r}%;
- }`}function QI(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,c,u,p;return p=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*p-1)),i===t?c=(o-r)/l%6:i===o?c=(r-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,p*=100,{hue:c,saturation:u,lightness:p}}function VI(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r);return 100*((i+s)/2)}var YI,ZI,Bs,od,W1,Y1=g(()=>{"use strict";a();j1();$();A();ct();it();Pe();w();j();x();YI=je(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),ZI=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938"];Bs=D({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(XI,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(C,{onClick:()=>q1(3224376)},"Reset Theme Color")}}),od=y({name:"ClientTheme",authors:[m.F53,m.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:Bs,startAt:"DOMContentLoaded",start(){K1(Bs.store.color),JI()},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),W1=/(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g});var nd,Z1=g(()=>{"use strict";a();A();w();nd=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[m.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});var rd,X1=g(()=>{"use strict";a();A();jn();Jr();w();j();j();x();rd=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[m.Ven],getShortcuts(){function e(i){let s=new Map;return function(...l){let c=String(l);if(s.has(c))return s.get(c);let u=Sr(i(...l)),p=(()=>{switch(u.length){case 0:return null;case 1:return u[0];default:let d=[...new Set(u)];return d.length>1&&console.warn(`Warning: This filter matches ${u.length} modules. Make it more specific!
-`,d),u[0]}})();return p&&c&&s.set(c,p),p}}let t,o=e(i=>i),r=e(Ae.byProps);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:Qt.c,wreq:Qt,wpsearch:Yc,wpex:Na,wpexs:i=>Na(Ia(i)),find:o,findAll:Sr,findByProps:r,findAllByProps:(...i)=>Sr(Ae.byProps(...i)),findByCode:e(Ae.byCode),findAllByCode:i=>Sr(Ae.byCode(i)),findComponentByCode:e(Ae.componentByCode),findAllComponentsByCode:(...i)=>Sr(Ae.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(Ae.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:go,canonicalizeMatch:ln,canonicalizeReplace:xa,canonicalizeReplacement:Zi,fakeRender:(i,s)=>{let l=t?.deref(),c=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(c),c.focus();let u=c.document;u.body.style.margin="1em",c.prepared||(c.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(p=>{let d=p.cloneNode(!0);p.parentElement?.tagName==="HEAD"?u.head.append(d):d.id?.startsWith("vencord-")||d.id?.startsWith("vcd-")?u.documentElement.append(d):u.body.append(d)})),Tr.render(_.createElement(i,s),u.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,o]of Object.entries(e))window[t]=o},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var J1,id,Q1=g(()=>{"use strict";a();Rt();Lt();A();w();x();J1=(e,{user:t})=>()=>{!t||e.push(n(G.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>$t.copy(``),icon:hi}))},id=y({name:"CopyUserURLs",authors:[m.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ue("user-context",J1)},stop(){fe("user-context",J1)}})});var nn,eA,V1,eS,tA,sd,ad,hl,ld,cd,tS=g(()=>{"use strict";a();$n();$();A();Ve();nt();w();Lr();j();x();nn=new ie("CrashHandler"),{ModalStack:eA,DraftManager:V1,DraftType:eS,closeExpressionPicker:tA}=No(()=>{let e=Xi(Ae.byProps("pushLazy","popAll"),Ae.byProps("clearDraft","saveDraft"),Ae.byProps("DraftType"),Ae.byProps("closeExpressionPicker","openExpressionPicker"));return{ModalStack:e[0],DraftManager:e[1],DraftType:e[2]?.DraftType,closeExpressionPicker:e[3]?.closeExpressionPicker}}),sd=D({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),ad=0,hl=0,ld=!1,cd=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[m.Nuckyz],enabledByDefault:!0,settings:sd,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-hl<=1e3&&!ld)return!0;if(ld=!1,++ad>5){try{De({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return hl=Date.now(),!1}setTimeout(()=>ad--,6e4);try{return ad===1&&Ts("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0),sd.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return nn.error("Failed to handle crash",t),!1}finally{hl=Date.now()}},handlePreventCrash(e){if(Date.now()-hl>=1e3)try{De({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=be.getChannelId();V1.clearDraft(t,eS.ChannelMessage),V1.clearDraft(t,eS.FirstThreadMessage)}catch(t){nn.debug("Failed to clear drafts.",t)}try{tA()}catch(t){nn.debug("Failed to close expression picker.",t)}try{O.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){nn.debug("Failed to close open context menu.",t)}try{eA.popAll()}catch(t){nn.debug("Failed to close old modals.",t)}try{Qo()}catch(t){nn.debug("Failed to close all open modals.",t)}try{O.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){nn.debug("Failed to close user popout.",t)}try{O.dispatch({type:"LAYER_POP_ALL"})}catch(t){nn.debug("Failed to pop all layers.",t)}if(sd.store.attemptToNavigateToHome)try{Do.transitionTo("/channels/@me")}catch(t){nn.debug("Failed to navigate to home",t)}try{ld=!0,e.forceUpdate()}catch(t){nn.debug("Failed to update crash handler component.",t)}}})});function yl(e){return Boolean(e)}function ud(e){return e!=null}var vl=g(()=>{"use strict";a()});async function oS(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await Pr.fetchAssetIds(Ur.store.appID,[e]))[0]}function Ot(){Sl(!0),E.plugins.CustomRPC.enabled&&Sl()}function iS(){return Ur.store.type!==1}function iA(e){return!iS()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function nS(){return Ur.store.timestampMode!==3}function rS(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function sS(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:d,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:T,buttonTwoText:N,buttonTwoURL:b}=Ur.store;if(!t)return;let I={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(I.url=s),Ur.store.timestampMode){case 1:I.timestamps={start:Math.floor(Date.now()/1e3)};break;case 2:I.timestamps={start:Math.floor(Date.now()/1e3)-new Date().getHours()*3600-new Date().getMinutes()*60-new Date().getSeconds()};break;case 3:(l||c)&&(I.timestamps={},l&&(I.timestamps.start=l),c&&(I.timestamps.end=c));break;case 0:default:break}v&&(I.buttons=[v,N].filter(yl),I.metadata={button_urls:[T,b].filter(yl)}),u&&(I.assets={large_image:await oS(u),large_text:p||void 0}),d&&(I.assets={...I.assets,small_image:await oS(d),small_text:h||void 0});for(let k in I){if(k==="type")continue;let M=I[k];(!M||M.length===0)&&delete I[k]}return I}async function Sl(e){let t=await sS();O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var oA,nA,rA,Ur,pd,aS=g(()=>{"use strict";a();$();xo();A();vl();ut();w();j();x();oA=je("onOpenGameProfile"),nA=P("activity","buttonColor"),rA=P("profileColors");Ur=D({appID:{type:0,description:"Application ID (required)",onChange:Ot,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:Ot,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:Ot,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:Ot,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ot,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:Ot,disabled:iS,isValid:iA},timestampMode:{type:4,description:"Timestamp mode",onChange:Ot,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp (only for custom timestamp mode)",onChange:Ot,disabled:nS,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp (only for custom timestamp mode)",onChange:Ot,disabled:nS,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ot,isValid:rS},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ot,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:Ot,isValid:rS},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ot,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:Ot,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:Ot},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ot,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:Ot}});pd=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[m.captain,m.AutumnVN],start:Sl,stop:()=>Sl(!0),settings:Ur,settingsAboutComponent:()=>{let e=at(sS);return n(f,null,n(S.FormText,null,"Go to ",n(qe,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",n(qe,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),n(S.FormDivider,null),n("div",{style:{width:"284px"},className:rA.profileColors},e[0]&&n(oA,{activity:e[0],className:nA.activity,channelId:be.getChannelId(),guild:de.getGuild(mo.getLastSelectedGuildId()),application:{id:Ur.store.appID},user:U.getCurrentUser()})))}})});var lS=g(()=>{});async function aA(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=sA.exec(e.video.url)?.[1];if(!t)return;let o=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!o.ok)return;let{titles:r,thumbnails:i}=await o.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0&&!i[0].original;if(!s&&!l)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title.replace(/ >(\S)/g," $1")),l&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new ie("Dearrow").error("Failed to dearrow embed",e)}}function lA({component:e}){let{embed:t}=e.props;return t?.dearrow?n(ee,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var sA,dd,cS=g(()=>{"use strict";a();lS();ae();A();Ve();w();x();sA=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;dd=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[m.Ven],embedDidMount:aA,renderButton(e){return n(B,{noop:!0},n(lA,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{.{0,30}let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var uS=g(()=>{});var cA,Qn,pS,dS,mS,$r,bl,Mi,Fs,md,Vn=g(()=>{"use strict";a();cA="https://decor.fieryflames.dev",Qn=cA+"/api",pS=Qn+"/authorize",dS="https://ugc.decor.fieryflames.dev",mS="1096966363416899624",$r="100101099111114",bl="11497119",Mi="1096357702931841148",Fs="dXp2SdxDcP",md=1e3*60*60*4});var uA,er,Us=g(()=>{"use strict";a();Ti();qo();Ve();nt();x();Vn();uA={async getItem(e){return wt.get(e).then(t=>t??null)},async setItem(e,t){await wt.set(e,t)},async removeItem(e){await wt.del(e)}},er=Ft(()=>Ir(eu((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[U.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[U.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>we(i=>n(es,{...i,scopes:["identify"],responseType:"code",redirectUri:pS,permissions:0n,clientId:mS,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let c=await fetch(l);if(c?.ok){let u=await c.text();t().setToken(u)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&(oo(`Failed to authorize: ${l.message}`,oe.Type.FAILURE),new ie("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>uA,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function Tl(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${er.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var fS,gS,hS,fd,yS,vS,xl=g(()=>{"use strict";a();Vn();Us();fS=async e=>{if(e?.length===0)return{};let t=new URL(Qn+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},gS=async(e="@me")=>Tl(Qn+`/users/${e}/decorations`).then(t=>t.json()),hS=async(e="@me")=>Tl(Qn+`/users/${e}/decoration`).then(t=>t.json()),fd=async(e,t="@me")=>{let o=new FormData;return e?"hash"in e?o.append("hash",e.hash):"file"in e&&(o.append("image",e.file),o.append("alt",e.alt??"null")):o.append("hash","null"),Tl(Qn+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},yS=async e=>{await Tl(Qn+`/decorations/${e}`,{method:"DELETE"})},vS=async()=>fetch(Qn+"/decorations/presets").then(e=>e.json())});function gd(e){return`${e.animated?"a_":""}${e.hash}`}function wl(e){return{asset:gd(e),skuId:$r}}var Ml=g(()=>{"use strict";a();Vn()});function SS(e){let[t,o]=Y(e?xn.getState().getAsset(e.id)??null:null);return pe(()=>{let r=xn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=xn.getState();i(e.id)}return r},[]),t?{asset:t,skuId:$r}:null}var xn,hd=g(()=>{"use strict";a();Nr();qo();x();xl();Vn();xn=Ft(()=>Ir((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:ro(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=Array.from(o),s=await fS(i),l=new Map(r),c=new Date;for(let u of i){let p=s[u]??null;l.set(u,{asset:p,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!r&&Date.now()-c.getTime(){"use strict";a();qo();x();xl();Ml();hd();rn=Ft(()=>Ir((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await gS(),r=await hS();e({decorations:o,selectedDecoration:r})},async create(o){let r=await fd(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await yS(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),fd(o),xn.getState().set(U.getCurrentUser().id,o?gd(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ce,Ii,Ai,bS,tr=g(()=>{"use strict";a();rt();j();Ce=Fe("vc-decor-"),Ii=P("modalFooterShopButton"),Ai=Aa(["openAvatarDecorationModal:"]),bS=Aa(["stickerInspected]:"])});var $s,TS,Pl,yd,xS,Gr=g(()=>{"use strict";a();j();x();TS=e=>$s=e,Pl=Wc(()=>{let e=qc(".shopPreviewBanner");return _.memo(e)}),xS=e=>yd=e});function vd(e){return n($s,{...e,isSelected:!1},n(xv,null),n(J,{variant:"text-xs/normal",color:"header-primary"},et.Messages.CREATE))}var wS=g(()=>{"use strict";a();Lt();x();Gr()});function Sd(e){return n($s,{...e},n(wv,null),n(J,{variant:"text-xs/normal",color:"header-primary"},et.Messages.NONE))}var MS=g(()=>{"use strict";a();Lt();x();Gr()});function bd({decoration:e}){let{delete:t}=rn();return n(G.Menu,{navId:Ce("decoration-context-menu"),onClose:Ut.closeContextMenu,"aria-label":"Decoration Options"},n(G.MenuItem,{id:Ce("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:rl,action:()=>$t.copy(e.hash)}),e.authorId===U.getCurrentUser().id&&n(G.MenuItem,{id:Ce("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:ll,action:()=>_t.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Ce("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var PS=g(()=>{"use strict";a();Lt();x();Pi();tr()});function Td(e){let{decoration:t}=e;return n(yd,{...e,onContextMenu:o=>{Ut.openContextMenu(o,()=>n(bd,{decoration:t}))},avatarDecoration:wl(t)})}var IS=g(()=>{"use strict";a();x();Ml();Gr();PS()});function xd({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ce("sectioned-grid-list-grid")},r.map(i=>n(_.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var AS=g(()=>{"use strict";a();x();tr()});function wd(e){return n("div",{className:te(Ce("sectioned-grid-list-container"),pA.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ce("sectioned-grid-list-section")},e.renderSectionHeader(t),n(xd,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var pA,NS=g(()=>{"use strict";a();Pe();j();tr();AS();pA=P("managedReactiveScroller")});function gA(e){let[t,o]=Y(null);return pe(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function hA(e){let[t,o]=Y(""),[r,i]=Y(null),[s,l]=Y(!1),[c,u]=Y(null);pe(()=>{c&&u(null)},[r]);let{create:p}=rn(),d=gA(r),h=bt(()=>d?{asset:d,skuId:bl}:null,[d]);return n(Ne,{...e,size:"medium",className:Ii.modal},n(Xe,{separator:!1,className:Ce("modal-header")},n(J,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(Tt,{onClick:e.onClose})),n(We,{className:Ce("create-decoration-modal-content"),scrollbarType:"none"},n(B,null,n(mA,{messageType:fA.WARNING},"Make sure your decoration does not violate ",n(qe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:Ce("create-decoration-modal-form-preview-container")},n("div",{className:Ce("create-decoration-modal-form")},c!==null&&n(J,{color:"text-danger",variant:"text-xs/normal"},c.message),n(S.FormSection,{title:"File"},n(dA,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(S.FormText,{type:"description",className:z.top8},"File should be APNG or PNG.")),n(S.FormSection,{title:"Name"},n(ot,{placeholder:"Companion Cube",value:t,onChange:o}),n(S.FormText,{type:"description",className:z.top8},"This name will be used when referring to this decoration."))),n("div",null,n(Pl,{avatarDecorationOverride:h,user:U.getCurrentUser()}))),n(S.FormText,{type:"description",className:z.bottom16},n("br",null),"You can receive updates on your decoration's review by joining ",n(qe,{href:`https://discord.gg/${Fs}`,onClick:async v=>{v.preventDefault(),de.getGuild(Mi)?(Qo(),O.dispatch({type:"LAYER_POP_ALL"}),Do.transitionToGuild(Mi)):await _r(Fs)&&(Qo(),O.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),"."))),n(pt,{className:Ce("modal-footer")},n(C,{onClick:()=>{l(!0),p({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),u(v)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel")))}var dA,mA,fA,Il,Md=g(()=>{"use strict";a();ae();xo();ct();it();nt();j();x();Vn();Pi();tr();Gr();dA=je("fileUploadInput,"),{default:mA,HelpMessageTypes:fA}=P("HelpMessageTypes");Il=()=>Promise.all([Ai(),bS()]).then(()=>we(e=>n(hA,{...e})))});function yA(e){return n(Ne,{...e,size:"small",className:Ii.modal},n(Xe,{separator:!1,className:Ce("modal-header")},n(J,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(Tt,{onClick:e.onClose})),n(We,{scrollbarType:"none"},n(S.FormText,null,"By submitting a decoration, you agree to ",n(qe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines"),". Not reading these guidelines may get your account suspended from creating more decorations in the future.")),n(pt,{className:Ce("modal-footer")},n(C,{onClick:()=>{Ni.store.agreedToGuidelines=!0,e.onClose(),Il()}},"Continue"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Go Back")))}var CS,kS=g(()=>{"use strict";a();xo();nt();x();Al();tr();Md();CS=()=>Ai().then(()=>we(e=>n(yA,{...e})))});function SA(){let[e,t]=Y([]);return pe(()=>{vS().then(t)},[]),e}function bA({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=Y([]);return pe(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let l=U.getUser(s)??await Ct.getUser(s);i(c=>[...c,l])}})()},[e.authorIds]),n("div",null,n(ce,null,n(S.FormTitle,{style:{flexGrow:1}},e.title),o&&n(vA,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:z.bottom8})),t&&n(S.FormText,{type:"description",className:z.bottom8},e.subtitle))}function TA(e){let[t,o]=Y(void 0),r=typeof t<"u",i=t!=null?wl(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=rn();pe(()=>{c()},[]);let p=r?t:l,d=typeof p?.authorId<"u",h=s.some(M=>M.reviewed===!1),v=SA(),T=v.flatMap(M=>M.decorations),N=v.find(M=>M.id===p?.presetId),b=typeof N<"u",k=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(M=>!T.some(F=>F.hash===M.hash)),"create"]},...v.map(M=>({title:M.name,subtitle:M.description||void 0,sectionKey:`preset-${M.id}`,items:M.decorations,authorIds:M.authorIds}))];return n(Ne,{...e,size:"dynamic",className:Ii.modal},n(Xe,{separator:!1,className:Ce("modal-header")},n(J,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(Tt,{onClick:e.onClose})),n(We,{className:Ce("change-decoration-modal-content"),scrollbarType:"none"},n(B,null,n(wd,{renderItem:M=>{if(typeof M=="string")switch(M){case"none":return n(Sd,{className:Ce("change-decoration-modal-decoration"),isSelected:p===null,onSelect:()=>o(null)});case"create":return n(ee,{text:"You already have a decoration pending review",shouldShow:h},F=>n(vd,{className:Ce("change-decoration-modal-decoration"),...F,onSelect:h?()=>{}:Ni.store.agreedToGuidelines?Il:CS}))}else return n(ee,{text:"Pending review",shouldShow:M.reviewed===!1},F=>n(Td,{...F,className:Ce("change-decoration-modal-decoration"),onSelect:M.reviewed!==!1?()=>o(M):()=>{},isSelected:p?.hash===M.hash,decoration:M}))},getItemKey:M=>typeof M=="string"?M:M.hash,getSectionKey:M=>M.sectionKey,renderSectionHeader:M=>n(bA,{section:M}),sections:k}),n("div",{className:Ce("change-decoration-modal-preview")},n(Pl,{avatarDecorationOverride:i,user:U.getCurrentUser()}),b&&n(S.FormTitle,{className:""},"Part of the ",N.name," Preset"),typeof p=="object"&&n(J,{variant:"text-sm/semibold",color:"header-primary"},p?.alt),d&&n(J,{key:`createdBy-${p.authorId}`},"Created by ",Be.parse(`<@${p.authorId}>`))))),n(pt,{className:te(Ce("change-decoration-modal-footer",Ce("modal-footer")))},n("div",{className:Ce("change-decoration-modal-footer-btn-container")},n(C,{onClick:()=>{u(t).then(e.onClose)},disabled:!r},"Apply"),n(C,{onClick:e.onClose,color:C.Colors.PRIMARY,look:C.Looks.LINK},"Cancel")),n("div",{className:Ce("change-decoration-modal-footer-btn-container")},n(C,{onClick:()=>_t.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Ce("danger-btn"),cancelText:"Cancel",onConfirm(){er.getState().remove(U.getCurrentUser().id),e.onClose()}}),color:C.Colors.PRIMARY,look:C.Looks.LINK},"Log Out"),n(ee,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},M=>n(C,{...M,onClick:async()=>{de.getGuild(Mi)?(e.onClose(),O.dispatch({type:"LAYER_POP_ALL"}),Do.transitionToGuild(Mi)):await _r(Fs)&&(Qo(),O.dispatch({type:"LAYER_POP_ALL"}))},color:C.Colors.PRIMARY,look:C.Looks.LINK},"Discord Server")))))}var vA,Pd,RS=g(()=>{"use strict";a();ae();kt();ct();it();Pe();nt();j();x();xl();Vn();Us();Pi();Ml();Al();tr();Gr();wS();MS();IS();NS();Md();kS();vA=je("defaultRenderUser","showDefaultAvatarsForNullUsers");Pd=()=>Ai().then(()=>we(e=>n(TA,{...e})))});function Gs({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=er(),{selectedDecoration:i,select:s,fetch:l}=rn();return pe(()=>{r.isAuthorized()&&l()},[r.token]),n(xA,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ce("section-remove-margin")},n(ce,null,n(C,{onClick:()=>{r.isAuthorized()?Pd():r.authorize().then(Pd).catch(()=>{})},size:C.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(C,{onClick:()=>s(null),color:C.Colors.PRIMARY,size:C.Sizes.SMALL,look:C.Looks.LINK},"Remove Decoration")))}var xA,Id=g(()=>{"use strict";a();kt();j();x();Us();Pi();tr();RS();xA=un(".customizationSectionBackground")});var Ni,Al=g(()=>{"use strict";a();$();xo();it();Pe();nt();w();x();Id();Ni=D({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(Gs,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(S.FormText,{type:"description",className:te(z.top8,z.bottom8)},"You can also access Decor decorations from the ",n(qe,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),Qo(),O.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(S.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}})});var wA,Ad,DS=g(()=>{"use strict";a();uS();ae();A();w();j();x();Vn();Us();Pi();hd();Al();Gr();Id();({isAnimatedAvatarDecoration:wA}=P("isAnimatedAvatarDecoration")),Ad=y({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[m.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<={user:\i},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem",replacement:[{match:/(?<==)\i=>{let{children.{20,100}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/,replace:"$1.skuId===$self.SKU_ID||"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"renderAvatarWithPopout(){",replacement:[{match:/(?<=getAvatarDecorationURL\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:Ni,flux:{CONNECTION_OPEN:()=>{er.getState().init(),rn.getState().clear(),xn.getState().fetch(U.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{xn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){TS(e)},set DecorationGridDecoration(e){xS(e)},SKU_ID:$r,useUserDecorAvatarDecoration:SS,async start(){xn.getState().fetch(U.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===$r){let o=new URL(`${dS}/${e.asset}.png`);return o.searchParams.set("animate",(!!t&&wA(e.asset)).toString()),o.toString()}else if(e?.skuId===bl)return e.asset},DecorSection:B.wrap(Gs)})});var Nd,LS=g(()=>{"use strict";a();A();w();Nd=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes.",authors:[m.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,120}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function Cd(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${IA[e.format_type]}`}async function OS(e){let t=MA.getStickerById(e);if(t)return t;let{body:o}=await Nt.get({url:`/stickers/${e}`});return O.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function AA(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await BS(Cd(t)));let{body:r}=await Nt.post({url:`/guilds/${e}/stickers`,body:o});O.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:U.getCurrentUser()}})}async function NA(e,t){let o=await BS(Cd(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return PA.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function CA(e){let t=U.getCurrentUser().id;return Object.values(de.getGuilds()).filter(o=>{if(!(o.ownerId===t||(_e.getGuildPermissions({id:o.id})&xe.CREATE_GUILD_EXPRESSIONS)===xe.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:l}=Ro.getGuilds()[o.id],c=0;for(let u of l)u.animated===i&&c++;return co.name.localeCompare(r.name))}async function BS(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function kA(e,t){try{t.t==="Sticker"?await AA(e,t):await NA(e,t),oe.show({message:`Successfully cloned ${t.name} to ${de.getGuild(e)?.name??"your server"}!`,type:oe.Type.SUCCESS,id:oe.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new ie("EmoteCloner").error("Failed to clone",t.name,"to",e,o),oe.show({message:"Failed to clone: "+r,type:oe.Type.FAILURE,id:oe.genId()})}}function LA({data:e}){let[t,o]=_.useState(!1),[r,i]=_.useState(e.name),[s,l]=_.useReducer(u=>u+1,0),c=_.useMemo(()=>CA(e),[e.id,s]);return n(f,null,n(S.FormTitle,{className:z.top20},"Custom Name"),n(gl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&DA.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>n(ee,{text:u.name},({onMouseLeave:p,onMouseEnter:d})=>n("div",{onMouseLeave:p,onMouseEnter:d,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),kA(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):n(S.FormText,{style:{fontSize:RA(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function Nl(e,t){return n(G.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>us(async()=>{let o=await t(),r={t:e,...o},i=Cd(r);return s=>n(Ne,{...s},n(Xe,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(S.FormText,null,"Clone ",r.name)),n(We,null,n(LA,{data:r})))})})}function FS(e){return new URL(e).pathname.endsWith(".gif")}var MA,PA,IA,RA,DA,ES,_S,kd,US=g(()=>{"use strict";a();Rt();Cp();A();Ve();it();nt();w();j();x();MA=Re("StickersStore"),PA=P("fetchEmoji","uploadEmoji","deleteEmoji"),IA=[,"png","png","json","gif"];RA=e=>[20,20,18,18,16,14,12][e.length]??4,DA=/^\w+$/i;ES=(e,t)=>()=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${o}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return Nl("Emoji",()=>({id:o,name:u,isAnimated:FS(r??i)}));case"sticker":return t.message.stickerItems.find(d=>d.id===o)?.format_type===3?void 0:Nl("Sticker",()=>OS(o))}})();l&&dt("copy-link",e)?.push(l)},_S=(e,t)=>()=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(!!o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(Nl("Emoji",()=>({id:o,name:r,isAnimated:s&&FS(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(Nl("Sticker",()=>OS(o)))},kd=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[m.Ven,m.Nuckyz],start(){ue("message",ES),ue("expression-picker",_S)},stop(){fe("message",ES),fe("expression-picker",_S)}})});var Rd,$S,Dd,GS=g(()=>{"use strict";a();$();ae();li();A();it();w();j();x();Rd=P("key","removeBuildOverride"),$S=D({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),Dd=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[m.Megu,m.Ven,m.Nickyux,m.BanTheNons,m.Nuckyz],settings:$S,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=()",predicate:()=>$S.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,o)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${o}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(_.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",n("kbd",{className:Rd.key},t)," +"," ",n("kbd",{className:Rd.key},o)," +"," ",n("kbd",{className:Rd.key},"O")," ","after enabling ",n("code",null,"isStaff")," below"),n(S.FormText,null,"and then toggling ",n("code",null,"Enable DevTools")," in the ",n("code",null,"Developer Options")," tab in settings."))},WarningCard:B.wrap(()=>n(So,{id:"vc-experiments-warning-card",className:z.bottom16},n(S.FormTitle,{tag:"h2"},"Hold on!!"),n(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(S.FormText,{className:z.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var Ld,HS=g(()=>{"use strict";a();A();w();Ld=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[m.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var zS=g(()=>{"use strict";a()});var WS=vr((RG,jS)=>{"use strict";a();var wn=jS.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var p=typeof Zr=="function"&&Zr;if(!u&&p)return p(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var d=o[c]={exports:{}};t[c][0].call(d.exports,function(h){var v=t[c][1][h];return i(v||h)},d,d.exports,e,t,o,r)}return o[c].exports}for(var s=typeof Zr=="function"&&Zr,l=0;l"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",k=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function M(){var R=setTimeout;return function(){return R(H,1)}}var F=new Array(1e3);function H(){for(var R=0;Ri+r.playTime;)i+=r.playTime;i+=N.delay}else u=!(c=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,p){for(var d=-1,h=u=u||0,v=u+(p=p||c.length-u);h>>8^r[255&(d^c[h])];return-1^d}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(p){return s(p)};var u={};c.parseURL=function(p){return p in u||(u[p]=l(p).then(s)),u[p]},c.animateContext=function(p,d){return c.parseURL(p).then(function(h){return h.addContext(d),h.play(),h})},c.animateImage=function(p){return p.setAttribute("data-is-apng","progress"),c.parseURL(p.src).then(function(d){p.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=d.width,h.height=d.height,Array.prototype.slice.call(p.attributes).forEach(function(k){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(k.nodeName)==-1&&h.setAttributeNode(k.cloneNode(!1))}),h.setAttribute("data-apng-src",p.src),p.alt!=""&&h.appendChild(document.createTextNode(p.alt));var v="",T="",N=0,b="";p.style.width!=""&&p.style.width!="auto"?v=p.style.width:p.hasAttribute("width")&&(v=p.getAttribute("width")+"px"),p.style.height!=""&&p.style.height!="auto"?T=p.style.height:p.hasAttribute("height")&&(T=p.getAttribute("height")+"px"),v!=""&&T==""&&(N=parseFloat(v),b=v.match(/\D+$/)[0],T=Math.round(h.height*N/h.width)+b),T!=""&&v==""&&(N=parseFloat(T),b=T.match(/\D+$/)[0],v=Math.round(h.width*N/h.height)+b),h.style.width=v,h.style.height=T;var I=p.parentNode;I.insertBefore(h,p),I.removeChild(p),d.addContext(h.getContext("2d")),d.play()},function(){p.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(p){var d=p.getContext("2d");"_apng_animation"in d&&d._apng_animation.removeContext(d)}}).call(this,typeof wn<"u"?wn:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(b){var I=new Uint8Array(b);return new r(function(k,M){for(var F=0;F>>0;for(var M=1;M<4;M++)k+=b[M+I]<<8*(3-M);return k},p=function(b,I){for(var k=0,M=0;M<2;M++)k+=b[M+I]<<8*(1-M);return k},d=function(b,I){return b[I]},h=function(b,I,k){var M=new Uint8Array(k);return M.set(b.subarray(I,I+k)),M},v=function(b,I,k){var M=Array.prototype.slice.call(b.subarray(I,I+k));return String.fromCharCode.apply(String,M)},T=function(b){return[b>>>24&255,b>>>16&255,b>>>8&255,255&b]},N=function(b,I){var k=b.length+I.length,M=new Uint8Array(new ArrayBuffer(k+8));M.set(T(I.length),0),M.set(function(H){for(var X=[],Z=0;Z{"use strict";a();qo();zS();qS=_n(()=>WS().APNG),EA="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",BG=`${EA}/rnnoise/workletProcessor.js`,KS="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",YS="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",ZS=_n(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var Fd=vr(Bd=>{a();var VS=Object.defineProperty,_A=e=>VS(e,"__esModule",{value:!0}),OA=(e,t)=>{for(var o in t)VS(e,o,{get:t[o],enumerable:!0})};_A(Bd);OA(Bd,{GIFEncoder:()=>s0,applyPalette:()=>WA,default:()=>tN,nearestColor:()=>ZA,nearestColorIndex:()=>r0,nearestColorIndexWithDistance:()=>i0,prequantize:()=>jA,quantize:()=>HA,snapColorsToPalette:()=>YA});var BA={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function e0(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c=i)return;var l=1024*1024;i=Math.max(i,s*(s>>0),s!=0&&(i=Math.max(i,256));let c=o;o=new Uint8Array(i),t>0&&o.set(c.subarray(0,t),0)}}var Ed=12,XS=5003,FA=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function UA(e,t,o,r,i=e0(512),s=new Uint8Array(256),l=new Int32Array(XS),c=new Int32Array(XS)){let u=l.length,p=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let d=0,h=0,v=p+1,T=v,N=!1,b=T,I=(1<=0;)if(le-=Le,le<0&&(le+=u),l[le]===Me){X=c[le];break e}L(X),X=re,F<1<0?d|=V<=8;)s[H++]=d&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),d>>=8,h-=8;if((F>I||N)&&(N?(b=T,I=(1<0;)s[H++]=d&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),d>>=8,h-=8;H>0&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0)}}}var $A=UA;function t0(e,t,o){return e<<8&63488|t<<2&992|o>>3}function o0(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function n0(e,t,o){return e>>4<<8|t&240|o>>4}function kl(e,t,o){return eo?o:e}function Hs(e){return e*e}function JS(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,p=s.gc,d=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let T=e[h],N=T.cnt,b=l*N/(l+N);if(!(b>=i)){var v=0;o&&(v+=b*Hs(T.ac-c),v>=i)||(v+=b*Hs(T.rc-u),!(v>=i)&&(v+=b*Hs(T.gc-p),!(v>=i)&&(v+=b*Hs(T.bc-d),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function _d(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function GA(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s>24&255,u=l>>16&255,p=l>>8&255,d=l&255,h=o0(d,p,u,c),v=h in r?r[h]:r[h]=_d();v.rc+=d,v.gc+=p,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s>16&255,u=l>>8&255,p=l&255,d=n0(p,u,c),h=d in r?r[d]:r[d]=_d();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s>16&255,u=l>>8&255,p=l&255,d=t0(p,u,c),h=d in r?r[d]:r[d]=_d();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}return r}function HA(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),p=o.useSqrt!==!1,d=r==="rgba4444",h=GA(u,r),v=h.length,T=v-1,N=new Uint32Array(v+1);for(var b=0,k=0;k1&&(H=F>>1,!(h[M=N[H]].err<=X));F=H)N[F]=M;N[F]=k}var Z=b-t;for(k=0;k=q.mtm&&h[q.nn].mtm<=q.tm)break;q.mtm==T?L=N[1]=N[N[0]--]:(JS(h,L,!1),q.tm=k);var X=h[L].err;for(F=1;(H=F+F)<=N[0]&&(Hh[N[H+1]].err&&H++,!(X<=h[M=N[H]].err));F=H)N[F]=M;N[F]=L}var V=h[q.nn],re=q.cnt,Me=V.cnt,I=1/(re+Me);d&&(q.ac=I*(re*q.ac+Me*V.ac)),q.rc=I*(re*q.rc+Me*V.rc),q.gc=I*(re*q.gc+Me*V.gc),q.bc=I*(re*q.bc+Me*V.bc),q.cnt+=V.cnt,q.mtm=++k,h[V.bk].fw=V.fw,h[V.fw].bk=V.bk,V.mtm=T}let le=[];var Le=0;for(k=0;;++Le){let he=kl(Math.round(h[k].rc),0,255),Se=kl(Math.round(h[k].gc),0,255),Ie=kl(Math.round(h[k].bc),0,255),ke=255;d&&(ke=kl(Math.round(h[k].ac),0,255),c&&(ke=ke<=(typeof c=="number"?c:127)?0:255),i&&ke<=l&&(he=Se=Ie=s,ke=0));let Te=d?[he,Se,Ie,ke]:[he,Se,Ie];if(zA(le,Te)||le.push(Te),(k=h[k].fw)==0)break}return le}function zA(e,t){for(let o=0;o=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function Dl(e,t){var o=0,r;for(r=0;r1?Math.round(e/t)*t:e}function jA(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s>24&255,u=l>>16&255,p=l>>8&255,d=l&255;c=Rl(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),d=Rl(d,t),p=Rl(p,t),u=Rl(u,t),i[s]=c<<24|u<<16|p<<8|d<<0}}function WA(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let p=0;p>24&255,v=d>>16&255,T=d>>8&255,N=d&255,b=o0(N,T,v,h),I=b in c?c[b]:c[b]=qA(N,T,v,h,t);l[p]=I}else{let p=o==="rgb444"?n0:t0;for(let d=0;d>16&255,T=h>>8&255,N=h&255,b=p(N,T,v),I=b in c?c[b]:c[b]=KA(N,T,v,t);l[d]=I}}return l}function qA(e,t,o,r,i){let s=0,l=1e100;for(let c=0;cl)continue;let h=u[0];if(d+=Hr(h-e),d>l)continue;let v=u[1];if(d+=Hr(v-t),d>l)continue;let T=u[2];d+=Hr(T-o),!(d>l)&&(l=d,s=c)}return s}function KA(e,t,o,r){let i=0,s=1e100;for(let l=0;ls)continue;let d=c[1];if(p+=Hr(d-t),p>s)continue;let h=c[2];p+=Hr(h-o),!(p>s)&&(s=p,i=l)}return i}function YA(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;ls?c=c.slice(0,3):c=c.slice();let u=i0(r,c.slice(0,3),Dl),p=u[0],d=u[1];d>0&&d<=i&&(e[p]=c)}}function Hr(e){return e*e}function r0(e,t,o=Dl){let r=1/0,i=-1;for(let s=0;s=0&&QA(r,M)}let Z=Math.round(I/10);XA(r,H,Z,N,b);let q=Boolean(k)&&!X;VA(r,h,v,q?k:null),q&&QS(r,k),eN(r,d,h,v,F,s,l,c)}};function p(){a0(r,"GIF89a")}}function XA(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let c=0;e.writeByte(0|l|c|s),or(e,o),e.writeByte(i||0),e.writeByte(0)}function JA(e,t,o,r,i=8){let c=Od(r.length)-1,u=1<<7|i-1<<4|0<<3|c,p=0,d=0;or(e,t),or(e,o),e.writeBytes([u,p,d])}function QA(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),a0(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),or(e,t),e.writeByte(0)}function QS(e,t){let o=1<>8&255)}function a0(e,t){for(var o=0;oi.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}var Ci,oN,zr,zs,l0,js,nr,Ll,nN,rN,Ud,$d,El,Je,Gd,u0=g(()=>{"use strict";a();on();$();A();Cl();ct();Ve();w();j();x();Ci=ba(Fd()),oN=0,zr=Re("StickersStore"),zs=Re("UserSettingsProtoStore"),l0=P("BINARY_READ_OPTIONS");js=No(()=>ts.PreloadedUserSettingsActionCreators),nr=No(()=>c0("appearance",js.ProtoClass)),Ll=No(()=>c0("clientThemeSettings",nr)),nN=1n<<18n,rN=1n<<37n,Ud=/\/emojis\/(\d+?)\.(png|webp|gif)/,$d=/\/stickers\/(\d+?)\./,El=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Je=D({enableEmojiBypass:{description:"Allow sending fake emojis",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allow sending fake stickers",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0}}),Gd=y({name:"FakeNitro",authors:[m.Arjix,m.D3SOX,m.Ven,m.obscurity,m.captain,m.Nuckyz,m.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Je,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Je.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,o)=>`${t}(!${o}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>Je.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,o)=>`${t},fakeNitroIntention){${o}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>Je.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Je.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Je.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Je.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Je.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Je.store.transformEmojis||Je.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Je.store.transformEmojis||Je.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Je.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,o)=>`${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Je.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>Je.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Je.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>Je.store.transformEmojis,replacement:{match:/(?<=isDiscoverable:\i,emojiComesFromCurrentGuild:\i,.+?}=(\i).+?;)(.+?return )(.{0,1000}\.Messages\.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION.+?)(?=},)/,replace:(e,t,o,r)=>`let{fakeNitroNode}=${t};${o}$self.addFakeNotice(${1},${r},!!fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:".FreemiumAppIconIds.DEFAULT&&(",replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return gp()?.id},get canUseEmotes(){return(U.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(U.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!zs||!js||!nr||!Ll)return;if((t?.premium_type??U?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=nr.create(),zs.settings.appearance?.theme!=null){let r=nr.create({theme:zs.settings.appearance.theme});e.appearance.theme=r.theme}if(zs.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=Ll.create({backgroundGradientPresetId:{value:zs.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,o){if((U?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!js||!nr||!Ll||!l0)return;let i=js.getCurrentValue().appearance,s=i!=null?nr.fromBinary(nr.toBinary(i),l0.BINARY_READ_OPTIONS):nr.create();s.theme=t;let l=Ll.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=js.ProtoClass.create();c.appearance=s,O.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"&&(e[0]=t.trimStart()),e[0]===""&&e.shift();let o=e.length-1,r=e[o];typeof r=="string"&&(e[o]=r.trimEnd()),e[o]===""&&e.pop()},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!Je.store.transformCompoundSentence)return e;let o=e.length,r=c=>{if(Je.store.transformEmojis){let u=c.props.href.match(Ud);if(u){let p=null;try{p=new URL(c.props.href)}catch{}let d=Ro.getCustomEmojiById(u[1])?.name??p?.searchParams.get("name")??"FakeNitroEmoji";return Be.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:d,fake:!0},void 0,{key:String(o++)})}}if(Je.store.transformStickers){if($d.test(c.props.href))return null;let u=c.props.href.match(El);if(u&&zr.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let p=!1;for(let[d,h]of u.props.children.entries()){if(h==null){delete u.props.children[d];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?p=!0:delete u.props.children[d]}if(!p)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,p]of c.entries())c[u]=s(p);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(Mr.cloneDeep(e))}catch(c){return new ie("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Je.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Je.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match($d);if(s){let c=null;try{c=new URL(i)}catch{}let u=zr.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(El);if(l){if(!zr.getStickerById(l[1]))continue;let c=zr.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!Je.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Je.store.transformCompoundSentence&&!o.includes(e.url)&&!o.includes(e.image?.proxyURL))return!1;if(Je.store.transformEmojis&&Ud.test(e.url))return!0;if(Je.store.transformStickers){if($d.test(e.url))return!0;let r=e.url.match(El);if(r&&zr.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(El);return!(o&&zr.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&Ud.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},hasPermissionToUseExternalEmojis(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:_e.can(nN,t)},hasPermissionToUseExternalStickers(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:_e.can(rN,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${E.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=qS(),{frames:i,width:s,height:l}=await r(e),c=(0,Ci.GIFEncoder)(),u=E.plugins.FakeNitro.stickerSize,p=document.createElement("canvas");p.width=u,p.height=u;let d=p.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);d.scale(h,h);let v;for(let N of i){let{left:b,top:I,width:k,height:M,img:F,delay:H,blendOp:X,disposeOp:Z}=N;v=d.getImageData(b,I,k,M),X===0&&d.clearRect(b,I,k,M),d.drawImage(F,b,I,k,M);let{data:q}=d.getImageData(0,0,u,u),L=(0,Ci.quantize)(q,256),V=(0,Ci.applyPalette)(q,L);c.writeFrame(V,u,u,{transparent:!0,palette:L,delay:H}),Z===1?d.clearRect(b,I,k,M):Z===2&&d.putImageData(v,b,I)}c.finish();let T=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});rs.promptToUpload([T],Q.getChannel(o),oN)},start(){let e=Je.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(o,r){return!o[r]||/\s/.test(o[r])?"":" "}this.preSend=Kt((o,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=zr.getStickerById(i.stickers?.[0]);if(!l||"pack_id"in l)break e;let c=this.canUseStickers&&this.hasPermissionToUseExternalStickers(o);if(l.available!==!1&&(c||l.guild_id===s))break e;let u=this.getStickerLink(l.id);if(l.format_type===4&&u.includes(".png")&&(u=u.replace(".png",".gif")),l.format_type===2)return this.sendAnimatedSticker(u,l.id,o),{cancel:!0};i.stickers.length=0,r.content+=` ${u}&name=${encodeURIComponent(l.name)}`}if(e.enableEmojiBypass){let l=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(o);for(let c of r.validNonShortcutEmojis){if(!c.require_colons||c.available!==!1&&l||c.guildId===s&&!c.animated)continue;let u=`<${c.animated?"a":""}:${c.originalName||c.name}:${c.id}>`,p=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(d,h,v)=>`${t(v,h-1)}${p}${t(v,h+d.length)}`)}}return{cancel:!1}}),this.preEdit=Br((o,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(o),{guildId:l}=this;i.content=i.content.replace(/(?/ig,(c,u,p,d)=>{let h=Ro.getCustomEmojiById(u);if(h==null||!h.require_colons||h.available!==!1&&s||h.guildId===l&&!h.animated)return c;let v=h.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(h.name)}));return`${t(d,p-1)}${v}${t(d,p+c.length)}`})})},stop(){Yt(this.preSend),Fr(this.preEdit)}})});function p0(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var d0,m0=g(()=>{"use strict";a();d0=p0;typeof module<"u"&&(module.exports=p0)});function iN(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function sN(e){if(e==null)return null;let t=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(t!=null){let o=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return o.substring(1,o.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var f0,Hd,g0=g(()=>{"use strict";a();$();ae();A();it();Pe();w();x();m0();f0=D({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Hd=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[m.Alyxia,m.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Usage"),n(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 go to your profile settings"),n("li",null,"\u2022 choose your own colors in the Nitro preview"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:f0,colorDecodeHook(e){if(e){if(f0.store.nitroFirst&&e.themeColors)return e;let t=sN(e.bio);if(t)return d0(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:B.wrap(function({primary:e,accent:t}){return n(C,{onClick:()=>{let o=iN(e,t);vo(o)},color:C.Colors.PRIMARY,size:C.Sizes.XLARGE,className:z.left16},"Copy 3y3")},{noop:!0})})});var zd,h0=g(()=>{"use strict";a();A();w();x();zd=y({name:"FavoriteEmojiFirst",authors:[m.Aria,m.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"MAX_AUTOCOMPLETE_RESULTS+",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=Ro.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function lN({instance:e,SearchBarComponent:t}){let[o,r]=Y(""),i=to(null),s=La(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(p=>({score:cN(l.toLowerCase(),v0(p.url??p.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:p})).filter(p=>p.score!=null);u.sort((p,d)=>d.score-p.score),c.favorites=u.map(p=>p.gif),e.forceUpdate()},[e.state]);return pe(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:aN.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function v0(e){let t=new URL(e);switch(y0.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function cN(e,t){let o=0,r=0;for(let i=0;i{"use strict";a();$();ae();A();w();j();x();aN=P("searchBar","searchBarFullRow"),y0=D({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),jd=y({name:"FavoriteGifSearch",authors:[m.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:y0,getTargetString:v0,instance:null,renderSearchBar(e,t){return this.instance=e,n(B,{noop:!0},n(lN,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var Wd,b0=g(()=>{"use strict";a();$();ks();A();w();Wd=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[m.Ven],settings:D({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:$o(0,100,10),stickToMarkers:!1,default:10}})})});var qd,T0=g(()=>{"use strict";a();A();w();x();qd=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[m.D3SOX,m.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return de.getGuild(t)?.ownerId===o}})});var _l,uN,Kd,x0=g(()=>{"use strict";a();ao();A();w();j();x();_l=P("createFriendInvite"),{uuid4:uN}=P("uuid4"),Kd=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[m.afn,m.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let o=lt(e,"Uses",5);if(o===1&&!U.getCurrentUser().phone)return me(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(o===1){let i=uN(),{body:{invite_suggestions:s}}=await Nt.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await _l.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await _l.createFriendInvite();me(t.channel.id,{content:`
+ }`}function Kd(e,t=""){let o=document.createElement("style");return o.setAttribute("id",e),o.textContent=t.split(`
+`).map(r=>r.trim()).join(`
+`),document.body.appendChild(o),o}async function yR(){let e="",t=document.querySelectorAll('link[rel="stylesheet"]');for(let o of t){let r=o.getAttribute("href");if(!r)continue;let i=await fetch(r);e+=await i.text()}return e}function vR(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,c,u,p;return p=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*p-1)),i===t?c=(o-r)/l%6:i===o?c=(r-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,p*=100,{hue:c,saturation:u,lightness:p}}function SR(e){let t=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4,o=t(parseInt(e.substring(0,2),16)/255),r=t(parseInt(e.substring(2,4),16)/255),i=t(parseInt(e.substring(4,6),16)/255);return o*.2126+r*.7152+i*.0722}var cR,uR,pR,uS,pS,ia,qd,dS,mR,fR,hS=g(()=>{"use strict";a();lS();$();P();ot();we();I();H();T();cR=Ne(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),uR=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];({saveClientTheme:pR}=x("saveClientTheme"));uS=Re("ThemeStore"),pS=Re("ClientThemesBackgroundStore");ia=N({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(dR,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(k,{onClick:()=>fS(3224376)},"Reset Theme Color")}}),qd=y({name:"ClientTheme",authors:[m.F53,m.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:ia,startAt:"DOMContentLoaded",async start(){gS(ia.store.color);let e=await yR();gR(e),hR(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),dS=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,mR=/^--primary-[1-5]\d{2}-hsl/g,fR=/^--primary-[5-9]\d{2}-hsl/g});var Yd,yS=g(()=>{"use strict";a();P();I();Yd=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[m.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});var Zd,vS=g(()=>{"use strict";a();P();rr();hi();I();H();H();T();Zd=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[m.Ven],getShortcuts(){function e(i){let s=new Map;return function(...l){let c=String(l);if(s.has(c))return s.get(c);let u=Nr(i(...l)),p=(()=>{switch(u.length){case 0:return null;case 1:return u[0];default:let d=[...new Set(u)];return d.length>1&&console.warn(`Warning: This filter matches ${u.length} modules. Make it more specific!
+`,d),u[0]}})();return p&&c&&s.set(c,p),p}}let t,o=e(i=>i),r=e(Ce.byProps);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:io.c,wreq:io,wpsearch:Ou,wpex:el,wpexs:i=>el(Va(i)),find:o,findAll:Nr,findByProps:r,findAllByProps:(...i)=>Nr(Ce.byProps(...i)),findByCode:e(Ce.byCode),findAllByCode:i=>Nr(Ce.byCode(i)),findComponentByCode:e(Ce.componentByCode),findAllComponentsByCode:(...i)=>Nr(Ce.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(Ce.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:So,canonicalizeMatch:bn,canonicalizeReplace:Za,canonicalizeReplacement:ys,fakeRender:(i,s)=>{let l=t?.deref(),c=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(c),c.focus();let u=c.document;u.body.style.margin="1em",c.prepared||(c.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(p=>{let d=p.cloneNode(!0);p.parentElement?.tagName==="HEAD"?u.head.append(d):d.id?.startsWith("vencord-")||d.id?.startsWith("vcd-")?u.documentElement.append(d):u.body.append(d)})),Or.render(U.createElement(i,s),u.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,o]of Object.entries(e))window[t]=o},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var bR,Xd,SS=g(()=>{"use strict";a();It();P();I();T();bR=(e,{user:t})=>{!t||e.push(n(L.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Ft.copy(``),icon:Ei}))},Xd=y({name:"CopyUserURLs",authors:[m.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":bR}})});var hn,TR,bS,TS,wR,Jd,wS,Qd,Vd,em,xS=g(()=>{"use strict";a();er();$();P();Ke();Ze();I();Zr();H();T();hn=new oe("CrashHandler"),{ModalStack:TR,DraftManager:bS,DraftType:TS,closeExpressionPicker:wR}=go(()=>{let e=Dr(Ce.byProps("pushLazy","popAll"),Ce.byProps("clearDraft","saveDraft"),Ce.byProps("DraftType"),Ce.byProps("closeExpressionPicker","openExpressionPicker"));return{ModalStack:e[0],DraftManager:e[1],DraftType:e[2]?.DraftType,closeExpressionPicker:e[3]?.closeExpressionPicker}}),Jd=N({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),wS=!1,Qd=!1,Vd=!0,em=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[m.Nuckyz],enabledByDefault:!0,settings:Jd,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!Qd&&(Qd=!0,setTimeout(()=>{try{if(!Vd){try{Fe({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}Vd=!1,setTimeout(()=>Vd=!0,500)}catch{}try{wS||(wS=!0,Hs("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0))}catch{}try{Jd.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){hn.error("Failed to handle crash",o)}},1))},handlePreventCrash(e){try{Fe({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=Ie.getChannelId();bS.clearDraft(t,TS.ChannelMessage),bS.clearDraft(t,TS.FirstThreadMessage)}catch(t){hn.debug("Failed to clear drafts.",t)}try{wR()}catch(t){hn.debug("Failed to close expression picker.",t)}try{B.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){hn.debug("Failed to close open context menu.",t)}try{TR.popAll()}catch(t){hn.debug("Failed to close old modals.",t)}try{dn()}catch(t){hn.debug("Failed to close all open modals.",t)}try{B.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){hn.debug("Failed to close user popout.",t)}try{B.dispatch({type:"LAYER_POP_ALL"})}catch(t){hn.debug("Failed to pop all layers.",t)}if(Jd.store.attemptToNavigateToHome)try{qo.transitionTo("/channels/@me")}catch(t){hn.debug("Failed to navigate to home",t)}setImmediate(()=>Qd=!1);try{e.setState({error:null,info:null})}catch(t){hn.debug("Failed to update crash handler component.",t)}}})});function Yl(e){return Boolean(e)}function tm(e){return e!=null}var Zl=g(()=>{"use strict";a()});async function MS(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await Ur.fetchAssetIds(ni.store.appID,[e]))[0]}function Ht(){Xl(!0),G.plugins.CustomRPC.enabled&&Xl()}function AS(){return ni.store.type!==1}function PR(e){return!AS()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function IS(){return ni.store.timestampMode!==3}function PS(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function CS(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:p,imageSmall:d,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:b,buttonTwoText:M,buttonTwoURL:w}=ni.store;if(!t)return;let C={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(C.url=s),ni.store.timestampMode){case 1:C.timestamps={start:Date.now()};break;case 2:C.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(l||c)&&(C.timestamps={},l&&(C.timestamps.start=l),c&&(C.timestamps.end=c));break;case 0:default:break}v&&(C.buttons=[v,M].filter(Yl),C.metadata={button_urls:[b,w].filter(Yl)}),u&&(C.assets={large_image:await MS(u),large_text:p||void 0}),d&&(C.assets={...C.assets,small_image:await MS(d),small_text:h||void 0});for(let R in C){if(R==="type")continue;let A=C[R];(!A||A.length===0)&&delete C[R]}return C}async function Xl(e){let t=await CS();B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var xR,MR,IR,ni,om,RS=g(()=>{"use strict";a();$();To();P();Zl();lt();I();H();T();xR=Ne("onOpenGameProfile"),MR=x("activity","buttonColor"),IR=x("profileColors");ni=N({appID:{type:0,description:"Application ID (required)",onChange:Ht,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:Ht,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:Ht,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:Ht,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ht,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:Ht,disabled:AS,isValid:PR},timestampMode:{type:4,description:"Timestamp mode",onChange:Ht,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp in milisecond (only for custom timestamp mode)",onChange:Ht,disabled:IS,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp in milisecond (only for custom timestamp mode)",onChange:Ht,disabled:IS,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ht,isValid:PS},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ht,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:Ht,isValid:PS},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ht,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:Ht,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:Ht},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ht,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:Ht}});om=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[m.captain,m.AutumnVN],start:Xl,stop:()=>Xl(!0),settings:ni,settingsAboutComponent:()=>{let e=st(CS);return n(f,null,n(S.FormText,null,"Go to ",n(je,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",n(je,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),n(S.FormDivider,null),n("div",{style:{width:"284px"},className:IR.profileColors},e[0]&&n(xR,{activity:e[0],className:MR.activity,channelId:Ie.getChannelId(),guild:ae.getGuild(yo.getLastSelectedGuildId()),application:{id:ni.store.appID},user:E.getCurrentUser()})))}})});var kS=g(()=>{});async function CR(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=AR.exec(e.video.url)?.[1];if(!t)return;let o=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!o.ok)return;let{titles:r,thumbnails:i}=await o.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0&&!i[0].original;if(!s&&!l)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title.replace(/ >(\S)/g," $1")),l&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new oe("Dearrow").error("Failed to dearrow embed",e)}}function RR({component:e}){let{embed:t}=e.props;return t?.dearrow?n(ne,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var AR,nm,NS=g(()=>{"use strict";a();kS();le();P();Ke();I();T();AR=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;nm=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[m.Ven],embedDidMount:CR,renderButton(e){return n(_,{noop:!0},n(RR,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{.{0,30}let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var DS=g(()=>{});var kR,pr,LS,ES,OS,ri,Jl,ji,sa,rm,dr=g(()=>{"use strict";a();kR="https://decor.fieryflames.dev",pr=kR+"/api",LS=pr+"/authorize",ES="https://ugc.decor.fieryflames.dev",OS="1096966363416899624",ri="100101099111114",Jl="11497119",ji="1096357702931841148",sa="dXp2SdxDcP",rm=1e3*60*60*4});var NR,mr,aa=g(()=>{"use strict";a();ei();Uo();Ke();Ze();T();dr();NR={async getItem(e){return yt.get(e).then(t=>t??null)},async setItem(e,t){await yt.set(e,t)},async removeItem(e){await yt.del(e)}},mr=Ot(()=>Gr(Uu((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[E.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[E.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>de(i=>n(bs,{...i,scopes:["identify"],responseType:"code",redirectUri:LS,permissions:0n,clientId:OS,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let c=await fetch(l);if(c?.ok){let u=await c.text();t().setToken(u)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&(Mt(`Failed to authorize: ${l.message}`,X.Type.FAILURE),new oe("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>NR,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function Ql(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${mr.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var _S,BS,FS,im,US,$S,Vl=g(()=>{"use strict";a();dr();aa();_S=async e=>{if(e?.length===0)return{};let t=new URL(pr+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},BS=async(e="@me")=>Ql(pr+`/users/${e}/decorations`).then(t=>t.json()),FS=async(e="@me")=>Ql(pr+`/users/${e}/decoration`).then(t=>t.json()),im=async(e,t="@me")=>{let o=new FormData;return e?"hash"in e?o.append("hash",e.hash):"file"in e&&(o.append("image",e.file),o.append("alt",e.alt??"null")):o.append("hash","null"),Ql(pr+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},US=async e=>{await Ql(pr+`/decorations/${e}`,{method:"DELETE"})},$S=async()=>fetch(pr+"/decorations/presets").then(e=>e.json())});function sm(e){return`${e.animated?"a_":""}${e.hash}`}function ec(e){return{asset:sm(e),skuId:ri}}var tc=g(()=>{"use strict";a();dr()});function GS(e){let[t,o]=W(e?Dn.getState().getAsset(e.id)??null:null);return se(()=>{let r=Dn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=Dn.getState();i(e.id)}return r},[]),t?{asset:t,skuId:ri}:null}var Dn,am=g(()=>{"use strict";a();zr();Uo();T();Vl();dr();Dn=Ot(()=>Gr((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:lo(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=Array.from(o),s=await _S(i),l=new Map(r),c=new Date;for(let u of i){let p=s[u]??null;l.set(u,{asset:p,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!r&&Date.now()-c.getTime(){"use strict";a();Uo();T();Vl();tc();am();yn=Ot(()=>Gr((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await BS(),r=await FS();e({decorations:o,selectedDecoration:r})},async create(o){let r=await im(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await US(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),im(o),Dn.getState().set(E.getCurrentUser().id,o?sm(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ee,qi,Ki,HS,fr=g(()=>{"use strict";a();Qe();H();Ee=ve("vc-decor-"),qi=x("modalFooterShopButton"),Ki=vi(["openAvatarDecorationModal:"]),HS=vi(["stickerInspected]:"])});var la,zS,oc,lm,jS,ii=g(()=>{"use strict";a();H();T();zS=e=>la=e,oc=Du(()=>{let e=Lu(".shopPreviewBanner");return U.memo(e)}),jS=e=>lm=e});function cm(e){return n(la,{...e,isSelected:!1},n(Fv,null),n(V,{variant:"text-xs/normal",color:"header-primary"},Ye.Messages.CREATE))}var WS=g(()=>{"use strict";a();It();T();ii()});function um(e){return n(la,{...e},n(Uv,null),n(V,{variant:"text-xs/normal",color:"header-primary"},Ye.Messages.NONE))}var qS=g(()=>{"use strict";a();It();T();ii()});function pm({decoration:e}){let{delete:t}=yn();return n(L.Menu,{navId:Ee("decoration-context-menu"),onClose:Yt.closeContextMenu,"aria-label":"Decoration Options"},n(L.MenuItem,{id:Ee("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:Dl,action:()=>Ft.copy(e.hash)}),e.authorId===E.getCurrentUser().id&&n(L.MenuItem,{id:Ee("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Oi,action:()=>et.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Ee("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var KS=g(()=>{"use strict";a();It();T();Wi();fr()});function dm(e){let{decoration:t}=e;return n(lm,{...e,onContextMenu:o=>{Yt.openContextMenu(o,()=>n(pm,{decoration:t}))},avatarDecoration:ec(t)})}var YS=g(()=>{"use strict";a();T();tc();ii();KS()});function mm({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ee("sectioned-grid-list-grid")},r.map(i=>n(U.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var ZS=g(()=>{"use strict";a();T();fr()});function fm(e){return n("div",{className:Q(Ee("sectioned-grid-list-container"),DR.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ee("sectioned-grid-list-section")},e.renderSectionHeader(t),n(mm,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var DR,XS=g(()=>{"use strict";a();we();H();fr();ZS();DR=x("managedReactiveScroller")});function _R(e){let[t,o]=W(null);return se(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function BR(e){let[t,o]=W(""),[r,i]=W(null),[s,l]=W(!1),[c,u]=W(null);se(()=>{c&&u(null)},[r]);let{create:p}=yn(),d=_R(r),h=Rt(()=>d?{asset:d,skuId:Jl}:null,[d]);return n(ye,{...e,size:"medium",className:qi.modal},n(Le,{separator:!1,className:Ee("modal-header")},n(V,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(pt,{onClick:e.onClose})),n(ke,{className:Ee("create-decoration-modal-content"),scrollbarType:"none"},n(_,null,n(ER,{messageType:OR.WARNING},"Make sure your decoration does not violate ",n(je,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:Ee("create-decoration-modal-form-preview-container")},n("div",{className:Ee("create-decoration-modal-form")},c!==null&&n(V,{color:"text-danger",variant:"text-xs/normal"},c.message),n(S.FormSection,{title:"File"},n(LR,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(S.FormText,{type:"description",className:j.top8},"File should be APNG or PNG.")),n(S.FormSection,{title:"Name"},n(Je,{placeholder:"Companion Cube",value:t,onChange:o}),n(S.FormText,{type:"description",className:j.top8},"This name will be used when referring to this decoration."))),n("div",null,n(oc,{avatarDecorationOverride:h,user:E.getCurrentUser()}))),n(S.FormText,{type:"description",className:j.bottom16},n("br",null),"You can receive updates on your decoration's review by joining ",n(je,{href:`https://discord.gg/${sa}`,onClick:async v=>{v.preventDefault(),ae.getGuild(ji)?(dn(),B.dispatch({type:"LAYER_POP_ALL"}),qo.transitionToGuild(ji)):await Qr(sa)&&(dn(),B.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),"."))),n(ct,{className:Ee("modal-footer")},n(k,{onClick:()=>{l(!0),p({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),u(v)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel")))}var LR,ER,OR,nc,gm=g(()=>{"use strict";a();le();To();mt();ot();Ze();H();T();dr();Wi();fr();ii();LR=Ne("fileUploadInput,"),{default:ER,HelpMessageTypes:OR}=x("HelpMessageTypes");nc=()=>Promise.all([Ki(),HS()]).then(()=>de(e=>n(BR,{...e})))});function FR(e){return n(ye,{...e,size:"small",className:qi.modal},n(Le,{separator:!1,className:Ee("modal-header")},n(V,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(pt,{onClick:e.onClose})),n(ke,{scrollbarType:"none"},n(S.FormText,null,"By submitting a decoration, you agree to ",n(je,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines"),". Not reading these guidelines may get your account suspended from creating more decorations in the future.")),n(ct,{className:Ee("modal-footer")},n(k,{onClick:()=>{Yi.store.agreedToGuidelines=!0,e.onClose(),nc()}},"Continue"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Go Back")))}var JS,QS=g(()=>{"use strict";a();To();Ze();T();rc();fr();gm();JS=()=>Ki().then(()=>de(e=>n(FR,{...e})))});function $R(){let[e,t]=W([]);return se(()=>{$S().then(t)},[]),e}function GR({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=W([]);return se(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let l=E.getUser(s)??await Bt.getUser(s);i(c=>[...c,l])}})()},[e.authorIds]),n("div",null,n(fe,null,n(S.FormTitle,{style:{flexGrow:1}},e.title),o&&n(UR,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:j.bottom8})),t&&n(S.FormText,{type:"description",className:j.bottom8},e.subtitle))}function HR(e){let[t,o]=W(void 0),r=typeof t<"u",i=t!=null?ec(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=yn();se(()=>{c()},[]);let p=r?t:l,d=typeof p?.authorId<"u",h=s.some(A=>A.reviewed===!1),v=$R(),b=v.flatMap(A=>A.decorations),M=v.find(A=>A.id===p?.presetId),w=typeof M<"u",R=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(A=>!b.some(F=>F.hash===A.hash)),"create"]},...v.map(A=>({title:A.name,subtitle:A.description||void 0,sectionKey:`preset-${A.id}`,items:A.decorations,authorIds:A.authorIds}))];return n(ye,{...e,size:"dynamic",className:qi.modal},n(Le,{separator:!1,className:Ee("modal-header")},n(V,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(pt,{onClick:e.onClose})),n(ke,{className:Ee("change-decoration-modal-content"),scrollbarType:"none"},n(_,null,n(fm,{renderItem:A=>{if(typeof A=="string")switch(A){case"none":return n(um,{className:Ee("change-decoration-modal-decoration"),isSelected:p===null,onSelect:()=>o(null)});case"create":return n(ne,{text:"You already have a decoration pending review",shouldShow:h},F=>n(cm,{className:Ee("change-decoration-modal-decoration"),...F,onSelect:h?()=>{}:Yi.store.agreedToGuidelines?nc:JS}))}else return n(ne,{text:"Pending review",shouldShow:A.reviewed===!1},F=>n(dm,{...F,className:Ee("change-decoration-modal-decoration"),onSelect:A.reviewed!==!1?()=>o(A):()=>{},isSelected:p?.hash===A.hash,decoration:A}))},getItemKey:A=>typeof A=="string"?A:A.hash,getSectionKey:A=>A.sectionKey,renderSectionHeader:A=>n(GR,{section:A}),sections:R}),n("div",{className:Ee("change-decoration-modal-preview")},n(oc,{avatarDecorationOverride:i,user:E.getCurrentUser()}),w&&n(S.FormTitle,{className:""},"Part of the ",M.name," Preset"),typeof p=="object"&&n(V,{variant:"text-sm/semibold",color:"header-primary"},p?.alt),d&&n(V,{key:`createdBy-${p.authorId}`},"Created by ",Pe.parse(`<@${p.authorId}>`))))),n(ct,{className:Q(Ee("change-decoration-modal-footer",Ee("modal-footer")))},n("div",{className:Ee("change-decoration-modal-footer-btn-container")},n(k,{onClick:()=>{u(t).then(e.onClose)},disabled:!r},"Apply"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel")),n("div",{className:Ee("change-decoration-modal-footer-btn-container")},n(k,{onClick:()=>et.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Ee("danger-btn"),cancelText:"Cancel",onConfirm(){mr.getState().remove(E.getCurrentUser().id),e.onClose()}}),color:k.Colors.PRIMARY,look:k.Looks.LINK},"Log Out"),n(ne,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},A=>n(k,{...A,onClick:async()=>{ae.getGuild(ji)?(e.onClose(),B.dispatch({type:"LAYER_POP_ALL"}),qo.transitionToGuild(ji)):await Qr(sa)&&(dn(),B.dispatch({type:"LAYER_POP_ALL"}))},color:k.Colors.PRIMARY,look:k.Looks.LINK},"Discord Server")))))}var UR,hm,VS=g(()=>{"use strict";a();le();Ut();mt();ot();we();Ze();H();T();Vl();dr();aa();Wi();tc();rc();fr();ii();WS();qS();YS();XS();gm();QS();UR=Ne("defaultRenderUser","showDefaultAvatarsForNullUsers");hm=()=>Ki().then(()=>de(e=>n(HR,{...e})))});function ca({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=mr(),{selectedDecoration:i,select:s,fetch:l}=yn();return se(()=>{r.isAuthorized()&&l()},[r.token]),n(zR,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ee("section-remove-margin")},n(fe,null,n(k,{onClick:()=>{r.isAuthorized()?hm():r.authorize().then(hm).catch(()=>{})},size:k.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(k,{onClick:()=>s(null),color:k.Colors.PRIMARY,size:k.Sizes.SMALL,look:k.Looks.LINK},"Remove Decoration")))}var zR,ym=g(()=>{"use strict";a();Ut();H();T();aa();Wi();fr();VS();zR=Go(".customizationSectionBackground")});var Yi,rc=g(()=>{"use strict";a();$();To();ot();we();Ze();I();T();ym();Yi=N({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(ca,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(S.FormText,{type:"description",className:Q(j.top8,j.bottom8)},"You can also access Decor decorations from the ",n(je,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),dn(),B.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(S.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}})});var jR,vm,eb=g(()=>{"use strict";a();DS();le();P();I();H();T();dr();aa();Wi();am();rc();ii();ym();({isAnimatedAvatarDecoration:jR}=x("isAnimatedAvatarDecoration")),vm=y({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[m.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<=USER_SETTINGS_AVATAR_DECORATION},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem",replacement:[{match:/(?<==)\i=>{let{children.{20,100}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/,replace:"$1.skuId===$self.SKU_ID||"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i,guildId:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"renderAvatarWithPopout(){",replacement:[{match:/(?<=getAvatarDecorationURL\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:Yi,flux:{CONNECTION_OPEN:()=>{mr.getState().init(),yn.getState().clear(),Dn.getState().fetch(E.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Dn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){zS(e)},set DecorationGridDecoration(e){jS(e)},SKU_ID:ri,useUserDecorAvatarDecoration:GS,async start(){Dn.getState().fetch(E.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===ri){let o=e.asset.split("_");return jR(e.asset)&&!t&&o.shift(),`${ES}/${o.join("_")}.png`}else if(e?.skuId===Jl)return e.asset},DecorSection:_.wrap(ca)})});var Sm,tb=g(()=>{"use strict";a();$();P();I();$s("DisableCallIdle","DisableDMCallIdle");Sm=y({name:"DisableCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",authors:[m.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/,?(?=this\.idleTimeout=new \i\.Timeout)/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]})});function bm(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${KR[e.format_type]}`}async function ob(e){let t=WR.getStickerById(e);if(t)return t;let{body:o}=await _t.get({url:`/stickers/${e}`});return B.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function YR(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await nb(bm(t)));let{body:r}=await _t.post({url:`/guilds/${e}/stickers`,body:o});B.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:E.getCurrentUser()}})}async function ZR(e,t){let o=await nb(bm(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return qR.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function XR(e){let t=E.getCurrentUser().id;return Object.values(ae.getGuilds()).filter(o=>{if(!(o.ownerId===t||(_e.getGuildPermissions({id:o.id})&me.CREATE_GUILD_EXPRESSIONS)===me.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:l}=jo.getGuilds()[o.id],c=0;for(let u of l)u.animated===i&&c++;return co.name.localeCompare(r.name))}async function nb(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function JR(e,t){try{t.t==="Sticker"?await YR(e,t):await ZR(e,t),X.show({message:`Successfully cloned ${t.name} to ${ae.getGuild(e)?.name??"your server"}!`,type:X.Type.SUCCESS,id:X.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new oe("EmoteCloner").error("Failed to clone",t.name,"to",e,o),X.show({message:"Failed to clone: "+r,type:X.Type.FAILURE,id:X.genId()})}}function ek({data:e}){let[t,o]=U.useState(!1),[r,i]=U.useState(e.name),[s,l]=U.useReducer(u=>u+1,0),c=U.useMemo(()=>XR(e),[e.id,s]);return n(f,null,n(S.FormTitle,{className:j.top20},"Custom Name"),n(Wl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&VR.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>n(ne,{text:u.name},({onMouseLeave:p,onMouseEnter:d})=>n("div",{onMouseLeave:p,onMouseEnter:d,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),JR(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):n(S.FormText,{style:{fontSize:QR(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function ic(e,t){return n(L.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Hr(async()=>{let o=await t(),r={t:e,...o},i=bm(r);return s=>n(ye,{...s},n(Le,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(S.FormText,null,"Clone ",r.name)),n(ke,null,n(ek,{data:r})))})})}function rb(e){return new URL(e).pathname.endsWith(".gif")}var WR,qR,KR,QR,VR,tk,ok,Tm,ib=g(()=>{"use strict";a();Eo();gd();P();Ke();ot();Ze();I();H();T();WR=Re("StickersStore"),qR=x("fetchEmoji","uploadEmoji","deleteEmoji"),KR=[,"png","png","json","gif"];QR=e=>[20,20,18,18,16,14,12][e.length]??4,VR=/^\w+$/i;tk=(e,t)=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${o}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return ic("Emoji",()=>({id:o,name:u,isAnimated:rb(r??i)}));case"sticker":return t.message.stickerItems.find(d=>d.id===o)?.format_type===3?void 0:ic("Sticker",()=>ob(o))}})();l&&ut("copy-link",e)?.push(l)},ok=(e,t)=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(!!o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(ic("Emoji",()=>({id:o,name:r,isAnimated:s&&rb(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(ic("Sticker",()=>ob(o)))},Tm=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[m.Ven,m.Nuckyz],contextMenus:{message:tk,"expression-picker":ok}})});var wm,sb,xm,ab=g(()=>{"use strict";a();$();le();Pi();P();ot();I();H();T();wm=x("key","removeBuildOverride"),sb=N({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),xm=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[m.Megu,m.Ven,m.Nickyux,m.BanTheNons,m.Nuckyz],settings:sb,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=()",predicate:()=>sb.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,o)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${o}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(U.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",n("kbd",{className:wm.key},t)," +"," ",n("kbd",{className:wm.key},o)," +"," ",n("kbd",{className:wm.key},"O")," ","after enabling ",n("code",null,"isStaff")," below"),n(S.FormText,null,"and then toggling ",n("code",null,"Enable DevTools")," in the ",n("code",null,"Developer Options")," tab in settings."))},WarningCard:_.wrap(()=>n(Ro,{id:"vc-experiments-warning-card",className:j.bottom16},n(S.FormTitle,{tag:"h2"},"Hold on!!"),n(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(S.FormText,{className:j.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var Mm,lb=g(()=>{"use strict";a();P();I();Mm=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[m.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var cb=g(()=>{"use strict";a()});var pb=kr((SW,ub)=>{"use strict";a();var Ln=ub.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var p=typeof fi=="function"&&fi;if(!u&&p)return p(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var d=o[c]={exports:{}};t[c][0].call(d.exports,function(h){var v=t[c][1][h];return i(v||h)},d,d.exports,e,t,o,r)}return o[c].exports}for(var s=typeof fi=="function"&&fi,l=0;l"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",R=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function A(){var D=setTimeout;return function(){return D(z,1)}}var F=new Array(1e3);function z(){for(var D=0;Di+r.playTime;)i+=r.playTime;i+=M.delay}else u=!(c=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,p){for(var d=-1,h=u=u||0,v=u+(p=p||c.length-u);h>>8^r[255&(d^c[h])];return-1^d}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(p){return s(p)};var u={};c.parseURL=function(p){return p in u||(u[p]=l(p).then(s)),u[p]},c.animateContext=function(p,d){return c.parseURL(p).then(function(h){return h.addContext(d),h.play(),h})},c.animateImage=function(p){return p.setAttribute("data-is-apng","progress"),c.parseURL(p.src).then(function(d){p.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=d.width,h.height=d.height,Array.prototype.slice.call(p.attributes).forEach(function(R){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(R.nodeName)==-1&&h.setAttributeNode(R.cloneNode(!1))}),h.setAttribute("data-apng-src",p.src),p.alt!=""&&h.appendChild(document.createTextNode(p.alt));var v="",b="",M=0,w="";p.style.width!=""&&p.style.width!="auto"?v=p.style.width:p.hasAttribute("width")&&(v=p.getAttribute("width")+"px"),p.style.height!=""&&p.style.height!="auto"?b=p.style.height:p.hasAttribute("height")&&(b=p.getAttribute("height")+"px"),v!=""&&b==""&&(M=parseFloat(v),w=v.match(/\D+$/)[0],b=Math.round(h.height*M/h.width)+w),b!=""&&v==""&&(M=parseFloat(b),w=b.match(/\D+$/)[0],v=Math.round(h.width*M/h.height)+w),h.style.width=v,h.style.height=b;var C=p.parentNode;C.insertBefore(h,p),C.removeChild(p),d.addContext(h.getContext("2d")),d.play()},function(){p.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(p){var d=p.getContext("2d");"_apng_animation"in d&&d._apng_animation.removeContext(d)}}).call(this,typeof Ln<"u"?Ln:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(w){var C=new Uint8Array(w);return new r(function(R,A){for(var F=0;F>>0;for(var A=1;A<4;A++)R+=w[A+C]<<8*(3-A);return R},p=function(w,C){for(var R=0,A=0;A<2;A++)R+=w[A+C]<<8*(1-A);return R},d=function(w,C){return w[C]},h=function(w,C,R){var A=new Uint8Array(R);return A.set(w.subarray(C,C+R)),A},v=function(w,C,R){var A=Array.prototype.slice.call(w.subarray(C,C+R));return String.fromCharCode.apply(String,A)},b=function(w){return[w>>>24&255,w>>>16&255,w>>>8&255,255&w]},M=function(w,C){var R=w.length+C.length,A=new Uint8Array(new ArrayBuffer(R+8));A.set(b(C.length),0),A.set(function(z){for(var Y=[],J=0;J{"use strict";a();Uo();cb();db=Jn(()=>pb().APNG),nk="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",IW=`${nk}/rnnoise/workletProcessor.js`,mb="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",fb="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",gb=Jn(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var Rm=kr(Cm=>{a();var Sb=Object.defineProperty,rk=e=>Sb(e,"__esModule",{value:!0}),ik=(e,t)=>{for(var o in t)Sb(e,o,{get:t[o],enumerable:!0})};rk(Cm);ik(Cm,{GIFEncoder:()=>Pb,applyPalette:()=>fk,default:()=>Mk,nearestColor:()=>vk,nearestColorIndex:()=>Mb,nearestColorIndexWithDistance:()=>Ib,prequantize:()=>mk,quantize:()=>pk,snapColorsToPalette:()=>yk});var sk={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function bb(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c=i)return;var l=1024*1024;i=Math.max(i,s*(s>>0),s!=0&&(i=Math.max(i,256));let c=o;o=new Uint8Array(i),t>0&&o.set(c.subarray(0,t),0)}}var Im=12,hb=5003,ak=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function lk(e,t,o,r,i=bb(512),s=new Uint8Array(256),l=new Int32Array(hb),c=new Int32Array(hb)){let u=l.length,p=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let d=0,h=0,v=p+1,b=v,M=!1,w=b,C=(1<=0;)if(ue-=Ue,ue<0&&(ue+=u),l[ue]===Se){Y=c[ue];break e}O(Y),Y=re,F<1<0?d|=te<=8;)s[z++]=d&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),d>>=8,h-=8;if((F>C||M)&&(M?(w=b,C=(1<0;)s[z++]=d&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),d>>=8,h-=8;z>0&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0)}}}var ck=lk;function Tb(e,t,o){return e<<8&63488|t<<2&992|o>>3}function wb(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function xb(e,t,o){return e>>4<<8|t&240|o>>4}function ac(e,t,o){return eo?o:e}function ua(e){return e*e}function yb(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,p=s.gc,d=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let b=e[h],M=b.cnt,w=l*M/(l+M);if(!(w>=i)){var v=0;o&&(v+=w*ua(b.ac-c),v>=i)||(v+=w*ua(b.rc-u),!(v>=i)&&(v+=w*ua(b.gc-p),!(v>=i)&&(v+=w*ua(b.bc-d),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Pm(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function uk(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s>24&255,u=l>>16&255,p=l>>8&255,d=l&255,h=wb(d,p,u,c),v=h in r?r[h]:r[h]=Pm();v.rc+=d,v.gc+=p,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s>16&255,u=l>>8&255,p=l&255,d=xb(p,u,c),h=d in r?r[d]:r[d]=Pm();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s>16&255,u=l>>8&255,p=l&255,d=Tb(p,u,c),h=d in r?r[d]:r[d]=Pm();h.rc+=p,h.gc+=u,h.bc+=c,h.cnt++}return r}function pk(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),p=o.useSqrt!==!1,d=r==="rgba4444",h=uk(u,r),v=h.length,b=v-1,M=new Uint32Array(v+1);for(var w=0,R=0;R1&&(z=F>>1,!(h[A=M[z]].err<=Y));F=z)M[F]=A;M[F]=R}var J=w-t;for(R=0;R=Z.mtm&&h[Z.nn].mtm<=Z.tm)break;Z.mtm==b?O=M[1]=M[M[0]--]:(yb(h,O,!1),Z.tm=R);var Y=h[O].err;for(F=1;(z=F+F)<=M[0]&&(zh[M[z+1]].err&&z++,!(Y<=h[A=M[z]].err));F=z)M[F]=A;M[F]=O}var te=h[Z.nn],re=Z.cnt,Se=te.cnt,C=1/(re+Se);d&&(Z.ac=C*(re*Z.ac+Se*te.ac)),Z.rc=C*(re*Z.rc+Se*te.rc),Z.gc=C*(re*Z.gc+Se*te.gc),Z.bc=C*(re*Z.bc+Se*te.bc),Z.cnt+=te.cnt,Z.mtm=++R,h[te.bk].fw=te.fw,h[te.fw].bk=te.bk,te.mtm=b}let ue=[];var Ue=0;for(R=0;;++Ue){let be=ac(Math.round(h[R].rc),0,255),Me=ac(Math.round(h[R].gc),0,255),De=ac(Math.round(h[R].bc),0,255),Oe=255;d&&(Oe=ac(Math.round(h[R].ac),0,255),c&&(Oe=Oe<=(typeof c=="number"?c:127)?0:255),i&&Oe<=l&&(be=Me=De=s,Oe=0));let Ae=d?[be,Me,De,Oe]:[be,Me,De];if(dk(ue,Ae)||ue.push(Ae),(R=h[R].fw)==0)break}return ue}function dk(e,t){for(let o=0;o=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function cc(e,t){var o=0,r;for(r=0;r1?Math.round(e/t)*t:e}function mk(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s>24&255,u=l>>16&255,p=l>>8&255,d=l&255;c=lc(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),d=lc(d,t),p=lc(p,t),u=lc(u,t),i[s]=c<<24|u<<16|p<<8|d<<0}}function fk(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let p=0;p>24&255,v=d>>16&255,b=d>>8&255,M=d&255,w=wb(M,b,v,h),C=w in c?c[w]:c[w]=gk(M,b,v,h,t);l[p]=C}else{let p=o==="rgb444"?xb:Tb;for(let d=0;d>16&255,b=h>>8&255,M=h&255,w=p(M,b,v),C=w in c?c[w]:c[w]=hk(M,b,v,t);l[d]=C}}return l}function gk(e,t,o,r,i){let s=0,l=1e100;for(let c=0;cl)continue;let h=u[0];if(d+=si(h-e),d>l)continue;let v=u[1];if(d+=si(v-t),d>l)continue;let b=u[2];d+=si(b-o),!(d>l)&&(l=d,s=c)}return s}function hk(e,t,o,r){let i=0,s=1e100;for(let l=0;ls)continue;let d=c[1];if(p+=si(d-t),p>s)continue;let h=c[2];p+=si(h-o),!(p>s)&&(s=p,i=l)}return i}function yk(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;ls?c=c.slice(0,3):c=c.slice();let u=Ib(r,c.slice(0,3),cc),p=u[0],d=u[1];d>0&&d<=i&&(e[p]=c)}}function si(e){return e*e}function Mb(e,t,o=cc){let r=1/0,i=-1;for(let s=0;s=0&&Tk(r,A)}let J=Math.round(C/10);Sk(r,z,J,M,w);let Z=Boolean(R)&&!Y;wk(r,h,v,Z?R:null),Z&&vb(r,R),xk(r,d,h,v,F,s,l,c)}};function p(){Ab(r,"GIF89a")}}function Sk(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let c=0;e.writeByte(0|l|c|s),gr(e,o),e.writeByte(i||0),e.writeByte(0)}function bk(e,t,o,r,i=8){let c=Am(r.length)-1,u=1<<7|i-1<<4|0<<3|c,p=0,d=0;gr(e,t),gr(e,o),e.writeBytes([u,p,d])}function Tk(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),Ab(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),gr(e,t),e.writeByte(0)}function vb(e,t){let o=1<>8&255)}function Ab(e,t){for(var o=0;oi.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function dc(e,t){let o=ee.getChannel(e);return!o||o.isPrivate()?!0:_e.can(t,o)}var Zi,Ik,ai,pa,Cb,da,hr,uc,km,Nm,pc,Rb,Xe,kb,Pk,Nb,Ak,Dm,Lb=g(()=>{"use strict";a();gn();$();P();sc();mt();Ke();I();H();T();Zi=Ka(Rm()),Ik=0,ai=Re("StickersStore"),pa=Re("UserSettingsProtoStore"),Cb=x("BINARY_READ_OPTIONS");da=go(()=>ws.PreloadedUserSettingsActionCreators),hr=go(()=>Db("appearance",da.ProtoClass)),uc=go(()=>Db("clientThemeSettings",hr)),km=/\/emojis\/(\d+?)\.(png|webp|gif)/,Nm=/\/stickers\/(\d+?)\./,pc=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Rb=/\[.+?\]\((https?:\/\/.+?)\)/,Xe=N({enableEmojiBypass:{description:"Allow sending fake emojis",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allow sending fake stickers",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0},useHyperLinks:{description:"Whether to use hyperlinks when sending fake emojis and stickers",type:3,default:!0},hyperLinkText:{description:"What text the hyperlink should use. {{NAME}} will be replaced with the emoji/sticker name.",type:0,default:"{{NAME}}"}}).withPrivateSettings();kb=e=>dc(e,me.USE_EXTERNAL_EMOJIS),Pk=e=>dc(e,me.USE_EXTERNAL_STICKERS),Nb=e=>dc(e,me.EMBED_LINKS),Ak=e=>dc(e,me.ATTACH_FILES),Dm=y({name:"FakeNitro",authors:[m.Arjix,m.D3SOX,m.Ven,m.fawn,m.captain,m.Nuckyz,m.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Xe,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Xe.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,o)=>`${t}(!${o}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>Xe.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,o)=>`${t},fakeNitroIntention){${o}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>Xe.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Xe.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Xe.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Xe.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Xe.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Xe.store.transformEmojis||Xe.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Xe.store.transformEmojis||Xe.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Xe.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,o)=>`${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Xe.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>Xe.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Xe.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>Xe.store.transformEmojis,replacement:{match:/(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,replace:(e,t,o)=>`$self.addFakeNotice(${1},${t},!!${o}?.fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:".FreemiumAppIconIds.DEFAULT&&(",replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return Js()?.id},get canUseEmotes(){return(E.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(E.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!pa||!da||!hr||!uc)return;if((t?.premium_type??E?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=hr.create(),pa.settings.appearance?.theme!=null){let r=hr.create({theme:pa.settings.appearance.theme});e.appearance.theme=r.theme}if(pa.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=uc.create({backgroundGradientPresetId:{value:pa.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,o){if((E?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!da||!hr||!uc||!Cb)return;let i=da.getCurrentValue().appearance,s=i!=null?hr.fromBinary(hr.toBinary(i),Cb.BINARY_READ_OPTIONS):hr.create();s.theme=t;let l=uc.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=da.ProtoClass.create();c.appearance=s,B.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"?(e[0]=t.trimStart(),e[0]||e.shift()):typeof t?.props?.children=="string"&&(t.props.children=t.props.children.trimStart(),t.props.children||e.shift());let o=e.length-1,r=e[o];typeof r=="string"?(e[o]=r.trimEnd(),e[o]||e.pop()):typeof r?.props?.children=="string"&&(r.props.children=r.props.children.trimEnd(),r.props.children||e.pop())},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!Xe.store.transformCompoundSentence)return e;let o=e.length,r=c=>{if(Xe.store.transformEmojis){let u=c.props.href.match(km);if(u){let p=null;try{p=new URL(c.props.href)}catch{}let d=jo.getCustomEmojiById(u[1])?.name??p?.searchParams.get("name")??"FakeNitroEmoji";return Pe.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:d,fake:!0},void 0,{key:String(o++)})}}if(Xe.store.transformStickers){if(Nm.test(c.props.href))return null;let u=c.props.href.match(pc);if(u&&ai.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let p=!1;for(let[d,h]of u.props.children.entries()){if(h==null){delete u.props.children[d];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?p=!0:delete u.props.children[d]}if(!p)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,p]of c.entries())c[u]=s(p);return c=this.clearEmptyArrayItems(c),c};try{let c=l(Fr.cloneDeep(e));return this.trimContent(c),c}catch(c){return new oe("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Xe.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Xe.store.transformCompoundSentence&&!i.startsWith("http")&&!Rb.test(i))continue;let s=i.match(Nm);if(s){let c=null;try{c=new URL(i)}catch{}let u=ai.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(pc);if(l){if(!ai.getStickerById(l[1]))continue;let c=ai.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!Xe.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Xe.store.transformCompoundSentence&&!o.some(r=>r===e.url||r.match(Rb)?.[1]===e.url))return!1;if(Xe.store.transformEmojis&&km.test(e.url))return!0;if(Xe.store.transformStickers){if(Nm.test(e.url))return!0;let r=e.url.match(pc);if(r&&ai.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(pc);return!(o&&ai.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&km.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${Xe.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=db(),{frames:i,width:s,height:l}=await r(e),c=(0,Zi.GIFEncoder)(),u=Xe.store.stickerSize,p=document.createElement("canvas");p.width=u,p.height=u;let d=p.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);d.scale(h,h);let v;for(let M of i){let{left:w,top:C,width:R,height:A,img:F,delay:z,blendOp:Y,disposeOp:J}=M;v=d.getImageData(w,C,R,A),Y===0&&d.clearRect(w,C,R,A),d.drawImage(F,w,C,R,A);let{data:Z}=d.getImageData(0,0,u,u),O=(0,Zi.quantize)(Z,256),te=(0,Zi.applyPalette)(Z,O);c.writeFrame(te,u,u,{transparent:!0,palette:O,delay:z}),J===1?d.clearRect(w,C,R,A):J===2&&d.putImageData(v,w,C)}c.finish();let b=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});As.promptToUpload([b],ee.getChannel(o),Ik)},start(){let e=Xe.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(r,i){return!r[i]||/\s/.test(r[i])?"":" "}function o(){return new Promise(r=>{et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."),n(S.FormText,{type:S.FormText.Types.DESCRIPTION},"You can disable this notice in the plugin settings.")),confirmText:"Send Anyway",cancelText:"Cancel",secondaryConfirmText:"Do not show again",onConfirm:()=>r(!0),onCloseCallback:()=>setImmediate(()=>r(!1)),onConfirmSecondary(){Xe.store.disableEmbedPermissionCheck=!0,r(!0)}})})}this.preSend=Vt(async(r,i,s)=>{let{guildId:l}=this,c=!1;e:{if(!e.enableStickerBypass)break e;let u=ai.getStickerById(s.stickers?.[0]);if(!u||"pack_id"in u)break e;let p=this.canUseStickers&&Pk(r);if(u.available!==!1&&(p||u.guild_id===l))break e;let d=this.getStickerLink(u.id);if(u.format_type===4&&d.includes(".png")&&(d=d.replace(".png",".gif")),u.format_type===2)return Ak(r)?this.sendAnimatedSticker(d,u.id,r):et.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."))}),{cancel:!0};{c=!0;let h=new URL(d);h.searchParams.set("name",u.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${v}](${h})`:h}`,s.stickers.length=0}}if(e.enableEmojiBypass){let u=this.canUseEmotes&&kb(r);for(let p of i.validNonShortcutEmojis){if(!p.require_colons||p.available!==!1&&u||p.guildId===l&&!p.animated)continue;c=!0;let d=`<${p.animated?"a":""}:${p.originalName||p.name}:${p.id}>`,h=new URL(p.url);h.searchParams.set("size",e.emojiSize.toString()),h.searchParams.set("name",p.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",p.name);i.content=i.content.replace(d,(b,M,w)=>`${t(w,M-1)}${e.useHyperLinks?`[${v}](${h})`:h}${t(w,M+b.length)}`)}}return c&&!e.disableEmbedPermissionCheck&&!Nb(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=ti(async(r,i,s)=>{if(!e.enableEmojiBypass)return;let{guildId:l}=this,c=!1,u=this.canUseEmotes&&kb(r);return s.content=s.content.replace(/(?/ig,(p,d,h,v)=>{let b=jo.getCustomEmojiById(d);if(b==null||!b.require_colons||b.available!==!1&&u||b.guildId===l&&!b.animated)return p;c=!0;let M=new URL(b.url);M.searchParams.set("size",e.emojiSize.toString()),M.searchParams.set("name",b.name);let w=e.hyperLinkText.replaceAll("{{NAME}}",b.name);return`${t(v,h-1)}${e.useHyperLinks?`[${w}](${M})`:M}${t(v,h+p.length)}`}),c&&!e.disableEmbedPermissionCheck&&!Nb(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){eo(this.preSend),oi(this.preEdit)}})});function Eb(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var Ob,_b=g(()=>{"use strict";a();Ob=Eb;typeof module<"u"&&(module.exports=Eb)});function Ck(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function Rk(e){if(e==null)return null;let t=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(t!=null){let o=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return o.substring(1,o.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var Bb,Lm,Fb=g(()=>{"use strict";a();$();le();P();ot();we();I();T();_b();Bb=N({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Lm=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[m.Alyxia,m.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Usage"),n(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 go to your profile settings"),n("li",null,"\u2022 choose your own colors in the Nitro preview"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:Bb,colorDecodeHook(e){if(e){if(Bb.store.nitroFirst&&e.themeColors)return e;let t=Rk(e.bio);if(t)return Ob(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:_.wrap(function({primary:e,accent:t}){return n(k,{onClick:()=>{let o=Ck(e,t);Ao(o)},color:k.Colors.PRIMARY,size:k.Sizes.XLARGE,className:j.left16},"Copy 3y3")},{noop:!0})})});var Em,Ub=g(()=>{"use strict";a();P();I();T();Em=y({name:"FavoriteEmojiFirst",authors:[m.Aria,m.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"MAX_AUTOCOMPLETE_RESULTS+",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=jo.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function Nk({instance:e,SearchBarComponent:t}){let[o,r]=W(""),i=xt(null),s=cl(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(p=>({score:Dk(l.toLowerCase(),Gb(p.url??p.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:p})).filter(p=>p.score!=null);u.sort((p,d)=>d.score-p.score),c.favorites=u.map(p=>p.gif),e.forceUpdate()},[e.state]);return se(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:kk.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function Gb(e){let t;try{t=new URL(e)}catch{return e}switch($b.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function Dk(e,t){let o=0,r=0;for(let i=0;i{"use strict";a();$();le();P();I();H();T();kk=x("searchBar","searchBarFullRow"),$b=N({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),Om=y({name:"FavoriteGifSearch",authors:[m.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:$b,getTargetString:Gb,instance:null,renderSearchBar(e,t){return this.instance=e,n(_,{noop:!0},n(Nk,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var _m,zb=g(()=>{"use strict";a();P();I();_m=y({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[m.Grzesiek11],patches:[{find:".default.Messages.DELETED_ROLE_PLACEHOLDER",replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]})});var Bm,jb=g(()=>{"use strict";a();$();Xs();P();I();Bm=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[m.Ven],settings:N({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:en(0,100,10),stickToMarkers:!1,default:10}})})});var Fm,Wb=g(()=>{"use strict";a();P();I();Fm=y({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[m.coolelectronics]})});var Um,qb=g(()=>{"use strict";a();P();I();T();Um=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[m.D3SOX,m.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return ae.getGuild(t)?.ownerId===o}})});var mc,Lk,$m,Kb=g(()=>{"use strict";a();uo();P();I();H();T();mc=x("createFriendInvite"),{uuid4:Lk}=x("uuid4"),$m=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[m.afn,m.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let o=ht(e,"Uses",5);if(o===1&&!E.getCurrentUser().phone)return ge(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(o===1){let i=Lk(),{body:{invite_suggestions:s}}=await _t.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await mc.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await mc.createFriendInvite();ge(t.channel.id,{content:`
discord.gg/${r.code} \xB7
Expires: \xB7
Max uses: \`${r.max_uses}\`
- `.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await _l.getAllFriendInvites()).map(i=>`
+ `.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await mc.getAllFriendInvites()).map(i=>`
_discord.gg/${i.code}_ \xB7
Expires: \xB7
Times used: \`${i.uses}/${i.max_uses}\`
- `.trim().replace(/\s+/g," "));me(t.channel.id,{content:r.join(`
-`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await _l.revokeFriendInvites(),me(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Yd,w0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
+ `.trim().replace(/\s+/g," "));ge(t.channel.id,{content:r.join(`
+`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await mc.revokeFriendInvites(),ge(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Ek,Ok,_k,Bk,Yb,Fk,Uk,Gm,Zb=g(()=>{"use strict";a();le();P();I();H();T();({Heading:Ek,Text:Ok}=x("Heading","Text")),_k=x("memberSinceContainer"),{getCreatedAtDate:Bk}=x("getCreatedAtDate"),Yb=x("clydeMoreInfo"),Fk=x("getLocale"),Uk=x("lastSection"),Gm=y({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[m.Elvyra],patches:[{find:".AnalyticsSections.USER_PROFILE}",replacement:{match:/\i.default,\{userId:(\i.id).{0,30}}\)/,replace:"$&,$self.friendsSince({ userId: $1 })"}},{find:".UserPopoutUpsellSource.PROFILE_PANEL,",replacement:{match:/\i.default,\{userId:(\i)}\)/,replace:"$&,$self.friendsSince({ userId: $1 })"}}],friendsSince:_.wrap(({userId:e})=>{let t=it.getSince(e);return t?n("div",{className:Uk.section},n(Ek,{variant:"eyebrow",className:Yb.title},"Friends Since"),n("div",{className:_k.memberSinceContainer},n(Ok,{variant:"text-sm/normal",className:Yb.body},Bk(t,Fk.getLocale())))):null},{noop:!0})})});var Hm,Xb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
min-width: 88px !important;
}
-`,classNames:{},dom:null});Yd="src/plugins/gameActivityToggle/style.css"});function dN(e){let{oldIcon:t}=M0.use(["oldIcon"]),o=t?"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z":"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",r=t?"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z":"M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z";return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:!e&&!t?"var(--status-danger)":"currentColor",mask:e?void 0:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(f,null,n("path",{fill:"var(--status-danger)",d:o}),n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:r}))))}}function mN(){let e=ri.ShowCurrentGame.useSetting();return n(pN,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:dN(e),role:"switch","aria-checked":!e,onClick:()=>ri.ShowCurrentGame.updateSetting(t=>!t)})}var pN,M0,Zd,P0=g(()=>{"use strict";a();$();rt();ae();A();w();j();x();w0();pN=je("Button.Sizes.NONE,disabled:");M0=D({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),Zd=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[m.Nuckyz,m.RuukuLada],settings:M0,patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:B.wrap(mN,{noop:!0}),start(){xt(Yd)},stop(){jt(Yd)}})});var fN,Xd,I0=g(()=>{"use strict";a();A();ct();w();j();({closeExpressionPicker:fN}=P("closeExpressionPicker")),Xd=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[m.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=(\i)=>\{/,replace:".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(bn(e.url+" "),fN())}})});function N0(e,t,o){let r=no.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Ol.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};no._sendMessage(e.id,i,r)}else no.sendGreetMessage(e.id,o[0],r)}function gN({channel:e,message:t}){let o=Ol.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(G.Menu,{navId:"greet-sticker-picker",onClose:()=>O.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(G.MenuGroup,{label:"Greet Mode"},Object.values(C0).map(s=>n(G.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(G.MenuSeparator,null),n(G.MenuGroup,{label:"Greet Stickers"},A0.map(s=>n(G.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>N0(e,t,[s.id])}))),Ol.store.unholyMultiGreetEnabled?n(f,null,n(G.MenuSeparator,null),n(G.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},A0.map(s=>{let l=i.some(c=>c===s.id);return n(G.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),n(G.MenuSeparator,null),n(G.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>N0(e,t,i),disabled:i.length===0}))):null)}var C0,Ol,A0,Jd,k0=g(()=>{"use strict";a();$();A();w();j();x();C0=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(C0||{}),Ol=D({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),{WELCOME_STICKERS:A0}=P("WELCOME_STICKERS");Jd=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[m.Ven],settings:Ol,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Ut.openContextMenu(e,()=>n(gN,{...t}))}})});var Qd={};ze(Qd,{_buildPopoverElements:()=>yN,addButton:()=>zo,buttons:()=>Bl,removeButton:()=>jo});function zo(e,t){Bl.set(e,t)}function jo(e){Bl.delete(e)}function yN(e,t){let o=[];for(let[r,i]of Bl.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){hN.error(`[${r}]`,s)}return o}var hN,Bl,jr=g(()=>{"use strict";a();Ve();hN=new ie("MessagePopover"),Bl=new Map});var Ws,D0,qs,R0,vN,Vd,L0=g(()=>{"use strict";a();Vo();jr();Lt();A();w();x();D0="HideAttachments_HiddenIds",qs=new Set,R0=()=>Dt(D0).then(e=>(qs=e??new Set,qs)),vN=e=>io(D0,e),Vd=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[m.Ven],dependencies:["MessagePopoverAPI"],async start(){Ws=document.createElement("style"),Ws.id="VencordHideAttachments",document.head.appendChild(Ws),await R0(),await this.buildCss(),zo("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=qs.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?sl:al,message:e,channel:Q.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){Ws.remove(),qs.clear(),jo("HideAttachments")},async buildCss(){let e=[...qs].map(t=>`#message-accessories-${t}`).join(",");Ws.textContent=`
+`,classNames:{},dom:null});Hm="src/plugins/gameActivityToggle/style.css"});function Gk(e){let{oldIcon:t}=Jb.use(["oldIcon"]),o=t?"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z":"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",r=t?"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z":"M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z";return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:!e&&!t?"var(--status-danger)":"currentColor",mask:e?void 0:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(f,null,n("path",{fill:"var(--status-danger)",d:o}),n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:r}))))}}function Hk(){let e=xi.ShowCurrentGame.useSetting();return n($k,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:Gk(e),role:"switch","aria-checked":!e,onClick:()=>xi.ShowCurrentGame.updateSetting(t=>!t)})}var $k,Jb,zm,Qb=g(()=>{"use strict";a();$();Qe();le();P();I();H();T();Xb();$k=Ne("Button.Sizes.NONE,disabled:");Jb=N({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),zm=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[m.Nuckyz,m.RuukuLada],settings:Jb,patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:_.wrap(Hk,{noop:!0}),start(){Nt(Hm)},stop(){Xt(Hm)}})});var zk,jm,Vb=g(()=>{"use strict";a();P();mt();I();H();({closeExpressionPicker:zk}=x("closeExpressionPicker")),jm=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[m.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=(\i)=>\{/,replace:".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(kn(e.url+" "),zk())}})});function tT(e,t,o){let r=ao.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(fc.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};ao._sendMessage(e.id,i,r)}else ao.sendGreetMessage(e.id,o[0],r)}function jk({channel:e,message:t}){let o=fc.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(L.Menu,{navId:"greet-sticker-picker",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(L.MenuGroup,{label:"Greet Mode"},Object.values(oT).map(s=>n(L.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(L.MenuSeparator,null),n(L.MenuGroup,{label:"Greet Stickers"},eT.map(s=>n(L.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>tT(e,t,[s.id])}))),fc.store.unholyMultiGreetEnabled?n(f,null,n(L.MenuSeparator,null),n(L.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},eT.map(s=>{let l=i.some(c=>c===s.id);return n(L.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),n(L.MenuSeparator,null),n(L.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>tT(e,t,i),disabled:i.length===0}))):null)}var oT,fc,eT,Wm,nT=g(()=>{"use strict";a();$();P();I();H();T();oT=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(oT||{}),fc=N({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),{WELCOME_STICKERS:eT}=x("WELCOME_STICKERS");Wm=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[m.Ven],settings:fc,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Yt.openContextMenu(e,()=>n(jk,{...t}))}})});var qm={};qe(qm,{_buildPopoverElements:()=>qk,addButton:()=>on,buttons:()=>gc,removeButton:()=>Oo});function on(e,t){gc.set(e,t)}function Oo(e){gc.delete(e)}function qk(e,t){let o=[];for(let[r,i]of gc.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){Wk.error(`[${r}]`,s)}return o}var Wk,gc,li=g(()=>{"use strict";a();Ke();Wk=new oe("MessagePopover"),gc=new Map});var ma,iT,fa,rT,Kk,Km,sT=g(()=>{"use strict";a();Xo();li();It();P();I();T();iT="HideAttachments_HiddenIds",fa=new Set,rT=()=>dt(iT).then(e=>(fa=e??new Set,fa)),Kk=e=>kt(iT,e),Km=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[m.Ven],dependencies:["MessagePopoverAPI"],async start(){ma=document.createElement("style"),ma.id="VencordHideAttachments",document.head.appendChild(ma),await rT(),await this.buildCss(),on("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=fa.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?El:Ol,message:e,channel:ee.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){ma.remove(),fa.clear(),Oo("HideAttachments")},async buildCss(){let e=[...fa].map(t=>`#message-accessories-${t}`).join(",");ma.textContent=`
:is(${e}) :is([class*="embedWrapper"], [class*="clickableSticker"]) {
/* important is not necessary, but add it to make sure bad themes won't break it */
display: none !important;
@@ -78,7 +94,7 @@ ${Is(r.join(", ")+`
color: var(--text-muted);
font-size: 80%;
}
- `},async toggleHide(e){let t=await R0();t.delete(e)||t.add(e),await vN(t),await this.buildCss()}})});var em,E0=g(()=>{"use strict";a();A();w();em=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[m.botato,m.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function B0(e,t,o,r){return n(ee,{text:t},i=>n("button",{...i,onClick:s=>TN(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function O0(e,t=!1){let o=ki.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?bN(e,"var(--status-danger)"):SN(e,t?"var(--green-300)":"var(--primary-400)")}function TN(e,t){e.stopPropagation();let o=rr().findIndex(r=>r.id===t.id);o===-1?ki.store.ignoredActivities=rr().concat(t):ki.store.ignoredActivities=rr().filter((r,i)=>i!==o),ri.ShowCurrentGame.updateSetting(r=>r)}function rr(){return ki.store.ignoredActivities??=[]}var _0,SN,bN,ki,tm,F0=g(()=>{"use strict";a();Vo();$();ae();A();w();j();x();_0=Re("RunningGameStore");SN=(e,t)=>B0(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),bN=(e,t)=>B0(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);ki=D({}).withPrivateSettings();tm=y({name:"IgnoreActivities",authors:[m.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are ignored from the Registered Games and Activities tabs.",settings:ki,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await Dt("IgnoreActivities_ignoredActivities");if(e!=null&&(ki.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),Nu("IgnoreActivities_ignoredActivities")),rr().length!==0){let t=_0.getGamesSeen();for(let[o,r]of rr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||rr().splice(o,1))}},isActivityNotIgnored(e){if(e.type===0||e.type===3){if(e.application_id!=null)return!rr().some(t=>t.id===e.application_id);{let t=_0.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!rr().some(o=>o.id===t)}}return!0},renderToggleGameActivityButton(e,t){return n(B,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},O0({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(B,{noop:!0},O0({id:e.id,name:e.name,type:1}))}})});var Ks,om=g(()=>{"use strict";a();Ks="vc-imgzoom-magnify-modal"});function nm(e,t){e()?t():requestAnimationFrame(()=>nm(e,t))}var U0=g(()=>{"use strict";a()});var xN,rm,$0=g(()=>{"use strict";a();rt();x();om();im();U0();xN=Fe("vc-imgzoom-"),rm=({instance:e,size:t,zoom:o})=>{let[r,i]=Y(!1),[s,l]=Y({x:0,y:0}),[c,u]=Y({x:0,y:0}),[p,d]=Y(0),h=to(!1),v=to(o),T=to(t),N=to(null),b=to(null),I=to(null),k=to(null);if(_.useLayoutEffect(()=>{let F=re=>{re.key==="Shift"&&(h.current=!0)},H=re=>{re.key==="Shift"&&(h.current=!1)},X=()=>{b.current.currentTime=I.current.currentTime},Z=re=>{if(e.state.mouseOver&&e.state.mouseDown){let Me=T.current/2,le={x:re.pageX,y:re.pageY},Le=-((le.x-N.current.getBoundingClientRect().left)*v.current-Me),he=-((le.y-N.current.getBoundingClientRect().top)*v.current-Me);l({x:re.x-Me,y:re.y-Me}),u({x:Le,y:he}),d(1)}else d(0)},q=re=>{e.state.mouseOver&&re.button===0&&(v.current=He.store.zoom,T.current=He.store.size,document.getElementById("image-context")&&O.dispatch({type:"CONTEXT_MENU_CLOSE"}),Z(re),d(1))},L=()=>{d(0),He.store.saveZoomValues&&(He.store.zoom=v.current,He.store.size=T.current)},V=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let Me=v.current+re.deltaY/100*(He.store.invertScroll?-1:1)*He.store.zoomSpeed;v.current=Me<=1?1:Me,Z(re)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let Me=T.current+re.deltaY*(He.store.invertScroll?-1:1)*He.store.zoomSpeed;T.current=Me<=50?50:Me,Z(re)}};return nm(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(Ks);N.current=re,re.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(I.current=re.querySelector("video"),I.current.addEventListener("timeupdate",X)),i(!0)}),document.addEventListener("keydown",F),document.addEventListener("keyup",H),document.addEventListener("mousemove",Z),document.addEventListener("mousedown",q),document.addEventListener("mouseup",L),document.addEventListener("wheel",V),()=>{document.removeEventListener("keydown",F),document.removeEventListener("keyup",H),document.removeEventListener("mousemove",Z),document.removeEventListener("mousedown",q),document.removeEventListener("mouseup",L),document.removeEventListener("wheel",V),He.store.saveZoomValues&&(He.store.zoom=v.current,He.store.size=T.current)}},[]),!r)return null;let M=N.current.getBoundingClientRect();return n("div",{className:xN("lens",{"nearest-neighbor":He.store.nearestNeighbour,square:He.store.square}),style:{opacity:p,width:T.current+"px",height:T.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:b,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${M.width*v.current}px`,height:`${M.height*v.current}px`,poster:e.props.src,src:I.current?.src??e.props.src,autoPlay:!0,loop:!0}):n("img",{ref:k,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${M.width*v.current}px`,height:`${M.height*v.current}px`,src:e.props.src,alt:""}))}});var sm,G0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
+ `},async toggleHide(e){let t=await rT();t.delete(e)||t.add(e),await Kk(t),await this.buildCss()}})});var Ym,aT=g(()=>{"use strict";a();P();I();Ym=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[m.botato,m.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function uT(e,t,o,r){return n(ne,{text:t},i=>n("button",{...i,onClick:s=>Xk(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function cT(e,t=!1){let o=to.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?Zk(e,"var(--status-danger)"):Yk(e,t?"var(--green-300)":"var(--primary-400)")}function Xk(e,t){e.stopPropagation();let o=yr().findIndex(r=>r.id===t.id);o===-1?to.store.ignoredActivities=yr().concat(t):to.store.ignoredActivities=yr().filter((r,i)=>i!==o),xi.ShowCurrentGame.updateSetting(r=>r)}function Jk(){return n(fe,{flexDirection:"column"},n(S.FormText,{type:S.FormText.Types.DESCRIPTION},"Import the application id of the CustomRPC plugin to the allowed list"),n("div",null,n(k,{onClick:()=>{let e=G.plugins.CustomRPC?.appID;if(!e)return Mt("CustomRPC application ID is not set.",X.Type.FAILURE);Zm?.(e)&&Mt("CustomRPC application ID is already added.",X.Type.FAILURE)}},"Import CustomRPC ID")))}function Qk(e){let[t,o]=W(to.store.allowedIds??"");Zm=i=>{let s=new Set(t.split(",").map(u=>u.trim()).filter(Boolean)),l=s.has(i)||(s.add(i),!1),c=Array.from(s).join(", ");return o(c),e.setValue(c),l},se(()=>()=>{Zm=null},[]);function r(i){o(i),e.setValue(i)}return n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Allowed List"),n(S.FormText,{className:j.bottom8,type:S.FormText.Types.DESCRIPTION},"Comma separated list of activity IDs to allow (Useful for allowing RPC activities and CustomRPC)"),n(Je,{type:"text",value:t,onChange:r,placeholder:"235834946571337729, 343383572805058560"}))}function yr(){return to.store.ignoredActivities??=[]}function Vk(e,t){if(t&&to.store.allowedIds.includes(t))return!1;switch(e){case 0:return to.store.ignorePlaying;case 1:return to.store.ignoreStreaming;case 2:return to.store.ignoreListening;case 3:return to.store.ignoreWatching;case 5:return to.store.ignoreCompeting}return!1}var lT,Yk,Zk,Zm,to,Xm,pT=g(()=>{"use strict";a();Xo();$();le();Ut();P();ot();I();H();T();lT=Re("RunningGameStore");Yk=(e,t)=>uT(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),Zk=(e,t)=>uT(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);Zm=null;to=N({importCustomRPC:{type:6,description:"",component:()=>n(Jk,null)},allowedIds:{type:6,description:"",default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));to.store.allowedIds=Array.from(t).join(", ")},component:e=>n(Qk,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1}}).withPrivateSettings();Xm=y({name:"IgnoreActivities",authors:[m.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are specifically ignored from the Registered Games and Activities tabs, or use the general settings below.",settings:to,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await dt("IgnoreActivities_ignoredActivities");if(e!=null&&(to.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),pp("IgnoreActivities_ignoredActivities")),yr().length!==0){let t=lT.getGamesSeen();for(let[o,r]of yr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||yr().splice(o,1))}},isActivityNotIgnored(e){if(Vk(e.type,e.application_id))return!1;if(e.application_id!=null)return!yr().some(t=>t.id===e.application_id)||to.store.allowedIds.includes(e.application_id);{let t=lT.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!yr().some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return n(_,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},cT({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(_,{noop:!0},cT({id:e.id,name:e.name,type:1}))}})});var ga,Jm=g(()=>{"use strict";a();ga="vc-imgzoom-magnify-modal"});function Qm(e,t){e()?t():requestAnimationFrame(()=>Qm(e,t))}var dT=g(()=>{"use strict";a()});var eN,Vm,mT=g(()=>{"use strict";a();Qe();T();Jm();ef();dT();eN=ve("vc-imgzoom-"),Vm=({instance:e,size:t,zoom:o})=>{let[r,i]=W(!1),[s,l]=W({x:0,y:0}),[c,u]=W({x:0,y:0}),[p,d]=W(0),h=xt(!1),v=xt(o),b=xt(t),M=xt(null),w=xt(null),C=xt(null),R=xt(null);if(U.useLayoutEffect(()=>{let F=re=>{re.key==="Shift"&&(h.current=!0)},z=re=>{re.key==="Shift"&&(h.current=!1)},Y=()=>{w.current.currentTime=C.current.currentTime},J=re=>{if(e.state.mouseOver&&e.state.mouseDown){let Se=b.current/2,ue={x:re.pageX,y:re.pageY},Ue=-((ue.x-M.current.getBoundingClientRect().left)*v.current-Se),be=-((ue.y-M.current.getBoundingClientRect().top)*v.current-Se);l({x:re.x-Se,y:re.y-Se}),u({x:Ue,y:be}),d(1)}else d(0)},Z=re=>{e.state.mouseOver&&re.button===0&&(v.current=nt.store.zoom,b.current=nt.store.size,document.getElementById("image-context")&&B.dispatch({type:"CONTEXT_MENU_CLOSE"}),J(re),d(1))},O=()=>{d(0),nt.store.saveZoomValues&&(nt.store.zoom=v.current,nt.store.size=b.current)},te=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let Se=v.current+re.deltaY/100*(nt.store.invertScroll?-1:1)*nt.store.zoomSpeed;v.current=Se<=1?1:Se,J(re)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let Se=b.current+re.deltaY*(nt.store.invertScroll?-1:1)*nt.store.zoomSpeed;b.current=Se<=50?50:Se,J(re)}};return Qm(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(ga);M.current=re,re.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(C.current=re.querySelector("video"),C.current.addEventListener("timeupdate",Y)),i(!0)}),document.addEventListener("keydown",F),document.addEventListener("keyup",z),document.addEventListener("mousemove",J),document.addEventListener("mousedown",Z),document.addEventListener("mouseup",O),document.addEventListener("wheel",te),()=>{document.removeEventListener("keydown",F),document.removeEventListener("keyup",z),document.removeEventListener("mousemove",J),document.removeEventListener("mousedown",Z),document.removeEventListener("mouseup",O),document.removeEventListener("wheel",te),nt.store.saveZoomValues&&(nt.store.zoom=v.current,nt.store.size=b.current)}},[]),!r)return null;let A=M.current?.getBoundingClientRect();return A?n("div",{className:eN("lens",{"nearest-neighbor":nt.store.nearestNeighbour,square:nt.store.square}),style:{opacity:p,width:b.current+"px",height:b.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:w,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${A.width*v.current}px`,height:`${A.height*v.current}px`,poster:e.props.src,src:C.current?.src??e.props.src,autoPlay:!0,loop:!0}):n("img",{ref:R,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${A.width*v.current}px`,height:`${A.height*v.current}px`,src:e.props.src,alt:""})):null}});var tf,fT=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
position: absolute;
inset: 0;
z-index: 9999;
@@ -89,6 +105,9 @@ ${Is(r.join(", ")+`
box-shadow: inset 0 0 10px 2px grey;
filter: drop-shadow(0 0 2px grey);
pointer-events: none;
+
+ /* negate the border offsetting the lens */
+ margin: -2px;
}
.vc-imgzoom-square {
@@ -109,10 +128,10 @@ ${Is(r.join(", ")+`
[class*="carouselModal_"] {
height: 0 !important;
}
-`,classNames:{},dom:null});sm="src/plugins/imageZoom/styles.css"});var He,H0,am,im=g(()=>{"use strict";a();Rt();$();rt();ks();A();Nr();w();x();$0();om();G0();He=D({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:$o(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:$o(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:$o(.1,5,.2),default:.5,stickToMarkers:!1}}),H0=e=>()=>{e.push(n(G.MenuGroup,{id:"image-zoom"},n(G.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:He.store.square,action:()=>{He.store.square=!He.store.square,Ut.closeContextMenu()}}),n(G.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:He.store.nearestNeighbour,action:()=>{He.store.nearestNeighbour=!He.store.nearestNeighbour,Ut.closeContextMenu()}}),n(G.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:1,maxValue:50,value:He.store.zoom,onChange:ro(r=>He.store.zoom=r,100)})}),n(G.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:50,maxValue:1e3,value:He.store.size,onChange:ro(r=>He.store.size=r,100)})}),n(G.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,o)=>n(G.MenuSliderControl,{ref:o,...t,minValue:.1,maxValue:5,value:He.store.zoomSpeed,onChange:ro(r=>He.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},am=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[m.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${Ks}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:He,currentMagnifierElement:null,element:null,Magnifier:rm,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===Ks&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(rm,{size:He.store.size,zoom:He.store.zoom,instance:e}),this.root=Tr.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){xt(sm),ue("image-context",H0),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){jt(sm),this.root&&this.root.unmount(),this.element?.remove(),fe("image-context",H0)}})});function wN(e){let t=e?.message?.content,[o,r]=_.useState("password");return n(Ne,{...e},n(Xe,null,n(S.FormTitle,{tag:"h4"},"Decrypt Message")),n(We,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(ot,{defaultValue:t,disabled:!0}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(ot,{style:{marginBottom:"20px"},onChange:r})),n(pt,null,n(C,{color:C.Colors.GREEN,onClick:()=>{let i=lm(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(C,{color:C.Colors.TRANSPARENT,look:C.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function z0(e){we(t=>n(wN,{...t,...e}))}var j0=g(()=>{"use strict";a();nt();x();Fl()});function MN(e){let[t,o]=_.useState(""),[r,i]=_.useState(""),[s,l]=_.useState("password"),[c,u]=_.useState(!1),p=t&&(c||r&&r.trim().split(" ").length>1);return n(Ne,{...e},n(Xe,null,n(S.FormTitle,{tag:"h4"},"Encrypt Message")),n(We,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(ot,{onChange:d=>{o(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(ot,{disabled:c,onChange:d=>{i(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(ot,{style:{marginBottom:"20px"},defaultValue:"password",onChange:d=>{l(d)}}),n(gt,{value:c,onChange:d=>{u(d)}},"Don't use a Cover")),n(pt,null,n(C,{color:C.Colors.GREEN,disabled:!p,onClick:()=>{if(!p)return;let d=K0(t,s,c?"d d":r),h=c?d.replaceAll("d",""):d;!h||(bn(h),e.onClose())}},"Send"),n(C,{color:C.Colors.TRANSPARENT,look:C.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function W0(){we(e=>n(MN,{...e}))}var q0=g(()=>{"use strict";a();ct();nt();x();Fl()});function PN(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function IN(){return n(ee,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function AN(e){return e.type.analyticsName!=="normal"?null:n(ee,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:o})=>n("div",{style:{display:"flex"}},n(C,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:eo.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:St.button,onClick:()=>W0(),style:{padding:"0 2px",scale:"0.9"}},n("div",{className:St.buttonWrapper},n("svg",{"aria-hidden":!0,role:"img",width:"32",height:"32",viewBox:"0 0 64 64",style:{scale:"1.1"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))))))}function K0(e,t,o){return cm.hide(e+"\u200B",t,o)}function lm(e,t,o){let r=cm.reveal(e,t);return o?r.replace("\u200B",""):r}function NN(e){return e.endsWith("\u200B")}async function CN(e){let t=Y0.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r{"use strict";a();jr();$();ae();A();Cl();w();x();j0();q0();Y0=D({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),um=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[m.SammCheese],dependencies:["MessagePopoverAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}},{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),settings:Y0,async start(){let{default:e}=await ZS();cm=new e(!0,!1),zo("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:Q.getChannel(t.channel_id),onClick:async()=>{await CN(t).then(o=>o?void this.buildEmbed(t,o):void z0({message:t}))}}:null)},stop(){jo("invDecrypt")},async getEmbed(e){let{body:t}=await Nt.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{O.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:B.wrap(AN,{noop:!0}),popOverIcon:()=>n(PN,null),indicator:B.wrap(IN,{noop:!0})})});function Z0(e,t){!Q.hasChannel(t)||Do.transitionTo(`/channels/${e??"@me"}/${t}`)}var Ul,wo,pm,X0=g(()=>{"use strict";a();Vo();A();w();x();Ul=!1;pm=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[m.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:Ul}=e)},CONNECTION_OPEN(){!Ul||(Ul=!1,wo?.channelId&&Z0(wo.guildId,wo.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){Ul||(wo={guildId:e,channelId:t},await io("KeepCurrentChannel_previousData",wo))}},async start(){wo=await Dt("KeepCurrentChannel_previousData"),wo?wo.channelId&&Z0(wo.guildId,wo.channelId):(wo={guildId:mo.getGuildId(),channelId:be.getChannelId()??null},await io("KeepCurrentChannel_previousData",wo))}})});async function dm(e){return(await Pr.fetchAssetIds(mm,[e]))[0]}function DN(e){O.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var mm,kN,J0,RN,Mo,fm,Q0=g(()=>{"use strict";a();$();xo();A();Ve();w();j();x();mm="1108588077900898414",kN="2a96cbd8b46e442fc41c2b86b821562f",J0=new ie("LastFMRichPresence"),RN=P("getLocalPresence");Mo=D({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]}}),fm=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[m.dzshn,m.RuiNtD,m.blahajZip,m.archeruwu],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to get an API key"),n(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(qe,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:Mo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!Mo.store.username||!Mo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:Mo.store.apiKey,user:Mo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return J0.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return J0.error("Failed to query Last.fm API",e),null}},async updatePresence(){DN(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(kN))return e.imageUrl;if(Mo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(Mo.store.hideWithSpotify){for(let s of RN.getActivities())if(s.type===2&&s.application_id!==mm)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await dm(t),large_text:e.album||void 0,small_image:await dm("lastfm-small"),small_text:"Last.fm"}:{large_image:await dm("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];Mo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${Mo.store.username}`});let i=(()=>{switch(Mo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;default:return Mo.store.statusName}})();return{application_id:mm,name:i,details:e.name,state:e.artist,assets:o,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:Mo.store.useListeningStatus?2:0,flags:1}}})});var V0,eb,gm,tb=g(()=>{"use strict";a();$();A();w();V0=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],eb=D({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),gm=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[m.Ven,m.KraXen72],settings:eb,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>eb.store.replaceEvents}]}],xor(e){let t="read if cute",o=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...o)},get quote(){return this.xor(V0[Math.floor(Math.random()*V0.length)])}})});function EN(){let{id:e,guild_id:t}=Ye([be],()=>vi()),{groups:o}=Ye([nb],()=>nb.getProps(t,e)),r=Ye([ob],()=>ob.getMemberCount(t));if(r==null)return null;let i=o.length===1&&o[0].id==="unknown"?0:o.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0);return n(ce,{id:"vc-membercount",style:{marginTop:"1em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},n(ee,{text:`${$l(i)} online in this channel`,position:"bottom"},s=>n("div",{...s},n("span",{style:{backgroundColor:"var(--green-360)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),n("span",{style:{color:"var(--green-360)"}},$l(i)))),n(ee,{text:`${$l(r)} total server members`,position:"bottom"},s=>n("div",{...s},n("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--primary-400)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),n("span",{style:{color:"var(--primary-400)"}},$l(r)))))}var ob,nb,LN,$l,hm,rb=g(()=>{"use strict";a();ae();kt();A();ct();w();j();x();ob=Re("GuildMemberCountStore"),nb=Re("ChannelMemberStore"),LN=new Intl.NumberFormat,$l=e=>LN.format(e);hm=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[m.Ven,m.Commandtechno],patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}}],render:B.wrap(EN,{noop:!0})})});var ym,ib,sb,Ys,vm,ab=g(()=>{"use strict";a();on();$();A();w();j();x();ym=!1,ib=e=>e.key==="Backspace"&&(ym=!0),sb=e=>e.key==="Backspace"&&(ym=!1),Ys=D({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),vm=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[m.Ven],dependencies:["MessageEventsAPI"],settings:Ys,start(){let e=P("deleteMessage","startEditMessage"),t=P("isEditing","isEditingAny");document.addEventListener("keydown",ib),document.addEventListener("keyup",sb),this.onClick=Qp((o,r,i)=>{let s=o.author.id===U.getCurrentUser().id;if(ym)Ys.store.enableDeleteOnClick&&(s||_e.can(xe.MANAGE_MESSAGES,r))&&(o.deleted?O.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:o.id,mlDeleted:!0}):e.deleteMessage(r.id,o.id),i.preventDefault());else{if(i.detail<2||Ys.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!_e.can(xe.SEND_MESSAGES,r)||o.deleted===!0)return;if(s){if(!Ys.store.enableDoubleClickToEdit||t.isEditing(r.id,o.id))return;e.startEditMessage(r.id,o.id,o.content),i.preventDefault()}else{if(!Ys.store.enableDoubleClickToReply)return;let l=64;if(o.hasFlag(l))return;O.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:!E.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){Vp(this.onClick),document.removeEventListener("keydown",ib),document.removeEventListener("keyup",sb)}})});var bm={};ze(bm,{_modifyAccessories:()=>_N,accessories:()=>Gl,addAccessory:()=>Zs,removeAccessory:()=>Sm});function Zs(e,t,o){Gl.set(e,{callback:t,position:o})}function Sm(e){Gl.delete(e)}function _N(e,t){for(let o of Gl.values()){let r=o.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(o.position!=null?o.position<0?e.length+o.position:o.position:e.length,0,...r.filter(i=>i!=null))}}return e}var Gl,Hl=g(()=>{"use strict";a();Gl=new Map});async function $N(e,t){let o=Ri.get(t);if(o)return o.message;Ri.set(t,{fetched:!1});let i=(await Nt.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=ko.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Ri.set(s.id,{message:s,fetched:!0}),s}function GN(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!cb.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function HN(e,t){return!e&&!t?"":e?t?`[no content, ${e} attachment${e!==1?"s":""} and ${t} embed${t!==1?"s":""}]`:`[no content, ${e} attachment${e!==1?"s":""}]`:`[no content, ${t} embed${t!==1?"s":""}]`}function zN(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||cb.test(t.url))))}function jN(e,t){if(e>t){let s=Math.min(e,400);return{width:s,height:Math.round(t/(e/s))}}let i=Math.min(t,300);return{width:Math.round(e/(t/i)),height:i}}function WN(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function qN({message:e}){let t=e.vencordEmbeddedBy??[],o=[],r=null;for(;(r=Tm.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=Q.getChannel(l);if(!u||s!=="@me"&&!_e.can(1024n,u))continue;let{listMode:p,idList:d}=zl.store,h=[s,l,e.author.id].some(b=>b&&d.includes(b));if(p==="blacklist"&&h||p==="whitelist"&&!h)continue;let v=Ri.get(c)?.message;if(!v)if(v??=ko.getMessage(l,c),v)Ri.set(c,{message:v,fetched:!0});else{let b={...e};delete b.embeds,delete b.interaction,UN.push(()=>$N(l,c).then(I=>I&&O.dispatch({type:"MESSAGE_UPDATE",message:b})));continue}let T={message:WN(v,[...t,e.id]),channel:u,guildID:s},N=zl.store.automodEmbeds;o.push(N==="always"||N==="prefer"&&!zN(v)?n(YN,{...T}):n(KN,{...T}))}return o.length?n(f,null,o):null}function KN({message:e,channel:t,guildID:o}){let r=o==="@me",i=!r&&de.getGuild(t.guild_id),s=U.getUser(Q.getChannel(t.id).recipients?.[0]);return n(ON,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(J,{variant:"text-xs/medium",tag:"span"},n("span",null,r?"Direct Message - ":i.name+" - "),r?Be.parse(`<@${s.id}>`):Be.parse(`<#${t.id}>`)),iconProxyURL:i?`https://${window.GLOBAL_ENV.CDN_HOST}/icons/${i.id}/${i.icon}.png`:`https://${window.GLOBAL_ENV.CDN_HOST}/avatars/${s.id}/${s.avatar}`}},renderDescription:()=>n("div",{key:e.id,className:te(lb.message,zl.store.messageBackgroundColor&&lb.searchResult)},n(FN,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function YN(e){let{message:t,channel:o,guildID:r}=e,i=Xc.MessageDisplayCompact.useSetting(),s=r==="@me",l=GN(t),{parse:c}=Be;return n(BN,{channel:o,childrenAccessories:n(J,{color:"text-muted",variant:"text-xs/medium",tag:"span"},c(s?`<@${Q.getChannel(o.id).recipients[0]}>`:`<#${o.id}>`),n("span",null,s?" - Direct Message":" - "+de.getGuild(o.guild_id)?.name)),compact:i,content:n(f,null,t.content||t.attachments.length<=l.length?c(t.content):[HN(t.attachments.length,t.embeds.length)],l.map(u=>{let{width:p,height:d}=jN(u.width,u.height);return n("div",null,n("img",{src:u.url,width:p,height:d}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Ri,ON,BN,FN,lb,Tm,cb,UN,zl,xm,ub=g(()=>{"use strict";a();Hl();$();ae();A();Pe();ci();w();j();x();Ri=new Map,ON=je(".inlineMediaEmbed"),BN=je(".withFooter]:","childrenMessageContent:"),FN=je("renderSimpleAccessories)"),lb=P("message","searchResult"),Tm=/(?n(C,{onClick:()=>Ri.clear()},"Clear the linked message cache")}});xm=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[m.TheSun,m.Ven,m.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:zl,start(){Zs("messageLinkEmbed",e=>Tm.test(e.message.content)?(Tm.lastIndex=0,n(B,null,n(qN,{message:e.message}))):null,4)}})});var pb=g(()=>{});var wm,db=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
+`,classNames:{},dom:null});tf="src/plugins/imageZoom/styles.css"});var nt,tN,of,ef=g(()=>{"use strict";a();$();Qe();Xs();zr();P();I();T();mT();Jm();fT();nt=N({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:en(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:en(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:en(.1,5,.2),default:.5,stickToMarkers:!1}}),tN=e=>{let{square:t,nearestNeighbour:o}=nt.use(["square","nearestNeighbour"]);e.push(n(L.MenuGroup,{id:"image-zoom"},n(L.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:t,action:()=>{nt.store.square=!t}}),n(L.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:o,action:()=>{nt.store.nearestNeighbour=!o}}),n(L.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(r,i)=>n(L.MenuSliderControl,{ref:i,...r,minValue:1,maxValue:50,value:nt.store.zoom,onChange:lo(s=>nt.store.zoom=s,100)})}),n(L.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(r,i)=>n(L.MenuSliderControl,{ref:i,...r,minValue:50,maxValue:1e3,value:nt.store.size,onChange:lo(s=>nt.store.size=s,100)})}),n(L.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(r,i)=>n(L.MenuSliderControl,{ref:i,...r,minValue:.1,maxValue:5,value:nt.store.zoomSpeed,onChange:lo(s=>nt.store.zoomSpeed=s,100),renderValue:s=>`${s.toFixed(3)}x`})})))},of=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[m.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${ga}',`}},{find:"handleImageLoad=",replacement:[{match:/placeholderVersion:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:nt,contextMenus:{"image-context":tN},currentMagnifierElement:null,element:null,Magnifier:Vm,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===ga&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(Vm,{size:nt.store.size,zoom:nt.store.zoom,instance:e}),this.root=Or.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){Nt(tf),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Xt(tf),this.root&&this.root.unmount(),this.element?.remove()}})});var gT=g(()=>{});var sf={};qe(sf,{ChatBarButton:()=>xo,_injectButtons:()=>nN,addChatBarButton:()=>wo,removeChatBarButton:()=>nn});function nN(e,t){if(!t.disabled)for(let[o,r]of rf)e.push(n(_,{noop:!0,key:o,onError:i=>oN.error(`Failed to render ${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var nf,rf,oN,wo,nn,xo,En=g(()=>{"use strict";a();gT();le();Ke();H();T();gt(["buttonContainer","channelTextArea"],e=>nf=e);rf=new Map,oN=new oe("ChatButtons");wo=(e,t)=>rf.set(e,t),nn=e=>rf.delete(e),xo=_.wrap(e=>n(ne,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("div",{className:`expression-picker-chat-input-button ${nf?.buttonContainer??""} vc-chatbar-button`},n(k,{"aria-label":e.tooltip,size:"",look:sl.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${ol.button} ${nf?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,...e.buttonProps},n("div",{className:ol.buttonWrapper},e.children)))),{noop:!0})});function rN(e){let t=e?.message?.content,[o,r]=U.useState("password");return n(ye,{...e},n(Le,null,n(S.FormTitle,{tag:"h4"},"Decrypt Message")),n(ke,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(Je,{defaultValue:t,disabled:!0}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(Je,{style:{marginBottom:"20px"},onChange:r})),n(ct,null,n(k,{color:k.Colors.GREEN,onClick:()=>{let i=af(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(k,{color:k.Colors.TRANSPARENT,look:k.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function hT(e){de(t=>n(rN,{...t,...e}))}var yT=g(()=>{"use strict";a();Ze();T();hc()});function iN(e){let[t,o]=U.useState(""),[r,i]=U.useState(""),[s,l]=U.useState("password"),[c,u]=U.useState(!1),p=t&&(c||r&&r.trim().split(" ").length>1);return n(ye,{...e},n(Le,null,n(S.FormTitle,{tag:"h4"},"Encrypt Message")),n(ke,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(Je,{onChange:d=>{o(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(Je,{disabled:c,onChange:d=>{i(d)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(Je,{style:{marginBottom:"20px"},defaultValue:"password",onChange:d=>{l(d)}}),n(wt,{value:c,onChange:d=>{u(d)}},"Don't use a Cover")),n(ct,null,n(k,{color:k.Colors.GREEN,disabled:!p,onClick:()=>{if(!p)return;let d=bT(t,s,c?"d d":r),h=c?d.replaceAll("d",""):d;!h||(kn(h),e.onClose())}},"Send"),n(k,{color:k.Colors.TRANSPARENT,look:k.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function vT(){de(e=>n(iN,{...e}))}var ST=g(()=>{"use strict";a();mt();Ze();T();hc()});function sN(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function aN(){return n(ne,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function bT(e,t,o){return lf.hide(e+"\u200B",t,o)}function af(e,t,o){let r=lf.reveal(e,t);return o?r.replace("\u200B",""):r}function cN(e){return e.endsWith("\u200B")}async function uN(e){let t=TT.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r{"use strict";a();En();li();$();le();P();sc();I();T();yT();ST();lN=({isMainChat:e})=>e?n(xo,{tooltip:"Encrypt Message",onClick:()=>vT(),buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":!0,role:"img",width:"24",height:"24",viewBox:"0 0 64 64",style:{scale:"1.39",translate:"0 -1px"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))):null,TT=N({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),cf=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[m.SammCheese],dependencies:["MessagePopoverAPI","ChatInputButtonAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),settings:TT,async start(){on("InvisibleChat",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:ee.getChannel(t.channel_id),onClick:async()=>{await uN(t).then(o=>o?void this.buildEmbed(t,o):void hT({message:t}))}}:null),wo("InvisibleChat",lN);let{default:e}=await gb();lf=new e(!0,!1)},stop(){Oo("InvisibleChat"),Oo("InvisibleChat")},async getEmbed(e){let{body:t}=await _t.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{B.dispatch({type:"MESSAGE_UPDATE",message:e})},popOverIcon:()=>n(sN,null),indicator:_.wrap(aN,{noop:!0})})});function wT(e,t){!ee.hasChannel(t)||qo.transitionTo(`/channels/${e??"@me"}/${t}`)}var yc,_o,uf,xT=g(()=>{"use strict";a();Xo();P();I();T();yc=!1;uf=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[m.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:yc}=e)},CONNECTION_OPEN(){!yc||(yc=!1,_o?.channelId&&wT(_o.guildId,_o.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){yc||(_o={guildId:e,channelId:t},await kt("KeepCurrentChannel_previousData",_o))}},async start(){_o=await dt("KeepCurrentChannel_previousData"),_o?_o.channelId&&wT(_o.guildId,_o.channelId):(_o={guildId:yo.getGuildId(),channelId:Ie.getChannelId()??null},await kt("KeepCurrentChannel_previousData",_o))}})});async function pf(e){return(await Ur.fetchAssetIds(df,[e]))[0]}function mN(e){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var df,pN,MT,dN,Mo,mf,IT=g(()=>{"use strict";a();$();To();P();Ke();I();H();T();df="1108588077900898414",pN="2a96cbd8b46e442fc41c2b86b821562f",MT=new oe("LastFMRichPresence"),dN=x("getLocalPresence");Mo=N({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]},showLastFmLogo:{description:"show the Last.fm logo by the album cover",type:3,default:!0}}),mf=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[m.dzshn,m.RuiNtD,m.blahajZip,m.archeruwu],settingsAboutComponent:()=>n(f,null,n(S.FormTitle,{tag:"h3"},"How to get an API key"),n(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(je,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:Mo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!Mo.store.username||!Mo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:Mo.store.apiKey,user:Mo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return MT.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return MT.error("Failed to query Last.fm API",e),null}},async updatePresence(){mN(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(pN))return e.imageUrl;if(Mo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(Mo.store.hideWithSpotify){for(let s of dN.getActivities())if(s.type===2&&s.application_id!==df)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await pf(t),large_text:e.album||void 0,...Mo.store.showLastFmLogo&&{small_image:await pf("lastfm-small"),small_text:"Last.fm"}}:{large_image:await pf("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];Mo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${Mo.store.username}`});let i=(()=>{switch(Mo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;default:return Mo.store.statusName}})();return{application_id:df,name:i,details:e.name,state:e.artist,assets:o,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:Mo.store.useListeningStatus?2:0,flags:1}}})});var PT,AT,ff,CT=g(()=>{"use strict";a();$();P();I();PT=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],AT=N({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),ff=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[m.Ven,m.KraXen72],settings:AT,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>AT.store.replaceEvents}]}],xor(e){let t="read if cute",o=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...o)},get quote(){return this.xor(PT[Math.floor(Math.random()*PT.length)])}})});var RT=g(()=>{});var vc,kT=g(()=>{"use strict";a();Uo();we();Wr();T();vc=Ot(()=>{let e=new vo,t=new Map;class o extends xs.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await Ms.preload(i,wn.getDefaultChannel(i).id)}ensureCount(i){t.has(i)||e.push(()=>this._ensureCount(i).then(()=>Ko(200),()=>Ko(200)))}}return new o(B,{GUILD_MEMBER_LIST_UPDATE({guildId:r,groups:i}){t.set(r,i.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0))},ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId:r,count:i}){t.set(r,i)}})})});function yf({isTooltip:e,tooltipGuildId:t}){let o=Be([Ie],()=>Bi()),r=e?t:o.guild_id,i=Be([gf],()=>gf.getMemberCount(r)),s=Be([vc],()=>vc.getCount(r)),{groups:l}=Be([hf],()=>hf.getProps(r,o?.id));if(!e&&(l.length>=1||l[0].id!=="unknown")&&(s=l.reduce((u,p)=>u+(p.id==="offline"?0:p.count),0)),se(()=>{vc.ensureCount(r)},[r]),i==null)return null;let c=s!=null?Sc(s):"?";return n("div",{className:Xi("widget",{tooltip:e,"member-list":!e})},n(ne,{text:`${c} online in this channel`,position:"bottom"},u=>n("div",{...u},n("span",{className:Xi("online-dot")}),n("span",{className:Xi("online")},c))),n(ne,{text:`${Sc(i)} total server members`,position:"bottom"},u=>n("div",{...u},n("span",{className:Xi("total-dot")}),n("span",{className:Xi("total")},Sc(i)))))}var NT=g(()=>{"use strict";a();mt();T();vf();kT()});var gf,hf,Sf,fN,Sc,Xi,bf,vf=g(()=>{"use strict";a();RT();$();Qe();le();P();I();H();NT();gf=Re("GuildMemberCountStore"),hf=Re("ChannelMemberStore"),Sf=N({toolTip:{type:3,description:"If the member count should be displayed on the server tooltip",default:!0,restartNeeded:!0},memberList:{type:3,description:"If the member count should be displayed on the member list",default:!0,restartNeeded:!0}}),fN=new Intl.NumberFormat,Sc=e=>fN.format(e),Xi=ve("vc-membercount-"),bf=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[m.Ven,m.Commandtechno],settings:Sf,patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"},predicate:()=>Sf.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/(?<=\.VIEW_AS_ROLES_MENTIONS_WARNING.{0,100})]/,replace:",$self.renderTooltip(arguments[0].guild)]"},predicate:()=>Sf.store.toolTip}],render:_.wrap(yf,{noop:!0}),renderTooltip:_.wrap(e=>n(yf,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var Tf,DT,LT,ha,wf,ET=g(()=>{"use strict";a();gn();$();P();I();H();T();Tf=!1,DT=e=>e.key==="Backspace"&&(Tf=!0),LT=e=>e.key==="Backspace"&&(Tf=!1),ha=N({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),wf=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[m.Ven],dependencies:["MessageEventsAPI"],settings:ha,start(){let e=x("deleteMessage","startEditMessage"),t=x("isEditing","isEditingAny");document.addEventListener("keydown",DT),document.addEventListener("keyup",LT),this.onClick=Hd((o,r,i)=>{let s=o.author.id===E.getCurrentUser().id;if(Tf)ha.store.enableDeleteOnClick&&(s||_e.can(me.MANAGE_MESSAGES,r))&&(o.deleted?B.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:o.id,mlDeleted:!0}):e.deleteMessage(r.id,o.id),i.preventDefault());else{if(i.detail<2||ha.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!_e.can(me.SEND_MESSAGES,r)||o.deleted===!0)return;if(s){if(!ha.store.enableDoubleClickToEdit||t.isEditing(r.id,o.id))return;e.startEditMessage(r.id,o.id,o.content),i.preventDefault()}else{if(!ha.store.enableDoubleClickToReply)return;let l=64;if(o.hasFlag(l))return;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:!G.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){zd(this.onClick),document.removeEventListener("keydown",DT),document.removeEventListener("keyup",LT)}})});var Mf={};qe(Mf,{_modifyAccessories:()=>gN,accessories:()=>bc,addAccessory:()=>ya,removeAccessory:()=>xf});function ya(e,t,o){bc.set(e,{callback:t,position:o})}function xf(e){bc.delete(e)}function gN(e,t){for(let o of bc.values()){let r=o.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(o.position!=null?o.position<0?e.length+o.position:o.position:e.length,0,...r.filter(i=>i!=null))}}return e}var bc,Tc=g(()=>{"use strict";a();bc=new Map});async function bN(e,t){let o=Ji.get(t);if(o)return o.message;Ji.set(t,{fetched:!1});let i=(await _t.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=zo.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Ji.set(s.id,{message:s,fetched:!0}),s}function TN(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!_T.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function wN(e,t){return!e&&!t?"":e?t?`[no content, ${e} attachment${e!==1?"s":""} and ${t} embed${t!==1?"s":""}]`:`[no content, ${e} attachment${e!==1?"s":""}]`:`[no content, ${t} embed${t!==1?"s":""}]`}function xN(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||_T.test(t.url))))}function MN(e,t){if(e>t){let s=Math.min(e,400);return{width:s,height:Math.round(t/(e/s))}}let i=Math.min(t,300);return{width:Math.round(e/(t/i)),height:i}}function IN(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function PN({message:e}){let t=e.vencordEmbeddedBy??[],o=[],r=null;for(;(r=Pf.exec(e.content))!==null;){let[i,s,l]=r;if(t.includes(l))continue;let c=ee.getChannel(s);if(!c||!c.isPrivate()&&!_e.can(me.VIEW_CHANNEL,c))continue;let{listMode:u,idList:p}=wc.store,d=[c.guild_id,s,e.author.id].some(M=>M&&p.includes(M));if(u==="blacklist"&&d||u==="whitelist"&&!d)continue;let h=Ji.get(l)?.message;if(!h)if(h??=zo.getMessage(s,l),h)Ji.set(l,{message:h,fetched:!0});else{let M={...e};delete M.embeds,delete M.interaction,SN.unshift(()=>bN(s,l).then(w=>w&&B.dispatch({type:"MESSAGE_UPDATE",message:M})));continue}let v={message:IN(h,[...t,e.id]),channel:c},b=wc.store.automodEmbeds;o.push(b==="always"||b==="prefer"&&!xN(h)?n(CN,{...v}):n(AN,{...v}))}return o.length?n(f,null,o):null}function BT(e){return e.isDM()?["Direct Message",Gt.getUserAvatarURL(E.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",Gt.getChannelIconURL(e)]:["Server",Gt.getGuildIconURL(ae.getGuild(e.guild_id))]}function AN({message:e,channel:t}){let o=E.getUser(ee.getChannel(t.id).recipients?.[0]),[r,i]=BT(t);return n(hN,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(V,{variant:"text-xs/medium",tag:"span"},n("span",null,r," - "),Pe.parse(t.isDM()?`<@${o.id}>`:`<#${t.id}>`)),iconProxyURL:i}},renderDescription:()=>n("div",{key:e.id,className:Q(OT.message,wc.store.messageBackgroundColor&&OT.searchResult)},n(vN,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function CN(e){let{message:t,channel:o}=e,r=Ts.MessageDisplayCompact.useSetting(),i=TN(t),{parse:s}=Pe,[l,c]=BT(o);return n(yN,{channel:o,childrenAccessories:n(V,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${If.embedAuthor} ${If.embedMargin}`},c&&n("img",{src:c,className:If.embedAuthorIcon,alt:""}),n("span",null,n("span",null,l," - "),o.isDM()?Pe.parse(`<@${ee.getChannel(o.id).recipients[0]}>`):Pe.parse(`<#${o.id}>`))),compact:r,content:n(f,null,t.content||t.attachments.length<=i.length?s(t.content):[wN(t.attachments.length,t.embeds.length)],i.map(u=>{let{width:p,height:d}=MN(u.width,u.height);return n("div",null,n("img",{src:u.url,width:p,height:d}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Ji,hN,yN,vN,OT,If,Pf,_T,SN,wc,Af,FT=g(()=>{"use strict";a();Tc();$();le();P();we();Wr();I();H();T();Ji=new Map,hN=Ne(".inlineMediaEmbed"),yN=Ne(".withFooter]:","childrenMessageContent:"),vN=Ne("renderSimpleAccessories)"),OT=x("message","searchResult"),If=x("embedAuthorIcon","embedAuthor","embedAuthor"),Pf=/(?n(k,{onClick:()=>Ji.clear()},"Clear the linked message cache")}});Af=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[m.TheSun,m.Ven,m.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:wc,start(){ya("messageLinkEmbed",e=>Pf.test(e.message.content)?(Pf.lastIndex=0,n(_,null,n(PN,{message:e.message}))):null,4)}})});var UT=g(()=>{});var Cf,$T=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
background-color: rgba(240 71 71 / 15%) !important;
}
-`,classNames:{},dom:null});wm="src/plugins/messageLogger/deleteStyleOverlay.css"});var Mm,mb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
+`,classNames:{},dom:null});Cf="src/plugins/messageLogger/deleteStyleOverlay.css"});var Rf,GT=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
.messagelogger-deleted [class*="contents"] > :is(div, h1, h2, h3, p) {
color: #f04747 !important;
}
@@ -131,15 +150,15 @@ ${Is(r.join(", ")+`
color: #be3535 !important;
text-decoration: underline;
}
-`,classNames:{},dom:null});Mm="src/plugins/messageLogger/deleteStyleText.css"});function fb(){E.plugins.MessageLogger.deleteStyle==="text"?(xt(Mm),jt(wm)):(jt(Mm),xt(wm))}var ZN,gb,hb,yb,Pm,vb=g(()=>{"use strict";a();pb();Rt();$();rt();ae();A();Ve();w();j();x();db();mb();ZN=P("edited","communicationDisabled","isSystemMessage");gb="ml-remove-history",hb="ml-toggle-style",yb=(e,t)=>()=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(n(G.MenuItem,{id:hb,key:hb,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(G.MenuItem,{id:gb,key:gb,label:"Remove Message History",color:"danger",action:()=>{r?O.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))},Pm=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[m.rushii,m.Ven,m.AutumnVN],start(){fb(),ue("message",yb)},stop(){fe("message",yb)},renderEdit(e){return n(B,{noop:!0},n("div",{className:"messagelogger-edited"},Be.parse(e.content),n(Yo,{timestamp:e.timestamp,isEdited:!0,isInline:!1},n("span",{className:ZN.edited}," ","(",et.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:yo?.call(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>fb()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(p=>(p.deleted=!0,p))))};o?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:o,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=E.plugins.MessageLogger,l=U.getCurrentUser().id;return t&&e.author?.bot||o&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(Q.getChannel(e.channel_id)?.parent_id)||s.includes(Q.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeAttachmentHoverButton",group:!0,replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {deleted},"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (arguments[0].message.editHistory?.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function Sb(e){yi({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await jl(e.name)?(E.plugins.MessageTags.clyde&&me(o.channel.id,{content:`${ir} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
-`)}):(me(o.channel.id,{content:`${ir} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[XN]:!0},"CustomTags")}var ir,ql,XN,Wl,jl,JN,QN,Im,bb=g(()=>{"use strict";a();ao();Vo();$();A();w();ir="<:luna:1035316192220553236>",ql="MessageTags_TAGS",XN=Symbol("MessageTags"),Wl=()=>Dt(ql).then(e=>e??[]),jl=e=>Dt(ql).then(t=>(t??[]).find(o=>o.name===e)??null),JN=async e=>{let t=await Wl();return t.push(e),io(ql,t),t},QN=async e=>{let t=await Wl();return t=await t.filter(o=>o.name!==e),io(ql,t),t};Im=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[m.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await Wl())Sb(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=lt(e[0].options,"tag-name",""),r=lt(e[0].options,"message","");if(await jl(o))return me(t.channel.id,{content:`${ir} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};Sb(i),await JN(i),me(t.channel.id,{content:`${ir} Successfully created the tag **${o}**!`});break}case"delete":{let o=lt(e[0].options,"tag-name","");if(!await jl(o))return me(t.channel.id,{content:`${ir} A Tag with the name **${o}** does not exist!`});Cs(o),await QN(o),me(t.channel.id,{content:`${ir} Successfully deleted the tag **${o}**!`});break}case"list":{me(t.channel.id,{embeds:[{title:"All Tags:",description:(await Wl()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
-`)||`${ir} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=lt(e[0].options,"tag-name",""),r=await jl(o);if(!r)return me(t.channel.id,{content:`${ir} A Tag with the name **${o}** does not exist!`});me(t.channel.id,{content:r.message.replaceAll("\\n",`
-`)});break}default:{me(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function VN(e){let t="";for(let o=0;o{"use strict";a();ao();A();w();Am=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[m.Arjix,m.echo,m.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[Xn],inputType:3,execute:(e,t)=>{let o=lt(e,"message","");me(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[Xn],execute:e=>({content:lt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ns],execute:e=>({content:VN(lt(e,"message",""))})}]})});var Nm,xb=g(()=>{"use strict";a();ao();A();w();Nm=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[m.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[Xn],execute:t=>({content:lt(t,"message","")+e.description})}))})});function tC(e){sr.store.tagSettings??=Cm;let[t,o]=Y(sr.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(ce,{flexDirection:"column"},Di.map(i=>n(At,{style:{padding:"1em 1em 0"}},n(S.FormTitle,{style:{width:"fit-content"}},n(ee,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>n("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",n(Mn,{type:Mn.Types[i.name]})))),n(ot,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:z.bottom16}),n(gt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),n(gt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var eC,Mn,wb,Di,Cm,sr,km,Mb=g(()=>{"use strict";a();$();kt();A();it();w();j();x();eC=P("computePermissions","canEveryoneRole"),Mn=Vt(e=>e.Types?.[0]==="BOT"),wb=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),Di=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:wb},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>de.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],Cm=Object.fromEntries(Di.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));sr=D({dontShowForBots:{description:"Don't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:tC,description:"fill me"}}),km=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[m.Cyn,m.TheSun,m.RyanCaoDev,m.LordElias,m.AutumnVN],settings:sr,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,o,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${o}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?\i)=\(null==.{0,100}\.BOT;return null!=(?\i)&&\i\.bot/,replace:"$ = $self.getTag({user: $, channel: arguments[0].channel, origType: $.bot ? 0 : null, location: 'not-chat' }); return typeof $ === 'number'"}},{find:".hasAvatarForGuild(null==",replacement:{match:/(?=usernameIcon:)/,replace:"moreTags_channelId:arguments[0].channelId,"}},{find:'copyMetaData:"User Tag"',replacement:{match:/(?=,botClass:)/,replace:",moreTags_channelId:arguments[0].moreTags_channelId"}},{find:",overrideDiscriminator:",replacement:[{match:/user:\i,nick:\i,/,replace:"$&moreTags_channelId,"},{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"}]}],start(){if(!sr.store.tagSettings)if(!sr.store.visibility_WEBHOOK)sr.store.tagSettings=Cm;else{let e={...Cm};Object.entries(Vencord.PlainSettings.plugins.MoreUserTags).forEach(([t,o])=>{let[r,i]=t.split("_");if(r==="visibility")switch(o){case"always":break;case"chat":e[i].showInNotChat=!1;break;case"not-chat":e[i].showInChat=!1;break;case"never":e[i].showInChat=!1,e[i].showInNotChat=!1;break}sr.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let o=de.getGuild(t?.guild_id);if(!o)return[];let r=eC.computePermissions({user:e,context:o,overwrites:t.permissionOverwrites});return Object.entries(xe).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return Di.forEach(({name:o})=>{e[o]=++t,e[t]=o,e[`${o}-BOT`]=++t,e[t]=`${o}-BOT`,e[`${o}-OP`]=++t,e[t]=`${o}-OP`}),e},isOPTag:e=>e===Mn.Types.ORIGINAL_POSTER||Di.some(t=>e===Mn.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[o,r]=e.split("-"),i=Di.find(({name:l})=>o===l);if(!i||r==="BOT"&&o!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=sr.store.tagSettings?.[i.name]?.text||i.displayName;switch(r){case"OP":return`${t.BOT_TAG_FORUM_ORIGINAL_POSTER} \u2022 ${s}`;case"BOT":return`${t.BOT_TAG_BOT} \u2022 ${s}`;default:return s}},getTag({message:e,user:t,channelId:o,origType:r,location:i,channel:s}){if(!t)return null;if(i==="chat"&&t.id==="1")return Mn.Types.OFFICIAL;if(t.isClyde())return Mn.Types.AI;let l=typeof r=="number"?r:null;if(s??=Q.getChannel(o),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let p of Di)if(!(i==="chat"&&!c.tagSettings[p.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[p.name].showInNotChat)&&(p.permissions?.some(d=>u.includes(d))||p.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=Mn.Types[`${p.name}-OP`]:t.bot&&!wb(e,t)&&!c.dontShowBotTag?l=Mn.Types[`${p.name}-BOT`]:l=Mn.Types[p.name];break}return l}})});function rC(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function iC(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function aC(e){let t=rC(e,Dm)+iC(e,sC);return Math.min(t,10)}function Rm(){if(!ar.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=ar.store.quality==="HD"?nC:oC,e.volume=ar.store.volume,e.play()}var Dm,oC,nC,ar,Lm,sC,Pb=g(()=>{"use strict";a();$();fp();A();Pe();w();x();Dm="\u{1F5FF}",oC="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",nC="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",ar=D({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:$o(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),Lm=y({name:"Moyai",authors:[m.Megu,m.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:ar,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||ar.store.ignoreBots&&o.author?.bot||ar.store.ignoreBlocked&&st.isBlocked(o.author?.id)||!o.content||r!==be.getChannelId())return;let i=aC(o.content);for(let s=0;s/gi});var lC,Kl,Em,Ib=g(()=>{"use strict";a();$();A();w();j();({updateGuildNotificationSettings:lC}=P("updateGuildNotificationSettings")),Kl=D({guild:{description:"Mute Guild",type:3,default:!0},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0}}),Em=y({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[m.Glitch,m.Nuckyz,m.carince],patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,o)=>`${e}if(!${o})$self.handleMute(${t});`}}],settings:Kl,handleMute(e){e==="@me"||e==="null"||e==null||lC(e,{muted:Kl.store.guild,suppress_everyone:Kl.store.everyone,suppress_roles:Kl.store.role})}})});function mC(e){return e.name||e.recipients.map(U.getUser).filter(ud).map(t=>st.getNickname(t.id)||pC.getName(t)).join(", ")}var cC,uC,pC,lr,dC,_m,Ab=g(()=>{"use strict";a();A();vl();w();j();x();cC=P("selectPrivateChannel"),uC=P("getChannelIconURL"),pC=P("getGlobalName"),lr=P("emptyIconFriends","emptyIconGuilds"),dC=P("guildNick","guildAvatarWithoutIcon");_m=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[m.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'($1||arguments[0].isCurrentUser)?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".UserProfileSections.USER_INFO_CONNECTIONS:",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}}],renderMutualGDMs(e,t){let o=Q.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>n(ei,{className:lr.listRow,onClick:()=>{t(),cC.selectPrivateChannel(r.id)}},n(ti,{src:uC.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:lr.listAvatar}),n("div",{className:lr.listRowContent},n("div",{className:lr.listName},mC(r)),n("div",{className:dC.guildNick},r.recipients.length+1," Members"))));return n(Vr,{className:lr.listScroller,fade:!0,onClose:t},o.length>0?o:n("div",{className:lr.empty},n("div",{className:lr.emptyIconFriends}),n("div",{className:lr.emptyText},"No group dms in common")))}})});var fC,Om,Nb=g(()=>{"use strict";a();$();A();w();j();fC=P("getRelationships","isBlocked"),Om=y({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[m.rushii,m.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>E.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,o)=>`if($self.isBlocked(${o}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>fC.isBlocked(e.author.id)})});var Bm,Cb=g(()=>{"use strict";a();A();w();Bm=y({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[m.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var Fm,kb=g(()=>{"use strict";a();A();w();Fm=y({name:"NoF1",description:"Disables F1 help bind.",authors:[m.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Um,Rb=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/noMosaic/styles.css",{name:"src/plugins/noMosaic/styles.css",source:`[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] {
+`,classNames:{},dom:null});Rf="src/plugins/messageLogger/deleteStyleText.css"});function HT(){G.plugins.MessageLogger.deleteStyle==="text"?(Nt(Rf),Xt(Cf)):(Xt(Rf),Nt(Cf))}var RN,zT,jT,kN,kf,WT=g(()=>{"use strict";a();UT();$();Qe();le();P();Ke();I();H();T();$T();GT();RN=x("edited","communicationDisabled","isSystemMessage");zT="ml-remove-history",jT="ml-toggle-style",kN=(e,t)=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(n(L.MenuItem,{id:jT,key:jT,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(L.MenuItem,{id:zT,key:zT,label:"Remove Message History",color:"danger",action:()=>{r?B.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))},kf=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[m.rushii,m.Ven,m.AutumnVN],contextMenus:{message:kN},start(){HT()},renderEdit(e){return n(_,{noop:!0},n("div",{className:"messagelogger-edited"},Pe.parse(e.content),n(Po,{timestamp:e.timestamp,isEdited:!0,isInline:!1},n("span",{className:RN.edited}," ","(",Ye.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:new Date(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>HT()},logDeletes:{type:3,description:"Whether to log deleted messages",default:!0},logEdits:{type:3,description:"Whether to log edited messages",default:!0},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(p=>(p.deleted=!0,p))))};o?t.ids.forEach(r):r(t.id)}catch(r){new oe("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e,t=!1){let{ignoreBots:o,ignoreSelf:r,ignoreUsers:i,ignoreChannels:s,ignoreGuilds:l,logEdits:c,logDeletes:u}=G.plugins.MessageLogger,p=E.getCurrentUser().id;return o&&e.author?.bot||r&&e.author?.id===p||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(ee.getChannel(e.channel_id)?.parent_id)||(t?!c:!u)||l.includes(ee.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message, true)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeAttachmentHoverButton",group:!0,replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {deleted},"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (arguments[0].message.editHistory?.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function qT(e){_i({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await xc(e.name)?(G.plugins.MessageTags.clyde&&ge(o.channel.id,{content:`${vr} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
+`)}):(ge(o.channel.id,{content:`${vr} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[NN]:!0},"CustomTags")}var vr,Ic,NN,Mc,xc,DN,LN,Nf,KT=g(()=>{"use strict";a();uo();Xo();$();P();I();vr="<:luna:1035316192220553236>",Ic="MessageTags_TAGS",NN=Symbol("MessageTags"),Mc=()=>dt(Ic).then(e=>e??[]),xc=e=>dt(Ic).then(t=>(t??[]).find(o=>o.name===e)??null),DN=async e=>{let t=await Mc();return t.push(e),kt(Ic,t),t},LN=async e=>{let t=await Mc();return t=await t.filter(o=>o.name!==e),kt(Ic,t),t};Nf=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[m.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await Mc())qT(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=ht(e[0].options,"tag-name",""),r=ht(e[0].options,"message","");if(await xc(o))return ge(t.channel.id,{content:`${vr} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};qT(i),await DN(i),ge(t.channel.id,{content:`${vr} Successfully created the tag **${o}**!`});break}case"delete":{let o=ht(e[0].options,"tag-name","");if(!await xc(o))return ge(t.channel.id,{content:`${vr} A Tag with the name **${o}** does not exist!`});Zs(o),await LN(o),ge(t.channel.id,{content:`${vr} Successfully deleted the tag **${o}**!`});break}case"list":{ge(t.channel.id,{embeds:[{title:"All Tags:",description:(await Mc()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
+`)||`${vr} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=ht(e[0].options,"tag-name",""),r=await xc(o);if(!r)return ge(t.channel.id,{content:`${vr} A Tag with the name **${o}** does not exist!`});ge(t.channel.id,{content:r.message.replaceAll("\\n",`
+`)});break}default:{ge(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function EN(e){let t="";for(let o=0;o{"use strict";a();uo();P();I();Df=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[m.Arjix,m.echo,m.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[cr],inputType:3,execute:(e,t)=>{let o=ht(e,"message","");ge(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[cr],execute:e=>({content:ht(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ys],execute:e=>({content:EN(ht(e,"message",""))})}]})});var Lf,ZT=g(()=>{"use strict";a();uo();P();I();Lf=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[m.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[cr],execute:t=>({content:ht(t,"message","")+e.description})}))})});function _N(e){Sr.store.tagSettings??=Ef;let[t,o]=W(Sr.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(fe,{flexDirection:"column"},Qi.map(i=>n(Tt,{style:{padding:"1em 1em 0"}},n(S.FormTitle,{style:{width:"fit-content"}},n(ne,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>n("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",n(On,{type:On.Types[i.name]})))),n(Je,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:j.bottom16}),n(wt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),n(wt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var ON,On,XT,Qi,Ef,Sr,Of,JT=g(()=>{"use strict";a();$();Ut();P();ot();I();H();T();ON=x("computePermissions","canEveryoneRole"),On=so(e=>e.Types?.[0]==="BOT"),XT=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),Qi=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:XT},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>ae.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],Ef=Object.fromEntries(Qi.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));Sr=N({dontShowForBots:{description:"Don't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:_N,description:"fill me"}}),Of=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[m.Cyn,m.TheSun,m.RyanCaoDev,m.LordElias,m.AutumnVN],settings:Sr,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=.{0,40}(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,o,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${o}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?\i)=\(null==.{0,100}\.BOT;return null!=(?\i)&&\i\.bot/,replace:"$ = $self.getTag({user: $, channel: arguments[0].channel, origType: $