// ==UserScript== // @name Vencord // @description A Discord client mod - Web version // @version 1.7.8.1713992796777 // @author Vendicated (https://github.com/Vendicated) // @namespace https://github.com/Vendicated/Vencord // @supportURL https://github.com/Vendicated/Vencord // @license GPL-3.0 // @match *://*.discord.com/* // @grant GM_xmlhttpRequest // @run-at document-start // @compatible chrome Chrome + Tampermonkey or Violentmonkey // @compatible firefox Firefox Tampermonkey // @compatible opera Opera + Tampermonkey or Violentmonkey // @compatible edge Edge + Tampermonkey or Violentmonkey // @compatible safari Safari + Tampermonkey or Violentmonkey // ==/UserScript== // this UserScript DOES NOT work on Firefox with Violentmonkey or Greasemonkey due to a bug that makes it impossible // to overwrite stuff on the window on sites that use CSP. Use Tampermonkey or use a chromium based browser // https://github.com/violentmonkey/violentmonkey/issues/997 // this is a compiled and minified version of Vencord. For the source code, visit the GitHub repo "use strict";var Vencord=(()=>{var PI=Object.create;var Ca=Object.defineProperty;var CI=Object.getOwnPropertyDescriptor;var NI=Object.getOwnPropertyNames;var RI=Object.getPrototypeOf,DI=Object.prototype.hasOwnProperty;var Ji=(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 y=(e,t)=>()=>(e&&(t=e(e=0)),t);var P1=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ve=(e,t)=>{for(var o in t)Ca(e,o,{get:t[o],enumerable:!0})},C1=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of NI(t))!DI.call(e,i)&&i!==o&&Ca(e,i,{get:()=>t[i],enumerable:!(r=CI(t,i))||r.enumerable});return e};var N1=(e,t,o)=>(o=e!=null?PI(RI(e)):{},C1(t||!e||!e.__esModule?Ca(o,"default",{value:e,enumerable:!0}):o,e)),ri=e=>C1(Ca({},"__esModule",{value:!0}),e);function kI(e){if(!e)return{};let t={},o=e.trim().split(` `);for(var r=0;r{var i=new FileReader;i.onload=s=>o(s.target.result),e==="arrayBuffer"?i.readAsArrayBuffer(t):e==="text"?i.readAsText(t,"utf-8"):r("unknown to")})}function LI(e,t){return new Promise((o,r)=>{let i=t||{};i.url=e,i.data=i.body,i.responseType="blob",i.onload=s=>{var c=s.response;s.blob=()=>Promise.resolve(c),s.arrayBuffer=()=>au("arrayBuffer",c),s.text=()=>au("text",c),s.json=async()=>JSON.parse(await au("text",c)),s.headers=kI(s.responseHeaders),s.ok=s.status>=200&&s.status<300,o(s)},i.ontimeout=()=>r("fetch timeout"),i.onerror=()=>r("fetch error"),i.onabort=()=>r("fetch abort"),GM_xmlhttpRequest(i)})}var h,a=y(()=>{"use strict";h=LI});var f,n,l=y(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var Oo={};Ve(Oo,{clear:()=>_I,createStore:()=>Na,del:()=>Vi,delMany:()=>BI,entries:()=>uu,get:()=>nt,getMany:()=>OI,keys:()=>UI,promisifyRequest:()=>Wt,set:()=>ht,setMany:()=>EI,update:()=>Mr,values:()=>FI});function Wt(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Na(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=Wt(o);return(i,s)=>r.then(c=>s(c.transaction(t,i).objectStore(t)))}function Eo(){return lu||(lu=Na("VencordData","VencordStore")),lu}function nt(e,t=Eo()){return t("readonly",o=>Wt(o.get(e)))}function ht(e,t,o=Eo()){return o("readwrite",r=>(r.put(t,e),Wt(r.transaction)))}function EI(e,t=Eo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),Wt(o.transaction)))}function OI(e,t=Eo()){return t("readonly",o=>Promise.all(e.map(r=>Wt(o.get(r)))))}function Mr(e,t,o=Eo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Wt(r.transaction))}catch(c){s(c)}}}))}function Vi(e,t=Eo()){return t("readwrite",o=>(o.delete(e),Wt(o.transaction)))}function BI(e,t=Eo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),Wt(o.transaction)))}function _I(e=Eo()){return e("readwrite",t=>(t.clear(),Wt(t.transaction)))}function cu(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},Wt(e.transaction)}function UI(e=Eo()){return e("readonly",t=>{if(t.getAllKeys)return Wt(t.getAllKeys());let o=[];return cu(t,r=>o.push(r.key)).then(()=>o)})}function FI(e=Eo()){return e("readonly",t=>{if(t.getAll)return Wt(t.getAll());let o=[];return cu(t,r=>o.push(r.value)).then(()=>o)})}function uu(e=Eo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Wt(t.getAllKeys()),Wt(t.getAll())]).then(([r,i])=>r.map((s,c)=>[s,i[c]]));let o=[];return e("readonly",r=>cu(r,i=>o.push([i.key,i.value])).then(()=>o))})}var lu,wo=y(()=>{"use strict";a();l();});function Gt(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var Ir=y(()=>{"use strict";a();l()});function $I(e,t,o){let r=t;if(t in e)return void o(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,o(i)},configurable:!0,enumerable:!1})}var D1=y(()=>{"use strict";a();l()});var es,pu=y(()=>{"use strict";a();l();es=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 nn,GI,Ra,d,ii,N=y(()=>{"use strict";a();l();nn="webpackChunkdiscord_app",GI="Vencord.Webpack.Common.React",Ra="1026515880080842772",d=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:715746190813298788n},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},Kodarru:{name:"Kodarru",id:785227396218748949n},nakoyasha:{name:"nakoyasha",id:222069018507345921n},Sqaaakoi:{name:"Sqaaakoi",id:259558259491340288n},Byron:{name:"byeoon",id:1167275288036655133n},Kaitlyn:{name:"kaitlyn",id:306158896630988801n},PolisanTheEasyNick:{name:"Oleh Polisan",id:242305263313485825n}}),ii=(()=>Object.freeze(Object.fromEntries(Object.entries(d).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function hn(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Lt(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[ts]:void 0,[si](){return!s[ts]&&t>i++&&(s[ts]=e(),!s[ts]&&t===i&&console.error("Lazy factory failed:",e)),s[ts]}});return new Proxy(s,{...Da,get(c,u,p){if(!o&&r)return Lt(()=>Reflect.get(c[si](),u,p),t,!0);let m=c[si]();if(typeof m=="object"||typeof m=="function")return Reflect.get(m,u,p);throw new Error("proxyLazy called on a primitive value")}})}var k1,Da,si,ts,xo=y(()=>{"use strict";a();l();k1=["arguments","caller","prototype"],Da={},si=Symbol.for("vencord.lazy.get"),ts=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Da[e]=(t,...o)=>Reflect[e](t[si](),...o);Da.ownKeys=e=>{let t=e[si](),o=Reflect.ownKeys(t);for(let r of k1)o.includes(r)||o.push(r);return o};Da.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&k1.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[si](),t);return o&&Object.defineProperty(e,t,o),o}});function bt(e,t=5){let o=hn(e,t),r=i=>{let s=o()??HI;return n(s,{...i})};return r.$$vencordInternal=o,r}var HI,du=y(()=>{"use strict";a();l();xo();HI=()=>null});var ie,Xe=y(()=>{"use strict";a();l();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)}}});function Bo(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function ka(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 mu(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 os(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=mu(o.match,Bo),o.replace=mu(o.replace,r=>ka(r,t)),Object.defineProperties(e,o)}var Ar=y(()=>{"use strict";a();l()});var zI,rn,La=y(()=>{"use strict";a();l();Xe();zI=(e,t,o)=>t,rn=zI});function Oa(e){if(sn!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>to=t]),e.pop(),to?(sn=to.c,!0):!1}function _o(e,...t){let o=new Error(`webpack.${e} found no module`);ai.error(o,"Filter:",t)}function Pr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in sn){let r=sn[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 E1(...e){let t=Ba(...e);return t?to.m[t]:null}function mo(e,t){return Lt(e,t)}function hu(e,t){return bt(e,t)}function oo(e){return Lt(()=>po(e))}function yn(...e){let t=po(xe.byProps(...e),{isIndirect:!0});return t||_o("findByProps",...e),t}function w(...e){return Lt(()=>yn(...e))}function _a(...e){let t=po(xe.byCode(...e),{isIndirect:!0});return t||_o("findByCode",...e),t}function fo(...e){return Lt(()=>_a(...e))}function O1(e){let t=po(xe.byStoreName(e),{isIndirect:!0});return t||_o("findStore",e),t}function Se(e){return Lt(()=>O1(e))}function yu(...e){let t=po(xe.componentByCode(...e),{isIndirect:!0});return t||_o("findComponentByCode",...e),t}function vu(e){return bt(()=>{let t=po(e,{isIndirect:!0});return t||_o("findComponent",e),t})}function Re(...e){return bt(()=>{let t=po(xe.componentByCode(...e),{isIndirect:!0});return t||_o("findComponentByCode",...e),t})}function Uo(...e){return bt(()=>{let t=po(xe.byProps(...e),{isIndirect:!0});return t||_o("findExportedComponent",...e),t[e[0]]})}async function _1(e,t=B1){let o=E1(...e);if(!o){let c=new Error("extractAndLoadChunks: Couldn't find module factory");ai.warn(c,"Code:",e,"Matcher:",t);return}let r=o.toString().match(Bo(t));if(!r){let c=new Error("extractAndLoadChunks: Couldn't find entry point id in module factory code");ai.warn(c,"Code:",e,"Matcher:",t);return}let[,i,s]=r;if(Number.isNaN(s)){let c=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the chunk ids array, or the entry point id returned as the second group wasn't a number");ai.warn(c,"Code:",e,"Matcher:",t);return}if(i){let c=Array.from(i.matchAll(/\("(.+?)"\)/g)).map(u=>u[1]);await Promise.all(c.map(u=>to.e(u)))}to(s)}function li(e,t=B1){return()=>_1(e,t)}function yt(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=xe.byProps(e);else if(Array.isArray(e))e=xe.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(sn!=null){let[r,i]=po(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}L1.set(e,t)}function WI(e){gu.add(e)}function qI(e){gu.delete(e)}function Su(...e){let t={},o=to.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let c of e)if(typeof c=="string"&&!s.includes(c)||c instanceof RegExp&&!c.test(s))continue e;t[r]=i}return t}function Ua(e){let t=to.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 ai,Ea,fu,to,sn,xe,L1,gu,po,Cr,Ba,jI,B1,z=y(()=>{"use strict";a();l();xo();du();Xe();Ar();La();ai=new ie("Webpack"),fu=new Promise(e=>Ea=e),xe={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=xe.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}},L1=new Map,gu=new Set;po=rn("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 sn){let s=sn[i];if(!(!s?.exports||s.exports===unsafeWindow)){if(t(s.exports))return r?[s.exports,i]:s.exports;if(s.exports.default&&s.exports.default!==unsafeWindow&&t(s.exports.default)){let c=s.exports.default;return r?[c,i]:c}}}return o||_o("find",t),r?[null,null]:null});Cr=rn("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 po(t[0]);let r=t,i=0,s=Array(o);e:for(let c in sn){let u=sn[c];if(!!u?.exports)for(let p=0;p{"use strict";a();l();z();Fa=oo(e=>e.image&&e.modal&&!e.applicationIcon),$a=w("buttonWrapper","buttonContent")});function ci(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},ci(e[o],r)):e[o]??=r}return e}function ee(...e){return e.filter(Boolean).join(" ")}function Fo(e){return new Promise(t=>setTimeout(t,e))}function Mo(e,t="Copied to clipboard!"){no.SUPPORTS_COPY?no.copy(e):t="Your browser does not support copying to clipboard",V.show({message:t,id:V.genId(),type:V.Type.SUCCESS})}function YI(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ns(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function ZI(e){try{return new URL(e)}catch{return null}}function rs(e){return e}var bu,XI,is,Ie=y(()=>{"use strict";a();l();x();N();bu=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,unsafeWindow.innerHeight);return!(t.bottom<0||t.top-o>=0)};XI=navigator.userAgent.includes("Mobi"),is=e=>Object.hasOwn(ii,e)});function dt(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=W({value:o.fallbackValue,error:null,pending:!0});return ae(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(c=>{!s||(i({value:c,error:null,pending:!1}),o.onSuccess?.(c))}).catch(c=>{!s||(i({value:null,error:c,pending:!1}),o.onError?.(c))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Io(e){let t=ui(o=>o+1,0);return e?t:t[1]}function ss({interval:e=1e3,deps:t=[]}){let[o,r]=W(0),i=Ct(()=>Date.now(),t);return ae(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var QI,JI,lt=y(()=>{"use strict";a();l();x();Ie();du();QI=()=>null,JI=(e=!1)=>{let t=q.useRef(null),[o,r]=W(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(bu(s)&&(r(!0),e)||(t.current=new IntersectionObserver(c=>{for(let u of c)u.target===s&&(u.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(u.isIntersecting))}),t.current.observe(s)))},o]}});function Ga(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=bt(()=>o);return yt(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function _t(e,t){yt(xe.byStoreName(e),t,{isIndirect:!0})}var Tu=y(()=>{"use strict";a();l();lt();z()});var T,Nt,k,qt,ne,ct,Ha,te,Ao,za,Nr,ja,as,F1,$o,Wa,pi,di,mi,qa,ls,zn,Po,VI,cs,$1=y(()=>{"use strict";a();l();z();Tu();T={},zn=Ga("MaskedLink",xe.componentByCode("MASKED_LINK)")),Po=Ga("Timestamp",xe.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),VI=Ga("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:cs}=w("OAuth2AuthorizeModal");yt(["FormItem","Button"],e=>{({useToken:ls,Card:Nt,Button:k,FormSwitch:qt,Tooltip:ne,TextInput:ct,TextArea:Ha,Text:te,Select:Ao,SearchableSelect:za,Slider:Nr,ButtonLooks:ja,TabBar:$o,Popout:as,Dialog:F1,Paginator:Wa,ScrollerThin:pi,Clickable:di,Avatar:mi,FocusLock:qa}=e),T=e})});var B,Kt,G1=y(()=>{"use strict";a();l();z();B={};yt(["MenuItem","MenuSliderControl"],e=>B=e);Kt=w("closeContextMenu","openContextMenu")});var q,W,ae,Ct,Tt,ui,Ka,Rr,H1=y(()=>{"use strict";a();l();z();Rr=w("createPortal","render");yt("useState",e=>{q=e,{useEffect:ae,useState:W,useMemo:Ct,useRef:Tt,useReducer:ui,useCallback:Ka}=q})});var us,fi,ps,z1=y(()=>{"use strict";a();l();z();us=w("MessageDisplayCompact"),fi=w("ShowCurrentGame"),ps=w("PreloadedUserSettingsActionCreators")});var ds,wu,Go,ms,Be,vn,Dr,an,pe,O,go,Ae,ho,re,Ge,Ke,Ho,fs,gs,_e,j1=y(()=>{"use strict";a();l();z();Tu();ds=w("connectStores"),wu=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(wu||{}),ms=w("openPrivateChannel"),{useStateFromStores:_e}=w("useStateFromStores");_t("DraftStore",e=>gs=e);_t("UserStore",e=>O=e);_t("UserProfileStore",e=>go=e);_t("ChannelStore",e=>re=e);_t("SelectedChannelStore",e=>Ae=e);_t("SelectedGuildStore",e=>ho=e);_t("GuildStore",e=>pe=e);_t("GuildMemberStore",e=>Ge=e);_t("RelationshipStore",e=>Ke=e);_t("PermissionStore",e=>Be=e);_t("PresenceStore",e=>an=e);_t("ReadStateStore",e=>Dr=e);_t("GuildChannelStore",e=>vn=e);_t("MessageStore",e=>Go=e);_t("WindowStore",e=>fs=e);_t("EmojiStore",e=>Ho=e)});var W1={};var q1=y(()=>{"use strict";a();l()});var K1={};var Y1=y(()=>{"use strict";a();l()});var Z1={};var X1=y(()=>{"use strict";a();l()});function wt(e,t=Q1.MESSAGE){V.show({id:V.genId(),message:e,type:t})}var F,zo,Et,xu,eA,kr,Ye,Co,De,rt,Q1,tA,V,Ot,hs,Lr,no,jo,gi,fe,Er,oA,Mu,ro,Iu,Au,Ut,J1=y(()=>{"use strict";a();l();z();yt(["dispatch","subscribe"],e=>{F=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ea()};e.subscribe("CONNECTION_OPEN",t)});yt(["ComponentDispatch","ComponentDispatcher"],e=>zo=e.ComponentDispatch);Et=mo(()=>{let e=yn("getAPIBaseURL");return e.HTTP??e}),xu=w("parseTwoDigitYear"),eA=w("highlight","registerLanguage"),kr=w("debounce","cloneDeep"),Ye=oo(e=>e.Messages?.["en-US"]);yt(["fromTimestamp","extractTimestamp"],e=>Co=e);yt("parseTopic",e=>De=e);yt(["show","close"],e=>rt=e);Q1={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},tA={TOP:0,BOTTOM:1},V={Type:Q1,Position:tA,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};yt("showToast",e=>{V.show=e.showToast,V.pop=e.popToast});Ot=w("getUser","fetchCurrentUser"),hs=w("showUploadFileSizeExceededError","promptToUpload"),Lr=w("fetchAssetIds","getAssetImage"),no=w("SUPPORTS_COPY","copy"),jo=w("transitionTo","replaceWith","transitionToGuild");yt(["open","saveAccountChanges"],e=>gi=e);({Permissions:fe}=oo(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint")),Er=fo("will be removed in v4"),oA=xe.byCode("[zustand persist middleware]"),{persist:Mu}=oo(e=>e.persist&&oA(e.persist)),ro=w("editMessage","sendMessage"),Iu=w("openUserProfileModal","closeUserProfileModal"),Au=w("resolveInvite"),Ut=w("getGuildBannerURL","getUserAvatarURL")});var Pu={};Ve(Pu,{Alerts:()=>rt,ApplicationAssetUtils:()=>Lr,Avatar:()=>mi,Button:()=>k,ButtonLooks:()=>ja,ButtonWrapperClasses:()=>$a,Card:()=>Nt,ChannelStore:()=>re,Clickable:()=>di,Clipboard:()=>no,ComponentDispatch:()=>zo,ComponentTypes:()=>W1,ContextMenuApi:()=>Kt,Dialog:()=>F1,DraftStore:()=>gs,DraftType:()=>wu,EmojiStore:()=>Ho,Flex:()=>VI,Flux:()=>ds,FluxDispatcher:()=>F,FocusLock:()=>qa,Forms:()=>T,GuildChannelStore:()=>vn,GuildMemberStore:()=>Ge,GuildStore:()=>pe,IconUtils:()=>Ut,InviteActions:()=>Au,MaskedLink:()=>zn,Menu:()=>B,MenuTypes:()=>K1,MessageActions:()=>ro,MessageStore:()=>Go,ModalImageClasses:()=>Fa,NavigationRouter:()=>jo,OAuth2AuthorizeModal:()=>cs,Paginator:()=>Wa,Parser:()=>De,PermissionStore:()=>Be,PermissionsBits:()=>fe,Popout:()=>as,PresenceStore:()=>an,PrivateChannelsStore:()=>ms,React:()=>q,ReactDOM:()=>Rr,ReadStateStore:()=>Dr,RelationshipStore:()=>Ke,RestAPI:()=>Et,ScrollerThin:()=>pi,SearchableSelect:()=>za,Select:()=>Ao,SelectedChannelStore:()=>Ae,SelectedGuildStore:()=>ho,SettingsRouter:()=>gi,Slider:()=>Nr,SnowflakeUtils:()=>Co,StatusSettingsStores:()=>fi,Switch:()=>qt,TabBar:()=>$o,Text:()=>te,TextAndImagesSettingsStores:()=>us,TextArea:()=>Ha,TextInput:()=>ct,Timestamp:()=>Po,Toasts:()=>V,Tooltip:()=>ne,UploadHandler:()=>hs,UserProfileActions:()=>Iu,UserProfileStore:()=>go,UserSettingsActionCreators:()=>ps,UserStore:()=>O,UserUtils:()=>Ot,UtilTypes:()=>Z1,WindowStore:()=>fs,hljs:()=>eA,i18n:()=>Ye,lodash:()=>kr,moment:()=>xu,showToast:()=>wt,useCallback:()=>Ka,useEffect:()=>ae,useMemo:()=>Ct,useReducer:()=>ui,useRef:()=>Tt,useState:()=>W,useStateFromStores:()=>_e,useToken:()=>ls,zustandCreate:()=>Er,zustandPersist:()=>Mu});var x=y(()=>{"use strict";a();l();U1();$1();G1();H1();z1();j1();q1();Y1();X1();J1()});function Or(e,t){return Ya.openModalLazy(e,t)}function ge(e,t,o){return Ya.openModal(e,t,o)}function Sn(e,t){return Ya.closeModal(e,t)}function ln(){return Ya.closeAllModals()}var No,Wo,Cu,Pe,He,Le,mt,ft,Ya,ze=y(()=>{"use strict";a();l();z();lt();No=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(No||{}),Wo=w("ModalRoot","ModalCloseButton"),Cu=Uo("ImageModal"),Pe=bt(()=>Wo.ModalRoot),He=bt(()=>Wo.ModalHeader),Le=bt(()=>Wo.ModalContent),mt=bt(()=>Wo.ModalFooter),ft=bt(()=>Wo.ModalCloseButton),Ya=w("openModalLazy")});async function Br(e){let{invite:t}=await Au.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return F.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;F.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),F.subscribe("INVITE_MODAL_CLOSE",r=()=>{F.unsubscribe("INVITE_MODAL_CLOSE",r),F.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function jn(){return re.getChannel(Ae.getChannelId())}function ys(){return pe.getGuild(jn()?.guild_id)}function nA(e){ms.openPrivateChannel(e)}function Wn(){return ps.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function _r(e){zo.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function rA(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return ro.sendMessage(e,i,o,r)}function qo(e,t){return ge(o=>n(Pe,{...o,className:Fa.modal,size:"dynamic"},n(Cu,{className:Fa.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(zn,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function yo(e){if(!await Ot.getUser(e))throw new Error("No such user: "+e);let o=ho.getGuildId();Iu.openUserProfileModal({userId:e,guildId:o,channelId:Ae.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Nu(e,t){let o=go.getUserProfile(e);if(o)return o;F.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await Et.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return F.dispatch({type:"USER_UPDATE",user:r.user}),await F.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&F.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),go.getUserProfile(e)}function bn(e){return e.discriminator==="0"?e.username:e.tag}var vs,ut=y(()=>{"use strict";a();l();x();ze();vs=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(vs||{})});function Za(e){return Boolean(e)}function Ru(e){return e!=null}var Xa=y(()=>{"use strict";a();l()});var Ur,Qa=y(()=>{"use strict";a();l();({localStorage:Ur}=unsafeWindow)});var V1,K,et=y(()=>{"use strict";a();l();V1="",K={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;K[`${e}${t}`]=o,V1+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:V1,id:"vencord-margins"})),{once:!0})});function Du(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var ku=y(()=>{"use strict";a();l()});var vo,Fr=y(()=>{"use strict";a();l();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}}});function ey(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ss(e,t,o=!1){let r=xu.duration(e,t),i=mA.map(p=>({amount:r[p](),unit:p})),s=0;e:for(let p=0;pp==="days");if(c!==-1){let p=i[c],m=p.amount%7;m===0?i.splice(c,1):p.amount=m}let u="";for(;i.length;){let{amount:p,unit:m}=i.shift();u.length&&(u+=i.length?", ":" and "),(p>0||u.length)&&(u+=`${p} ${ey(m,p===1,o)}`)}return u.length?u:`0 ${ey(t,!1,o)}`}function fA(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 bs(e,t){let o="```";return`${o}${t||""} ${e.replaceAll("```","\\`\\`\\`")} ${o}`}var Lu,iA,sA,aA,lA,cA,uA,pA,dA,$r,mA,qn=y(()=>{"use strict";a();l();x();Lu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),iA=e=>e.toLowerCase().split("_"),sA=e=>e.toLowerCase().split("-"),aA=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),lA=e=>e.toLowerCase().split(" "),cA=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),uA=e=>e.join("_").toUpperCase(),pA=e=>e.join("-").toLowerCase(),dA=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),$r=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),mA=["years","months","weeks","days","hours","minutes","seconds"]});var Eu={};Ve(Eu,{ChangeList:()=>es,Devs:()=>d,DevsById:()=>ii,ImageModal:()=>Cu,LazyComponent:()=>bt,Logger:()=>ie,Margins:()=>K,ModalCloseButton:()=>ft,ModalContent:()=>Le,ModalFooter:()=>mt,ModalHeader:()=>He,ModalRoot:()=>Pe,ModalSize:()=>No,Modals:()=>Wo,NoopComponent:()=>QI,Queue:()=>vo,REACT_GLOBAL:()=>GI,SUPPORT_CHANNEL_ID:()=>Ra,Theme:()=>vs,WEBPACK_CHUNK:()=>nn,canonicalizeDescriptor:()=>mu,canonicalizeMatch:()=>Bo,canonicalizeReplace:()=>ka,canonicalizeReplacement:()=>os,checkIntersecting:()=>bu,classes:()=>ee,closeAllModals:()=>ln,closeModal:()=>Sn,copyWithToast:()=>Mo,debounce:()=>Gt,fetchUserProfile:()=>Nu,formatDuration:()=>Ss,getCurrentChannel:()=>jn,getCurrentGuild:()=>ys,getTheme:()=>Wn,getUniqueUsername:()=>bn,humanFriendlyJoin:()=>fA,identity:()=>rs,insertTextIntoChatInputBox:()=>_r,isMobile:()=>XI,isNonNullish:()=>Ru,isObject:()=>YI,isObjectEmpty:()=>ns,isPluginDev:()=>is,isTruthy:()=>Za,localStorage:()=>Ur,makeCodeblock:()=>bs,makeLazy:()=>hn,mergeDefaults:()=>ci,onceDefined:()=>$I,onlyOnce:()=>Du,openImageModal:()=>qo,openInviteModal:()=>Br,openModal:()=>ge,openModalLazy:()=>Or,openPrivateChannel:()=>nA,openUserProfile:()=>yo,parseUrl:()=>ZI,proxyLazy:()=>Lt,sendMessage:()=>rA,sleep:()=>Fo,useAwaiter:()=>dt,useForceUpdater:()=>Io,useIntersection:()=>JI,useTimer:()=>ss,wordsFromCamel:()=>Lu,wordsFromKebab:()=>sA,wordsFromPascal:()=>aA,wordsFromSnake:()=>iA,wordsFromTitle:()=>lA,wordsToCamel:()=>cA,wordsToKebab:()=>pA,wordsToPascal:()=>dA,wordsToSnake:()=>uA,wordsToTitle:()=>$r});var Ou=y(()=>{"use strict";a();l();Ir();D1();pu();N();ut();Xa();xo();Qa();Xe();et();Ie();ze();ku();Ar();Fr();lt();qn();});var ty,Bu=y(()=>{"use strict";a();l()});var iy=y(()=>{});function cn(e){return n("div",{...e,className:ee(e.className,"vc-error-card")},e.children)}var hi=y(()=>{"use strict";a();l();iy();Ie()});var bA,sy,ay,Uu,U,ce=y(()=>{"use strict";a();l();Xe();et();lt();x();hi();bA="#e78284",sy=new ie("React ErrorBoundary",bA),ay={},Uu=bt(()=>class extends q.PureComponent{state={error:ay,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}),sy.error(`A component threw an Error `,t),sy.error("Component Stack",o.componentStack)}render(){if(this.state.error===ay)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(cn,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:K.top8},this.state.stack)))}});Uu.wrap=(e,t)=>o=>n(Uu,{...t,wrappedProps:o},n(e,{...o}));U=Uu});function Va(){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 Fu=y(()=>{"use strict";a();l()});function Ts(e){return n(k,{...e,look:k.Looks.LINK,color:k.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(Va,null),"Donate")}var $u=y(()=>{"use strict";a();l();x();Fu()});function he(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 Bt=y(()=>{"use strict";a();l()});function S(e){return e}var P=y(()=>{"use strict";a();l()});async function ly(e=!1){Gu={};let t={};e&&(t.cache="no-cache"),Gu=await h("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var TA,wA,Gu,Hu,cy=y(()=>{"use strict";a();l();tl();$u();ce();Bt();Fu();N();et();Ie();ze();P();x();TA="https://vencord.dev/assets/favicon.png",wA={description:"Vencord Contributor",image:TA,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>is(e.id),link:"https://github.com/Vendicated/Vencord"},Gu={};Hu=S({name:"BadgeAPI",description:"API to add badges to users.",authors:[d.Megu,d.Ven,d.TheSun],required:!0,patches:[{find:'id:"premium",',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 ly(!0),V.show({id:V.genId(),message:"Successfully refetched badges!",type:V.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(wA),await ly()},renderBadgeComponent:U.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return Gu[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=ge(r=>n(U,{noop:!0,onError:()=>{Sn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Wo.ModalRoot,{...r},n(Wo.ModalHeader,null,n(he,{style:{width:"100%",justifyContent:"center"}},n(T.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(Va,null),"Vencord Donor"))),n(Wo.ModalContent,null,n(he,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(T.FormText,null,"This Badge is a special perk for Vencord Donors"),n(T.FormText,{className:K.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(Wo.ModalFooter,null,n(he,{style:{width:"100%",justifyContent:"center"}},n(Ts,null))))))}}))}})});var zu,uy=y(()=>{"use strict";a();l();N();P();zu=S({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[d.Ven],patches:[{find:'"sticker")',replacement:{match:/!\i\.isMobile(?=.+?(\i)\.push\(.{0,50}"gift")/,replace:"$& &&(Vencord.Api.ChatButtons._injectButtons($1,arguments[0]),true)"}}]})});var ju,py=y(()=>{"use strict";a();l();N();P();ju=S({name:"CommandsAPI",authors:[d.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 Wu,dy=y(()=>{"use strict";a();l();N();P();Wu=S({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[d.Nuckyz,d.Ven,d.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 qu,my=y(()=>{"use strict";a();l();N();P();qu=S({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[d.TheSun,d.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/\.Messages\.GUILD_OWNER(?=.+?decorators:(\i)\(\)).+?\1=?\(\)=>.+?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 Ku,fy=y(()=>{"use strict";a();l();N();P();Ku=S({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[d.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var Yu,gy=y(()=>{"use strict";a();l();N();P();Yu=S({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[d.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var Zu,hy=y(()=>{"use strict";a();l();N();P();Zu=S({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[d.Arjix,d.hunt,d.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,c)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${c},${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 Xu,yy=y(()=>{"use strict";a();l();N();P();Xu=S({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[d.KingFish,d.Ven,d.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 Qu,vy=y(()=>{"use strict";a();l();N();P();Qu=S({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[d.Ven],required:!0,patches:[{find:'"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 Ju,Sy=y(()=>{"use strict";a();l();N();P();Ju=S({name:"ServerListAPI",authors:[d.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 Vu,by=y(()=>{"use strict";a();l();N();P();Vu=S({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[d.Cyn,d.Ven,d.Nuckyz,d.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 ol,Ty=y(()=>{"use strict";a();l();ol=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,c){let u=s[c];return!(c in s)&&i.getDefaultValue&&(u=i.getDefaultValue({target:s,key:c,root:o,path:r})),typeof u=="object"&&u!==null&&!Array.isArray(u)?i.makeProxy(u,o,`${r}${r&&"."}${c}`):u},set(s,c,u){if(s[c]===u)return!0;Reflect.set(s,c,u);let p=`${r}${r&&"."}${c}`;return i.globalListeners.forEach(m=>m(u,p)),i.pathListeners.get(p)?.forEach(m=>m(u)),!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 wy=y(()=>{});var nl,ep=y(()=>{"use strict";a();l();wy();G();ce();Ie();x();nl=U.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:c,onClose:u,image:p,permanent:m,className:g,dismissOnClick:v}){let{timeout:b,position:I}=xt(["notifications.timeout","notifications.position"]).notifications,A=_e([fs],()=>fs.isFocused()),[M,R]=W(!1),[D,C]=W(0),$=Ct(()=>Date.now(),[b,M,A]);ae(()=>{if(M||!A||b===0||m)return void C(0);let X=setInterval(()=>{let J=Date.now()-$;J>=b?u():C(J)},10);return()=>clearInterval(X)},[b,M,A]);let j=D/b;return n("button",{className:ee("vc-notification-root",g),style:I==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{c?.(),v!==!1&&u()},onContextMenu:X=>{X.preventDefault(),X.stopPropagation(),u()},onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!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(),u()}},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)))),p&&n("img",{className:"vc-notification-img",src:p,alt:""}),b!==0&&!m&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-j)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var np={};Ve(np,{classNameFactory:()=>Ce,classNameToSelector:()=>My,compileStyle:()=>op,disableStyle:()=>Ko,enableStyle:()=>So,isStyleEnabled:()=>tp,requireStyle:()=>ws,setStyleClassNames:()=>MA,styleMap:()=>xy,toggleStyle:()=>xA});function ws(e){let t=xy.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function So(e){let t=ws(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),op(t),document.head.appendChild(t.dom),!0)}function Ko(e){let t=ws(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var xy,xA,tp,MA,op,My,Ce,st=y(()=>{"use strict";a();l();xy=unsafeWindow.VencordStyles??=new Map;xA=e=>tp(e)?Ko(e):So(e),tp=e=>ws(e).dom?.isConnected??!1,MA=(e,t,o=!0)=>{let r=ws(e);r.classNames=t,o&&tp(r.name)&&op(r)},op=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?My(r):t})},My=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),Ce=(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 Iy,Ay=y(()=>{a();l();Iy=(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 Cy(e){if(e.noPersist)return;let t=H.notifications.logLimit;t!==0&&(await Mr(rl,o=>{let r=o??[],{onClick:i,onClose:s,richBody:c,permanent:u,noPersist:p,dismissOnClick:m,...g}=e;return r.unshift({...g,timestamp:Date.now(),id:Iy()}),r.length>t&&t!==200&&(r.length=t),r}),xs.forEach(o=>o()))}async function IA(e){let t=await Py(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await ht(rl,t),xs.forEach(r=>r()))}function AA(){let[e,t]=ui(s=>s+1,0);ae(()=>(xs.add(t),()=>void xs.delete(t)),[]);let[o,r,i]=dt(Py,{fallbackValue:[],deps:[e]});return[o,i]}function PA({data:e}){let[t,o]=W(!1),r=q.useRef(null);return ae(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:yi("wrapper",{removing:t}),ref:r},n(nl,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>IA(e.timestamp),200))},richBody:n("div",{className:yi("body")},e.body,n(Po,{timestamp:new Date(e.timestamp),className:yi("timestamp")}))}))}function CA({log:e,pending:t}){return!e.length&&!t?n("div",{className:yi("container")},n("div",{className:yi("empty")}),n(T.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:yi("container")},e.map(o=>n(PA,{data:o,key:o.id})))}function NA({modalProps:e,close:t}){let[o,r]=AA();return n(Pe,{...e,size:"large"},n(He,null,n(te,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(ft,{onClick:t})),n(Le,null,n(CA,{log:o,pending:r})),n(mt,null,n(k,{disabled:o.length===0,onClick:()=>{rt.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 ht(rl,[]),xs.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function il(){let e=ge(t=>n(NA,{modalProps:t,close:()=>Sn(e)}))}var rl,Py,yi,xs,sl=y(()=>{"use strict";a();l();wo();G();st();ze();lt();x();Ay();ep();rl="notification-log",Py=async()=>await nt(rl)??[],yi=Ce("vc-notification-log-"),xs=new Set});function kA(){if(!rp){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),rp=Rr.createRoot(e)}return rp}function LA(e,t){let o=kA();return new Promise(r=>{o.render(n(nl,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function EA(){if(typeof Notification>"u")return!1;let{useNative:e}=H.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Ny(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ue(e){if(Cy(e),EA()&&await Ny()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:c=null}=e,u=new Notification(t,{body:o,icon:r,image:i});u.onclick=s,u.onclose=c}else RA.push(()=>LA(e,DA++))}var RA,rp,DA,Ry=y(()=>{"use strict";a();l();G();Fr();x();ep();sl();RA=new vo,DA=42});var ip={};Ve(ip,{requestPermission:()=>Ny,showNotification:()=>Ue});var Tn=y(()=>{"use strict";a();l();Ry()});function Fy(e,t){return jA(e,t||{},0,0)}function $y(e,t){return GA(e,t)}var Yt,io,al,ll,cl,cp,Ey,Oy,By,up,_y,OA,Dy,pp,wn,je,un,Yn,je,je,je,je,As,je,BA,_A,UA,FA,sp,Yo,ap,fp,Uy,$A,Kn,GA,xn,Ms,lp,dp,ky,Is,mp,Ly,HA,gp,zA,jA,WA,qA,Gy=y(()=>{a();l();Yt=Uint8Array,io=Uint16Array,al=Uint32Array,ll=new Yt([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]),cl=new Yt([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]),cp=new Yt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ey=function(e,t){for(var o=new io(31),r=0;r<31;++r)o[r]=t+=1<>>1|(je&21845)<<1,wn=(wn&52428)>>>2|(wn&13107)<<2,wn=(wn&61680)>>>4|(wn&3855)<<4,pp[je]=((wn&65280)>>>8|(wn&255)<<8)>>>1;un=function(e,t,o){for(var r=e.length,i=0,s=new io(t);i>>p]=m}else for(u=new io(r),i=0;i>>15-e[i]);return u},Yn=new Yt(288);for(je=0;je<144;++je)Yn[je]=8;for(je=144;je<256;++je)Yn[je]=9;for(je=256;je<280;++je)Yn[je]=7;for(je=280;je<288;++je)Yn[je]=8;As=new Yt(32);for(je=0;je<32;++je)As[je]=5;BA=un(Yn,9,0),_A=un(Yn,9,1),UA=un(As,5,0),FA=un(As,5,1),sp=function(e){for(var t=e[0],o=1;ot&&(t=e[o]);return t},Yo=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},ap=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},fp=function(e){return(e+7)/8|0},Uy=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?io:e.BYTES_PER_ELEMENT==4?al:Yt)(o-t);return r.set(e.subarray(t,o)),r},$A=["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"],Kn=function(e,t,o){var r=new Error(t||$A[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Kn),!o)throw r;return r},GA=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new Yt(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new Yt(r*3));var c=function(br){var Gn=t.length;if(br>Gn){var Hn=new Yt(Math.max(Gn*2,br));Hn.set(t),t=Hn}},u=o.f||0,p=o.p||0,m=o.b||0,g=o.l,v=o.d,b=o.m,I=o.n,A=r*8;do{if(!g){u=Yo(e,p,1);var M=Yo(e,p+1,3);if(p+=3,M)if(M==1)g=_A,v=FA,b=9,I=5;else if(M==2){var $=Yo(e,p,31)+257,j=Yo(e,p+10,15)+4,X=$+Yo(e,p+5,31)+1;p+=14;for(var J=new Yt(X),Q=new Yt(19),_=0;_>>4;if(R<16)J[_++]=R;else{var Fe=0,Te=0;for(R==16?(Te=3+Yo(e,p,3),p+=2,Fe=J[_-1]):R==17?(Te=3+Yo(e,p,7),p+=3):R==18&&(Te=11+Yo(e,p,127),p+=7);Te--;)J[_++]=Fe}}var Me=J.subarray(0,$),ke=J.subarray($);b=sp(Me),I=sp(ke),g=un(Me,b,1),v=un(ke,I,1)}else Kn(1);else{var R=fp(p)+4,D=e[R-4]|e[R-3]<<8,C=R+D;if(C>r){s&&Kn(0);break}i&&c(m+D),t.set(e.subarray(R,C),m),o.b=m+=D,o.p=p=C*8,o.f=u;continue}if(p>A){s&&Kn(0);break}}i&&c(m+131072);for(var Oe=(1<>>4;if(p+=Fe&15,p>A){s&&Kn(0);break}if(Fe||Kn(2),At<256)t[m++]=At;else if(At==256){ve=p,g=null;break}else{var it=At-254;if(At>264){var _=At-257,$e=ll[_];it=Yo(e,p,(1<<$e)-1)+By[_],p+=$e}var eo=v[ap(e,p)&Ne],Dt=eo>>>4;eo||Kn(3),p+=eo&15;var ke=OA[Dt];if(Dt>3){var $e=cl[Dt];ke+=ap(e,p)&(1<<$e)-1,p+=$e}if(p>A){s&&Kn(0);break}i&&c(m+131072);for(var Pt=m+it;m>>8},Ms=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},lp=function(e,t){for(var o=[],r=0;rb&&(b=s[r].s);var I=new io(b+1),A=dp(o[g-1],I,0);if(A>t){var r=0,M=0,R=A-t,D=1<t)M+=D-(1<>>=R;M>0;){var $=s[r].s;I[$]=0&&M;--r){var j=s[r].s;I[j]==t&&(--I[j],++M)}A=t}return[new Yt(I),A]},dp=function(e,t,o){return e.s==-1?Math.max(dp(e.l,t,o+1),dp(e.r,t,o+1)):t[e.s]=o},ky=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new io(++t),r=0,i=e[0],s=1,c=function(p){o[r++]=p},u=1;u<=t;++u)if(e[u]==i&&u!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)c(32754);s>2&&(c(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(c(i),--s;s>6;s-=6)c(8304);s>2&&(c(s-3<<5|8208),s=0)}for(;s--;)c(i);s=1,i=e[u]}return[o.subarray(0,r),t]},Is=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&&!se[cp[me-1]];--me);var Fe=m+5<<3,Te=Is(i,Yn)+Is(s,As)+c,Me=Is(i,b)+Is(s,M)+c+14+3*me+Is(Q,se)+(2*Q[16]+3*Q[17]+7*Q[18]);if(Fe<=Te&&Fe<=Me)return mp(t,g,e.subarray(p,p+m));var ke,Oe,Ne,ve;if(xn(t,g,1+(Me15&&(xn(t,g,eo[_]>>>5&127),g+=eo[_]>>>12)}}else ke=BA,Oe=Yn,Ne=UA,ve=As;for(var _=0;_255){var Dt=r[_]>>>18&31;Ms(t,g,ke[Dt+257]),g+=Oe[Dt+257],Dt>7&&(xn(t,g,r[_]>>>23&31),g+=ll[Dt]);var Pt=r[_]&31;Ms(t,g,Ne[Pt]),g+=ve[Pt],Pt>3&&(Ms(t,g,r[_]>>>5&8191),g+=cl[Pt])}else Ms(t,g,ke[r[_]]),g+=Oe[r[_]];return Ms(t,g,ke[256]),g+Oe[256]},HA=new al([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),gp=new Yt(0),zA=function(e,t,o,r,i,s){var c=e.length,u=new Yt(r+c+5*(1+Math.ceil(c/7e3))+i),p=u.subarray(r,u.length-i),m=0;if(!t||c<8)for(var g=0;g<=c;g+=65535){var v=g+65535;v>=c&&(p[m>>3]=s),m=mp(p,m+1,e.subarray(g,v))}else{for(var b=HA[t-1],I=b>>>13,A=b&8191,M=(1<7e3||se>24576)&&ke>423){m=Ly(e,p,0,X,J,Q,oe,se,me,g-me,m),se=_=oe=0,me=g;for(var Oe=0;Oe<286;++Oe)J[Oe]=0;for(var Oe=0;Oe<30;++Oe)Q[Oe]=0}var Ne=2,ve=0,At=A,it=Te-Me&32767;if(ke>2&&Fe==j(g-it))for(var $e=Math.min(I,ke)-1,eo=Math.min(32767,g),Dt=Math.min(258,ke);it<=eo&&--At&&Te!=Me;){if(e[g+Ne]==e[g+Ne-it]){for(var Pt=0;PtNe){if(Ne=Pt,ve=it,Pt>$e)break;for(var br=Math.min(it,Pt-2),Gn=0,Oe=0;OeGn&&(Gn=$t,Me=Hn)}}}Te=Me,Me=R[Te],it+=Te-Me+32768&32767}if(ve){X[se++]=268435456|up[Ne]<<18|Dy[ve];var wr=up[Ne]&31,E=Dy[ve]&31;oe+=ll[wr]+cl[E],++J[257+wr],++Q[E],be=g+Ne,++_}else X[se++]=e[g],++J[e[g]]}}m=Ly(e,p,s,X,J,Q,oe,se,me,g-me,m),!s&&m&7&&(m=mp(p,m+1,gp))}return Uy(u,0,r+fp(m)+i)},jA=function(e,t,o,r,i){return zA(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)};WA=typeof TextDecoder<"u"&&new TextDecoder,qA=0;try{WA.decode(gp,{stream:!0}),qA=1}catch{}});async function Hy(){let e=await nt("Vencord_cloudSecret")??{},t=hp();return e[t]?(await Mr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Ps()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Ps()}`]}async function KA(e){await Mr("Vencord_cloudSecret",t=>(t??={},t[`${hp()}:${Ps()}`]=e,t))}async function yp(){await Mr("Vencord_cloudSecret",e=>(e??={},delete e[`${hp()}:${Ps()}`],e))}async function zy(){if(await Hy()!==void 0){H.cloud.authenticated=!0;return}try{let o=await h(new URL("/v1/oauth/settings",Zn()));var{clientId:e,redirectUri:t}=await o.json()}catch{Ue({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),H.cloud.authenticated=!1;return}ge(o=>n(cs,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){H.cloud.authenticated=!1;return}try{let i=await h(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(ul.info("Authorized with secret"),await KA(s),Ue({title:"Cloud Integration",body:"Cloud integrations enabled!"}),H.cloud.authenticated=!0):(Ue({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),H.cloud.authenticated=!1)}catch(i){ul.error("Failed to authorize",i),Ue({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),H.cloud.authenticated=!1}}}))}async function vi(){let e=await Hy();return unsafeWindow.btoa(`${e}:${Ps()}`)}var ul,Zn,hp,Ps,vp=y(()=>{"use strict";a();l();wo();Tn();G();x();Xe();ze();ul=new ie("Cloud","#39b7e0"),Zn=()=>new URL(H.cloud.url),hp=()=>Zn().origin,Ps=()=>{let e=O.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function Cs(){unsafeWindow.VesktopNative.app.relaunch()}var Xn=y(()=>{"use strict";a();l()});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 dl(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 ml=y(()=>{"use strict";a();l()});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(Mn,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 Wy({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 qy(){let e="vencord-settings-backup.json",t=await Wy(),o=new TextEncoder().encode(t);pl(new File([o],e,{type:"application/json"}))}async function Yy(e=!0){if(!1){if(t)try{}catch(o){}}else{let t=await dl("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await jy(o.result),e&&YA()}catch(r){new ie("SettingsSync").error(r),e&&ZA(r)}},o.readAsText(t)}}async function Si(e){let t=await Wy({minify:!0});try{let o=await h(new URL("/v1/settings",Zn()),{method:"PUT",headers:{Authorization:await vi(),"Content-Type":"application/octet-stream"},body:Fy(new TextEncoder().encode(t))});if(!o.ok){Zo.error(`Failed to sync up, API returned ${o.status}`),Ue({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();Mn.cloud.settingsSyncVersion=r,VencordNative.settings.set(Mn),Zo.info("Settings uploaded to cloud successfully"),e&&Ue({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){Zo.error("Failed to sync up",o),Ue({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function fl(e=!0,t=!1){try{let o=await h(new URL("/v1/settings",Zn()),{method:"GET",headers:{Authorization:await vi(),Accept:"application/octet-stream","If-None-Match":H.cloud.settingsSyncVersion.toString()}});if(o.status===404)return Zo.info("No settings on the cloud"),e&&Ue({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return Zo.info("Settings up to date"),e&&Ue({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return Zo.error(`Failed to sync down, API returned ${o.status}`),Ue({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=H.cloud.settingsSyncVersion;if(!t&&rlocation.reload(),noPersist:!0}),!0}catch(o){return Zo.error("Failed to sync down",o),Ue({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${o.toString()}).`,color:"var(--red-360)"}),!1}}async function Zy(){try{let e=await h(new URL("/v1/settings",Zn()),{method:"DELETE",headers:{Authorization:await vi()}});if(!e.ok){Zo.error(`Failed to delete, API returned ${e.status}`),Ue({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}Zo.info("Settings deleted from cloud successfully"),Ue({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){Zo.error("Failed to delete",e),Ue({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var Ky,YA,ZA,Zo,Ns=y(()=>{"use strict";a();l();Tn();G();x();Gy();vp();Xe();Xn();ml();Ky=(e,t)=>V.show({type:e,message:t,id:V.genId()}),YA=()=>Ky(V.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),ZA=e=>Ky(V.Type.FAILURE,`Failed to import settings: ${String(e)}`);Zo=new ie("Cloud:Settings","#39b7e0")});var bp={};Ve(bp,{PlainSettings:()=>Mn,Settings:()=>H,SettingsStore:()=>Ht,definePluginSettings:()=>L,migratePluginSettings:()=>Gr,useSettings:()=>xt});function xt(e){let[,t]=q.useReducer(()=>({}),{});return q.useEffect(()=>e?(e.forEach(o=>Ht.addChangeListener(o,t)),()=>e.forEach(o=>Ht.removeChangeListener(o,t))):(Ht.addGlobalChangeListener(t),()=>Ht.removeGlobalChangeListener(t)),[]),Ht.store}function Gr(e,...t){let{plugins:o}=Ht.plain;if(!(e in o)){for(let r of t)if(r in o){XA.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],Ht.markAsChanged();break}}}function L(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return H.plugins[o.pluginName]},use:r=>xt(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var XA,QA,Sp,JA,Ht,Mn,H,G=y(()=>{"use strict";a();l();Ir();Ty();Qa();Xe();Ie();Ns();P();x();Hr();XA=new ie("Settings"),QA={autoUpdate:!0,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}},Sp=VencordNative.settings.get();ci(Sp,QA);JA=Gt(async()=>{H.cloud.settingsSync&&H.cloud.authenticated&&(await Si(),delete Ur.Vencord_settingsDirty)},6e4),Ht=new ol(Sp,{readOnly:!0,getDefaultValue({target:e,key:t,path:o}){let r=e[t];if(!We)return r;if(o==="plugins"&&t in We)return e[t]={enabled:We[t].required??We[t].enabledByDefault??!1};if(o.startsWith("plugins.")){let i=o.slice(8);if(i in We){let s=We[i].options?.[t];if(!s)return r;if("default"in s)return e[t]=s.default;if(s.type===4){let c=s.options.find(u=>u.default);return c&&(e[t]=c.value),c?.value}}}return r}});Ht.addGlobalChangeListener((e,t)=>{Ht.plain.cloud.settingsSyncVersion=Date.now(),Ur.Vencord_settingsDirty=!0,JA(),VencordNative.settings.set(Ht.plain,t)});Mn=Sp,H=Ht.store});var Xo,bi=y(()=>{a();l();Xo="4fce88f"});var Xy=y(()=>{});var Qy=y(()=>{});var Ip={};Ve(Ip,{UpdateLogger:()=>Tp,changes:()=>Rs,checkForUpdates:()=>xp,getRepo:()=>Jy,isNewer:()=>hl,isOutdated:()=>Qn,maybePromptToUpdate:()=>Ds,update:()=>Mp,updateError:()=>wp});async function gl(e){let t=await e;if(t.ok)return t.value;throw wp=t.error,t.error}async function xp(){return Rs=await gl(VencordNative.updater.getUpdates()),Rs.some(e=>e.hash===Xo)?(hl=!0,Qn=!1):Qn=Rs.length>0}async function Mp(){if(!Qn)return!0;let e=await gl(VencordNative.updater.update());if(e&&(Qn=!1,!await gl(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Ds(e,t=!1){return;try{if(await xp()){let r=confirm(e);if(r&&hl)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Mp(),Cs())}}catch(o){Tp.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Tp,Qn,hl,wp,Rs,Jy,zr=y(()=>{"use strict";a();l();bi();Xe();Xn();Tp=new ie("Updater","white"),Qn=!1,hl=!1;Jy=()=>gl(VencordNative.updater.getRepo())});function Vy(){Ds("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 e0=y(()=>{"use strict";a();l();zr()});function Qo({title:e,children:t}){return n(T.FormSection,null,n(te,{variant:"heading-lg/semibold",tag:"h2",className:K.bottom16},e),t)}function pn(e,t){return U.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:VA})}var VA,Jn=y(()=>{"use strict";a();l();Xy();Qy();ce();e0();et();ku();x();VA=Du(Vy)});var r0={};Ve(r0,{default:()=>n5});function e5(){let[e,,t]=dt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=xt(),r=q.useMemo(()=>Math.random()>.5?o0:n0,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),c=!1,u=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},!1,!1,!1,!1,!1];return n(Qo,{title:"Vencord Settings"},n(o5,{image:r}),n(T.FormSection,{title:"Quick Actions"},n(Nt,{className:t0("quick-actions-card")},n(q.Fragment,null,!1,n(k,{onClick:()=>VencordNative.quickCss.openEditor(),size:k.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),!1,n(k,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:k.Sizes.SMALL,disabled:t},"Open in GitHub")))),n(T.FormDivider,null),n(T.FormSection,{className:K.top16,title:"Settings",tag:"h5"},n(T.FormText,{className:K.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),u.map(p=>p&&n(qt,{key:p.key,value:o[p.key],onChange:m=>o[p.key]=m,note:p.note},p.title))),c&&n(f,null,n(T.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(Ao,{className:K.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:p=>o.macosVibrancyStyle=p,isSelected:p=>o.macosVibrancyStyle===p,serialize:rs})),typeof Notification<"u"&&n(t5,{settings:o.notifications}))}function t5({settings:e}){return n(f,null,n(T.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(cn,{style:{padding:"1em"},className:K.bottom8},n(T.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(T.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(T.FormText,{className:K.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(Ao,{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(T.FormTitle,{tag:"h5",className:K.top16+" "+K.bottom8},"Notification Position"),n(Ao,{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(T.FormTitle,{tag:"h5",className:K.top16+" "+K.bottom8},"Notification Timeout"),n(T.FormText,{className:K.bottom16},"Set to 0s to never automatically time out"),n(Nr,{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(T.FormTitle,{tag:"h5",className:K.top16+" "+K.bottom8},"Notification Log Limit"),n(T.FormText,{className:K.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(Nr,{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:il,disabled:e.logLimit===0},"Open Notification Log"))}function o5({image:e}){return n(Nt,{className:t0("card","donate")},n("div",null,n(T.FormTitle,{tag:"h5"},"Support the Project"),n(T.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(Ts,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===n0?"pixelated":void 0,marginLeft:"auto",transform:e===o0?"rotate(10deg)":void 0}}))}var t0,o0,n0,n5,i0=y(()=>{"use strict";a();l();sl();G();st();$u();hi();et();Ie();Xn();lt();x();Jn();t0=Ce("vc-settings-"),o0="https://cdn.discordapp.com/emojis/1026533090627174460.png",n0="https://media.discordapp.net/stickers/1039992459209490513.png";n5=pn(e5,"Vencord Settings")});var s0=y(()=>{});var Np={};Ve(Np,{currentNotice:()=>ks,nextNotice:()=>a0,noticesQueue:()=>Pp,popNotice:()=>Cp,showNotice:()=>Ls});function Cp(){Ap.dismiss()}function a0(){ks=Pp.shift(),ks&&Ap.show(...ks,"VencordNotice")}function Ls(e,t,o){Pp.push(["GENERIC",e,t,o]),ks||a0()}var Ap,Pp,ks,yl=y(()=>{"use strict";a();l();z();yt(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Ap=e);Pp=[],ks=null});var l0=y(()=>{});function Zt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:ee(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ti({height:e=24,width:t=24,className:o}){return n(Zt,{height:e,width:t,className:ee(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 vl(e){return n(Zt,{...e,className:ee(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 jr(e){return n(Zt,{...e,className:ee(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 Wr(e){return n(Zt,{...e,className:ee(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 Sl(e){return n(Zt,{...e,className:ee(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 c0(e){return n(Zt,{"aria-label":Ye.Messages.GUILD_OWNER,...e,className:ee(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 u0(e){return n(Zt,{...e,className:ee(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 bl(e){return n(Zt,{...e,className:ee(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 Tl(e){return n(Zt,{...e,className:ee(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 p0(e){return n(Zt,{...e,className:ee(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 d0(e){return n(Zt,{...e,className:ee(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(Zt,{...e,className:ee(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 Vn(e){return n(Zt,{...e,className:ee(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 m0(e){return n(Zt,{...e,className:ee(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 f0(e){return n(Zt,{...e,className:ee(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 Mt=y(()=>{"use strict";a();l();l0();Ie();x()});function Es(){return`-${Co.fromTimestamp(Date.now())}`}function ye(e,t){let o=r5.createBotMessage({channelId:e,content:"",embeds:[]});return ro.receiveMessage(e,ci(t,o)),t}function vt(e,t,o){return e.find(r=>r.name===t)?.value||o}var r5,Dp=y(()=>{"use strict";a();l();Ie();z();x();r5=w("createBotMessage")});var In,Jo,kp,wl=y(()=>{"use strict";a();l();In=(v=>(v[v.SUB_COMMAND=1]="SUB_COMMAND",v[v.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",v[v.STRING=3]="STRING",v[v.INTEGER=4]="INTEGER",v[v.BOOLEAN=5]="BOOLEAN",v[v.USER=6]="USER",v[v.CHANNEL=7]="CHANNEL",v[v.ROLE=8]="ROLE",v[v.MENTIONABLE=9]="MENTIONABLE",v[v.NUMBER=10]="NUMBER",v[v.ATTACHMENT=11]="ATTACHMENT",v))(In||{}),Jo=(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))(Jo||{}),kp=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(kp||{})});var Op={};Ve(Op,{ApplicationCommandInputType:()=>Jo,ApplicationCommandOptionType:()=>In,ApplicationCommandType:()=>kp,BUILT_IN:()=>er,OptionalMessageOption:()=>tr,RequiredMessageOption:()=>Os,_handleCommand:()=>s5,_init:()=>i5,commands:()=>Lp,findOption:()=>vt,generateId:()=>Es,prepareOption:()=>Ep,registerCommand:()=>wi,sendBotMessage:()=>ye,unregisterCommand:()=>Bs});function Ep(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===g0?r[o]=tr:t===h0&&(r[o]=Os),t.choices?.forEach(i=>i.displayName||=i.name),Ep(r[o])}),e}function a5(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};wi(r,t)})}function wi(e,t){if(!er){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(er.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${er.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Ep(e),e.options?.[0]?.type===1){a5(e,t);return}Lp[e.name]=e,er.push(e)}function Bs(e){let t=er.findIndex(o=>o.name===e);return t===-1?!1:(er.splice(t,1),delete Lp[e],!0)}var er,Lp,g0,h0,tr,Os,i5,s5,so=y(()=>{"use strict";a();l();qn();Dp();wl();Dp();wl();Lp={},g0=Symbol("OptionalMessageOption"),h0=Symbol("RequiredMessageOption"),tr=g0,Os=h0,i5=function(e){try{er=e,tr=e.find(t=>t.name==="shrug").options[0],Os=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},s5=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}"`,c=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),ye(o.channel.id,{content:`${s}: ${bs(c)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function y0({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Bp=y(()=>{"use strict";a();l()});function v0({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let c=t[r]??e.default,[u,p]=q.useState(c??!1),[m,g]=q.useState(null);q.useEffect(()=>{s(m!==null)},[m]);function v(b){let I=e.isValid?.call(o,b)??!0;typeof I=="string"?g(I):I?(g(null),p(b),i(b)):g("Invalid input provided.")}return n(T.FormSection,null,n(qt,{value:u,onChange:v,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},$r(Lu(r))),m&&n(T.FormText,{style:{color:"var(--text-danger)"}},m))}var S0=y(()=>{"use strict";a();l();qn();x()});function b0({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var T0=y(()=>{"use strict";a();l()});function _p({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function c(b){return e.type===2?BigInt(b):Number(b)}let[u,p]=q.useState(`${t[r]??e.default??0}`),[m,g]=q.useState(null);q.useEffect(()=>{s(m!==null)},[m]);function v(b){let I=e.isValid?.call(o,b)??!0;g(null),typeof I=="string"?g(I):I||g("Invalid input provided."),e.type===1&&BigInt(b)>=l5?(p(`${Number.MAX_SAFE_INTEGER}`),i(c(b))):(p(b),i(c(b)))}return n(T.FormSection,null,n(T.FormTitle,null,e.description),n(ct,{type:"number",pattern:"-?[0-9]+",value:u,onChange:v,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),m&&n(T.FormText,{style:{color:"var(--text-danger)"}},m))}var l5,w0=y(()=>{"use strict";a();l();P();x();l5=BigInt(Number.MAX_SAFE_INTEGER)});function x0({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let c=t[s]??e.options?.find(b=>b.default)?.value,[u,p]=q.useState(c??null),[m,g]=q.useState(null);q.useEffect(()=>{i(m!==null)},[m]);function v(b){let I=e.isValid?.call(o,b)??!0;typeof I=="string"?g(I):I?(g(null),p(b),r(b)):g("Invalid input provided.")}return n(T.FormSection,null,n(T.FormTitle,null,e.description),n(Ao,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:v,isSelected:b=>b===u,serialize:b=>String(b),...e.componentProps}),m&&n(T.FormText,{style:{color:"var(--text-danger)"}},m))}var M0=y(()=>{"use strict";a();l();x()});function or(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function I0({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let c=t[r]??e.default,[u,p]=q.useState(null);q.useEffect(()=>{s(u!==null)},[u]);function m(g){let v=e.isValid?.call(o,g)??!0;typeof v=="string"?p(v):v?(p(null),i(g)):p("Invalid input provided.")}return n(T.FormSection,null,n(T.FormTitle,null,e.description),n(Nr,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:c,onValueChange:m,onValueRender:g=>String(g.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Up=y(()=>{"use strict";a();l();x()});function A0({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[c,u]=q.useState(t[r]??e.default??null),[p,m]=q.useState(null);q.useEffect(()=>{s(p!==null)},[p]);function g(v){let b=e.isValid?.call(o,v)??!0;m(typeof b=="string"?b:b?null:"Invalid input provided."),u(v),i(v)}return n(T.FormSection,null,n(T.FormTitle,null,e.description),n(ct,{type:"text",value:c,onChange:g,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),p&&n(T.FormText,{style:{color:"var(--text-danger)"}},p))}var P0=y(()=>{"use strict";a();l();x()});var xl=y(()=>{"use strict";a();l();Bp();S0();T0();w0();M0();Up();P0()});var C0=y(()=>{});function N0(e){ge(t=>n(Pe,{...t},n(U,null,n(Le,{className:xi("root")},n(g5,{user:e})))))}function m5(){let e=Wn()===2?p5:d5;return n("img",{src:e,alt:"GitHub"})}function f5(){let e=Wn()===2?u5:c5;return n("img",{src:e,alt:"Website"})}function g5({user:e}){xt();let t=_e([go],()=>go.getUserProfile(e.id));ae(()=>{!t&&!e.bot&&e.id&&Nu(e.id)},[e.id]);let o=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=Ct(()=>{let s=Object.values(We);return(ii[e.id]?s.filter(u=>u.authors.includes(ii[e.id])):s.filter(u=>u.authors.some(p=>p.name===e.username))).filter(u=>!u.name.endsWith("API")).sort((u,p)=>Number(u.required??!1)-Number(p.required??!1))},[e.id,e.username]);return n(f,null,n("div",{className:xi("header")},n("img",{className:xi("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(T.FormTitle,{tag:"h2",className:xi("name")},e.username),n("div",{className:xi("links")},r&&n(zn,{href:"https://"+r},n(f5,null)),o&&n(zn,{href:`https://github.com/${o}`},n(m5,null)))),n("div",{className:xi("plugins")},i.map(s=>n(Ml,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>wt("Restart to apply changes!")}))))}var c5,u5,p5,d5,xi,R0=y(()=>{"use strict";a();l();C0();G();st();ce();N();ut();ze();x();Hr();Fp();c5="/assets/e1e96d89e192de1997f73730db26e94f.svg",u5="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",p5="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",d5="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",xi=Ce("vc-author-modal-")});function D0(e){let t=new y5({username:e.username,id:e.id??Es(),avatar:e.avatar,bot:!0});return F.dispatch({type:"USER_UPDATE",user:t}),t}function _s({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=q.useState([]),c=xt().plugins[e.name],[u,p]=q.useState({}),[m,g]=q.useState({}),[v,b]=q.useState(null),I=()=>Object.values(m).every(C=>!C),A=Boolean(c&&e.options&&!ns(e.options));q.useEffect(()=>{(async()=>{for(let C of e.authors.slice(0,6)){let $=C.id?await Ot.getUser(`${C.id}`).catch(()=>D0({username:C.name})):D0({username:C.name});s(j=>[...j,$])}})()},[]);async function M(){if(!e.options){o();return}if(e.beforeSave){let $=await Promise.resolve(e.beforeSave(u));if($!==!0){b($);return}}let C=!1;for(let[$,j]of Object.entries(u)){let X=e.options[$];c[$]=j,X?.onChange?.(j),X?.restartNeeded&&(C=!0)}C&&t(),o()}function R(){if(!A||!e.options)return n(T.FormText,null,"There are no settings for this plugin.");{let C=Object.entries(e.options).map(([$,j])=>{if(j.hidden)return null;function X(_){p(oe=>({...oe,[$]:_}))}function J(_){g(oe=>({...oe,[$]:_}))}let Q=v5[j.type];return n(Q,{id:$,key:$,option:j,onChange:X,onError:J,pluginSettings:c,definedSettings:e.settings})});return n(he,{flexDirection:"column",style:{gap:12,marginBottom:16}},C)}}function D(C,$){let j=e.authors.length-$,X=e.authors.length-j,J=X+e.authors.length-$;return n(ne,{text:e.authors.slice(X,J).map(Q=>Q.name).join(", ")},({onMouseEnter:Q,onMouseLeave:_})=>n("div",{className:$p.moreUsers,onMouseEnter:Q,onMouseLeave:_},"+",j))}return n(Pe,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(He,{separator:!1},n(te,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(ft,{onClick:o})),n(Le,null,n(T.FormSection,null,n(T.FormTitle,{tag:"h3"},"About ",e.name),n(T.FormText,null,e.description),n(T.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(h5,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:D,renderUser:C=>n(di,{className:$p.clickableAvatar,onClick:()=>N0(C)},n("img",{className:$p.avatar,src:C.getAvatarURL(void 0,80,!0),alt:C.username,title:C.username}))}))),!!e.settingsAboutComponent&&n("div",{className:ee(K.bottom8,"vc-text-selectable")},n(T.FormSection,null,n(U,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:u})))),n(T.FormSection,{className:K.bottom16},n(T.FormTitle,{tag:"h3"},"Settings"),R())),A&&n(mt,null,n(he,{flexDirection:"column",style:{width:"100%"}},n(he,{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:!I()},({onMouseEnter:C,onMouseLeave:$})=>n(k,{size:k.Sizes.SMALL,color:k.Colors.BRAND,onClick:M,onMouseEnter:C,onMouseLeave:$,disabled:!I()},"Save & Close"))),v&&n(te,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",v))))}var h5,$p,y5,v5,Gp=y(()=>{"use strict";a();l();so();G();ce();Bt();xo();et();Ie();ze();P();z();x();xl();R0();h5=Re("defaultRenderUser","showDefaultAvatarsForNullUsers"),$p=w("moreUsers","emptyUser","avatarContainer","clickableAvatar"),y5=Lt(()=>O.getCurrentUser().constructor);v5={[0]:A0,[1]:_p,[2]:_p,[3]:v0,[4]:x0,[5]:I0,[6]:b0}});var k0=y(()=>{});var L0=y(()=>{});function E0({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:ee(Il.container,"default-colors",e?Il.checked:void 0),style:{backgroundColor:e?Hp:zp,opacity:o?.3:1}},n("svg",{className:Il.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:Hp,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:Hp,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:zp,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:zp,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:Il.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var Hp,zp,Il,O0=y(()=>{"use strict";a();l();L0();Ie();z();Hp="var(--green-360)",zp="var(--primary-400)",Il=w("slider","input","container")});function Al({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:c,setEnabled:u,description:p,onMouseEnter:m,onMouseLeave:g}){return n("div",{className:Mi("card",{"card-disabled":e}),onMouseEnter:m,onMouseLeave:g},n("div",{className:Mi("header")},n("div",{className:Mi("name-author")},n(te,{variant:"text-md/bold",className:Mi("name")},o,t&&n(y0,{text:"NEW",color:"#ED4245"})),!!s&&n(te,{variant:"text-md/normal",className:Mi("author")},s)),r,n(E0,{checked:c,onChange:u,disabled:e})),n(te,{className:Mi("note"),variant:"text-sm/normal"},p),i)}var Mi,jp=y(()=>{"use strict";a();l();k0();st();Bp();O0();x();Mi=Ce("vc-addon-")});var Yp={};Ve(Yp,{_usePatchContextMenu:()=>T5,addContextMenuPatch:()=>qp,addGlobalContextMenuPatch:()=>S5,findGroupChildrenByChildId:()=>pt,globalPatches:()=>Pl,navPatches:()=>Us,removeContextMenuPatch:()=>Kp,removeGlobalContextMenuPatch:()=>b5});function qp(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=Us.get(o);r||(r=new Set,Us.set(o,r)),r.add(t)}}function S5(e){Pl.add(e)}function Kp(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Us.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function b5(e){return Pl.delete(e)}function pt(e,t){for(let o of t){if(o==null)continue;if(Array.isArray(o)){let i=pt(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=pt(e,r);if(i!==null)return i}}return null}function T5(e){e={...e,children:Wp(e.children)},e.contextMenuApiArguments??=[];let t=Us.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){B0.error(`Patch for ${e.navId} errored,`,r)}for(let o of Pl)try{o(e.navId,e.children,...e.contextMenuApiArguments)}catch(r){B0.error("Global patch errored,",r)}return e}function Wp(e){return Array.isArray(e)?e.map(Wp):(q.isValidElement(e)&&(e=q.cloneElement(e),e?.props?.children&&(e.type!==B.MenuControlItem||e.type===B.MenuControlItem&&e.props.control!=null)&&(e.props.children=Wp(e.props.children))),e)}var B0,Us,Pl,Ro=y(()=>{"use strict";a();l();Xe();x();B0=new ie("ContextMenu"),Us=new Map,Pl=new Set});var Jp={};Ve(Jp,{PMLogger:()=>w5,isPluginEnabled:()=>Xp,patches:()=>_0,plugins:()=>x5,startAllPlugins:()=>Fs,startDependenciesRecursive:()=>Nl,startPlugin:()=>$s,stopPlugin:()=>Qp});function Xp(e){return(We[e]?.required||We[e]?.isDependency||Zp[e]?.enabled)??!1}function Nl(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!H.plugins[r].enabled){if(Nl(We[r]),H.plugins[r].enabled=!0,We[r].patches){ao.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}$s(We[r])||o.push(r)}}),{restartNeeded:t,failures:o}}var ao,w5,x5,_0,Zp,U0,Fs,$s,Qp,Rl=y(()=>{"use strict";a();l();so();Ro();G();Xe();P();x();Hr();La();ao=new ie("PluginManager","#a6d189"),w5=ao,x5=We,_0=[],Zp=H.plugins;U0=Object.values(We);for(let e of U0)Zp[e.name]?.enabled&&e.dependencies?.forEach(t=>{let o=We[t];if(o)Zp[t].enabled=!0,o.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);ao.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&&Xp(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),_0.push(t)}Fs=rn("startAllPlugins",function(t){ao.info(`Starting plugins (stage ${t})`);for(let o in We)if(Xp(o)){if((We[o].startAt??"WebpackReady")!==t)continue;$s(We[o])}});$s=rn("startPlugin",function(t){let{name:o,commands:r,flux:i,contextMenus:s}=t;if(t.start){if(ao.info("Starting plugin",o),t.started)return ao.warn(`${o} already started`),!1;try{t.start(),t.started=!0}catch(c){return ao.error(`Failed to start ${o} `,c),!1}}if(r?.length){ao.info("Registering commands of plugin",o);for(let c of r)try{wi(c,o)}catch(u){return ao.error(`Failed to register command ${c.name} `,u),!1}}if(i)for(let c in i)F.subscribe(c,i[c]);if(s)for(let c in s)qp(c,s[c]);return!0},e=>`startPlugin ${e.name}`),Qp=rn("stopPlugin",function(t){let{name:o,commands:r,flux:i,contextMenus:s}=t;if(t.stop){if(ao.info("Stopping plugin",o),!t.started)return ao.warn(`${o} already stopped`),!1;try{t.stop(),t.started=!1}catch(c){return ao.error(`Failed to stop ${o} `,c),!1}}if(r?.length){ao.info("Unregistering commands of plugin",o);for(let c of r)try{Bs(c.name)}catch(u){return ao.error(`Failed to unregister command ${c.name} `,u),!1}}if(i)for(let c in i)F.unsubscribe(c,i[c]);if(s)for(let c in s)Kp(c,s[c]);return!0},e=>`stopPlugin ${e.name}`)});function A5(e){V.show({message:e,type:V.Type.FAILURE,id:V.genId(),options:{position:V.Position.BOTTOM}})}function P5({required:e}){return n(Nt,{className:qr("info-card",{"restart-card":e})},e?n(f,null,n(T.FormTitle,{tag:"h5"},"Restart required!"),n(T.FormText,{className:qr("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(T.FormTitle,{tag:"h5"},"Plugin Management"),n(T.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(T.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ml({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let c=H.plugins[e.name],u=()=>c.enabled??!1;function p(){Or(async()=>g=>n(_s,{...g,plugin:e,onRestartNeeded:()=>o(e.name)}))}function m(){let g=u();if(!g){let{restartNeeded:b,failures:I}=Nl(e);if(I.length){F0.error(`Failed to start dependencies for ${e.name}: ${I.join(", ")}`),Ls("Failed to start dependencies: "+I.join(", "),"Close",()=>null);return}else if(b){c.enabled=!0,o(e.name);return}}if(e.patches?.length){c.enabled=!g,o(e.name);return}if(g&&!e.started){c.enabled=!g;return}if(!(g?Qp(e):$s(e))){c.enabled=!1;let b=`Error while ${g?"stopping":"starting"} plugin ${e.name}`;F0.error(b),A5(b);return}c.enabled=!g}return n(Al,{name:e.name,description:e.description,isNew:s,enabled:u(),setEnabled:m,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>p(),className:ee(I5.button,qr("info-button"))},e.options&&!ns(e.options)?n(d0,null):n(Sl,null))})}function Vp(){let e=xt(),t=q.useMemo(()=>new es,[]);q.useEffect(()=>()=>void(t.hasChanges&&rt.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((b,I)=>n(f,null,I>0&&", ",De.parse("`"+b+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=q.useMemo(()=>{let b={};for(let I in We){let A=We[I].dependencies;if(A)for(let M of A)b[M]??=[],b[M].push(I)}return b},[]),r=q.useMemo(()=>Object.values(We).sort((b,I)=>b.name.localeCompare(I.name)),[]),[i,s]=q.useState({value:"",status:0}),c=b=>s(I=>({...I,value:b})),u=b=>s(I=>({...I,status:b})),p=b=>{let I=e.plugins[b.name]?.enabled;if(I&&i.status===2||!I&&i.status===1||i.status===3&&!m?.includes(b.name))return!1;if(!i.value.length)return!0;let A=i.value.toLowerCase();return b.name.toLowerCase().includes(A)||b.description.toLowerCase().includes(A)||b.tags?.some(M=>M.toLowerCase().includes(A))},[m]=dt(()=>nt("Vencord_existingPlugins").then(b=>{let I=Date.now()/1e3,A={},M=Object.values(r).map(D=>D.name),R=[];for(let{name:D}of r)(A[D]=b?.[D]??I)+60*60*24*2>I&&R.push(D);return ht("Vencord_existingPlugins",A),kr.isEqual(R,M)?[]:R})),g,v;if(r?.length){g=[],v=[];for(let b of r){if(!b.options&&b.name.endsWith("API")&&i.value!=="API"||!p(b))continue;if(b.required||o[b.name]?.some(A=>e.plugins[A].enabled)){let A=b.required?"This plugin is required for Vencord to function.":C5(o[b.name]?.filter(M=>e.plugins[M].enabled));v.push(n(ne,{text:A,key:b.name},({onMouseLeave:M,onMouseEnter:R})=>n(Ml,{onMouseLeave:M,onMouseEnter:R,onRestartNeeded:D=>t.handleChange(D),disabled:!0,plugin:b})))}else g.push(n(Ml,{onRestartNeeded:A=>t.handleChange(A),disabled:!1,plugin:b,isNew:m?.includes(b.name),key:b.name}))}}else g=v=n(te,{variant:"text-md/normal"},"No plugins meet search criteria.");return n(Qo,{title:"Plugins"},n(P5,{required:t.hasChanges}),n(T.FormTitle,{tag:"h5",className:ee(K.top20,K.bottom8)},"Filters"),n("div",{className:qr("filter-controls")},n(ct,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:c,className:K.bottom20}),n("div",{className:M5.inputWrapper},n(Ao,{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:u,isSelected:b=>b===i.status,closeOnSelect:!0}))),n(T.FormTitle,{className:K.top20},"Plugins"),n("div",{className:qr("grid")},g),n(T.FormDivider,{className:K.top20}),n(T.FormTitle,{tag:"h5",className:ee(K.top20,K.bottom8)},"Required Plugins"),n("div",{className:qr("grid")},v))}function C5(e){return n(q.Fragment,null,n(T.FormText,null,"This plugin is required by:"),e.map(t=>n(T.FormText,{className:qr("dep-text")},t)))}var qr,F0,M5,I5,Fp=y(()=>{"use strict";a();l();s0();wo();yl();G();st();Mt();Gp();jp();Jn();pu();Xe();et();Ie();ze();lt();z();x();Hr();Rl();qr=Ce("vc-plugins-"),F0=new ie("PluginSettings","#a6d189"),M5=w("inputDefault","inputWrapper"),I5=w("button","disabled","enabled")});var $0={};Ve($0,{default:()=>N5});var N5,G0=y(()=>{"use strict";a();l();Fp();Jn();N5=pn(Vp,"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 bo=y(()=>{"use strict";a();l()});var H0={};Ve(H0,{default:()=>_5});function L5({link:e}){let[t,o,r]=dt(()=>h(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let c=s.headers.get("Content-Type");if(!c?.startsWith("text/css")&&!c?.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(T.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function E5({themeLinks:e}){return e.length?n(f,null,n(T.FormTitle,{className:K.top20,tag:"h5"},"Validator"),n(T.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(Nt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(T.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(L5,{link:t}))))):null}function O5({theme:e,enabled:t,onChange:o,onDelete:r}){return n(Al,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:n("div",{style:{cursor:"pointer",color:"var(--status-danger"},onClick:r},n(Vn,null)),footer:n(he,{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&&Br(e.invite).catch(()=>wt("Invalid or expired invite"))}},"Discord Server"))})}function B5(){let e=xt(["themeLinks","enabledThemes"]),t=Tt(null),[o,r]=W(0),[i,s]=W(e.themeLinks.join(` `)),[c,u]=W(null),[p,,m]=dt(VencordNative.themes.getThemesDir);ae(()=>{g()},[]);async function g(){let R=await VencordNative.themes.getThemesList();u(R)}function v(R,D){if(D){if(e.enabledThemes.includes(R))return;e.enabledThemes=[...e.enabledThemes,R]}else e.enabledThemes=e.enabledThemes.filter(C=>C!==R)}async function b(R){if(R.stopPropagation(),R.preventDefault(),!R.currentTarget?.files?.length)return;let{files:D}=R.currentTarget,C=Array.from(D,$=>{let{name:j}=$;if(!!j.endsWith(".css"))return new Promise((X,J)=>{let Q=new FileReader;Q.onload=()=>{VencordNative.themes.uploadTheme(j,Q.result).then(X).catch(J)},Q.readAsText($)})});await Promise.all(C),g()}function I(){return n(f,null,n(Nt,{className:"vc-settings-card"},n(T.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(T.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(T.FormSection,{title:"Local Themes"},n(Nt,{className:"vc-settings-quick-actions-card"},n(f,null,n(k,{size:k.Sizes.SMALL,disabled:m},"Upload Theme",n(R5,{ref:t,onChange:b,multiple:!0,filters:[{extensions:["css"]}]})),n(k,{onClick:g,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:()=>ge(R=>n(_s,{...R,plugin:Vencord.Plugins.plugins.ClientTheme,onRestartNeeded:()=>{}})),size:k.Sizes.SMALL},"Edit ClientTheme"))),n("div",{className:k5("grid")},c?.map(R=>n(O5,{key:R.fileName,enabled:e.enabledThemes.includes(R.fileName),onChange:D=>v(R.fileName,D),onDelete:async()=>{v(R.fileName,!1),await VencordNative.themes.deleteTheme(R.fileName),g()},theme:R})))))}function A(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(R=>R.trim()).filter(Boolean))]}function M(){return n(f,null,n(Nt,{className:"vc-settings-card vc-text-selectable"},n(T.FormTitle,{tag:"h5"},"Paste links to css files here"),n(T.FormText,null,"One link per line"),n(T.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(T.FormSection,{title:"Online Themes",tag:"h5"},n(Ha,{value:i,onChange:s,className:ee(D5.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:A,rows:10}),n(E5,{themeLinks:e.themeLinks})))}return n(Qo,{title:"Themes"},n($o,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n($o.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n($o.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&I(),o===1&&M())}var GU,R5,D5,k5,_5,z0=y(()=>{"use strict";a();l();G();st();Bt();Mt();bo();Gp();ut();et();Ie();ze();Xn();lt();z();x();jp();Jn();GU=w("resolveInvite"),R5=oo(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),D5=oo(e=>typeof e.textarea=="string"),k5=Ce("vc-settings-theme-");_5=pn(B5,"Themes")});function Dl({value:e,onChange:t,validate:o}){let[r,i]=q.useState(e),[s,c]=q.useState();function u(p){i(p);let m=o(p);m===!0?(c(void 0),t(p)):c(m)}return n(f,null,n(ct,{type:"text",value:r,onChange:u,error:s}))}var ed=y(()=>{"use strict";a();l();x()});var j0={};Ve(j0,{default:()=>H5});function U5(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function F5(){let e=await h(new URL("/v1/",Zn()),{method:"DELETE",headers:{Authorization:await vi()}});if(!e.ok){ul.error(`Failed to erase data, API returned ${e.status}`),Ue({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}H.cloud.authenticated=!1,await yp(),Ue({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function $5(){let{cloud:e}=xt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(T.FormSection,{title:"Settings Sync",className:K.top16},n(T.FormText,{variant:"text-md/normal",className:K.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(qt,{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:()=>Si(!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:()=>fl(!0,!0)},"Sync from Cloud")),n(k,{size:k.Sizes.SMALL,color:k.Colors.RED,disabled:!t,onClick:()=>Zy()},"Delete Cloud Settings")))}function G5(){let e=xt(["cloud.authenticated","cloud.url"]);return n(Qo,{title:"Vencord Cloud"},n(T.FormSection,{title:"Cloud Settings",className:K.top16},n(T.FormText,{variant:"text-md/normal",className:K.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(qt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&zy(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(T.FormTitle,{tag:"h5"},"Backend URL"),n(T.FormText,{className:K.bottom8},"Which backend to use when using cloud integrations."),n(Dl,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,yp()},validate:U5}),n(k,{className:K.top8,size:k.Sizes.MEDIUM,color:k.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>rt.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:F5,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),n(T.FormDivider,{className:K.top16})),n($5,null))}var H5,W0=y(()=>{"use strict";a();l();Tn();G();ed();bo();vp();et();Ns();x();Jn();H5=pn(G5,"Cloud")});var q0={};Ve(q0,{default:()=>j5});function z5(){return n(Qo,{title:"Backup & Restore"},n(Nt,{className:ee("vc-settings-card","vc-backup-restore-card")},n(he,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(te,{variant:"text-md/normal",className:K.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(te,{variant:"text-md/normal",className:K.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(he,null,n(k,{onClick:()=>Yy(),size:k.Sizes.SMALL},"Import Settings"),n(k,{onClick:qy,size:k.Sizes.SMALL},"Export Settings")))}var j5,K0=y(()=>{"use strict";a();l();Bt();et();Ie();Ns();x();Jn();j5=pn(z5,"Backup & Restore")});var Gs,td=y(()=>{"use strict";a();l();G();N();P();bi();Gs=S({name:"Settings",description:"Adds Settings UI and debug info",authors:[d.Ven,d.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(H.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:(i0(),ri(r0)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(G0(),ri($0)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(z0(),ri(H0)).default,className:"vc-themes"},!1,{section:"VencordCloud",label:"Cloud",element:(W0(),ri(j0)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(K0(),ri(q0)).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||unsafeWindow.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" (Web)"},makeInfoElements(e,t){let{electronVersion:o,chromiumVersion:r,additionalInfo:i}=this;return n(f,null,n(e,{...t},"Vencord ",Xo,i),o&&n(e,{...t},"Electron ",o),r&&n(e,{...t},"Chromium ",r))}})});var Y0,W5,od,Z0=y(()=>{"use strict";a();l();nr();N();Ie();qn();P();zr();x();bi();Hr();td();Y0="Vencord-SupportHelper-Dismiss",W5=[Ra,"1024286218801926184","1033680203433660458"],od=S({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>W5.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=unsafeWindow.GLOBAL_ENV,t=(()=>"armcord"in unsafeWindow?`ArmCord v${unsafeWindow.armcord.version}`:`${typeof unsafeWindow<"u"?"UserScript":"Web"} (${navigator.userAgent})`)(),o=u=>u.endsWith("API")||We[u].required,r=Object.keys(We).filter(u=>Vencord.Plugins.isPluginEnabled(u)&&!o(u)),i=Object.keys(We).filter(u=>Vencord.Plugins.isPluginEnabled(u)&&o(u)),s={Vencord:`v1.7.8 \u2022 ${Xo}${Gs.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1713992796761)}`,"Discord Branch":e,Client:t,Platform:unsafeWindow.navigator.platform,Outdated:Qn,OpenAsar:"openasar"in unsafeWindow};return{content:` **Vencord Debug Info** >>> ${Object.entries(s).map(([u,p])=>`${u}: ${p}`).join(` `)} Enabled Plugins (${r.length+i.length}): ${bs(r.join(", ")+` `+i.join(", "))} `.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===Ra&&!is(O.getCurrentUser().id)&&Qn&&Xo!==await at.get(Y0)){let t=()=>at.set(Y0,Xo);rt.show({title:"Hold on!",body:n("div",null,n(T.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(T.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 nd,X0=y(()=>{"use strict";a();l();N();P();nd=S({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[d.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 rd,id,Q0=y(()=>{"use strict";a();l();G();N();P();rd=L({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}}),id=S({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[d.zt,d.Trwy],patches:[{find:'="MaskedLinkStore",',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>rd.store.domain},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"},predicate:()=>rd.store.file}],settings:rd})});var q5,K5,Y5,rr,sd,J0=y(()=>{"use strict";a();l();G();ce();N();P();z();q5=fo(".actionBarIcon)"),K5=w("popFirstFile","update"),Y5=/\.tar\.\w+$/,rr=L({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:()=>rr.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>rr.store.method!==1}}),sd=S({name:"AnonymiseFileNames",authors:[d.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:rr,renderIcon:U.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??rr.store.anonymiseByDefault;return n(q5,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,K5.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??rr.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=Y5.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(rr.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:rr.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return rr.store.consistent+i;case 2:return Date.now()+i}}})});async function V0(e,t){return(await Lr.fetchAssetIds(e,[t]))[0]}async function X5(e){let t={};return await Z5.fetchApplicationsRPC(t,e),t.application}var Z5,ev,Ii,ad,tv=y(()=>{"use strict";a();l();yl();bo();N();P();z();x();Z5=w("fetchApplicationsRPC","getRemoteIconURL");ev={};ad=S({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[d.Ducko],settingsAboutComponent:()=>n(f,null,n(T.FormTitle,{tag:"h3"},"How to use arRPC"),n(T.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 V0(o.application_id,r.large_image)),r?.small_image&&(r.small_image=await V0(o.application_id,r.small_image)),o){let i=o.application_id;ev[i]||=await X5(i);let s=ev[i];o.name||=s.name}F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in unsafeWindow)return;if(Ii&&Ii.close(),Ii=new WebSocket("ws://127.0.0.1:1337"),Ii.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(Ii.readyState===WebSocket.OPEN),1e3))){Ls("Failed to connect to arRPC, is it running?","Retry",()=>{Cp(),this.start()});return}V.show({message:"Connected to arRPC",type:V.Type.SUCCESS,id:V.genId(),options:{duration:1e3,position:V.Position.BOTTOM}})},stop(){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),Ii?.close()}})});var ld,ov=y(()=>{"use strict";a();l();N();P();ld=S({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[d.Xinto,d.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 nv,rv,Q5,iv,sv=y(()=>{"use strict";a();l();ce();z();x();cd();nv=Se("ChannelRTCStore"),rv=w("a","animated","useTransition"),Q5=Re('("guildsnav")'),iv=U.wrap(e=>{let t=_e([Ai],()=>Ai.getExpandedFolders()),o=_e([nv],()=>nv.isFullscreenInContext()),r=n(Q5,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(u=>`.${u}`).join("")),c={display:o?"none":"flex"};return!s||!It.store.sidebarAnim?i?n("div",{style:c},r):null:n(rv.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(u,p)=>p&&n(rv.animated.div,{style:{...u,...c}},r))},{noop:!0})});function eP(e){return V5.getGuildFolders().find(t=>t.guildIds.includes(e))}function lv(){for(let e of Ai.getExpandedFolders())pd.toggleGuildFolderExpand(e)}var J5,V5,Ai,pd,av,ud,It,dd,cd=y(()=>{"use strict";a();l();G();N();P();z();x();sv();({GuildsTree:J5}=w("GuildsTree")),V5=Se("SortedGuildStore"),Ai=Se("ExpandedGuildFolderStore"),pd=w("move","toggleGuildFolderExpand"),av=null,ud=!1;It=L({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}}),dd=S({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[d.juby,d.AutumnVN,d.Nuckyz],settings:It,patches:[{find:'("guildsnav")',predicate:()=>It.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:()=>It.store.sidebar&&It.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:()=>It.store.sidebar,replacement:[{predicate:()=>It.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!It.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!It.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:()=>It.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>It.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>It.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>It.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!It.store.closeAllFolders&&!It.store.forceOpen)&&av!==e.guildId){av=e.guildId;let t=eP(e.guildId);t?.folderId?It.store.forceOpen&&!Ai.isFolderExpanded(t.folderId)&&pd.toggleGuildFolderExpand(t.folderId):It.store.closeAllFolders&&lv()}},TOGGLE_GUILD_FOLDER_EXPAND(e){It.store.closeOthers&&!ud&&(ud=!0,F.wait(()=>{let t=Ai.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&pd.toggleGuildFolderExpand(o);ud=!1}))}},getGuildTree(e,t,o){if(!e||o==null)return t;let r=new J5;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(It.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(iv,{...e}),closeFolders:lv})});var md,cv=y(()=>{"use strict";a();l();N();P();md=S({name:"BetterGifAltText",authors:[d.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 fd,uv=y(()=>{"use strict";a();l();N();P();fd=S({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[d.Samwich],patches:[{find:".GIFPickerResultTypes.SEARCH",replacement:[{match:/(?<="state",{resultType:)null/,replace:'"Favorites"'}]}]})});var tP,gd,pv=y(()=>{"use strict";a();l();G();N();Ar();P();z();tP=w("section","lastSection"),gd=S({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[d.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>{if(t.match(/}=.+/)){let r=e.match(Bo(/hideNote:(\i)=!?\d/));return r?`hideNote:${r[1]}=!0`:e}return"hideNote:!0"}}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".popularApplicationCommandIds,",replacement:{match:/lastSection:(!?\i)}\),/,replace:"$&$self.patchPadding($1),"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>H.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e)return n("div",{className:tP.lastSection})}})});function oP(){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 nP(){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 dv,hd,mv=y(()=>{"use strict";a();l();N();ut();P();z();x();dv=w("open","selectRole","updateGuild");hd=S({name:"BetterRoleContext",description:"Adds options to copy role color / edit role when right clicking roles in the user profile",authors:[d.Ven],start(){us.DeveloperMode.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=ys();if(!o)return;let r=pe.getRole(o.id,t);!r||(r.colorString&&e.push(n(B.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>no.copy(r.colorString),icon:nP})),Be.getGuildPermissionProps(o).canManageRoles&&e.push(n(B.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await dv.open(o.id,"ROLES"),dv.selectRole(t)},icon:oP})))}}})});var yd,fv=y(()=>{"use strict";a();l();G();N();P();x();yd=S({name:"BetterRoleDot",authors:[d.Ven,d.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:()=>H.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>H.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!H.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>H.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!H.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){no.copy(e),V.show({message:"Copied to Clipboard!",type:V.Type.SUCCESS,id:V.genId(),options:{duration:1e3,position:V.Position.BOTTOM}})}})});var gv,hv,yv,vv,Sv,bv,Tv,wv,xv,Mv=y(()=>{"use strict";a();l();lt();z();gv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"})),hv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M188.8,255.93A67.2,67.2,0,1,0,256,188.75,67.38,67.38,0,0,0,188.8,255.93Z"}),n("path",{d:"M476.75,217.79s0,0,0,.05a206.63,206.63,0,0,0-7-28.84h-.11a202.16,202.16,0,0,1,7.07,29h0a203.5,203.5,0,0,0-7.07-29H314.24c19.05,17,31.36,40.17,31.36,67.05a86.55,86.55,0,0,1-12.31,44.73L231,478.45a2.44,2.44,0,0,1,0,.27V479h0v-.26A224,224,0,0,0,256,480c6.84,0,13.61-.39,20.3-1a222.91,222.91,0,0,0,29.78-4.74C405.68,451.52,480,362.4,480,255.94A225.25,225.25,0,0,0,476.75,217.79Z"}),n("path",{d:"M256,345.5c-33.6,0-61.6-17.91-77.29-44.79L76,123.05l-.14-.24A224,224,0,0,0,207.4,474.55l0-.05,77.69-134.6A84.13,84.13,0,0,1,256,345.5Z"}),n("path",{d:"M91.29,104.57l77.35,133.25A89.19,89.19,0,0,1,256,166H461.17a246.51,246.51,0,0,0-25.78-43.94l.12.08A245.26,245.26,0,0,1,461.17,166h.17a245.91,245.91,0,0,0-25.66-44,2.63,2.63,0,0,1-.35-.26A223.93,223.93,0,0,0,91.14,104.34l.14.24Z"})),yv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 24 24"},n("path",{d:"M21.86 17.86q.14 0 .25.12.1.13.1.25t-.11.33l-.32.46-.43.53-.44.5q-.21.25-.38.42l-.22.23q-.58.53-1.34 1.04-.76.51-1.6.91-.86.4-1.74.64t-1.67.24q-.9 0-1.69-.28-.8-.28-1.48-.78-.68-.5-1.22-1.17-.53-.66-.92-1.44-.38-.77-.58-1.6-.2-.83-.2-1.67 0-1 .32-1.96.33-.97.87-1.8.14.95.55 1.77.41.82 1.02 1.5.6.68 1.38 1.21.78.54 1.64.9.86.36 1.77.56.92.2 1.8.2 1.12 0 2.18-.24 1.06-.23 2.06-.72l.2-.1.2-.05zm-15.5-1.27q0 1.1.27 2.15.27 1.06.78 2.03.51.96 1.24 1.77.74.82 1.66 1.4-1.47-.2-2.8-.74-1.33-.55-2.48-1.37-1.15-.83-2.08-1.9-.92-1.07-1.58-2.33T.36 14.94Q0 13.54 0 12.06q0-.81.32-1.49.31-.68.83-1.23.53-.55 1.2-.96.66-.4 1.35-.66.74-.27 1.5-.39.78-.12 1.55-.12.7 0 1.42.1.72.12 1.4.35.68.23 1.32.57.63.35 1.16.83-.35 0-.7.07-.33.07-.65.23v-.02q-.63.28-1.2.74-.57.46-1.05 1.04-.48.58-.87 1.26-.38.67-.65 1.39-.27.71-.42 1.44-.15.72-.15 1.38zM11.96.06q1.7 0 3.33.39 1.63.38 3.07 1.15 1.43.77 2.62 1.93 1.18 1.16 1.98 2.7.49.94.76 1.96.28 1 .28 2.08 0 .89-.23 1.7-.24.8-.69 1.48-.45.68-1.1 1.22-.64.53-1.45.88-.54.24-1.11.36-.58.13-1.16.13-.42 0-.97-.03-.54-.03-1.1-.12-.55-.1-1.05-.28-.5-.19-.84-.5-.12-.09-.23-.24-.1-.16-.1-.33 0-.15.16-.35.16-.2.35-.5.2-.28.36-.68.16-.4.16-.95 0-1.06-.4-1.96-.4-.91-1.06-1.64-.66-.74-1.52-1.28-.86-.55-1.79-.89-.84-.3-1.72-.44-.87-.14-1.76-.14-1.55 0-3.06.45T.94 7.55q.71-1.74 1.81-3.13 1.1-1.38 2.52-2.35Q6.68 1.1 8.37.58q1.7-.52 3.58-.52Z"})),vv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M130.22 127.548C130.38 127.558 130.3 127.558 130.22 127.548V127.548ZM481.64 172.898C471.03 147.398 449.56 119.898 432.7 111.168C446.42 138.058 454.37 165.048 457.4 185.168C457.405 185.306 457.422 185.443 457.45 185.578C429.87 116.828 383.098 89.1089 344.9 28.7479C329.908 5.05792 333.976 3.51792 331.82 4.08792L331.7 4.15792C284.99 30.1109 256.365 82.5289 249.12 126.898C232.503 127.771 216.219 131.895 201.19 139.035C199.838 139.649 198.736 140.706 198.066 142.031C197.396 143.356 197.199 144.87 197.506 146.323C197.7 147.162 198.068 147.951 198.586 148.639C199.103 149.327 199.76 149.899 200.512 150.318C201.264 150.737 202.096 150.993 202.954 151.071C203.811 151.148 204.676 151.045 205.491 150.768L206.011 150.558C221.511 143.255 238.408 139.393 255.541 139.238C318.369 138.669 352.698 183.262 363.161 201.528C350.161 192.378 326.811 183.338 304.341 187.248C392.081 231.108 368.541 381.784 246.951 376.448C187.487 373.838 149.881 325.467 146.421 285.648C146.421 285.648 157.671 243.698 227.041 243.698C234.541 243.698 255.971 222.778 256.371 216.698C256.281 214.698 213.836 197.822 197.281 181.518C188.434 172.805 184.229 168.611 180.511 165.458C178.499 163.75 176.392 162.158 174.201 160.688C168.638 141.231 168.399 120.638 173.51 101.058C148.45 112.468 128.96 130.508 114.8 146.428H114.68C105.01 134.178 105.68 93.7779 106.25 85.3479C106.13 84.8179 99.022 89.0159 98.1 89.6579C89.5342 95.7103 81.5528 102.55 74.26 110.088C57.969 126.688 30.128 160.242 18.76 211.318C14.224 231.701 12 255.739 12 263.618C12 398.318 121.21 507.508 255.92 507.508C376.56 507.508 478.939 420.281 496.35 304.888C507.922 228.192 481.64 173.82 481.64 172.898Z"})),Sv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z"})),bv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 496 512"},n("path",{d:"M313.9 32.7c-170.2 0-252.6 223.8-147.5 355.1 36.5 45.4 88.6 75.6 147.5 75.6 36.3 0 70.3-11.1 99.4-30.4-43.8 39.2-101.9 63-165.3 63-3.9 0-8 0-11.9-.3C104.6 489.6 0 381.1 0 248 0 111 111 0 248 0h.8c63.1.3 120.7 24.1 164.4 63.1-29-19.4-63.1-30.4-99.3-30.4zm101.8 397.7c-40.9 24.7-90.7 23.6-132-5.8 56.2-20.5 97.7-91.6 97.7-176.6 0-84.7-41.2-155.8-97.4-176.6 41.8-29.2 91.2-30.3 132.9-5 105.9 98.7 105.5 265.7-1.2 364z"})),Tv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"})),wv=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{"fill-rule":"evenodd",d:"M4.475 5.458c-.284 0-.514-.237-.47-.517C4.28 3.24 5.576 2 7.825 2c2.25 0 3.767 1.36 3.767 3.215 0 1.344-.665 2.288-1.79 2.973-1.1.659-1.414 1.118-1.414 2.01v.03a.5.5 0 0 1-.5.5h-.77a.5.5 0 0 1-.5-.495l-.003-.2c-.043-1.221.477-2.001 1.645-2.712 1.03-.632 1.397-1.135 1.397-2.028 0-.979-.758-1.698-1.926-1.698-1.009 0-1.71.529-1.938 1.402-.066.254-.278.461-.54.461h-.777ZM7.496 14c.622 0 1.095-.474 1.095-1.09 0-.618-.473-1.092-1.095-1.092-.606 0-1.087.474-1.087 1.091S6.89 14 7.496 14Z"})),xv=bt(()=>_a("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"))});function Hs(e){return`${e.os} \xB7 ${e.platform}`}function zs(){return at.set(Iv(),lo)}async function Av(){(await at.get(Iv())||new Map).forEach((t,o)=>{lo.set(o,t)})}function Pv(e){switch(e){case"Windows Mobile":case"Windows":return"#55a6ef";case"Linux":return"#cdcd31";case"Android":return"#7bc958";case"Mac OS X":case"iOS":return"";default:return"#f3799a"}}function Cv(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return gv;case"Android Chrome":case"Chrome iOS":case"Chrome":return hv;case"Edge":return yv;case"Firefox":return vv;case"Internet Explorer":return Sv;case"Opera Mini":case"Opera":return bv;case"Mobile Safari":case"Safari":return Tv;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return xv;default:return wv}}var Iv,lo,vd=y(()=>{"use strict";a();l();nr();x();Mv();Iv=()=>`BetterSessions_savedSessions_${O.getCurrentUser().id}`,lo=new Map});function Nv({props:e,session:t,state:o}){let[r,i]=o,[s,c]=q.useState(lo.get(t.id_hash)?.name??"");function u(){lo.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:Hs(t.client_info)),zs(),e.onClose()}return n(Pe,{...e},n(He,null,n(T.FormTitle,{tag:"h4"},"Rename")),n(Le,null,n(T.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),n(ct,{style:{marginBottom:"10px"},placeholder:Hs(t.client_info),value:s,onChange:c,onKeyDown:p=>{p.key==="Enter"&&u()}}),n(k,{style:{marginBottom:"20px",paddingLeft:"1px",paddingRight:"1px",opacity:.6},look:k.Looks.LINK,color:k.Colors.LINK,size:k.Sizes.NONE,onClick:()=>c("")},"Reset Name")),n(mt,null,n(k,{color:k.Colors.BRAND,onClick:u},"Save"),n(k,{color:k.Colors.TRANSPARENT,look:k.Looks.LINK,onClick:()=>e.onClose()},"Cancel")))}var Rv=y(()=>{"use strict";a();l();ze();x();vd()});function Dv({session:e,state:t}){return n(k,{look:k.Looks.LINK,color:k.Colors.LINK,size:k.Sizes.NONE,style:{paddingTop:"0px",paddingBottom:"0px",top:"-2px"},onClick:()=>ge(o=>n(Nv,{props:o,session:e,state:t}))},"Rename")}var kv=y(()=>{"use strict";a();l();ze();x();Rv()});var rP,iP,Lv,sP,aP,Sd,bd,Ev=y(()=>{"use strict";a();l();Tn();G();ce();N();P();z();x();kv();vd();rP=Se("AuthSessionsStore"),iP=w("saveAccountChanges","open"),Lv=w("timestampTooltip","blockquoteContainer"),sP=w("sessionIcon"),aP=Uo("BlobMask"),Sd=L({backgroundCheck:{type:3,description:"Check for new sessions in the background, and display notifications when they are detected",default:!1,restartNeeded:!0},checkInterval:{description:"How often to check for new sessions in the background (if enabled), in minutes",type:1,default:20,restartNeeded:!0}}),bd=S({name:"BetterSessions",description:"Enhances the sessions (devices) menu. Allows you to view exact timestamps, give each session a custom name, and receive notifications about new sessions.",authors:[d.amia],settings:Sd,patches:[{find:"Messages.AUTH_SESSIONS_SESSION_LOG_OUT",replacement:[{match:/({variant:"eyebrow",className:\i\.sessionInfoRow,children:).{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:\i\[\d+\]}\)\]}\)\]/,replace:"$1$self.renderName(arguments[0])"},{match:/({variant:"text-sm\/medium",className:\i\.sessionInfoRow,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/,replace:"$1$self.renderTimestamp({ ...arguments[0], timeLabel: $2 })}"},{match:/\.currentSession:null\),children:\[(?<=,icon:(\i)\}.+?)/,replace:"$& $self.renderIcon({ ...arguments[0], DeviceIcon: $1 }), false &&"}]},{find:"this.getBadgePositionInterpolation(",replacement:{match:/(\i\.animated\.rect,{id:\i,x:48-\(\i\+8\)\+4,y:)28(,width:\i\+8,height:)24,/,replace:(e,t,o)=>`${t} 48 - ((this.props.lowerBadgeHeight ?? 16) + 8) + 4 ${o} (this.props.lowerBadgeHeight ?? 16) + 8,`}}],renderName:U.wrap(({session:e})=>{let t=lo.get(e.id_hash),o=q.useState(t?.name?`${t.name}*`:Hs(e.client_info)),[r,i]=o;return n(f,null,n("span",null,r),(t==null||t.isNew)&&n("div",{className:"vc-plugins-badge",style:{backgroundColor:"#ED4245",marginLeft:"2px"}},"NEW"),n(Dv,{session:e,state:o}))},{noop:!0}),renderTimestamp:U.wrap(({session:e,timeLabel:t})=>n(ne,{text:e.approx_last_used_time.toLocaleString(),tooltipClassName:Lv.timestampTooltip},o=>n("span",{...o,className:Lv.timestamp},t)),{noop:!0}),renderIcon:U.wrap(({session:e,DeviceIcon:t})=>{let o=Cv(e.client_info.platform);return n(aP,{style:{cursor:"unset"},selected:!1,lowerBadge:n("div",{style:{width:"20px",height:"20px",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"50%",backgroundColor:"var(--interactive-normal)",color:"var(--background-secondary)"}},n(o,{width:14,height:14})),lowerBadgeWidth:20,lowerBadgeHeight:20},n("div",{className:sP.sessionIcon,style:{backgroundColor:Pv(e.client_info.os)}},n(t,{width:28,height:28})))},{noop:!0}),async checkNewSessions(){let e=await Et.get({url:"/auth/sessions"});for(let t of e.body.user_sessions)lo.has(t.id_hash)||(lo.set(t.id_hash,{name:"",isNew:!0}),Ue({title:"BetterSessions",body:`New session: ${t.client_info.os} \xB7 ${t.client_info.platform} \xB7 ${t.client_info.location}`,permanent:!0,onClick:()=>iP.open("Sessions")}));zs()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=rP.getSessions().map(t=>t.id_hash);e.forEach(t=>{lo.has(t)||lo.set(t,{name:"",isNew:!1})}),e.length>0&&lo.forEach((t,o)=>{e.includes(o)||lo.delete(o)}),lo.forEach(t=>{t.isNew=!1}),zs()}},async start(){await Av(),this.checkNewSessions(),Sd.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,Sd.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}})});function cP({mode:e,baseLayer:t=!1,...o}){let r=e==="HIDDEN",i=Tt(null);ae(()=>()=>{zo.dispatch("LAYER_POP_START"),zo.dispatch("LAYER_POP_COMPLETE")},[]);let s=n("div",{ref:i,"aria-hidden":r,className:lP({[Ov.layer]:!0,[Ov.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(qa,{containerRef:i},s)}var lP,Ov,Pi,Td,Bv=y(()=>{"use strict";a();l();G();st();ce();N();P();z();x();lP=Ce(""),Ov=w("animating","baseLayer","bg","layer","layers"),Pi=L({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}});Td=S({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[d.Kyuuhachi],settings:Pi,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=\((\i),"contextType",\i\.AccessibilityPreferencesContext\);)/,replace:"$1=$self.Layer;",predicate:()=>Pi.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"\d+",name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>Pi.store.eagerLoad}]},{find:"DefaultCustomContentScroller:function()",replacement:[{match:/\(0,\i\.useTransition\)\((\i)/,replace:"(_cb=>_cb(void 0,$1))||$&"},{match:/\i\.animated\.div/,replace:'"div"'}],predicate:()=>Pi.store.disableFade},{find:"Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",replacement:{match:/(?<=(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?openContextMenuLazy.{0,100}?(await Promise\.all[^};]*?\)\)).*?,)(?=\1\(this)/,replace:"(async ()=>$2)(),"},predicate:()=>Pi.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(U,{fallback:()=>e.children},n(cP,{...e}))},wrapMenu(e){if(!Pi.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(B.MenuItem,{id:r.replace(/\W/,"_"),label:r,children:s,action:s[0].props.action}):s})}}}})});var wd,_v=y(()=>{"use strict";a();l();N();P();wd=S({name:"BetterUploadButton",authors:[d.fawn,d.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 Uv,Fv,$v=y(()=>{"use strict";a();l();z();Uv=Se("ApplicationStreamPreviewStore"),Fv=Se("ApplicationStreamingStore")});var uP,Gv,pP,dP,xd,Hv=y(()=>{"use strict";a();l();Mt();N();ut();P();x();$v();uP=async({guildId:e,channelId:t,ownerId:o})=>{let r=await Uv.getPreviewURL(e,t,o);!r||qo(r)},Gv=(e,{userId:t})=>{let o=Fv.getAnyStreamForUser(t);if(!o)return;let r=n(B.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:u0,action:()=>o&&uP(o),disabled:!o});e.push(n(B.MenuSeparator,null),r)},pP=(e,{stream:t})=>Gv(e,{userId:t.ownerId}),dP=(e,{user:t})=>{if(t)return Gv(e,{userId:t.id})},xd=S({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[d.phil],contextMenus:{"user-context":dP,"stream-context":pP}})});function zv(){js.textContent=` .vc-nsfw-img [class^=imageWrapper] img, .vc-nsfw-img [class^=wrapperPaused] video { filter: blur(${H.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 js,Md,jv=y(()=>{"use strict";a();l();G();N();P();Md=S({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[d.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:zv}},start(){js=document.createElement("style"),js.id="VcBlurNsfw",document.head.appendChild(js),zv()},stop(){js?.remove()}})});function mP(e){let t=H.plugins.CallTimer.format==="human",o=g=>t?g:g.toString().padStart(2,"0"),r=g=>t?g:"",i=t?" ":":",s=Math.floor(e/864e5),c=Math.floor(e%864e5/36e5),u=Math.floor(e%864e5%36e5/6e4),p=Math.floor(e%864e5%36e5%6e4/1e3),m="";return s&&(m+=`${s}d `),(c||m)&&(m+=`${o(c)}${r("h")}${i}`),(u||m||!t)&&(m+=`${o(u)}${r("m")}${i}`),m+=`${o(p)}${r("s")}`,m}var Id,Wv=y(()=>{"use strict";a();l();G();ce();N();lt();P();Id=S({name:"CallTimer",description:"Adds a timer to vcs",authors:[d.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(U,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=ss({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},mP(t)))}})});var kd={};Ve(kd,{_handleClick:()=>hP,_handlePreEdit:()=>gP,_handlePreSend:()=>fP,addClickListener:()=>Rd,addPreEditListener:()=>Kr,addPreSendListener:()=>Xt,removeClickListener:()=>Dd,removePreEditListener:()=>Yr,removePreSendListener:()=>Qt});async function fP(e,t,o,r){o.replyOptions=r;for(let i of Pd)try{if((await i(e,t,o))?.cancel)return!0}catch(s){Ad.error(`MessageSendHandler: Listener encountered an unknown error `,s)}return!1}async function gP(e,t,o){for(let r of Cd)try{if((await r(e,t,o))?.cancel)return!0}catch(i){Ad.error(`MessageEditHandler: Listener encountered an unknown error `,i)}return!1}function Xt(e){return Pd.add(e),e}function Kr(e){return Cd.add(e),e}function Qt(e){return Pd.delete(e)}function Yr(e){return Cd.delete(e)}function hP(e,t,o){e=Go.getMessage(t.id,e.id)??e;for(let r of Nd)try{r(e,t,o)}catch(i){Ad.error(`MessageClickHandler: Listener encountered an unknown error `,i)}}function Rd(e){return Nd.add(e),e}function Dd(e){return Nd.delete(e)}var Ad,Pd,Cd,Nd,dn=y(()=>{"use strict";a();l();Xe();x();Ad=new ie("MessageEvents","#e5c890"),Pd=new Set,Cd=new Set;Nd=new Set});var qv,Kv=y(()=>{"use strict";a();l();qv=["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 Yv,yP,Ld,Zv=y(()=>{"use strict";a();l();dn();N();P();Kv();Yv=/[\\^$.*+?()[\]{}|]/g,yP=RegExp(Yv.source),Ld=S({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[d.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&yP.test(e)?e.replace(Yv,"\\$&"):e||""},createRules(){let e=qv;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,c,u)=>{this.removeParam(i,c,u)})})}),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=Xt((e,t)=>this.onSend(t)),this.preEdit=Kr((e,t,o)=>this.onSend(o))},stop(){Qt(this.preSend),Yr(this.preEdit)}})});var Xv=y(()=>{});function oS(e){let t=e.toString(16).padStart(6,"0");Ws.store.color=t,nS(t)}function Qv(e){bP({theme:e})}function TP(){let e=_e([Jv],()=>Jv.theme),t=e==="light",o=t?"dark":"light",i=_e([Vv],()=>Vv.gradientPreset)!==void 0,s=CP(Ws.store.color),c=!1,u=!0;return(t&&s<.26||!t&&s>.12)&&(c=!0),s<.26&&s>.12&&(u=!1),t&&s>.65&&(c=!0,u=!1),n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(T.FormTitle,{tag:"h3"},"Theme Color"),n(T.FormText,null,"Add a color to your Discord client theme")),n(vP,{color:parseInt(Ws.store.color,16),onChange:oS,showEyeDropper:!1,suggestedColors:SP})),(c||i)&&n(f,null,n(T.FormDivider,{className:ee(K.top8,K.bottom8)}),n("div",{className:`client-theme-contrast-warning ${c?t?"theme-dark":"theme-light":""}`},n("div",{className:"client-theme-warning"},n(T.FormText,null,"Warning, your theme won't look good:"),c&&n(T.FormText,null,"Selected color won't contrast well with text"),i&&n(T.FormText,null,"Nitro themes aren't supported")),c&&u&&n(k,{onClick:()=>Qv(o),color:k.Colors.RED},"Switch to ",o," mode"),i&&n(k,{onClick:()=>Qv(e),color:k.Colors.RED},"Disable Nitro Theme"))))}function tS(e,t,o){return Object.entries(e).filter(([r])=>r.search(t)>-1).map(([r,i])=>{let s=i-e[o],c=s>=0?"+":"-";return`${r}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${c} ${Math.abs(s).toFixed(2)}%);`}).join(` `)}function MP(e){let t={},o=eS.exec(e);for(;o!==null;){let[,r,i]=o;t[r]=parseFloat(i),o=eS.exec(e)}Od("clientThemeOffsets",[`.theme-light { ${tS(t,wP,"--primary-345-hsl")} }`,`.theme-dark { ${tS(t,xP,"--primary-600-hsl")} }`].join(` `))}function IP(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=Ll(o,A=>kl(A,r)).join(`, `),c=Ll(o,A=>kl(A,i)).join(`, `),u=`${s} { background: var(--primary-100) }`,p=`${c} { background-color: var(--primary-100) }`,m=/\.theme-light\{([^}]*--[^:}]*(?:background|bg)[^:}]*:var\(--white-500\)[^}]*)\}/m,g=/^(--[^:]*(?:background|bg)[^:]*):var\(--white-500\)/m,v=Ll(o,A=>kl(A,m)).map(A=>A.split(";")).flat(),I=`.theme-light { ${Ll(v,A=>kl(A,g)).map(A=>`${A}: var(--primary-100);`).join(` `)} }`;Od("clientThemeLightModeFixes",[u,p,I].join(` `))}function kl(e,t){let o=e.match(t);return o===null?null:o[1]}function Ll(e,t){return e.map(t).filter(Boolean)}function nS(e){let{hue:t,saturation:o,lightness:r}=PP(e),i=document.getElementById("clientThemeVars");i||(i=Od("clientThemeVars")),i.textContent=`:root { --theme-h: ${t}; --theme-s: ${o}%; --theme-l: ${r}%; }`}function Od(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 AP(){let e="",t=document.querySelectorAll('link[rel="stylesheet"]');for(let o of t){let r=o.getAttribute("href");if(!r)continue;let i=await h(r);e+=await i.text()}return e}function PP(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),c=i-s,u,p,m;return m=(i+s)/2,c===0?(u=0,p=0):(p=c/(1-Math.abs(2*m-1)),i===t?u=(o-r)/c%6:i===o?u=(r-t)/c+2:u=(t-o)/c+4,u*=60,u<0&&(u+=360)),p*=100,m*=100,{hue:u,saturation:p,lightness:m}}function CP(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 vP,SP,bP,Jv,Vv,Ws,Ed,eS,wP,xP,rS=y(()=>{"use strict";a();l();Xv();G();N();et();Ie();P();z();x();vP=Re(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),SP=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];({saveClientTheme:bP}=w("saveClientTheme"));Jv=Se("ThemeStore"),Vv=Se("ClientThemesBackgroundStore");Ws=L({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(TP,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(k,{onClick:()=>oS(3224376)},"Reset Theme Color")}}),Ed=S({name:"ClientTheme",authors:[d.F53,d.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:Ws,startAt:"DOMContentLoaded",async start(){nS(Ws.store.color);let e=await AP();MP(e),IP(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),eS=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,wP=/^--primary-[1-5]\d{2}-hsl/g,xP=/^--primary-[5-9]\d{2}-hsl/g});var Bd,iS=y(()=>{"use strict";a();l();N();P();Bd=S({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[d.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 NP,_d,sS=y(()=>{"use strict";a();l();N();Xn();Ar();P();z();z();x();NP=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},_d=S({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[d.Ven],getShortcuts(){function e(i){let s=new Map;return function(...c){let u=String(c);if(s.has(u))return s.get(u);let p=Pr(i(...c)),m=(()=>{switch(p.length){case 0:return null;case 1:return p[0];default:let g=[...new Set(p)];return g.length>1&&console.warn(`Warning: This filter matches ${p.length} modules. Make it more specific! `,g),p[0]}})();return m&&u&&s.set(u,m),m}}let t,o=e(i=>i),r=e(xe.byProps);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:to.c,wreq:to,wpsearch:Su,wpex:Ua,wpexs:i=>Ua(Ba(i)),find:o,findAll:Pr,findByProps:r,findAllByProps:(...i)=>Pr(xe.byProps(...i)),findByCode:e(xe.byCode),findAllByCode:i=>Pr(xe.byCode(i)),findComponentByCode:e(xe.componentByCode),findAllComponentsByCode:(...i)=>Pr(xe.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(xe.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:NP("restart"),canonicalizeMatch:Bo,canonicalizeReplace:ka,canonicalizeReplacement:os,fakeRender:(i,s)=>{let c=t?.deref(),u=c?.closed===!1?c:unsafeWindow.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(u),u.focus();let p=u.document;p.body.style.margin="1em",u.prepared||(u.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(m=>{let g=m.cloneNode(!0);m.parentElement?.tagName==="HEAD"?p.head.append(g):g.id?.startsWith("vencord-")||g.id?.startsWith("vcd-")?p.documentElement.append(g):p.body.append(g)})),Rr.render(q.createElement(i,s),p.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();unsafeWindow.shortcutList=e;for(let[t,o]of Object.entries(e))unsafeWindow[t]=o},stop(){delete unsafeWindow.shortcutList;for(let e in this.getShortcuts())delete unsafeWindow[e]}})});var RP,Ud,aS=y(()=>{"use strict";a();l();Mt();N();P();x();RP=(e,{user:t})=>{!t||e.push(n(B.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>no.copy(``),icon:Ti}))},Ud=S({name:"CopyUserURLs",authors:[d.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":RP}})});var mn,DP,lS,cS,kP,Fd,uS,$d,Gd,Hd,pS=y(()=>{"use strict";a();l();Tn();G();N();Xe();ze();P();zr();z();x();mn=new ie("CrashHandler"),{ModalStack:DP,DraftManager:lS,DraftType:cS,closeExpressionPicker:kP}=mo(()=>{let e=Cr(xe.byProps("pushLazy","popAll"),xe.byProps("clearDraft","saveDraft"),xe.byProps("DraftType"),xe.byProps("closeExpressionPicker","openExpressionPicker"));return{ModalStack:e[0],DraftManager:e[1],DraftType:e[2]?.DraftType,closeExpressionPicker:e[3]?.closeExpressionPicker}}),Fd=L({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}}),uS=!1,$d=!1,Gd=!0,Hd=S({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[d.Nuckyz],enabledByDefault:!0,settings:Fd,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!$d&&($d=!0,setTimeout(()=>{try{if(!Gd){try{Ue({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}Gd=!1,setTimeout(()=>Gd=!0,500)}catch{}try{uS||(uS=!0,Ds("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{Fd.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){mn.error("Failed to handle crash",o)}},1))},handlePreventCrash(e){try{Ue({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=Ae.getChannelId();lS.clearDraft(t,cS.ChannelMessage),lS.clearDraft(t,cS.FirstThreadMessage)}catch(t){mn.debug("Failed to clear drafts.",t)}try{kP()}catch(t){mn.debug("Failed to close expression picker.",t)}try{F.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){mn.debug("Failed to close open context menu.",t)}try{DP.popAll()}catch(t){mn.debug("Failed to close old modals.",t)}try{ln()}catch(t){mn.debug("Failed to close all open modals.",t)}try{F.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){mn.debug("Failed to close user popout.",t)}try{F.dispatch({type:"LAYER_POP_ALL"})}catch(t){mn.debug("Failed to pop all layers.",t)}if(Fd.store.attemptToNavigateToHome)try{jo.transitionTo("/channels/@me")}catch(t){mn.debug("Failed to navigate to home",t)}setImmediate(()=>$d=!1);try{e.setState({error:null,info:null})}catch(t){mn.debug("Failed to update crash handler component.",t)}}})});async function dS(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await Lr.fetchAssetIds(Zr.store.appID,[e]))[0]}function Ft(){El(!0),H.plugins.CustomRPC.enabled&&El()}function gS(){return Zr.store.type!==1}function BP(e){return!gS()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function mS(){return Zr.store.timestampMode!==3}function fS(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 hS(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:c,endTime:u,imageBig:p,imageBigTooltip:m,imageSmall:g,imageSmallTooltip:v,buttonOneText:b,buttonOneURL:I,buttonTwoText:A,buttonTwoURL:M}=Zr.store;if(!t)return;let R={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(R.url=s),Zr.store.timestampMode){case 1:R.timestamps={start:Date.now()};break;case 2:R.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(c||u)&&(R.timestamps={},c&&(R.timestamps.start=c),u&&(R.timestamps.end=u));break;case 0:default:break}b&&(R.buttons=[b,A].filter(Za),R.metadata={button_urls:[I,M].filter(Za)}),p&&(R.assets={large_image:await dS(p),large_text:m||void 0}),g&&(R.assets={...R.assets,small_image:await dS(g),small_text:v||void 0});for(let D in R){if(D==="type")continue;let C=R[D];(!C||C.length===0)&&delete R[D]}return R}async function El(e){let t=await hS();F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var LP,EP,OP,Zr,zd,yS=y(()=>{"use strict";a();l();G();bo();N();Xa();lt();P();z();x();LP=fo("profileThemeStyle:","--profile-gradient-primary-color"),EP=Re("onOpenGameProfile"),OP=w("activity","buttonColor");Zr=L({appID:{type:0,description:"Application ID (required)",onChange:Ft,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:Ft,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:Ft,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:Ft,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ft,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:Ft,disabled:gS,isValid:BP},timestampMode:{type:4,description:"Timestamp mode",onChange:Ft,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:Ft,disabled:mS,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:Ft,disabled:mS,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ft,isValid:fS},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ft,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:Ft,isValid:fS},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ft,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:Ft,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:Ft},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ft,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:Ft}});zd=S({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[d.captain,d.AutumnVN],start:El,stop:()=>El(!0),settings:Zr,settingsAboutComponent:()=>{let e=dt(hS),{profileThemeStyle:t}=LP({});return n(f,null,n(T.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(T.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(T.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(T.FormDivider,null),n("div",{style:{width:"284px",...t}},e[0]&&n(EP,{activity:e[0],className:OP.activity,channelId:Ae.getChannelId(),guild:pe.getGuild(ho.getLastSelectedGuildId()),application:{id:Zr.store.appID},user:O.getCurrentUser()})))}})});var vS=y(()=>{});async function UP(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=_P.exec(e.video.url)?.[1];if(!t)return;let o=await h(`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,c=i[0]?.votes>=0&&!i[0].original;if(!s&&!c)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title.replace(/ >(\S)/g," $1")),c&&(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 FP({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:c}=t.dearrow;t.dearrow.enabled=!i,c&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=c),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 _P,jd,SS=y(()=>{"use strict";a();l();vS();ce();N();Xe();P();x();_P=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;jd=S({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[d.Ven],embedDidMount:UP,renderButton(e){return n(U,{noop:!0},n(FP,{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 bS=y(()=>{});var $P,ir,TS,wS,xS,Xr,Ol,Ci,qs,Wd,sr=y(()=>{"use strict";a();l();$P="https://decor.fieryflames.dev",ir=$P+"/api",TS=ir+"/authorize",wS="https://ugc.decor.fieryflames.dev",xS="1096966363416899624",Xr="100101099111114",Ol="11497119",Ci="1096357702931841148",qs="dXp2SdxDcP",Wd=1e3*60*60*4});var GP,ar,Ks=y(()=>{"use strict";a();l();nr();xo();Xe();ze();x();sr();GP={async getItem(e){return at.get(e).then(t=>t??null)},async setItem(e,t){await at.set(e,t)},async removeItem(e){await at.del(e)}},ar=Lt(()=>Er(Mu((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[O.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[O.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)=>ge(i=>n(cs,{...i,scopes:["identify"],responseType:"code",redirectUri:TS,permissions:0n,clientId:xS,cancelCompletesFlow:!1,callback:async s=>{try{let c=new URL(s.location);c.searchParams.append("client","vencord");let u=await h(c);if(u?.ok){let p=await u.text();t().setToken(p)}else throw new Error("Request not OK");o(void 0)}catch(c){c instanceof Error&&(wt(`Failed to authorize: ${c.message}`,V.Type.FAILURE),new ie("Decor").error("Failed to authorize",c),r(c))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>GP,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function Bl(e,t){let o=await h(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${ar.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var MS,IS,AS,qd,PS,CS,_l=y(()=>{"use strict";a();l();sr();Ks();MS=async e=>{if(e?.length===0)return{};let t=new URL(ir+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await h(t).then(o=>o.json())},IS=async(e="@me")=>Bl(ir+`/users/${e}/decorations`).then(t=>t.json()),AS=async(e="@me")=>Bl(ir+`/users/${e}/decoration`).then(t=>t.json()),qd=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"),Bl(ir+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},PS=async e=>{await Bl(ir+`/decorations/${e}`,{method:"DELETE"})},CS=async()=>h(ir+"/decorations/presets").then(e=>e.json())});function Kd(e){return`${e.animated?"a_":""}${e.hash}`}function Ul(e){return{asset:Kd(e),skuId:Xr}}var Fl=y(()=>{"use strict";a();l();sr()});function NS(e){let[t,o]=W(e?An.getState().getAsset(e.id)??null:null);return ae(()=>{let r=An.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=An.getState();i(e.id)}return r},[]),t?{asset:t,skuId:Xr}:null}var An,Yd=y(()=>{"use strict";a();l();Ir();xo();x();_l();sr();An=Lt(()=>Er((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:Gt(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=Array.from(o),s=await MS(i),c=new Map(r),u=new Date;for(let p of i){let m=s[p]??null;c.set(p,{asset:m,fetchedAt:u})}e({usersDecorations:c})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:c}=t(),{fetchedAt:u}=i.get(o)??{};u&&!r&&Date.now()-u.getTime(){"use strict";a();l();xo();x();_l();Fl();Yd();fn=Lt(()=>Er((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await IS(),r=await AS();e({decorations:o,selectedDecoration:r})},async create(o){let r=await qd(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await PS(r);let{selectedDecoration:i,decorations:s}=t(),c={decorations:s.filter(u=>u.hash!==r),selectedDecoration:i?.hash===r?null:i};e(c)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),qd(o),An.getState().set(O.getCurrentUser().id,o?Kd(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ee,Ri,Di,RS,lr=y(()=>{"use strict";a();l();st();z();Ee=Ce("vc-decor-"),Ri=w("modalFooterShopButton"),Di=li(["openAvatarDecorationModal:"]),RS=li(["stickerInspected]:"])});var Ys,DS,$l,Zd,kS,Qr=y(()=>{"use strict";a();l();z();x();DS=e=>Ys=e,$l=hu(()=>{let e=yu(".shopPreviewBanner");return q.memo(e)}),kS=e=>Zd=e});function Xd(e){return n(Ys,{...e,isSelected:!1},n(m0,null),n(te,{variant:"text-xs/normal",color:"header-primary"},Ye.Messages.CREATE))}var LS=y(()=>{"use strict";a();l();Mt();x();Qr()});function Qd(e){return n(Ys,{...e},n(f0,null),n(te,{variant:"text-xs/normal",color:"header-primary"},Ye.Messages.NONE))}var ES=y(()=>{"use strict";a();l();Mt();x();Qr()});function Jd({decoration:e}){let{delete:t}=fn();return n(B.Menu,{navId:Ee("decoration-context-menu"),onClose:Kt.closeContextMenu,"aria-label":"Decoration Options"},n(B.MenuItem,{id:Ee("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:vl,action:()=>no.copy(e.hash)}),e.authorId===O.getCurrentUser().id&&n(B.MenuItem,{id:Ee("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Vn,action:()=>rt.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 OS=y(()=>{"use strict";a();l();Mt();x();Ni();lr()});function Vd(e){let{decoration:t}=e;return n(Zd,{...e,onContextMenu:o=>{Kt.openContextMenu(o,()=>n(Jd,{decoration:t}))},avatarDecoration:Ul(t)})}var BS=y(()=>{"use strict";a();l();x();Fl();Qr();OS()});function em({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ee("sectioned-grid-list-grid")},r.map(i=>n(q.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var _S=y(()=>{"use strict";a();l();x();lr()});function tm(e){return n("div",{className:ee(Ee("sectioned-grid-list-container"),HP.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ee("sectioned-grid-list-section")},e.renderSectionHeader(t),n(em,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var HP,US=y(()=>{"use strict";a();l();Ie();z();lr();_S();HP=w("managedReactiveScroller")});function qP(e){let[t,o]=W(null);return ae(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function KP(e){let[t,o]=W(""),[r,i]=W(null),[s,c]=W(!1),[u,p]=W(null);ae(()=>{u&&p(null)},[r]);let{create:m}=fn(),g=qP(r),v=Ct(()=>g?{asset:g,skuId:Ol}:null,[g]);return n(Pe,{...e,size:"medium",className:Ri.modal},n(He,{separator:!1,className:Ee("modal-header")},n(te,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(ft,{onClick:e.onClose})),n(Le,{className:Ee("create-decoration-modal-content"),scrollbarType:"none"},n(U,null,n(jP,{messageType:WP.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:Ee("create-decoration-modal-form-preview-container")},n("div",{className:Ee("create-decoration-modal-form")},u!==null&&n(te,{color:"text-danger",variant:"text-xs/normal"},u.message),n(T.FormSection,{title:"File"},n(zP,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(T.FormText,{type:"description",className:K.top8},"File should be APNG or PNG.")),n(T.FormSection,{title:"Name"},n(ct,{placeholder:"Companion Cube",value:t,onChange:o}),n(T.FormText,{type:"description",className:K.top8},"This name will be used when referring to this decoration."))),n("div",null,n($l,{avatarDecorationOverride:v,user:O.getCurrentUser()}))),n(T.FormText,{type:"description",className:K.bottom16},n("br",null),"You can receive updates on your decoration's review by joining ",n(Qe,{href:`https://discord.gg/${qs}`,onClick:async b=>{b.preventDefault(),pe.getGuild(Ci)?(ln(),F.dispatch({type:"LAYER_POP_ALL"}),jo.transitionToGuild(Ci)):await Br(qs)&&(ln(),F.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),"."))),n(mt,{className:Ee("modal-footer")},n(k,{onClick:()=>{c(!0),m({alt:t,file:r}).then(e.onClose).catch(b=>{c(!1),p(b)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Cancel")))}var zP,jP,WP,Gl,om=y(()=>{"use strict";a();l();ce();bo();ut();et();ze();z();x();sr();Ni();lr();Qr();zP=Re("fileUploadInput,"),{default:jP,HelpMessageTypes:WP}=w("HelpMessageTypes");Gl=()=>Promise.all([Di(),RS()]).then(()=>ge(e=>n(KP,{...e})))});function YP(e){return n(Pe,{...e,size:"small",className:Ri.modal},n(He,{separator:!1,className:Ee("modal-header")},n(te,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(ft,{onClick:e.onClose})),n(Le,{scrollbarType:"none"},n(T.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(mt,{className:Ee("modal-footer")},n(k,{onClick:()=>{ki.store.agreedToGuidelines=!0,e.onClose(),Gl()}},"Continue"),n(k,{onClick:e.onClose,color:k.Colors.PRIMARY,look:k.Looks.LINK},"Go Back")))}var FS,$S=y(()=>{"use strict";a();l();bo();ze();x();Hl();lr();om();FS=()=>Di().then(()=>ge(e=>n(YP,{...e})))});function XP(){let[e,t]=W([]);return ae(()=>{CS().then(t)},[]),e}function QP({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=W([]);return ae(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let c=O.getUser(s)??await Ot.getUser(s);i(u=>[...u,c])}})()},[e.authorIds]),n("div",null,n(he,null,n(T.FormTitle,{style:{flexGrow:1}},e.title),o&&n(ZP,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:K.bottom8})),t&&n(T.FormText,{type:"description",className:K.bottom8},e.subtitle))}function JP(e){let[t,o]=W(void 0),r=typeof t<"u",i=t!=null?Ul(t):t,{decorations:s,selectedDecoration:c,fetch:u,select:p}=fn();ae(()=>{u()},[]);let m=r?t:c,g=typeof m?.authorId<"u",v=s.some(C=>C.reviewed===!1),b=XP(),I=b.flatMap(C=>C.decorations),A=b.find(C=>C.id===m?.presetId),M=typeof A<"u",D=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(C=>!I.some($=>$.hash===C.hash)),"create"]},...b.map(C=>({title:C.name,subtitle:C.description||void 0,sectionKey:`preset-${C.id}`,items:C.decorations,authorIds:C.authorIds}))];return n(Pe,{...e,size:"dynamic",className:Ri.modal},n(He,{separator:!1,className:Ee("modal-header")},n(te,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(ft,{onClick:e.onClose})),n(Le,{className:Ee("change-decoration-modal-content"),scrollbarType:"none"},n(U,null,n(tm,{renderItem:C=>{if(typeof C=="string")switch(C){case"none":return n(Qd,{className:Ee("change-decoration-modal-decoration"),isSelected:m===null,onSelect:()=>o(null)});case"create":return n(ne,{text:"You already have a decoration pending review",shouldShow:v},$=>n(Xd,{className:Ee("change-decoration-modal-decoration"),...$,onSelect:v?()=>{}:ki.store.agreedToGuidelines?Gl:FS}))}else return n(ne,{text:"Pending review",shouldShow:C.reviewed===!1},$=>n(Vd,{...$,className:Ee("change-decoration-modal-decoration"),onSelect:C.reviewed!==!1?()=>o(C):()=>{},isSelected:m?.hash===C.hash,decoration:C}))},getItemKey:C=>typeof C=="string"?C:C.hash,getSectionKey:C=>C.sectionKey,renderSectionHeader:C=>n(QP,{section:C}),sections:D}),n("div",{className:Ee("change-decoration-modal-preview")},n($l,{avatarDecorationOverride:i,user:O.getCurrentUser()}),M&&n(T.FormTitle,{className:""},"Part of the ",A.name," Preset"),typeof m=="object"&&n(te,{variant:"text-sm/semibold",color:"header-primary"},m?.alt),g&&n(te,{key:`createdBy-${m.authorId}`},"Created by ",De.parse(`<@${m.authorId}>`))))),n(mt,{className:ee(Ee("change-decoration-modal-footer",Ee("modal-footer")))},n("div",{className:Ee("change-decoration-modal-footer-btn-container")},n(k,{onClick:()=>{p(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:()=>rt.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(){ar.getState().remove(O.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"},C=>n(k,{...C,onClick:async()=>{pe.getGuild(Ci)?(e.onClose(),F.dispatch({type:"LAYER_POP_ALL"}),jo.transitionToGuild(Ci)):await Br(qs)&&(ln(),F.dispatch({type:"LAYER_POP_ALL"}))},color:k.Colors.PRIMARY,look:k.Looks.LINK},"Discord Server")))))}var ZP,nm,GS=y(()=>{"use strict";a();l();ce();Bt();ut();et();Ie();ze();z();x();_l();sr();Ks();Ni();Fl();Hl();lr();Qr();LS();ES();BS();US();om();$S();ZP=Re("defaultRenderUser","showDefaultAvatarsForNullUsers");nm=()=>Di().then(()=>ge(e=>n(JP,{...e})))});function Zs({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=ar(),{selectedDecoration:i,select:s,fetch:c}=fn();return ae(()=>{r.isAuthorized()&&c()},[r.token]),n(VP,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ee("section-remove-margin")},n(he,null,n(k,{onClick:()=>{r.isAuthorized()?nm():r.authorize().then(nm).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 VP,rm=y(()=>{"use strict";a();l();Bt();z();x();Ks();Ni();lr();GS();VP=fo(".customizationSectionBackground")});var ki,Hl=y(()=>{"use strict";a();l();G();bo();et();Ie();ze();P();x();rm();ki=L({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(Zs,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(T.FormText,{type:"description",className:ee(K.top8,K.bottom8)},"You can also access Decor decorations from the ",n(Qe,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),ln(),F.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(T.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 eC,im,HS=y(()=>{"use strict";a();l();bS();ce();N();P();z();x();sr();Ks();Ni();Yd();Hl();Qr();rm();({isAnimatedAvatarDecoration:eC}=w("isAnimatedAvatarDecoration")),im=S({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[d.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)(?<=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:ki,flux:{CONNECTION_OPEN:()=>{ar.getState().init(),fn.getState().clear(),An.getState().fetch(O.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{An.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){DS(e)},set DecorationGridDecoration(e){kS(e)},SKU_ID:Xr,useUserDecorAvatarDecoration:NS,async start(){An.getState().fetch(O.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===Xr){let o=e.asset.split("_");return eC(e.asset)&&!t&&o.shift(),`${wS}/${o.join("_")}.png`}else if(e?.skuId===Ol)return e.asset},DecorSection:U.wrap(Zs)})});var sm,zS=y(()=>{"use strict";a();l();G();N();P();Gr("DisableCallIdle","DisableDMCallIdle");sm=S({name:"DisableCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",authors:[d.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/,?(?=\i\(this,"idleTimeout",new \i\.Timeout\))/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]})});function am(e){return e.t==="Emoji"?`${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}?size=4096&lossless=true`:`${unsafeWindow.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${nC[e.format_type]}?size=4096&lossless=true`}async function jS(e){let t=tC.getStickerById(e);if(t)return t;let{body:o}=await Et.get({url:`/stickers/${e}`});return F.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function rC(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 WS(am(t)));let{body:r}=await Et.post({url:`/guilds/${e}/stickers`,body:o});F.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:O.getCurrentUser()}})}async function iC(e,t){let o=await WS(am(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return oC.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function sC(e){let t=O.getCurrentUser().id;return Object.values(pe.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Be.getGuildPermissions({id:o.id})&fe.CREATE_GUILD_EXPRESSIONS)===fe.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:c}=Ho.getGuilds()[o.id],u=0;for(let p of c)p.animated===i&&!p.managed&&u++;return uo.name.localeCompare(r.name))}async function WS(e){let t=await h(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function aC(e,t){try{t.t==="Sticker"?await rC(e,t):await iC(e,t),V.show({message:`Successfully cloned ${t.name} to ${pe.getGuild(e)?.name??"your server"}!`,type:V.Type.SUCCESS,id:V.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),V.show({message:"Failed to clone: "+r,type:V.Type.FAILURE,id:V.genId()})}}function uC({data:e}){let[t,o]=q.useState(!1),[r,i]=q.useState(e.name),[s,c]=q.useReducer(p=>p+1,0),u=q.useMemo(()=>sC(e),[e.id,s]);return n(f,null,n(T.FormTitle,{className:K.top20},"Custom Name"),n(Dl,{value:r,onChange:p=>{e.name=p,i(p)},validate:p=>e.t==="Emoji"&&p.length>2&&p.length<32&&cC.test(p)||e.t==="Sticker"&&p.length>2&&p.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"}},u.map(p=>n(ne,{text:p.name},({onMouseLeave:m,onMouseEnter:g})=>n("div",{onMouseLeave:m,onMouseEnter:g,role:"button","aria-label":"Clone to "+p.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),aC(p.id,e).finally(()=>{c(),o(!1)})}},p.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:p.getIconURL(512,!0),alt:p.name}):n(T.FormText,{style:{fontSize:lC(p.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},p.acronym))))))}function zl(e,t){return n(B.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Or(async()=>{let o=await t(),r={t:e,...o},i=am(r);return s=>n(Pe,{...s},n(He,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(T.FormText,null,"Clone ",r.name)),n(Le,null,n(uC,{data:r})))})})}function qS(e){return new URL(e).pathname.endsWith(".gif")}var tC,oC,nC,lC,cC,pC,dC,lm,KS=y(()=>{"use strict";a();l();Ro();ed();N();Xe();et();ze();P();z();x();tC=Se("StickersStore"),oC=w("fetchEmoji","uploadEmoji","deleteEmoji"),nC=[,"png","png","json","gif"];lC=e=>[20,20,18,18,16,14,12][e.length]??4,cC=/^\w+$/i;pC=(e,t)=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let c=(()=>{switch(s){case"emoji":let u=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${o}\\.`));if(!u)return;let p=u[1]??"FakeNitroEmoji";return zl("Emoji",()=>({id:o,name:p,isAnimated:qS(r??i)}));case"sticker":return t.message.stickerItems.find(g=>g.id===o)?.format_type===3?void 0:zl("Sticker",()=>jS(o))}})();c&&pt("copy-link",e)?.push(c)},dC=(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(zl("Emoji",()=>({id:o,name:r,isAnimated:s&&qS(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(zl("Sticker",()=>jS(o)))},lm=S({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[d.Ven,d.Nuckyz],contextMenus:{message:pC,"expression-picker":dC}})});var cm,YS,um,ZS=y(()=>{"use strict";a();l();G();ce();hi();N();et();P();z();x();cm=w("key","removeBuildOverride"),YS=L({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),um=S({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[d.Megu,d.Ven,d.Nickyux,d.BanTheNons,d.Nuckyz],settings:YS,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:()=>YS.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(q.Fragment,null,n(T.FormTitle,{tag:"h3"},"More Information"),n(T.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",n("kbd",{className:cm.key},t)," +"," ",n("kbd",{className:cm.key},o)," +"," ",n("kbd",{className:cm.key},"O")," ","after enabling ",n("code",null,"isStaff")," below"),n(T.FormText,null,"and then toggling ",n("code",null,"Enable DevTools")," in the ",n("code",null,"Developer Options")," tab in settings."))},WarningCard:U.wrap(()=>n(cn,{id:"vc-experiments-warning-card",className:K.bottom16},n(T.FormTitle,{tag:"h2"},"Hold on!!"),n(T.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(T.FormText,{className:K.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 pm,XS=y(()=>{"use strict";a();l();N();P();pm=S({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[d.lewisakura],start(){unsafeWindow.addEventListener("keydown",this.event)},stop(){unsafeWindow.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var JS=P1((aY,QS)=>{"use strict";a();l();var Pn=QS.exports;(function e(t,o,r){function i(u,p){if(!o[u]){if(!t[u]){var m=typeof Ji=="function"&&Ji;if(!p&&m)return m(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}var g=o[u]={exports:{}};t[u][0].call(g.exports,function(v){var b=t[u][1][v];return i(b||v)},g,g.exports,e,t,o,r)}return o[u].exports}for(var s=typeof Ji=="function"&&Ji,c=0;c"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",D=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function C(){var E=setTimeout;return function(){return E(j,1)}}var $=new Array(1e3);function j(){for(var E=0;Ei+r.playTime;)i+=r.playTime;i+=A.delay}else p=!(u=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(u,p,m){for(var g=-1,v=p=p||0,b=p+(m=m||u.length-p);v>>8^r[255&(g^u[v])];return-1^g}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),c=e("./loader"),u=r.APNG={};u.checkNativeFeatures=i.checkNativeFeatures,u.ifNeeded=i.ifNeeded,u.parseBuffer=function(m){return s(m)};var p={};u.parseURL=function(m){return m in p||(p[m]=c(m).then(s)),p[m]},u.animateContext=function(m,g){return u.parseURL(m).then(function(v){return v.addContext(g),v.play(),v})},u.animateImage=function(m){return m.setAttribute("data-is-apng","progress"),u.parseURL(m.src).then(function(g){m.setAttribute("data-is-apng","yes");var v=document.createElement("canvas");v.width=g.width,v.height=g.height,Array.prototype.slice.call(m.attributes).forEach(function(D){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(D.nodeName)==-1&&v.setAttributeNode(D.cloneNode(!1))}),v.setAttribute("data-apng-src",m.src),m.alt!=""&&v.appendChild(document.createTextNode(m.alt));var b="",I="",A=0,M="";m.style.width!=""&&m.style.width!="auto"?b=m.style.width:m.hasAttribute("width")&&(b=m.getAttribute("width")+"px"),m.style.height!=""&&m.style.height!="auto"?I=m.style.height:m.hasAttribute("height")&&(I=m.getAttribute("height")+"px"),b!=""&&I==""&&(A=parseFloat(b),M=b.match(/\D+$/)[0],I=Math.round(v.height*A/v.width)+M),I!=""&&b==""&&(A=parseFloat(I),M=I.match(/\D+$/)[0],b=Math.round(v.width*A/v.height)+M),v.style.width=b,v.style.height=I;var R=m.parentNode;R.insertBefore(v,m),R.removeChild(m),g.addContext(v.getContext("2d")),g.play()},function(){m.setAttribute("data-is-apng","no")})},u.releaseCanvas=function(m){var g=m.getContext("2d");"_apng_animation"in g&&g._apng_animation.removeContext(g)}}).call(this,typeof Pn<"u"?Pn:typeof unsafeWindow<"u"?unsafeWindow:{})},{"./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,c){var u=new XMLHttpRequest;u.open("GET",i),u.responseType="arraybuffer",u.onload=function(){this.status==200?s(this.response):c(this)},u.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),c=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(M){var R=new Uint8Array(M);return new r(function(D,C){for(var $=0;$>>0;for(var C=1;C<4;C++)D+=M[C+R]<<8*(3-C);return D},m=function(M,R){for(var D=0,C=0;C<2;C++)D+=M[C+R]<<8*(1-C);return D},g=function(M,R){return M[R]},v=function(M,R,D){var C=new Uint8Array(D);return C.set(M.subarray(R,R+D)),C},b=function(M,R,D){var C=Array.prototype.slice.call(M.subarray(R,R+D));return String.fromCharCode.apply(String,C)},I=function(M){return[M>>>24&255,M>>>16&255,M>>>8&255,255&M]},A=function(M,R){var D=M.length+R.length,C=new Uint8Array(new ArrayBuffer(D+8));C.set(I(R.length),0),C.set(function(j){for(var X=[],J=0;J{"use strict";a();l();xo();Bu();VS=hn(()=>JS().APNG),mC="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",fY=`${mC}/rnnoise/workletProcessor.js`});var hm=P1(gm=>{a();l();var rb=Object.defineProperty,fC=e=>rb(e,"__esModule",{value:!0}),gC=(e,t)=>{for(var o in t)rb(e,o,{get:t[o],enumerable:!0})};fC(gm);gC(gm,{GIFEncoder:()=>pb,applyPalette:()=>MC,default:()=>EC,nearestColor:()=>CC,nearestColorIndex:()=>cb,nearestColorIndexWithDistance:()=>ub,prequantize:()=>xC,quantize:()=>TC,snapColorsToPalette:()=>PC});var hC={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 ib(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,c=i.length){r(t+c);for(let u=0;u=i)return;var c=1024*1024;i=Math.max(i,s*(s>>0),s!=0&&(i=Math.max(i,256));let u=o;o=new Uint8Array(i),t>0&&o.set(u.subarray(0,t),0)}}var dm=12,tb=5003,yC=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function vC(e,t,o,r,i=ib(512),s=new Uint8Array(256),c=new Int32Array(tb),u=new Int32Array(tb)){let p=c.length,m=Math.max(2,r);s.fill(0),u.fill(0),c.fill(-1);let g=0,v=0,b=m+1,I=b,A=!1,M=I,R=(1<=0;)if(me-=Fe,me<0&&(me+=p),c[me]===be){X=u[me];break e}_(X),X=se,$<1<0?g|=oe<=8;)s[j++]=g&255,j>=254&&(i.writeByte(j),i.writeBytesView(s,0,j),j=0),g>>=8,v-=8;if(($>R||A)&&(A?(M=I,R=(1<0;)s[j++]=g&255,j>=254&&(i.writeByte(j),i.writeBytesView(s,0,j),j=0),g>>=8,v-=8;j>0&&(i.writeByte(j),i.writeBytesView(s,0,j),j=0)}}}var SC=vC;function sb(e,t,o){return e<<8&63488|t<<2&992|o>>3}function ab(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function lb(e,t,o){return e>>4<<8|t&240|o>>4}function jl(e,t,o){return eo?o:e}function Xs(e){return e*e}function ob(e,t,o){var r=0,i=1e100;let s=e[t],c=s.cnt,u=s.ac,p=s.rc,m=s.gc,g=s.bc;for(var v=s.fw;v!=0;v=e[v].fw){let I=e[v],A=I.cnt,M=c*A/(c+A);if(!(M>=i)){var b=0;o&&(b+=M*Xs(I.ac-u),b>=i)||(b+=M*Xs(I.rc-p),!(b>=i)&&(b+=M*Xs(I.gc-m),!(b>=i)&&(b+=M*Xs(I.bc-g),!(b>=i)&&(i=b,r=v))))}}s.err=i,s.nn=r}function mm(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function bC(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,p=c>>16&255,m=c>>8&255,g=c&255,v=ab(g,m,p,u),b=v in r?r[v]:r[v]=mm();b.rc+=g,b.gc+=m,b.bc+=p,b.ac+=u,b.cnt++}else if(t==="rgb444")for(let s=0;s>16&255,p=c>>8&255,m=c&255,g=lb(m,p,u),v=g in r?r[g]:r[g]=mm();v.rc+=m,v.gc+=p,v.bc+=u,v.cnt++}else for(let s=0;s>16&255,p=c>>8&255,m=c&255,g=sb(m,p,u),v=g in r?r[g]:r[g]=mm();v.rc+=m,v.gc+=p,v.bc+=u,v.cnt++}return r}function TC(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:c=0,oneBitAlpha:u=!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 p=new Uint32Array(e.buffer),m=o.useSqrt!==!1,g=r==="rgba4444",v=bC(p,r),b=v.length,I=b-1,A=new Uint32Array(b+1);for(var M=0,D=0;D1&&(j=$>>1,!(v[C=A[j]].err<=X));$=j)A[$]=C;A[$]=D}var J=M-t;for(D=0;D=Q.mtm&&v[Q.nn].mtm<=Q.tm)break;Q.mtm==I?_=A[1]=A[A[0]--]:(ob(v,_,!1),Q.tm=D);var X=v[_].err;for($=1;(j=$+$)<=A[0]&&(jv[A[j+1]].err&&j++,!(X<=v[C=A[j]].err));$=j)A[$]=C;A[$]=_}var oe=v[Q.nn],se=Q.cnt,be=oe.cnt,R=1/(se+be);g&&(Q.ac=R*(se*Q.ac+be*oe.ac)),Q.rc=R*(se*Q.rc+be*oe.rc),Q.gc=R*(se*Q.gc+be*oe.gc),Q.bc=R*(se*Q.bc+be*oe.bc),Q.cnt+=oe.cnt,Q.mtm=++D,v[oe.bk].fw=oe.fw,v[oe.fw].bk=oe.bk,oe.mtm=I}let me=[];var Fe=0;for(D=0;;++Fe){let Te=jl(Math.round(v[D].rc),0,255),Me=jl(Math.round(v[D].gc),0,255),ke=jl(Math.round(v[D].bc),0,255),Oe=255;g&&(Oe=jl(Math.round(v[D].ac),0,255),u&&(Oe=Oe<=(typeof u=="number"?u:127)?0:255),i&&Oe<=c&&(Te=Me=ke=s,Oe=0));let Ne=g?[Te,Me,ke,Oe]:[Te,Me,ke];if(wC(me,Ne)||me.push(Ne),(D=v[D].fw)==0)break}return me}function wC(e,t){for(let o=0;o=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function ql(e,t){var o=0,r;for(r=0;r1?Math.round(e/t)*t:e}function xC(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s>24&255,p=c>>16&255,m=c>>8&255,g=c&255;u=Wl(u,o),r&&(u=u<=(typeof r=="number"?r:127)?0:255),g=Wl(g,t),m=Wl(m,t),p=Wl(p,t),i[s]=u<<24|p<<16|m<<8|g<<0}}function MC(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,c=new Uint8Array(i),u=new Array(s),p=o==="rgba4444";if(o==="rgba4444")for(let m=0;m>24&255,b=g>>16&255,I=g>>8&255,A=g&255,M=ab(A,I,b,v),R=M in u?u[M]:u[M]=IC(A,I,b,v,t);c[m]=R}else{let m=o==="rgb444"?lb:sb;for(let g=0;g>16&255,I=v>>8&255,A=v&255,M=m(A,I,b),R=M in u?u[M]:u[M]=AC(A,I,b,t);c[g]=R}}return c}function IC(e,t,o,r,i){let s=0,c=1e100;for(let u=0;uc)continue;let v=p[0];if(g+=Jr(v-e),g>c)continue;let b=p[1];if(g+=Jr(b-t),g>c)continue;let I=p[2];g+=Jr(I-o),!(g>c)&&(c=g,s=u)}return s}function AC(e,t,o,r){let i=0,s=1e100;for(let c=0;cs)continue;let g=u[1];if(m+=Jr(g-t),m>s)continue;let v=u[2];m+=Jr(v-o),!(m>s)&&(s=m,i=c)}return i}function PC(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(c=>c.slice(0,3)),i=o*o,s=e[0].length;for(let c=0;cs?u=u.slice(0,3):u=u.slice();let p=ub(r,u.slice(0,3),ql),m=p[0],g=p[1];g>0&&g<=i&&(e[m]=u)}}function Jr(e){return e*e}function cb(e,t,o=ql){let r=1/0,i=-1;for(let s=0;s=0&&DC(r,C)}let J=Math.round(R/10);NC(r,j,J,A,M);let Q=Boolean(D)&&!X;kC(r,v,b,Q?D:null),Q&&nb(r,D),LC(r,g,v,b,$,s,c,u)}};function m(){db(r,"GIF89a")}}function NC(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,c;r?(s=1,c=2):(s=0,c=0),t>=0&&(c=t&7),c<<=2;let u=0;e.writeByte(0|c|u|s),cr(e,o),e.writeByte(i||0),e.writeByte(0)}function RC(e,t,o,r,i=8){let u=fm(r.length)-1,p=1<<7|i-1<<4|0<<3|u,m=0,g=0;cr(e,t),cr(e,o),e.writeBytes([p,m,g])}function DC(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),db(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),cr(e,t),e.writeByte(0)}function nb(e,t){let o=1<>8&255)}function db(e,t){for(var o=0;oi.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function Zl(e,t){let o=re.getChannel(e);return!o||o.isPrivate()?!0:Be.can(t,o)}var Li,OC,Vr,Qs,mb,Js,ur,Kl,ym,vm,Yl,fb,Ze,BC,_C,gb,UC,Sm,yb=y(()=>{"use strict";a();l();dn();G();N();eb();ut();Xe();P();z();x();Li=N1(hm()),OC=0,Vr=Se("StickersStore"),Qs=Se("UserSettingsProtoStore"),mb=w("BINARY_READ_OPTIONS");Js=mo(()=>ps.PreloadedUserSettingsActionCreators),ur=mo(()=>hb("appearance",Js.ProtoClass)),Kl=mo(()=>hb("clientThemeSettings",ur)),ym=/\/emojis\/(\d+?)\.(png|webp|gif)/,vm=/\/stickers\/(\d+?)\./,Yl=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,fb=/\[.+?\]\((https?:\/\/.+?)\)/,Ze=L({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();BC=e=>Zl(e,fe.USE_EXTERNAL_EMOJIS),_C=e=>Zl(e,fe.USE_EXTERNAL_STICKERS),gb=e=>Zl(e,fe.EMBED_LINKS),UC=e=>Zl(e,fe.ATTACH_FILES),Sm=S({name:"FakeNitro",authors:[d.Arjix,d.D3SOX,d.Ven,d.fawn,d.captain,d.Nuckyz,d.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Ze,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Ze.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:()=>Ze.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:()=>Ze.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Ze.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Ze.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Ze.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'"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:()=>Ze.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Ze.store.transformEmojis||Ze.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Ze.store.transformEmojis||Ze.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:()=>Ze.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,o)=>`${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Ze.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:()=>Ze.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:()=>Ze.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:()=>Ze.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"}},{find:'type:"GUILD_SOUNDBOARD_SOUND_CREATE"',replacement:{match:/(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g,replace:"true"}}],get guildId(){return ys()?.id},get canUseEmotes(){return(O.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(O.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!Qs||!Js||!ur||!Kl)return;if((t?.premium_type??O?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=ur.create(),Qs.settings.appearance?.theme!=null){let r=ur.create({theme:Qs.settings.appearance.theme});e.appearance.theme=r.theme}if(Qs.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=Kl.create({backgroundGradientPresetId:{value:Qs.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,o){if((O?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!Js||!ur||!Kl||!mb)return;let i=Js.getCurrentValue().appearance,s=i!=null?ur.fromBinary(ur.toBinary(i),mb.BINARY_READ_OPTIONS):ur.create();s.theme=t;let c=Kl.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=c,s.clientThemeSettings.backgroundGradientPresetId=c.backgroundGradientPresetId;let u=Js.ProtoClass.create();u.appearance=s,F.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:u}})},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")&&!Ze.store.transformCompoundSentence)return e;let o=e.length,r=u=>{if(Ze.store.transformEmojis){let p=u.props.href.match(ym);if(p){let m=null;try{m=new URL(u.props.href)}catch{}let g=Ho.getCustomEmojiById(p[1])?.name??m?.searchParams.get("name")??"FakeNitroEmoji";return De.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:p[2]==="gif",emojiId:p[1],name:g,fake:!0},void 0,{key:String(o++)})}}if(Ze.store.transformStickers){if(vm.test(u.props.href))return null;let p=u.props.href.match(Yl);if(p&&Vr.getStickerById(p[1]))return null}return u},i=u=>u?.props?.trusted!=null?r(u):u?.props?.children!=null?Array.isArray(u.props.children)?(u.props.children=c(u.props.children),u.props.children.length===0?null:u):(u.props.children=s(u.props.children),u):u,s=u=>{let p=i(u);if(p?.type==="ul"||p?.type==="ol"){if(this.ensureChildrenIsArray(p),p.props.children.length===0)return null;let m=!1;for(let[g,v]of p.props.children.entries()){if(v==null){delete p.props.children[g];continue}this.ensureChildrenIsArray(v),v.props.children.length>0?m=!0:delete p.props.children[g]}if(!m)return null;p.props.children=this.clearEmptyArrayItems(p.props.children)}return p},c=u=>{for(let[p,m]of u.entries())u[p]=s(m);return u=this.clearEmptyArrayItems(u),u};try{let u=c(kr.cloneDeep(e));return this.trimContent(u),u}catch(u){return new ie("FakeNitro").error(u),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Ze.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(!Ze.store.transformCompoundSentence&&!i.startsWith("http")&&!fb.test(i))continue;let s=i.match(vm);if(s){let u=null;try{u=new URL(i)}catch{}let p=Vr.getStickerById(s[1])?.name??u?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:p,fake:!0});continue}let c=i.match(Yl);if(c){if(!Vr.getStickerById(c[1]))continue;let u=Vr.getStickerById(c[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:c[1],name:u,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!Ze.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Ze.store.transformCompoundSentence&&!o.some(r=>r===e.url||r.match(fb)?.[1]===e.url))return!1;if(Ze.store.transformEmojis&&ym.test(e.url))return!0;if(Ze.store.transformStickers){if(vm.test(e.url))return!0;let r=e.url.match(Yl);if(r&&Vr.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(Yl);return!(o&&Vr.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&ym.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=${Ze.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=VS(),{frames:i,width:s,height:c}=await r(e),u=(0,Li.GIFEncoder)(),p=Ze.store.stickerSize,m=document.createElement("canvas");m.width=p,m.height=p;let g=m.getContext("2d",{willReadFrequently:!0}),v=p/Math.max(s,c);g.scale(v,v);let b;for(let A of i){let{left:M,top:R,width:D,height:C,img:$,delay:j,blendOp:X,disposeOp:J}=A;b=g.getImageData(M,R,D,C),X===0&&g.clearRect(M,R,D,C),g.drawImage($,M,R,D,C);let{data:Q}=g.getImageData(0,0,p,p),_=(0,Li.quantize)(Q,256),oe=(0,Li.applyPalette)(Q,_);u.writeFrame(oe,p,p,{transparent:!0,palette:_,delay:j}),J===1?g.clearRect(M,R,D,C):J===2&&g.putImageData(b,M,R)}u.finish();let I=new File([u.bytesView()],`${t}.gif`,{type:"image/gif"});hs.promptToUpload([I],re.getChannel(o),OC)},canUseEmote(e,t){return e.require_colons===!1?!0:e.available===!1?!1:this.canUseEmotes?e.guildId===this.guildId||BC(t):!e.animated&&e.guildId===this.guildId},start(){let e=Ze.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(r,i){return!r[i]||/\s/.test(r[i])?"":" "}function o(){return new Promise(r=>{rt.show({title:"Hold on!",body:n("div",null,n(T.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(T.FormText,{type:T.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(){Ze.store.disableEmbedPermissionCheck=!0,r(!0)}})})}this.preSend=Xt(async(r,i,s)=>{let{guildId:c}=this,u=!1;e:{if(!e.enableStickerBypass)break e;let p=Vr.getStickerById(s.stickers?.[0]);if(!p||"pack_id"in p)break e;let m=this.canUseStickers&&_C(r);if(p.available!==!1&&(m||p.guild_id===c))break e;let g=this.getStickerLink(p.id);if(p.format_type===4&&g.includes(".png")&&(g=g.replace(".png",".gif")),p.format_type===2)return UC(r)?this.sendAnimatedSticker(g,p.id,r):rt.show({title:"Hold on!",body:n("div",null,n(T.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};{u=!0;let v=new URL(g);v.searchParams.set("name",p.name);let b=e.hyperLinkText.replaceAll("{{NAME}}",p.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${b}](${v})`:v}`,s.stickers.length=0}}if(e.enableEmojiBypass)for(let p of i.validNonShortcutEmojis){if(this.canUseEmote(p,r))continue;u=!0;let m=`<${p.animated?"a":""}:${p.originalName||p.name}:${p.id}>`,g=new URL(p.url);g.searchParams.set("size",e.emojiSize.toString()),g.searchParams.set("name",p.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",p.name);i.content=i.content.replace(m,(b,I,A)=>`${t(A,I-1)}${e.useHyperLinks?`[${v}](${g})`:g}${t(A,I+b.length)}`)}return u&&!e.disableEmbedPermissionCheck&&!gb(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=Kr(async(r,i,s)=>{if(!e.enableEmojiBypass)return;let c=!1;return s.content=s.content.replace(/(?/ig,(u,p,m,g)=>{let v=Ho.getCustomEmojiById(p);if(v==null||this.canUseEmote(v,r))return u;c=!0;let b=new URL(v.url);b.searchParams.set("size",e.emojiSize.toString()),b.searchParams.set("name",v.name);let I=e.hyperLinkText.replaceAll("{{NAME}}",v.name);return`${t(g,m-1)}${e.useHyperLinks?`[${I}](${b})`:b}${t(g,m+u.length)}`}),c&&!e.disableEmbedPermissionCheck&&!gb(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){Qt(this.preSend),Yr(this.preEdit)}})});function vb(...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,...c){return Reflect[i](o(c[0]),...c)};return new Proxy(t,r)}var Sb,bb=y(()=>{"use strict";a();l();Sb=vb;typeof module<"u"&&(module.exports=vb)});function FC(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 $C(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 Tb,bm,wb=y(()=>{"use strict";a();l();G();ce();N();et();Ie();P();x();bb();Tb=L({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),bm=S({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[d.Alyxia,d.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_RESET_PROFILE_THEME",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>n(T.FormSection,null,n(T.FormTitle,{tag:"h3"},"Usage"),n(T.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:Tb,colorDecodeHook(e){if(e){if(Tb.store.nitroFirst&&e.themeColors)return e;let t=$C(e.bio);if(t)return Sb(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:U.wrap(function({primary:e,accent:t}){return n(k,{onClick:()=>{let o=FC(e,t);Mo(o)},color:k.Colors.PRIMARY,size:k.Sizes.XLARGE,className:K.left16},"Copy 3y3")},{noop:!0})})});var Tm,xb=y(()=>{"use strict";a();l();N();P();x();Tm=S({name:"FavoriteEmojiFirst",authors:[d.Aria,d.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=Ho.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??1/0)}})});function HC({instance:e,SearchBarComponent:t}){let[o,r]=W(""),i=Tt(null),s=Ka(c=>{r(c);let{props:u}=e;if(c===""){u.favorites=u.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let p=u.favCopy.map(m=>({score:zC(c.toLowerCase(),Ib(m.url??m.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:m})).filter(m=>m.score!=null);p.sort((m,g)=>g.score-m.score),u.favorites=p.map(m=>m.gif),e.forceUpdate()},[e.state]);return ae(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:GC.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 Ib(e){let t;try{t=new URL(e)}catch{return e}switch(Mb.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 zC(e,t){let o=0,r=0;for(let i=0;i{"use strict";a();l();G();ce();N();P();z();x();GC=w("searchBar","searchBarFullRow"),Mb=L({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}]}}),wm=S({name:"FavoriteGifSearch",authors:[d.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:Mb,getTargetString:Ib,instance:null,renderSearchBar(e,t){return this.instance=e,n(U,{noop:!0},n(HC,{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 xm,Pb=y(()=>{"use strict";a();l();N();P();xm=S({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[d.Grzesiek11],patches:[{find:".default.Messages.DELETED_ROLE_PLACEHOLDER",replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]})});var Mm,Cb=y(()=>{"use strict";a();l();N();P();x();Mm=S({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[d.D3SOX,d.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 pe.getGuild(t)?.ownerId===o}})});var Xl,jC,Im,Nb=y(()=>{"use strict";a();l();so();N();P();z();x();Xl=w("createFriendInvite"),{uuid4:jC}=w("uuid4"),Im=S({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[d.afn,d.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=vt(e,"Uses",5);if(o===1&&!O.getCurrentUser().phone)return ye(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=jC(),{body:{invite_suggestions:s}}=await Et.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await Xl.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await Xl.createFriendInvite();ye(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 Xl.getAllFriendInvites()).map(i=>` _discord.gg/${i.code}_ \xB7 Expires: \xB7 Times used: \`${i.uses}/${i.max_uses}\` `.trim().replace(/\s+/g," "));ye(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 Xl.revokeFriendInvites(),ye(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var WC,qC,KC,YC,Rb,ZC,XC,Am,Db=y(()=>{"use strict";a();l();ce();N();ut();xo();P();z();x();({Heading:WC,Text:qC}=w("Heading","Text")),KC=hn(()=>{for(let e of["memberSinceWrapper","memberSinceContainer"]){let t=po(xe.byProps(e),{isIndirect:!0});if(t)return t[e]}return _o("findByProps","memberSinceWrapper/memberSinceContainer"),""}),{getCreatedAtDate:YC}=w("getCreatedAtDate"),Rb=w("clydeMoreInfo"),ZC=w("getLocale"),XC=w("lastSection"),Am=S({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[d.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:U.wrap(({userId:e})=>{let t=Ke.getSince(e);return t?n("div",{className:XC.section},n(WC,{variant:"eyebrow",className:Rb.title},"Friends Since"),n("div",{className:KC()},!!jn()?.guild_id&&n("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--interactive-normal)"},n("path",{d:"M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),n("path",{d:"M3 5v-.75C3 3.56 3.56 3 4.25 3s1.24.56 1.33 1.25C6.12 8.65 9.46 12 13 12h1a8 8 0 0 1 8 8 2 2 0 0 1-2 2 .21.21 0 0 1-.2-.15 7.65 7.65 0 0 0-1.32-2.3c-.15-.2-.42-.06-.39.17l.25 2c.02.15-.1.28-.25.28H9a2 2 0 0 1-2-2v-2.22c0-1.57-.67-3.05-1.53-4.37A15.85 15.85 0 0 1 3 5Z"})),n(qC,{variant:"text-sm/normal",className:Rb.body},YC(t,ZC.getLocale())))):null},{noop:!0})})});var Pm,kb=y(()=>{a();l();(unsafeWindow.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});Pm="src/plugins/gameActivityToggle/style.css"});function JC(e){let{oldIcon:t}=Lb.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 VC(){let e=fi.ShowCurrentGame.useSetting();return n(QC,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:JC(e),role:"switch","aria-checked":!e,onClick:()=>fi.ShowCurrentGame.updateSetting(t=>!t)})}var QC,Lb,Cm,Eb=y(()=>{"use strict";a();l();G();st();ce();N();P();z();x();kb();QC=Re("Button.Sizes.NONE,disabled:");Lb=L({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),Cm=S({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[d.Nuckyz,d.RuukuLada],settings:Lb,patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:U.wrap(VC,{noop:!0}),start(){So(Pm)},stop(){Ko(Pm)}})});var e4,Nm,Ob=y(()=>{"use strict";a();l();N();ut();P();z();({closeExpressionPicker:e4}=w("closeExpressionPicker")),Nm=S({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[d.Ven],patches:[{find:'"handleSelectGIF",',replacement:{match:/"handleSelectGIF",(\i)=>\{/,replace:'"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);'}}],handleSelect(e){e&&(_r(e.url+" "),e4())}})});function _b(e,t,o){let r=ro.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Ql.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};ro._sendMessage(e.id,i,r)}else ro.sendGreetMessage(e.id,o[0],r)}function t4({channel:e,message:t}){let o=Ql.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(B.Menu,{navId:"greet-sticker-picker",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(B.MenuGroup,{label:"Greet Mode"},Object.values(Ub).map(s=>n(B.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(B.MenuSeparator,null),n(B.MenuGroup,{label:"Greet Stickers"},Bb.map(s=>n(B.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>_b(e,t,[s.id])}))),Ql.store.unholyMultiGreetEnabled?n(f,null,n(B.MenuSeparator,null),n(B.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},Bb.map(s=>{let c=i.some(u=>u===s.id);return n(B.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:c,disabled:!c&&i.length>=3,action:()=>{o.multiGreetChoices=c?i.filter(u=>u!==s.id):[...i,s.id]}})}),n(B.MenuSeparator,null),n(B.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>_b(e,t,i),disabled:i.length===0}))):null)}var Ub,Ql,Bb,Rm,Fb=y(()=>{"use strict";a();l();G();N();P();z();x();Ub=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(Ub||{}),Ql=L({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:Bb}=w("WELCOME_STICKERS");Rm=S({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:[d.Ven],settings:Ql,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||Kt.openContextMenu(e,()=>n(t4,{...t}))}})});var Dm={};Ve(Dm,{_buildPopoverElements:()=>n4,addButton:()=>Cn,buttons:()=>Jl,removeButton:()=>Nn});function Cn(e,t){Jl.set(e,t)}function Nn(e){Jl.delete(e)}function n4(e,t){let o=[];for(let[r,i]of Jl.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){o4.error(`[${r}]`,s)}return o}var o4,Jl,Ei=y(()=>{"use strict";a();l();Xe();o4=new ie("MessagePopover"),Jl=new Map});var Vs,Gb,ea,$b,r4,km,Hb=y(()=>{"use strict";a();l();wo();Ei();Mt();N();P();x();Gb="HideAttachments_HiddenIds",ea=new Set,$b=()=>nt(Gb).then(e=>(ea=e??new Set,ea)),r4=e=>ht(Gb,e),km=S({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[d.Ven],dependencies:["MessagePopoverAPI"],async start(){Vs=document.createElement("style"),Vs.id="VencordHideAttachments",document.head.appendChild(Vs),await $b(),await this.buildCss(),Cn("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=ea.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?bl:Tl,message:e,channel:re.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){Vs.remove(),ea.clear(),Nn("HideAttachments")},async buildCss(){let e=[...ea].map(t=>`#message-accessories-${t}`).join(",");Vs.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; } :is(${e})::after { content: "Attachments hidden"; color: var(--text-muted); font-size: 80%; } `},async toggleHide(e){let t=await $b();t.delete(e)||t.add(e),await r4(t),await this.buildCss()}})});var Lm,zb=y(()=>{"use strict";a();l();N();P();Lm=S({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[d.botato,d.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function qb(e,t,o,r){return n(ne,{text:t},i=>n("button",{...i,onClick:s=>a4(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 Wb(e,t=!1){let o=Jt.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?s4(e,"var(--status-danger)"):i4(e,t?"var(--green-300)":"var(--primary-400)")}function a4(e,t){e.stopPropagation();let o=pr().findIndex(r=>r.id===t.id);o===-1?Jt.store.ignoredActivities=pr().concat(t):Jt.store.ignoredActivities=pr().filter((r,i)=>i!==o),fi.ShowCurrentGame.updateSetting(r=>r)}function l4(){return n(he,{flexDirection:"column"},n(T.FormText,{type:T.FormText.Types.DESCRIPTION},"Import the application id of the CustomRPC plugin to the allowed list"),n("div",null,n(k,{onClick:()=>{let e=H.plugins.CustomRPC?.appID;if(!e)return wt("CustomRPC application ID is not set.",V.Type.FAILURE);Em?.(e)&&wt("CustomRPC application ID is already added.",V.Type.FAILURE)}},"Import CustomRPC ID")))}function c4(e){let[t,o]=W(Jt.store.allowedIds??"");Em=i=>{let s=new Set(t.split(",").map(p=>p.trim()).filter(Boolean)),c=s.has(i)||(s.add(i),!1),u=Array.from(s).join(", ");return o(u),e.setValue(u),c},ae(()=>()=>{Em=null},[]);function r(i){o(i),e.setValue(i)}return n(T.FormSection,null,n(T.FormTitle,{tag:"h3"},"Allowed List"),n(T.FormText,{className:K.bottom8,type:T.FormText.Types.DESCRIPTION},"Comma separated list of activity IDs to allow (Useful for allowing RPC activities and CustomRPC)"),n(ct,{type:"text",value:t,onChange:r,placeholder:"235834946571337729, 343383572805058560"}))}function pr(){return Jt.store.ignoredActivities??=[]}function u4(e,t){if(t&&Jt.store.allowedIds.includes(t))return!1;switch(e){case 0:return Jt.store.ignorePlaying;case 1:return Jt.store.ignoreStreaming;case 2:return Jt.store.ignoreListening;case 3:return Jt.store.ignoreWatching;case 5:return Jt.store.ignoreCompeting}return!1}var jb,i4,s4,Em,Jt,Om,Kb=y(()=>{"use strict";a();l();wo();G();ce();Bt();N();et();P();z();x();jb=Se("RunningGameStore");i4=(e,t)=>qb(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),s4=(e,t)=>qb(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);Em=null;Jt=L({importCustomRPC:{type:6,description:"",component:()=>n(l4,null)},allowedIds:{type:6,description:"",default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));Jt.store.allowedIds=Array.from(t).join(", ")},component:e=>n(c4,{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();Om=S({name:"IgnoreActivities",authors:[d.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:Jt,patches:[{find:'="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 nt("IgnoreActivities_ignoredActivities");if(e!=null&&(Jt.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),Vi("IgnoreActivities_ignoredActivities")),pr().length!==0){let t=jb.getGamesSeen();for(let[o,r]of pr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||pr().splice(o,1))}},isActivityNotIgnored(e){if(u4(e.type,e.application_id))return!1;if(e.application_id!=null)return!pr().some(t=>t.id===e.application_id)||Jt.store.allowedIds.includes(e.application_id);{let t=jb.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!pr().some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return n(U,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},Wb({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(U,{noop:!0},Wb({id:e.id,name:e.name,type:1}))}})});var ta,Bm=y(()=>{"use strict";a();l();ta="vc-imgzoom-magnify-modal"});function _m(e,t){e()?t():requestAnimationFrame(()=>_m(e,t))}var Yb=y(()=>{"use strict";a();l()});var p4,Um,Zb=y(()=>{"use strict";a();l();st();x();Bm();Fm();Yb();p4=Ce("vc-imgzoom-"),Um=({instance:e,size:t,zoom:o})=>{let[r,i]=W(!1),[s,c]=W({x:0,y:0}),[u,p]=W({x:0,y:0}),[m,g]=W(0),v=Tt(!1),b=Tt(o),I=Tt(t),A=Tt(null),M=Tt(null),R=Tt(null),D=Tt(null);if(q.useLayoutEffect(()=>{let $=se=>{se.key==="Shift"&&(v.current=!0)},j=se=>{se.key==="Shift"&&(v.current=!1)},X=()=>{M.current.currentTime=R.current.currentTime},J=se=>{if(e.state.mouseOver&&e.state.mouseDown){let be=I.current/2,me={x:se.pageX,y:se.pageY},Fe=-((me.x-A.current.getBoundingClientRect().left)*b.current-be),Te=-((me.y-A.current.getBoundingClientRect().top)*b.current-be);c({x:se.x-be,y:se.y-be}),p({x:Fe,y:Te}),g(1)}else g(0)},Q=se=>{e.state.mouseOver&&se.button===0&&(b.current=tt.store.zoom,I.current=tt.store.size,document.getElementById("image-context")&&F.dispatch({type:"CONTEXT_MENU_CLOSE"}),J(se),g(1))},_=()=>{g(0),tt.store.saveZoomValues&&(tt.store.zoom=b.current,tt.store.size=I.current)},oe=async se=>{if(e.state.mouseOver&&e.state.mouseDown&&!v.current){let be=b.current+se.deltaY/100*(tt.store.invertScroll?-1:1)*tt.store.zoomSpeed;b.current=be<=1?1:be,J(se)}if(e.state.mouseOver&&e.state.mouseDown&&v.current){let be=I.current+se.deltaY*(tt.store.invertScroll?-1:1)*tt.store.zoomSpeed;I.current=be<=50?50:be,J(se)}};return _m(()=>e.state.readyState==="READY",()=>{let se=document.getElementById(ta);A.current=se,se.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(R.current=se.querySelector("video"),R.current.addEventListener("timeupdate",X)),i(!0)}),document.addEventListener("keydown",$),document.addEventListener("keyup",j),document.addEventListener("mousemove",J),document.addEventListener("mousedown",Q),document.addEventListener("mouseup",_),document.addEventListener("wheel",oe),()=>{document.removeEventListener("keydown",$),document.removeEventListener("keyup",j),document.removeEventListener("mousemove",J),document.removeEventListener("mousedown",Q),document.removeEventListener("mouseup",_),document.removeEventListener("wheel",oe),tt.store.saveZoomValues&&(tt.store.zoom=b.current,tt.store.size=I.current)}},[]),!r)return null;let C=A.current?.getBoundingClientRect();return C?n("div",{className:p4("lens",{"nearest-neighbor":tt.store.nearestNeighbour,square:tt.store.square}),style:{opacity:m,width:I.current+"px",height:I.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:M,style:{position:"absolute",left:`${u.x}px`,top:`${u.y}px`},width:`${C.width*b.current}px`,height:`${C.height*b.current}px`,poster:e.props.src,src:R.current?.src??e.props.src,autoPlay:!0,loop:!0}):n("img",{ref:D,style:{position:"absolute",transform:`translate(${u.x}px, ${u.y}px)`},width:`${C.width*b.current}px`,height:`${C.height*b.current}px`,src:e.props.src,alt:""})):null}});var $m,Xb=y(()=>{a();l();(unsafeWindow.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; border: 2px solid grey; border-radius: 50%; overflow: hidden; cursor: none; 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 { border-radius: 0; } .vc-imgzoom-nearest-neighbor>img { image-rendering: pixelated; /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */ } /* make the carousel take up less space so we can click the backdrop and exit out of it */ [class*="modalCarouselWrapper_"] { top: 0 !important; } [class*="carouselModal_"] { height: 0 !important; } `,classNames:{},dom:null});$m="src/plugins/imageZoom/styles.css"});var tt,d4,Gm,Fm=y(()=>{"use strict";a();l();G();st();xl();Ir();N();P();x();Zb();Bm();Xb();tt=L({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:or(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:or(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:or(.1,5,.2),default:.5,stickToMarkers:!1}}),d4=e=>{let{square:t,nearestNeighbour:o}=tt.use(["square","nearestNeighbour"]);e.push(n(B.MenuGroup,{id:"image-zoom"},n(B.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:t,action:()=>{tt.store.square=!t}}),n(B.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:o,action:()=>{tt.store.nearestNeighbour=!o}}),n(B.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(r,i)=>n(B.MenuSliderControl,{ref:i,...r,minValue:1,maxValue:50,value:tt.store.zoom,onChange:Gt(s=>tt.store.zoom=s,100)})}),n(B.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(r,i)=>n(B.MenuSliderControl,{ref:i,...r,minValue:50,maxValue:1e3,value:tt.store.size,onChange:Gt(s=>tt.store.size=s,100)})}),n(B.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(r,i)=>n(B.MenuSliderControl,{ref:i,...r,minValue:.1,maxValue:5,value:tt.store.zoomSpeed,onChange:Gt(s=>tt.store.zoomSpeed=s,100),renderValue:s=>`${s.toFixed(3)}x`})})))},Gm=S({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:[d.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${ta}',`}},{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:tt,contextMenus:{"image-context":d4},currentMagnifierElement:null,element:null,Magnifier:Um,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===ta&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(Um,{size:tt.store.size,zoom:tt.store.zoom,instance:e}),this.root=Rr.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(){So($m),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Ko($m),this.root&&this.root.unmount(),this.element?.remove()}})});var Qb,Hm,Jb=y(()=>{"use strict";a();l();G();N();P();z();x();zm();Qb=Se("UserAffinitiesStore"),Hm=S({name:"ImplicitRelationships",description:"Shows your implicit relationships in the Friends tab.",authors:[d.Dolfies],patches:[{find:".FRIENDS_ALL_HEADER",replacement:{match:/toString\(\)\}\);case (\i\.\i)\.BLOCKED/,replace:'toString()});case $1.IMPLICIT:return "Implicit \u2014 "+arguments[1];case $1.BLOCKED'}},{find:"FriendsEmptyState: Invalid empty state",replacement:{match:/case (\i\.\i)\.ONLINE:(?=return (\i)\.SECTION_ONLINE)/,replace:"case $1.ONLINE:case $1.IMPLICIT:"}},{find:".FRIENDS_SECTION_ONLINE",replacement:{match:/(\(0,\i\.jsx\)\(\i\.TabBar\.Item,\{id:\i\.\i)\.BLOCKED,className:([^\s]+?)\.item,children:\i\.\i\.Messages\.BLOCKED\}\)/,replace:'$1.IMPLICIT,className:$2.item,children:"Implicit"}),$&'}},{find:'"FriendsStore"',replacement:{match:/(?<=case (\i\.\i)\.BLOCKED:return (\i)\.type===\i\.\i\.BLOCKED)/,replace:";case $1.IMPLICIT:return $2.type===5"}},{find:".fetchRelationships()",replacement:{match:/(\i\.\i)\.fetchRelationships\(\)/,replace:"$1.fetchRelationships(),$self.fetchImplicitRelationships()"}},{find:"getRelationshipCounts(){",replacement:{predicate:()=>H.plugins.ImplicitRelationships.sortByAffinity,match:/\.sortBy\(\i=>\i\.comparator\)/,replace:"$&.sortBy((row) => $self.sortList(row))"}},{find:".REQUEST_GUILD_MEMBERS",replacement:{match:/\.send\(8,{/,replace:"$&nonce:arguments[1].nonce,"}},{find:"GUILD_MEMBERS_REQUEST:",replacement:{match:/presences:!!(\i)\.presences/,replace:"$&,nonce:$1.nonce"}},{find:".not_found",replacement:{match:/notFound:(\i)\.not_found/,replace:"$&,nonce:$1.nonce"}}],settings:L({sortByAffinity:{type:3,default:!0,description:"Whether to sort implicit relationships by their affinity to you.",restartNeeded:!0}}),sortList(e){return e.type===5?-Qb.getUserAffinity(e.user.id)?.affinity:e.comparator},async fetchImplicitRelationships(){let e=Qb.getUserAffinitiesUserIds(),t=Array.from(e).filter(g=>!Ke.getRelationshipType(g)),o=new Set(Object.values(re.getSortedPrivateChannels()).flatMap(g=>g.recipients)),r=t.filter(g=>!O.getUser(g)||o.has(g)),i=Object.keys(pe.getGuilds()),s=Co.fromTimestamp(Date.now()),c=i.length*Math.ceil(r.length/100),u=new Set(r),p=Ke.getRelationships(),m=({nonce:g,members:v})=>{g===s&&(v.forEach(b=>{u.delete(b.user.id)}),t.map(b=>O.getUser(b)).filter(b=>b&&!u.has(b.id)).forEach(b=>p[b.id]=5),Ke.emitChange(),--c===0&&F.unsubscribe("GUILD_MEMBERS_CHUNK",m))};F.subscribe("GUILD_MEMBERS_CHUNK",m);for(let g=0;g{"use strict";a();l();wo();N();P();x();Vl=!1;jm=S({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[d.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:Vl}=e)},CONNECTION_OPEN(){!Vl||(Vl=!1,Do?.channelId&&Vb(Do.guildId,Do.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){Vl||(Do={guildId:e,channelId:t},await ht("KeepCurrentChannel_previousData",Do))}},async start(){Do=await nt("KeepCurrentChannel_previousData"),Do?Do.channelId&&Vb(Do.guildId,Do.channelId):(Do={guildId:ho.getGuildId(),channelId:Ae.getChannelId()??null},await ht("KeepCurrentChannel_previousData",Do))}})});async function Wm(e){return(await Lr.fetchAssetIds(qm,[e]))[0]}function g4(e){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var qm,m4,t2,f4,To,Km,o2=y(()=>{"use strict";a();l();G();bo();N();Xe();P();z();x();qm="1108588077900898414",m4="2a96cbd8b46e442fc41c2b86b821562f",t2=new ie("LastFMRichPresence"),f4=w("getLocalPresence");To=L({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}}),Km=S({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[d.dzshn,d.RuiNtD,d.blahajZip,d.archeruwu],settingsAboutComponent:()=>n(f,null,n(T.FormTitle,{tag:"h3"},"How to get an API key"),n(T.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:To,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!To.store.username||!To.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:To.store.apiKey,user:To.store.username,limit:"1",format:"json"}),t=await h(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return t2.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 t2.error("Failed to query Last.fm API",e),null}},async updatePresence(){g4(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(m4))return e.imageUrl;if(To.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(To.store.hideWithSpotify){for(let s of f4.getActivities())if(s.type===2&&s.application_id!==qm)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await Wm(t),large_text:e.album||void 0,...To.store.showLastFmLogo&&{small_image:await Wm("lastfm-small"),small_text:"Last.fm"}}:{large_image:await Wm("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];To.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${To.store.username}`});let i=(()=>{switch(To.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 To.store.statusName}})();return{application_id:qm,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:To.store.useListeningStatus?2:0,flags:1}}})});var n2,r2,Ym,i2=y(()=>{"use strict";a();l();G();N();P();n2=["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{%"],r2=L({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),Ym=S({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[d.Ven,d.KraXen72],settings:r2,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/"_loadingText",function\(\)\{/,replace:"$&return $self.quote;"},{match:/"_eventLoadingText",function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>r2.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(n2[Math.floor(Math.random()*n2.length)])}})});var s2=y(()=>{});var ec,a2=y(()=>{"use strict";a();l();xo();Ie();Fr();x();ec=Lt(()=>{let e=new vo,t=new Map;class o extends ds.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await ms.preload(i,vn.getDefaultChannel(i).id)}ensureCount(i){t.has(i)||e.push(()=>this._ensureCount(i).then(()=>Fo(200),()=>Fo(200)))}}return new o(F,{GUILD_MEMBER_LIST_UPDATE({guildId:r,groups:i}){t.set(r,i.reduce((s,c)=>s+(c.id==="offline"?0:c.count),0))},ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId:r,count:i}){t.set(r,i)}})})});function Qm({isTooltip:e,tooltipGuildId:t}){let o=_e([Ae],()=>jn()),r=e?t:o.guild_id,i=_e([Zm],()=>Zm.getMemberCount(r)),s=_e([ec],()=>ec.getCount(r)),{groups:c}=_e([Xm],()=>Xm.getProps(r,o?.id));if(!e&&(c.length>=1||c[0].id!=="unknown")&&(s=c.reduce((p,m)=>p+(m.id==="offline"?0:m.count),0)),ae(()=>{ec.ensureCount(r)},[r]),i==null)return null;let u=s!=null?tc(s):"?";return n("div",{className:Oi("widget",{tooltip:e,"member-list":!e})},n(ne,{text:`${u} online in this channel`,position:"bottom"},p=>n("div",{...p},n("span",{className:Oi("online-dot")}),n("span",{className:Oi("online")},u))),n(ne,{text:`${tc(i)} total server members`,position:"bottom"},p=>n("div",{...p},n("span",{className:Oi("total-dot")}),n("span",{className:Oi("total")},tc(i)))))}var l2=y(()=>{"use strict";a();l();ut();x();Jm();a2()});var Zm,Xm,Vm,h4,tc,Oi,ef,Jm=y(()=>{"use strict";a();l();s2();G();st();ce();N();P();z();l2();Zm=Se("GuildMemberCountStore"),Xm=Se("ChannelMemberStore"),Vm=L({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}}),h4=new Intl.NumberFormat,tc=e=>h4.format(e),Oi=Ce("vc-membercount-"),ef=S({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[d.Ven,d.Commandtechno],settings:Vm,patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"},predicate:()=>Vm.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/(?<=\.VIEW_AS_ROLES_MENTIONS_WARNING.{0,100})]/,replace:",$self.renderTooltip(arguments[0].guild)]"},predicate:()=>Vm.store.toolTip}],render:U.wrap(Qm,{noop:!0}),renderTooltip:U.wrap(e=>n(Qm,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var tf,c2,u2,oa,of,p2=y(()=>{"use strict";a();l();dn();G();N();P();z();x();tf=!1,c2=e=>e.key==="Backspace"&&(tf=!0),u2=e=>e.key==="Backspace"&&(tf=!1),oa=L({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}}),of=S({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[d.Ven],dependencies:["MessageEventsAPI"],settings:oa,start(){let e=w("deleteMessage","startEditMessage"),t=w("isEditing","isEditingAny");document.addEventListener("keydown",c2),document.addEventListener("keyup",u2),this.onClick=Rd((o,r,i)=>{let s=o.author.id===O.getCurrentUser().id;if(tf)oa.store.enableDeleteOnClick&&(s||Be.can(fe.MANAGE_MESSAGES,r))&&(o.deleted?F.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||oa.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!Be.can(fe.SEND_MESSAGES,r)||o.deleted===!0)return;if(s){if(!oa.store.enableDoubleClickToEdit||t.isEditing(r.id,o.id))return;e.startEditMessage(r.id,o.id,o.content),i.preventDefault()}else{if(!oa.store.enableDoubleClickToReply)return;let c=64;if(o.hasFlag(c))return;F.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:!H.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){Dd(this.onClick),document.removeEventListener("keydown",c2),document.removeEventListener("keyup",u2)}})});var nf={};Ve(nf,{_modifyAccessories:()=>y4,accessories:()=>oc,addAccessory:()=>na,removeAccessory:()=>ra});function na(e,t,o){oc.set(e,{callback:t,position:o})}function ra(e){oc.delete(e)}function y4(e,t){for(let o of oc.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 oc,nc=y(()=>{"use strict";a();l();oc=new Map});async function w4(e,t){let o=Bi.get(t);if(o)return o.message;Bi.set(t,{fetched:!1});let i=(await Et.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Go.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Bi.set(s.id,{message:s,fetched:!0}),s}function x4(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:c}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:c});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!m2.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function M4(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 I4(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||m2.test(t.url))))}function A4(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 P4(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function C4({message:e}){let t=e.vencordEmbeddedBy??[],o=[],r=null;for(;(r=sf.exec(e.content))!==null;){let[i,s,c]=r;if(t.includes(c))continue;let u=re.getChannel(s);if(!u||!u.isPrivate()&&!Be.can(fe.VIEW_CHANNEL,u))continue;let{listMode:p,idList:m}=rc.store,g=[u.guild_id,s,e.author.id].some(A=>A&&m.includes(A));if(p==="blacklist"&&g||p==="whitelist"&&!g)continue;let v=Bi.get(c)?.message;if(!v)if(v??=Go.getMessage(s,c),v)Bi.set(c,{message:v,fetched:!0});else{let A={...e};delete A.embeds,delete A.interaction,T4.unshift(()=>w4(s,c).then(M=>M&&F.dispatch({type:"MESSAGE_UPDATE",message:A})));continue}let b={message:P4(v,[...t,e.id]),channel:u},I=rc.store.automodEmbeds;o.push(I==="always"||I==="prefer"&&!I4(v)?n(R4,{...b}):n(N4,{...b}))}return o.length?n(f,null,o):null}function f2(e){return e.isDM()?["Direct Message",Ut.getUserAvatarURL(O.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",Ut.getChannelIconURL(e)]:["Server",Ut.getGuildIconURL(pe.getGuild(e.guild_id))]}function N4({message:e,channel:t}){let o=O.getUser(re.getChannel(t.id).recipients?.[0]),[r,i]=f2(t);return n(v4,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(te,{variant:"text-xs/medium",tag:"span"},n("span",null,r," - "),De.parse(t.isDM()?`<@${o.id}>`:`<#${t.id}>`)),iconProxyURL:i}},renderDescription:()=>n("div",{key:e.id,className:ee(d2.message,rc.store.messageBackgroundColor&&d2.searchResult)},n(b4,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function R4(e){let{message:t,channel:o}=e,r=us.MessageDisplayCompact.useSetting(),i=x4(t),{parse:s}=De,[c,u]=f2(o);return n(S4,{channel:o,childrenAccessories:n(te,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${rf.embedAuthor} ${rf.embedMargin}`},u&&n("img",{src:u,className:rf.embedAuthorIcon,alt:""}),n("span",null,n("span",null,c," - "),o.isDM()?De.parse(`<@${re.getChannel(o.id).recipients[0]}>`):De.parse(`<#${o.id}>`))),compact:r,content:n(f,null,t.content||t.attachments.length<=i.length?s(t.content):[M4(t.attachments.length,t.embeds.length)],i.map(p=>{let{width:m,height:g}=A4(p.width,p.height);return n("div",null,n("img",{src:p.url,width:m,height:g}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Bi,v4,S4,b4,d2,rf,sf,m2,T4,rc,af,g2=y(()=>{"use strict";a();l();nc();G();ce();N();Ie();Fr();P();z();x();Bi=new Map,v4=Re(".inlineMediaEmbed"),S4=Re(".withFooter]:","childrenMessageContent:"),b4=Re("renderSimpleAccessories)"),d2=w("message","searchResult"),rf=w("embedAuthorIcon","embedAuthor","embedAuthor"),sf=/(?n(k,{onClick:()=>Bi.clear()},"Clear the linked message cache")}});af=S({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[d.TheSun,d.Ven,d.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:rc,start(){na("messageLinkEmbed",e=>sf.test(e.message.content)?(sf.lastIndex=0,n(U,null,n(C4,{message:e.message}))):null,4)},stop(){ra("messageLinkEmbed")}})});var h2=y(()=>{});var lf,y2=y(()=>{a();l();(unsafeWindow.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});lf="src/plugins/messageLogger/deleteStyleOverlay.css"});var cf,v2=y(()=>{a();l();(unsafeWindow.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; } /* Bot "thinking" text highlighting */ .messagelogger-deleted [class*="colorStandard"] { color: #f04747 !important; } /* Embed highlighting */ .messagelogger-deleted article :is(div, span, h1, h2, h3, p) { color: #f04747 !important; } .messagelogger-deleted a { color: #be3535 !important; text-decoration: underline; } `,classNames:{},dom:null});cf="src/plugins/messageLogger/deleteStyleText.css"});function S2(){H.plugins.MessageLogger.deleteStyle==="text"?(So(cf),Ko(lf)):(Ko(cf),So(lf))}var D4,b2,T2,k4,uf,w2=y(()=>{"use strict";a();l();h2();G();st();ce();N();Xe();P();z();x();y2();v2();D4=w("edited","communicationDisabled","isSystemMessage");b2="ml-remove-history",T2="ml-toggle-style",k4=(e,t)=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:c}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let u=document.getElementById(`chat-messages-${c}-${s}`);if(!u)break e;e.push(n(B.MenuItem,{id:T2,key:T2,label:"Toggle Deleted Highlight",action:()=>u.classList.toggle("messagelogger-deleted")}))}e.push(n(B.MenuItem,{id:b2,key:b2,label:"Remove Message History",color:"danger",action:()=>{r?F.dispatch({type:"MESSAGE_DELETE",channelId:c,id:s,mlDeleted:!0}):o.editHistory=[]}}))},uf=S({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[d.rushii,d.Ven,d.AutumnVN],contextMenus:{message:k4},start(){S2()},renderEdit(e){return n(U,{noop:!0},n("div",{className:"messagelogger-edited"},De.parse(e.content),n(Po,{timestamp:e.timestamp,isEdited:!0,isInline:!1},n("span",{className:D4.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:()=>S2()},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 c=64;t.mlDeleted||(s.flags&c)===c||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,p=>p.set("deleted",!0).set("attachments",p.attachments.map(m=>(m.deleted=!0,m))))};o?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e,t=!1){let{ignoreBots:o,ignoreSelf:r,ignoreUsers:i,ignoreChannels:s,ignoreGuilds:c,logEdits:u,logDeletes:p}=H.plugins.MessageLogger,m=O.getCurrentUser().id;return o&&e.author?.bot||r&&e.author?.id===m||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(re.getChannel(e.channel_id)?.parent_id)||(t?!u:!p)||c.includes(re.getChannel(e.channel_id)?.guild_id)},patches:[{find:'"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:".removeMosaicItemHoverButton",group:!0,replacement:[{match:/(className:\i,item:\i),/,replace:"$1,item: 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:'"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 x2(e){wi({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await ic(e.name)?(H.plugins.MessageTags.clyde&&ye(o.channel.id,{content:`${dr} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` `)}):(ye(o.channel.id,{content:`${dr} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[L4]:!0},"CustomTags")}var dr,ac,L4,sc,ic,E4,O4,pf,M2=y(()=>{"use strict";a();l();so();wo();G();N();P();dr="<:luna:1035316192220553236>",ac="MessageTags_TAGS",L4=Symbol("MessageTags"),sc=()=>nt(ac).then(e=>e??[]),ic=e=>nt(ac).then(t=>(t??[]).find(o=>o.name===e)??null),E4=async e=>{let t=await sc();return t.push(e),ht(ac,t),t},O4=async e=>{let t=await sc();return t=await t.filter(o=>o.name!==e),ht(ac,t),t};pf=S({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[d.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 sc())x2(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=vt(e[0].options,"tag-name",""),r=vt(e[0].options,"message","");if(await ic(o))return ye(t.channel.id,{content:`${dr} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};x2(i),await E4(i),ye(t.channel.id,{content:`${dr} Successfully created the tag **${o}**!`});break}case"delete":{let o=vt(e[0].options,"tag-name","");if(!await ic(o))return ye(t.channel.id,{content:`${dr} A Tag with the name **${o}** does not exist!`});Bs(o),await O4(o),ye(t.channel.id,{content:`${dr} Successfully deleted the tag **${o}**!`});break}case"list":{ye(t.channel.id,{embeds:[{title:"All Tags:",description:(await sc()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(` `)||`${dr} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=vt(e[0].options,"tag-name",""),r=await ic(o);if(!r)return ye(t.channel.id,{content:`${dr} A Tag with the name **${o}** does not exist!`});ye(t.channel.id,{content:r.message.replaceAll("\\n",` `)});break}default:{ye(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function B4(e){let t="";for(let o=0;o{"use strict";a();l();so();N();P();df=S({name:"MoreCommands",description:"echo, lenny, mock",authors:[d.Arjix,d.echo,d.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[tr],inputType:3,execute:(e,t)=>{let o=vt(e,"message","");ye(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[tr],execute:e=>({content:vt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Os],execute:e=>({content:B4(vt(e,"message",""))})}]})});var mf,A2=y(()=>{"use strict";a();l();so();N();P();mf=S({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[d.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:[tr],execute:t=>({content:vt(t,"message","")+e.description})}))})});function U4(e){mr.store.tagSettings??=ff;let[t,o]=W(mr.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(he,{flexDirection:"column"},_i.map(i=>n(Nt,{style:{padding:"1em 1em 0"}},n(T.FormTitle,{style:{width:"fit-content"}},n(ne,{text:i.description},({onMouseEnter:s,onMouseLeave:c})=>n("div",{onMouseEnter:s,onMouseLeave:c},i.displayName," Tag ",n(Rn,{type:Rn.Types[i.name]})))),n(ct,{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:K.bottom16}),n(qt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),n(qt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var _4,Rn,P2,_i,ff,mr,gf,C2=y(()=>{"use strict";a();l();G();Bt();N();et();P();z();x();_4=w("computePermissions","canEveryoneRole"),Rn=oo(e=>e.Types?.[0]==="BOT"),P2=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),_i=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:P2},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>pe.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"]}],ff=Object.fromEntries(_i.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));mr=L({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:U4,description:"fill me"}}),gf=S({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[d.Cyn,d.TheSun,d.RyanCaoDev,d.LordElias,d.AutumnVN],settings:mr,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: $.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(!mr.store.tagSettings)if(!mr.store.visibility_WEBHOOK)mr.store.tagSettings=ff;else{let e={...ff};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}mr.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let o=pe.getGuild(t?.guild_id);if(!o)return[];let r=_4.computePermissions({user:e,context:o,overwrites:t.permissionOverwrites});return Object.entries(fe).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return _i.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===Rn.Types.ORIGINAL_POSTER||_i.some(t=>e===Rn.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[o,r]=e.split("-"),i=_i.find(({name:c})=>o===c);if(!i||r==="BOT"&&o!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=mr.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 Rn.Types.OFFICIAL;if(t.isClyde())return Rn.Types.AI;let c=typeof r=="number"?r:null;if(s??=re.getChannel(o),!s)return c;let u=this.settings.store,p=this.getPermissions(t,s);for(let m of _i)if(!(i==="chat"&&!u.tagSettings[m.name].showInChat)&&!(i==="not-chat"&&!u.tagSettings[m.name].showInNotChat)&&(m.permissions?.some(g=>p.includes(g))||m.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?c=Rn.Types[`${m.name}-OP`]:t.bot&&!P2(e,t)&&!u.dontShowBotTag?c=Rn.Types[`${m.name}-BOT`]:c=Rn.Types[m.name];break}return c}})});function G4(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function H4(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function j4(e){let t=G4(e,yf)+H4(e,z4);return Math.min(t,10)}function hf(){if(!fr.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=fr.store.quality==="HD"?$4:F4,e.volume=fr.store.volume,e.play()}var yf,F4,$4,fr,vf,z4,N2=y(()=>{"use strict";a();l();G();Up();N();Ie();P();x();yf="\u{1F5FF}",F4="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",$4="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",fr=L({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:or(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}}),vf=S({name:"Moyai",authors:[d.Megu,d.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:fr,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||fr.store.ignoreBots&&o.author?.bot||fr.store.ignoreBlocked&&Ke.isBlocked(o.author?.id)||!o.content||r!==Ae.getChannelId())return;let i=j4(o.content);for(let s=0;s/gi});function Y4(e){return e.name||e.recipients.map(O.getUser).filter(Ru).map(t=>Ke.getNickname(t.id)||q4.getName(t)).join(", ")}var W4,q4,gr,K4,Sf,R2=y(()=>{"use strict";a();l();N();Xa();P();z();x();W4=w("selectPrivateChannel"),q4=w("getGlobalName"),gr=w("emptyIconFriends","emptyIconGuilds"),K4=w("guildNick","guildAvatarWithoutIcon");Sf=S({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[d.amia],patches:[{find:".Messages.MUTUAL_GUILDS_WITH_END_COUNT",replacement:{match:/(?<=\.tabBarItem.{0,50}MUTUAL_GUILDS.+?}\),)(?=.+?(\(0,\i\.jsxs?\)\(.{0,100}id:))/,replace:'(arguments[0].user.bot||arguments[0].isCurrentUser)?null:$1"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=re.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>n(di,{className:gr.listRow,onClick:()=>{t(),W4.selectPrivateChannel(r.id)}},n(mi,{src:Ut.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:gr.listAvatar}),n("div",{className:gr.listRowContent},n("div",{className:gr.listName},Y4(r)),n("div",{className:K4.guildNick},r.recipients.length+1," Members"))));return n(pi,{className:gr.listScroller,fade:!0,onClose:t},o.length>0?o:n("div",{className:gr.empty},n("div",{className:gr.emptyIconFriends}),n("div",{className:gr.emptyText},"No group dms in common")))}})});var Z4,X4,Q4,ia,bf,D2=y(()=>{"use strict";a();l();G();N();P();z();({updateGuildNotificationSettings:Z4}=w("updateGuildNotificationSettings")),{toggleShowAllChannels:X4}=w("toggleShowAllChannels"),{isOptInEnabledForGuild:Q4}=w("isOptInEnabledForGuild"),ia=L({guild:{description:"Mute Guild automatically",type:3,default:!0},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0},showAllChannels:{description:"Show all channels automatically",type:3,default:!0}});Gr("NewGuildSettings","MuteNewGuild");bf=S({name:"NewGuildSettings",description:"Automatically mute new servers and change various other settings upon joining",tags:["MuteNewGuild","mute","server"],authors:[d.Glitch,d.Nuckyz,d.carince,d.Mopi],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:ia,handleMute(e){e==="@me"||e==="null"||e==null||(Z4(e,{muted:ia.store.guild,suppress_everyone:ia.store.everyone,suppress_roles:ia.store.role}),ia.store.showAllChannels&&Q4(e)&&X4(e))}})});var J4,Tf,k2=y(()=>{"use strict";a();l();G();N();P();z();J4=w("getRelationships","isBlocked"),Tf=S({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[d.rushii,d.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['="MessageStore",','"displayName","ReadStateStore")'].map(e=>({find:e,predicate:()=>H.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=>J4.isBlocked(e.author.id)})});var wf,L2=y(()=>{"use strict";a();l();N();P();wf=S({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:[d.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var xf,E2=y(()=>{"use strict";a();l();N();P();xf=S({name:"NoF1",description:"Disables F1 help bind.",authors:[d.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var O2,Mf,B2=y(()=>{"use strict";a();l();G();N();P();O2=L({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),Mf=S({name:"NoMosaic",authors:[d.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:O2,patches:[{find:"isGroupableMedia:function()",replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i;/,replace:"=>false;"}},{find:"renderAttachments(",predicate:()=>O2.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]})});var V4,sa,If,_2=y(()=>{"use strict";a();l();G();N();P();z();V4=w("getMessageRequestsCount"),sa=L({hideFriendRequestsCount:{type:3,description:"Hide incoming friend requests count",default:!0,restartNeeded:!0},hideMessageRequestsCount:{type:3,description:"Hide message requests count",default:!0,restartNeeded:!0},hidePremiumOffersCount:{type:3,description:"Hide nitro offers count",default:!0,restartNeeded:!0}}),If=S({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[d.amia],settings:sa,patches:[{find:"getPendingCount(){",predicate:()=>sa.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>sa.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>sa.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>sa.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return V4.getMessageRequestChannelIds().size}})});var Af,U2=y(()=>{"use strict";a();l();N();P();Af=S({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[d.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var lc,Pf,F2=y(()=>{"use strict";a();l();G();N();P();lc=L({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),Pf=S({name:"NoReplyMention",description:"Disables reply pings by default",authors:[d.DustyAngel47,d.axyie,d.pylix,d.outfoxxed],settings:lc,shouldMention(e,t){let o=lc.store.userList.includes(e.author.id),r=lc.store.shouldPingListed?o:!o;return lc.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var Cf,$2=y(()=>{"use strict";a();l();N();P();Cf=S({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[d.Nuckyz],patches:[{find:'"ApplicationStreamPreviewUploadManager"',replacement:{match:/await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,replace:"0"}}]})});var Nf,G2=y(()=>{"use strict";a();l();N();P();Nf=S({name:"NoTypingAnimation",authors:[d.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Rf,H2=y(()=>{"use strict";a();l();N();P();Rf=S({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[d.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton()",replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"flash:!0,returnMessageId",replacement:{match:/.\?(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"false?$1"}}]})});var Df,z2=y(()=>{"use strict";a();l();N();P();Df=S({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[d.bb010g],patches:[{find:".Messages.COPY_MESSAGE_LINK,",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var e3,kf,j2=y(()=>{"use strict";a();l();G();N();P();e3=L({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),kf=S({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[d.philipbry],settings:e3,patches:[{find:"_ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/,replace:"$self.settings.store.notificationVolume/100*"}}]})});var Lf,W2=y(()=>{"use strict";a();l();N();P();Lf=S({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[d.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/,replace:"!0"}}]})});var aa,Ef,q2=y(()=>{"use strict";a();l();G();N();P();x();aa=L({channelToAffect:{type:4,description:"Select the type of DM for the plugin to affect",options:[{label:"Both",value:"both_dms",default:!0},{label:"User DMs",value:"user_dm"},{label:"Group DMs",value:"group_dm"}]},allowMentions:{type:3,description:"Receive audio pings for @mentions",default:!1},allowEveryone:{type:3,description:"Receive audio pings for @everyone and @here in group DMs",default:!1}}),Ef=S({name:"OnePingPerDM",description:"If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",authors:[d.ProffDea],settings:aa,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,soundpack:\i,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=re.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&aa.store.channelToAffect==="group_dm"||t===3&&aa.store.channelToAffect==="user_dm"||aa.store.allowMentions&&e.mentions.some(o=>o.id===O.getCurrentUser().id)||aa.store.allowEveryone&&e.mention_everyone?!0:Dr.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Of,K2=y(()=>{"use strict";a();l();N();P();Of=S({name:"oneko",description:"cat follow mouse (real)",authors:[d.Ven,d.adryd],start(){h("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif").replace("(isReducedMotion)","(false)")).then(eval)},stop(){document.getElementById("oneko")?.remove()}})});var t3,o3,n3,ei,Zte,Bf,Y2=y(()=>{"use strict";a();l();G();N();P();x();t3=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,o3=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,n3=/^https:\/\/store\.epicgames\.com\/(.+)$/,ei=L({spotify:{type:3,description:"Open Spotify links in the Spotify app",default:!0},steam:{type:3,description:"Open Steam links in the Steam app",default:!0},epic:{type:3,description:"Open Epic Games links in the Epic Games Launcher",default:!0}}),Zte=VencordNative.pluginHelpers.OpenInApp,Bf=S({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[d.Ven],settings:ei,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/(?<=handleClick:function\(\)\{return (\i)\}.+?)function \1\(.+?\)\{/,replace:"async $& if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>ei.store.spotify,replacement:{match:/\i\.\i\.isProtocolRegistered\(\)(.{0,100})window.open/g,replace:"true$1VencordNative.native.openExternal"}},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:\i=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;e:{if(!ei.store.spotify)break e;let r=t3.exec(o);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!ei.store.steam||!o3.test(o))break e;return VencordNative.native.openExternal(`steam://openurl/${o}`),t?.preventDefault(),wt("Opened link in Steam",V.Type.SUCCESS),!0}e:{if(!ei.store.epic)break e;let r=n3.exec(o);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(unsafeWindow.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){t==="spotify"&&ei.store.spotify?(VencordNative.native.openExternal(`spotify:user:${o}`),e.preventDefault()):t==="steam"&&ei.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${o}`),wt("Opened link in Steam",V.Type.SUCCESS),e.preventDefault())}})});var _f,Uf,Z2=y(()=>{"use strict";a();l();G();N();P();_f=L({defaultLayout:{type:4,options:[{label:"List",value:1,default:!0},{label:"Gallery",value:2}],description:"Which layout to use as default"},defaultSortOrder:{type:4,options:[{label:"Recently Active",value:0,default:!0},{label:"Date Posted",value:1}],description:"Which sort order to use as default"}}),Uf=S({name:"OverrideForumDefaults",description:"Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",authors:[d.Inbestigator],patches:[{find:"getDefaultLayout(){",replacement:[{match:/getDefaultLayout\(\){/,replace:"$&return $self.getLayout();"},{match:/getDefaultSortOrder\(\){/,replace:"$&return $self.getSortOrder();"}]}],getLayout:()=>_f.store.defaultLayout,getSortOrder:()=>_f.store.defaultSortOrder,settings:_f})});function Q2(e){F.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function J2(e){let t={screenshakeEnabledLocations:{0:!0,1:!0,2:!0},shakeIntensity:1,confettiSize:16,confettiCount:5,combosRequiredCount:1};switch(e){case 0:{Object.assign(t,{screenshakeEnabledLocations:{0:!0,1:!1,2:!1},combosRequiredCount:5});break}case 1:{Object.assign(t,{confettiSize:12,confettiCount:8});break}case 2:{Object.assign(t,{shakeIntensity:20,confettiSize:25,confettiCount:15});break}}F.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var X2,Ff,V2=y(()=>{"use strict";a();l();G();N();P();x();X2=L({superIntensePartyMode:{description:"Party intensity",type:4,options:[{label:"Normal",value:0,default:!0},{label:"Better",value:1},{label:"Project X",value:2}],restartNeeded:!1,onChange:J2}}),Ff=S({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[d.UwUDev],settings:X2,start(){Q2(!0),J2(X2.store.superIntensePartyMode)},stop(){Q2(!1)}})});var $f,Gf,eT=y(()=>{"use strict";a();l();G();N();P();$f=L({lockout:{type:3,default:!0,description:`Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,restartNeeded:!0},onboarding:{type:3,default:!0,description:'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',restartNeeded:!0}}),Gf=S({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[d.lewisakura],patches:[{find:".showPermissionLockoutModal(",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>$f.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/(?<=(?:isDefaultChannelThresholdMetAfterDelete|checkDefaultChannelThresholdMetAfterChannelPermissionDeny):function\(\)\{)return \i(?=\})/g,replace:"return () => true"}],predicate:()=>$f.store.onboarding}],settings:$f})});var tT=y(()=>{});function r3(e){return $r(e.toLowerCase().split("_"))}function cc(e){return e=oT[e]||e,Ye.Messages[e]||r3(e)}function nT(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=oT[e]||e);let t=Ye.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?De.parse(t.message):typeof t=="string"?t:""}function uc({id:e},t){let o=pe.getRoles(e);return[...t.roles,e].map(r=>o[r]).sort((r,i)=>i.position-r.position)}function rT(e){switch(Dn.store.permissionsSortOrder){case 0:return e.sort((t,o)=>o.position-t.position);case 1:return e.sort((t,o)=>t.position-o.position);default:return e}}function pc(e,t){let o=pe.getRoles(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=o[r.id];return o[i.id].position-s.position})}var Vt,oT,la=y(()=>{"use strict";a();l();st();qn();x();ua();ca();Vt=Ce("vc-permviewer-");oT={MANAGE_GUILD:"MANAGE_SERVER",MANAGE_GUILD_EXPRESSIONS:"MANAGE_EXPRESSIONS",CREATE_GUILD_EXPRESSIONS:"CREATE_EXPRESSIONS",MODERATE_MEMBERS:"MODERATE_MEMBER",STREAM:"VIDEO",SEND_VOICE_MESSAGES:"ROLE_PERMISSIONS_SEND_VOICE_MESSAGE"}});function Hf(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Denied"),n("path",{fill:"var(--status-danger)",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"}))}function zf(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Allowed"),n("path",{fill:"var(--text-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function sT(){return n("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},n("g",null,n("title",null,"Not overwritten"),n("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var aT=y(()=>{"use strict";a();l()});function s3(e,t,o){return ge(r=>n(c3,{modalProps:r,permissions:e,guild:t,header:o}))}function a3({permissions:e,guild:t,modalProps:o,header:r}){e.sort((p,m)=>p.type-m.type),_e([Ge],()=>Ge.getMemberIds(t.id),null,(p,m)=>p.length===m.length),ae(()=>{let p=e.filter(m=>m.type===1&&!Ge.isMember(t.id,m.id)).map(({id:m})=>m);F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:p})},[]);let[i,s]=W(0),c=e[i],u=pe.getRoles(t.id);return n(Pe,{...o,size:"large"},n(He,null,n(te,{className:Vt("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),n(ft,{onClick:o.onClose})),n(Le,null,!c&&n("div",{className:Vt("perms-no-perms")},n(te,{variant:"heading-lg/normal"},"No permissions to display!")),c&&n("div",{className:Vt("perms-container")},n("div",{className:Vt("perms-list")},e.map((p,m)=>{let g=O.getUser(p.id??""),v=u[p.id??""];return n("button",{className:Vt("perms-list-item-btn"),onClick:()=>s(m)},n("div",{className:Vt("perms-list-item",{"perms-list-item-active":i===m}),onContextMenu:b=>{Dn.store.unsafeViewAsRole&&p.type===0&&Kt.openContextMenu(b,()=>n(l3,{guild:t,roleId:p.id,onClose:o.onClose}))}},(p.type===0||p.type===2)&&n("span",{className:Vt("perms-role-circle"),style:{backgroundColor:v?.colorString??"var(--primary-300)"}}),p.type===1&&g!==void 0&&n("img",{className:Vt("perms-user-img"),src:g.getAvatarURL(void 0,void 0,!1)}),n(te,{variant:"text-md/normal"},p.type===0?v?.name??"Unknown Role":p.type===1?(g&&bn(g))??"Unknown User":n(he,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(c0,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:Vt("perms-perms")},Object.entries(fe).map(([p,m])=>n("div",{className:Vt("perms-perms-item")},n("div",{className:Vt("perms-perms-item-icon")},(()=>{let{permissions:g,overwriteAllow:v,overwriteDeny:b}=c;return g?(g&m)===m?zf():Hf():v&&(v&m)===m?zf():b&&(b&m)===m?Hf():sT()})()),n(te,{variant:"text-md/normal"},cc(p)),n(ne,{text:nT(p)||"No Description"},g=>n(Sl,{...g}))))))))}function l3({guild:e,roleId:t,onClose:o}){return n(B.Menu,{navId:Vt("role-context-menu"),onClose:Kt.closeContextMenu,"aria-label":"Role Options"},n(B.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=pe.getRole(e.id,t);!r||(o(),F.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var c3,Ui,ca=y(()=>{"use strict";a();l();ce();Bt();Mt();ut();ze();x();ua();la();aT();c3=U.wrap(a3),Ui=s3});var lT=y(()=>{});function pa({children:e,onMoreClick:t,buttons:o,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:c}){let[u,p]=W(i);return n(f,null,n("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},n(te,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},c),n("div",{className:jf("center-flex")},o??null,t&&n(ne,{text:r},m=>n("button",{...m,className:jf("btn"),onClick:t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(ne,{text:u?"Hide "+c:"Show "+c},m=>n("button",{...m,className:jf("btn"),onClick:()=>{p(g=>!g),s?.(u)}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:u?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),u&&e)}var jf,Wf=y(()=>{"use strict";a();l();st();x();lT();jf=Ce("vc-expandableheader-")});function p3({guild:e,guildMember:t,showBorder:o}){let r=Dn.use(["permissionsSortOrder"]),[i,s]=Ct(()=>{let M=[],R=uc(e,t),D=R.map(C=>({type:0,...C}));if(e.ownerId===t.userId){D.push({type:2,permissions:Object.values(fe).reduce(($,j)=>$|j,0n)});let C=Ye.Messages.GUILD_OWNER||"Server Owner";M.push({permission:C,roleColor:"var(--primary-300)",rolePosition:1/0})}rT(R);for(let[C,$]of Object.entries(fe))for(let{permissions:j,colorString:X,position:J}of R)if((j&$)===$){M.push({permission:cc(C),roleColor:X||"var(--primary-300)",rolePosition:J});break}return M.sort((C,$)=>$.rolePosition-C.rolePosition),[D,M]},[r.permissionsSortOrder]),{root:c,role:u,roleRemoveButton:p,roleNameOverflow:m,roles:g,rolePill:v,rolePillBorder:b,roleCircle:I,roleName:A}=u3;return n(pa,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Ui(i,e,t.nick||O.getUser(t.userId).username),onDropDownClick:M=>Dn.store.defaultPermissionsDropdownState=!M,defaultState:Dn.store.defaultPermissionsDropdownState,buttons:[n(ne,{text:`Sorting by ${r.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},M=>n("button",{...M,className:Vt("userperms-sortorder-btn"),onClick:()=>{r.permissionsSortOrder=r.permissionsSortOrder===0?1:0}},n("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:r.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},n("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},s.length>0&&n("div",{className:ee(c,g)},s.map(({permission:M,roleColor:R})=>n("div",{className:ee(u,v,o?b:null)},n("div",{className:p},n("span",{className:I,style:{backgroundColor:R}})),n("div",{className:A},n(te,{className:m,variant:"text-xs/medium"},M))))))}var u3,cT,uT=y(()=>{"use strict";a();l();ce();Wf();Ie();z();x();ua();la();ca();u3=mo(()=>Object.assign({},...Cr(xe.byProps("roles","rolePill","rolePillBorder"),xe.byProps("roleCircle","dotBorderBase","dotBorderColor"),xe.byProps("roleNameOverflow","root","roleName","roleRemoveButton"))));cT=U.wrap(p3,{noop:!0})});function qf(e,t,o){return o===0&&!Ge.isMember(e,t)?null:n(B.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=pe.getGuild(e),i,s;switch(o){case 0:{let c=Ge.getMember(e,t);i=uc(r,c).map(u=>({type:0,...u})),r.ownerId===t&&i.push({type:2,permissions:Object.values(fe).reduce((u,p)=>u|p,0n)}),s=c.nick??O.getUser(c.userId).username;break}case 1:{let c=re.getChannel(t);i=pc(Object.values(c.permissionOverwrites).map(({id:u,allow:p,deny:m,type:g})=>({type:g,id:u,overwriteAllow:p,overwriteDeny:m})),e),s=c.name;break}default:{i=Object.values(pe.getRoles(r.id)).map(c=>({type:0,...c})),s=r.name;break}}Ui(i,r,s)}})}function dc(e,t){return(o,r)=>{if(!r||t===0&&!r.user||t===2&&!r.guild||t===1&&(!r.channel||!r.guild))return;let i=pt(e,o),s=(()=>{switch(t){case 0:return qf(r.guildId,r.user.id,t);case 1:return qf(r.guild.id,r.channel.id,t);case 2:return qf(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&o.splice(-1,0,n(B.MenuGroup,null,s)))}}var Dn,Kf,ua=y(()=>{"use strict";a();l();tT();Ro();G();N();P();x();ca();uT();la();Dn=L({permissionsSortOrder:{description:"The sort method used for defining which role grants an user a certain permission",type:4,options:[{label:"Highest Role",value:0,default:!0},{label:"Lowest Role",value:1}]},defaultPermissionsDropdownState:{description:"Whether the permissions dropdown on user popouts should be open by default",type:3,default:!1}});Kf=S({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[d.Nuckyz,d.Ven],settings:Dn,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:(.{0,60})}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,o,r)=>`${e}$self.UserPermissions(${o},${r},${t}),`}}],UserPermissions:(e,t,o)=>!!t&&n(cT,{guild:e,guildMember:t,showBorder:o}),contextMenus:{"user-context":dc("roles",0),"channel-context":dc(["mute-channel","unmute-channel"],1),"guild-context":dc("privacy",2),"guild-header-popout":dc("privacy",2)}})});function dT(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),r(s)},s.onerror=(c,u,p,m,g)=>i(g||c),s.crossOrigin="Anonymous",s.src=o})}async function h3(e,t,o){for(let r of e)switch(r.name){case"image":let i=g3.getUploads(t.channel.id,pT)[0];if(i){if(!i.isImage)throw"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await Ot.getUser(r.value)).getAvatarURL(o?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user `,s),"Failed to fetch user. Check the console for more info."}}return null}var Fi,pT,d3,m3,mc,f3,g3,Yf,mT=y(()=>{"use strict";a();l();so();N();xo();P();z();x();Fi=N1(hm()),pT=0,d3=20,m3=128,mc=10,f3=hn(()=>Promise.all(Array.from({length:mc},(e,t)=>dT(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),g3=w("getUploads");Yf=S({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[d.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let o=await f3(),r=vt(e,"no-server-pfp",!1);try{var i=await h3(e,t,r);if(!i)throw"No Image specified!"}catch(b){ye(t.channel.id,{content:String(b)});return}let s=await dT(i),c=vt(e,"delay",d3),u=vt(e,"resolution",m3),p=(0,Fi.GIFEncoder)(),m=document.createElement("canvas");m.width=m.height=u;let g=m.getContext("2d");for(let b=0;bhs.promptToUpload([v],t.channel,pT),10)}}]})});var fT=y(()=>{});var gT,Zf,hT=y(()=>{"use strict";a();l();fT();G();ce();N();P();x();gT=L({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),Zf=S({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[d.Nobody],settings:gT,patches:[{find:".nonMediaMosaicItem]",replacement:{match:/\.nonMediaMosaicItem\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:U.wrap(()=>n(ne,{text:"Toggle Picture in Picture"},e=>n("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let o=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(o.cloneNode(!0));r.loop=gT.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=o.currentTime,r.requestPictureInPicture(),o.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},n("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});var yT=y(()=>{});var vT,fc=y(()=>{"use strict";a();l();vT=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306]});async function kn(e){let{id:t}=O.getCurrentUser();await ht(ST+t,e)}async function Qf(){let e=O.getCurrentUser()?.id;await v3(e),await w3(e),zt()}async function v3(e){de=await nt(ST+e)??[]}function TT(e){return de.find(t=>t.id===e)}async function wT(e){de.push(e),await kn(de)}async function xT(e){let t=de.findIndex(o=>o.id===e.id);t!==-1&&(de[t]=e,await kn(de))}async function MT(e,t){let o=de.find(r=>r.id===t);!o||o.channels.includes(e)||(o.channels.push(e),await kn(de))}async function IT(e){let t=de.find(o=>o.channels.includes(e));!t||(t.channels=t.channels.filter(o=>o!==e),await kn(de))}async function AT(e){!de.find(o=>o.id===e)||(de=de.filter(o=>o.id!==e),await kn(de))}async function PT(e,t=!0){let o=de.find(r=>r.id===e);!o||(o.collapsed=t,await kn(de))}function ma(e){return de.some(t=>t.channels.includes(e))}function CT(){return de.length}function NT(){if(ko.store.pinOrder===0){let e=tg.getPrivateChannelIds();return de.filter(t=>!t.collapsed).flatMap(t=>e.filter(o=>t.channels.includes(o)))}return de.filter(e=>!e.collapsed).flatMap(e=>e.channels)}function RT(){return de.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}function LT(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}async function Vf(e,t){let o=de.findIndex(i=>i.id===e),r=o+t;LT(de,o,r),await kn(de)}async function eg(e,t){let o=de.find(s=>s.channels.includes(e));if(!o)return;let r=o.channels.indexOf(e),i=r+t;LT(o.channels,r,i),await kn(de)}async function b3(){if(de.some(o=>o.id==="oldPins"))return await ht(Xf,!0);let e=S3(),t=[...new Set(e)].filter(o=>!de.some(r=>r.channels.includes(o)));t?.length&&de.push({id:"oldPins",name:"Pins",color:10070709,channels:t}),await ht(Xf,!0)}async function T3(e){let t=await nt(y3+e);de.length===0&&t?.length&&de.push(...t.filter(o=>o.id!=="oldPins")),await ht(bT,!0)}async function w3(e){let t=await nt(bT),o=await nt(Xf);t&&o||(t||await T3(e),o||await b3(),await kn(de))}var ST,Xf,bT,y3,de,DT,da,kT,Jf,S3,hc=y(()=>{"use strict";a();l();wo();G();x();fc();fa();ST="PinDMsCategories-",Xf="PinDMsMigratedPinDMs",bT="PinDMsMigratedOldCategories",y3="BetterPinDMsCategories-",de=[];DT=(e,t,o)=>{let r=e[t],i=e[t+o];return r&&i},da=(e,t)=>{let o=de.findIndex(r=>r.id===e);return DT(de,o,t)},kT=e=>da(e,-1)||da(e,1),Jf=(e,t)=>{let o=de.find(i=>i.channels.includes(e));if(!o)return!1;let r=o.channels.indexOf(e);return DT(o.channels,r,t)};S3=()=>(H.plugins.PinDMs.pinnedDMs||void 0)?.split(",")});function P3(e,t){let[o,r]=W(null);return ae(()=>{e?r(TT(e)):t&&r({id:V.genId(),name:`Pin Category ${de.length+1}`,color:10070709,collapsed:!1,channels:[t]})},[e,t]),{category:o,setCategory:r}}function C3({categoryId:e,modalProps:t,initalChannelId:o}){let{category:r,setCategory:i}=P3(e,o);if(!r)return null;let s=async c=>{c.preventDefault(),e?await xT(r):await wT(r),zt(),t.onClose()};return n(Pe,{...t},n(He,null,n(te,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),n("form",{onSubmit:s},n(Le,{className:A3("content")},n(T.FormSection,null,n(T.FormTitle,null,"Name"),n(ct,{value:r.name,onChange:c=>i({...r,name:c})})),n(T.FormDivider,null),n(T.FormSection,null,n(T.FormTitle,null,"Color"),n(I3,{key:r.name,defaultColor:10070709,colors:vT,onChange:c=>i({...r,color:c}),value:r.color,renderDefaultButton:()=>null,renderCustomButton:()=>n(M3,{color:r.color,onChange:c=>i({...r,color:c}),key:r.name,showEyeDropper:!1})}))),n(mt,null,n(k,{type:"submit",onClick:s,disabled:!r.name},e?"Save":"Create"))))}var M3,I3,og,A3,yc,ng=y(()=>{"use strict";a();l();st();ze();z();x();fc();hc();fa();M3=Re(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),I3=Re("presets,","customColor:"),og=li(['name:"UserSettings"'],/createPromise:.{0,20}Promise\.all\((\[\i\.\i\(".+?"\).+?\])\).then\(\i\.bind\(\i,"(.+?)"\)\).{0,50}"UserSettings"/),A3=Ce("vc-pindms-modal-");yc=(e,t)=>Or(async()=>(await og(),o=>n(C3,{categoryId:e,modalProps:o,initalChannelId:t})))});function ET(e){let t=ma(e);return n(B.MenuItem,{id:"pin-dm",label:"Pin DMs"},!t&&n(f,null,n(B.MenuItem,{id:"vc-add-category",label:"Add Category",color:"brand",action:()=>yc(null,e)}),n(B.MenuSeparator,null),de.map(o=>n(B.MenuItem,{id:`pin-category-${o.name}`,label:o.name,action:()=>MT(e,o.id).then(zt)}))),t&&n(f,null,n(B.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>IT(e).then(zt)}),ko.store.pinOrder===1&&Jf(e,-1)&&n(B.MenuItem,{id:"move-up",label:"Move Up",action:()=>eg(e,-1).then(zt)}),ko.store.pinOrder===1&&Jf(e,1)&&n(B.MenuItem,{id:"move-down",label:"Move Down",action:()=>eg(e,1).then(zt)})))}var N3,R3,OT,BT=y(()=>{"use strict";a();l();Ro();x();hc();fa();ng();N3=(e,t)=>{pt("leave-channel",e)?.unshift(ET(t.channel.id))},R3=(e,t)=>{let o=pt("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,ET(t.channel.id))}},OT={"gdm-context":N3,"user-context":R3}});var _T,tg,UT,zt,ko,rg,fa=y(()=>{"use strict";a();l();yT();G();ce();N();Ie();P();z();x();BT();ng();fc();hc();_T=w("privateChannelsHeaderContainer"),tg=Se("PrivateChannelSortStore"),zt=()=>UT?.props?._forceUpdate?.(),ko=L({pinOrder:{type:4,description:"Which order should pinned DMs be displayed in?",options:[{label:"Most recent message",value:0,default:!0},{label:"Custom (right click channels to reorder)",value:1}],onChange:()=>zt()},dmSectioncollapsed:{type:3,description:"Collapse DM sections",default:!1,onChange:()=>zt()}}),rg=S({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[d.Ven,d.Aria],settings:ko,contextMenus:OT,patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i)/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c))"},{match:/(?<=renderRow:this\.renderRow,)sections:\[.+?1\)]/,replace:"...$self.makeProps(this,{$&})"},{match:/"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.default),\{channel:.+?)/,replace:"$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2);"},{match:/"renderSection",(\i)=>{/,replace:"$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);"},{match:/(?<=span",{)className:\i\.headerText,/,replace:"...$self.makeSpanProps(),$&"},{match:/(?<="getRowHeight",.{1,100}return 1===)\i/,replace:"($&-$self.categoryLen())"},{match:/"getRowHeight",\((\i),(\i)\)=>{/,replace:"$&if($self.isChannelHidden($1,$2))return 0;"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"},{match:/(?<=scrollToChannel\(\i\){.{1,300})this\.props\.privateChannelIds/,replace:"[...$&,...$self.getAllUncollapsedChannels()]"}]},{find:'.FRIENDS},"friends"',replacement:{match:/(?<=\i=\i=>{).{1,100}premiumTabSelected.{1,800}showDMHeader:.+?,/,replace:"let forceUpdate = Vencord.Util.useForceUpdater();$&_forceUpdate:forceUpdate,"}},{find:".Routes.APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}}],sections:null,set _instance(e){this.instance=e,UT=e},startAt:"WebpackReady",start:Qf,flux:{CONNECTION_OPEN:Qf},isPinned:ma,categoryLen:CT,getSections:RT,getAllUncollapsedChannels:NT,requireSettingsMenu:og,makeProps(e,{sections:t}){return this._instance=e,this.sections=t,this.sections.splice(1,0,...this.getSections()),this.instance?.props?.privateChannelIds?.length===0&&(this.sections[this.sections.length-1]=0),{sections:this.sections,chunkSize:this.getChunkSize()}},makeSpanProps(){return{onClick:()=>this.collapseDMList(),role:"button",style:{cursor:"pointer"}}},getChunkSize(){let e=this.getSections();return(e.length*40+e.reduce((o,r)=>o+=r+44,0)+256)*1.5},isCategoryIndex(e){return this.sections&&e>0&&e{let t=de[e-1];return t?n("h2",{className:ee(_T.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`},onClick:async()=>{await PT(t.id,!t.collapsed),zt()},onContextMenu:o=>{Kt.openContextMenu(o,()=>n(B.Menu,{navId:"vc-pindms-header-menu",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),color:"danger","aria-label":"Pin DMs Category Menu"},n(B.MenuItem,{id:"vc-pindms-edit-category",label:"Edit Category",action:()=>yc(t.id,null)}),kT(t.id)&&n(f,null,da(t.id,-1)&&n(B.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>Vf(t.id,-1).then(()=>zt())}),da(t.id,1)&&n(B.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>Vf(t.id,1).then(()=>zt())})),n(B.MenuSeparator,null),n(B.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>AT(t.id).then(()=>zt())})))}},n("span",{className:_T.headerText},t?.name??"uh oh"),n("svg",{className:"vc-pindms-collapse-icon","aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"}))):null}),renderChannel(e,t,o){let{channel:r,category:i}=this.getChannel(e,t,this.instance.props.channels);return!r||!i||this.isChannelHidden(e,t)?null:n(o,{channel:r,selected:this.instance.props.selectedChannelId===r.id},r.id)},getChannel(e,t,o){let r=de[e-1];if(!r)return{channel:null,category:null};let i=this.getCategoryChannels(r)[t];return{channel:o[i],category:r}},getCategoryChannels(e){return e.channels.length===0?[]:ko.store.pinOrder===0?tg.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}})});var ig,FT=y(()=>{"use strict";a();l();N();P();ig=S({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[d.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var lg={};Ve(lg,{__getDecorators:()=>k3,addDecorator:()=>sg,decorators:()=>vc,removeDecorator:()=>ag});function sg(e,t,o){vc.set(e,{decorator:t,onlyIn:o})}function ag(e){vc.delete(e)}function k3(e){let t=!!e.guildId;return Array.from(vc.values(),o=>{let{decorator:r,onlyIn:i}=o;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var vc,cg=y(()=>{"use strict";a();l();vc=new Map});var dg={};Ve(dg,{__addDecorationsToMessage:()=>L3,addDecoration:()=>ug,decorations:()=>Sc,removeDecoration:()=>pg});function ug(e,t){Sc.set(e,t)}function pg(e){Sc.delete(e)}function L3(e){return[...Sc.values()].map(t=>t(e))}var Sc,mg=y(()=>{"use strict";a();l();Sc=new Map});function bc(e,t){return({color:o,tooltip:r,small:i})=>n(ne,{text:r},s=>n("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:o},n("path",{d:e})))}var E3,$T,O3,B3,_3,gg,GT,fg,hg,HT=y(()=>{"use strict";a();l();tl();cg();mg();G();ce();N();P();z();x();E3=Se("SessionsStore");$T={desktop:bc("M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"),web:bc("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"),mobile:bc("M 187 0 L 813 0 C 916.277 0 1000 83.723 1000 187 L 1000 1313 C 1000 1416.277 916.277 1500 813 1500 L 187 1500 C 83.723 1500 0 1416.277 0 1313 L 0 187 C 0 83.723 83.723 0 187 0 Z M 125 1000 L 875 1000 L 875 250 L 125 250 Z M 500 1125 C 430.964 1125 375 1180.964 375 1250 C 375 1319.036 430.964 1375 500 1375 C 569.036 1375 625 1319.036 625 1250 C 625 1180.964 569.036 1125 500 1125 Z",{viewBox:"0 0 1000 1500",height:17,width:17}),console:bc("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",{viewBox:"0 0 50 50"})},O3=w("useStatusFillColor","StatusTypes"),B3=({platform:e,status:t,small:o})=>{let r=e[0].toUpperCase()+e.slice(1),i=$T[e]??$T.desktop;return n(i,{color:O3.useStatusFillColor(t),tooltip:r,small:o})},_3=e=>an.getState()?.clientStatuses?.[e],gg=({user:e,wantMargin:t=!0,wantTopMargin:o=!1,small:r=!1})=>{if(!e||e.bot)return null;if(e.id===O.getCurrentUser().id){let c=E3.getSessions();if(typeof c!="object")return null;let u=Object.values(c).sort(({status:g},{status:v})=>g===v?0:g==="online"?1:v==="online"?-1:g==="idle"?1:v==="idle"?-1:0),p=Object.values(u).reduce((g,v)=>(v.clientInfo.client!=="unknown"&&(g[v.clientInfo.client]=v.status),g),{}),{clientStatuses:m}=an.getState();m[O.getCurrentUser().id]=p}let i=an.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([c,u])=>n(B3,{key:c,platform:c,status:u,small:r}));return s.length?n("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:o?2:0,padding:t?0:1,gap:2}},s):null},GT={component:e=>n(gg,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(_3(e.user.id)??{}).length,key:"indicator"},fg={list:{description:"In the member list",onEnable:()=>sg("platform-indicator",e=>n(U,{noop:!0},n(gg,{user:e.user,small:!0}))),onDisable:()=>ag("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>yg(GT),onDisable:()=>vg(GT)},messages:{description:"Inside messages",onEnable:()=>ug("platform-indicator",e=>n(U,{noop:!0},n(gg,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>pg("platform-indicator")}},hg=S({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[d.kemo,d.TheSun,d.Nuckyz,d.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=H.plugins.PlatformIndicators,{displayMode:t}=e;t&&(t!=="both"?e[t]=!0:(e.list=!0,e.badges=!0),e.messages=!0,delete e.displayMode),Object.entries(fg).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(fg).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>H.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,replace:".STATUS_TYPING;$1;switch"},{match:/switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/,replace:"$1;$&"}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>H.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,o)=>`${o}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>H.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(fg).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});var zT=y(()=>{});var Tg={};Ve(Tg,{ChatBarButton:()=>tn,_injectButtons:()=>F3,addChatBarButton:()=>Vo,removeChatBarButton:()=>en});function F3(e,t){if(!t.disabled)for(let[o,r]of bg)e.push(n(U,{noop:!0,key:o,onError:i=>U3.error(`Failed to render ${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var Sg,bg,U3,Vo,en,tn,hr=y(()=>{"use strict";a();l();zT();ce();Xe();z();x();yt(["buttonContainer","channelTextArea"],e=>Sg=e);bg=new Map,U3=new ie("ChatButtons");Vo=(e,t)=>bg.set(e,t),en=e=>bg.delete(e),tn=U.wrap(e=>n(ne,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("div",{className:`expression-picker-chat-input-button ${Sg?.buttonContainer??""} vc-chatbar-button`},n(k,{"aria-label":e.tooltip,size:"",look:ja.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${$a.button} ${Sg?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,...e.buttonProps},n("div",{className:$a.buttonWrapper},e.children)))),{noop:!0})});var WT,jT,$3,G3,H3,wg,qT=y(()=>{"use strict";a();l();hr();so();N();P();z();x();WT=w("getUploads"),jT=e=>gs.getDraft(e,0),$3=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),G3=async e=>await Promise.all(WT.getUploads(e,0).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,c=URL.createObjectURL(s),u={id:Es(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:c+"#",proxy_url:c+"#"};if(o){let p=await $3(c);if(!p)return u;u.width=p.width,u.height=p.height}return u})),H3=({isMainChat:e,isEmpty:t,type:{attachments:o}})=>{let r=Ae.getChannelId(),i=_e([gs],()=>jT(r));if(!e)return null;let s=o&&WT.getUploads(r,0).length>0;return!(!t&&i?.length>0)&&!s?null:n(tn,{tooltip:"Preview Message",onClick:async()=>ye(r,{content:jT(r),author:O.getCurrentUser(),attachments:s?await G3(r):void 0}),buttonProps:{style:{translate:"0 2px"}}},n("svg",{fill:"currentColor",fillRule:"evenodd",width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.096",translate:"0 -1px"}},n("path",{d:"M22.89 11.7c.07.2.07.4 0 .6C22.27 13.9 19.1 21 12 21c-7.11 0-10.27-7.11-10.89-8.7a.83.83 0 0 1 0-.6C1.73 10.1 4.9 3 12 3c7.11 0 10.27 7.11 10.89 8.7Zm-4.5-3.62A15.11 15.11 0 0 1 20.85 12c-.38.88-1.18 2.47-2.46 3.92C16.87 17.62 14.8 19 12 19c-2.8 0-4.87-1.38-6.39-3.08A15.11 15.11 0 0 1 3.15 12c.38-.88 1.18-2.47 2.46-3.92C7.13 6.38 9.2 5 12 5c2.8 0 4.87 1.38 6.39 3.08ZM15.56 11.77c.2-.1.44.02.44.23a4 4 0 1 1-4-4c.21 0 .33.25.23.44a2.5 2.5 0 0 0 3.32 3.32Z"})))},wg=S({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[d.Aria],dependencies:["ChatInputButtonAPI"],startAt:"Init",start:()=>Vo("previewMessage",H3),stop:()=>en("previewMessage")})});var KT=y(()=>{});function xg(){return n(q.Fragment,null,n(T.FormTitle,{tag:"h3"},"More Information"),n(T.FormText,null,"To add your own pronouns, visit"," ",n(Qe,{href:"https://pronoundb.org"},"pronoundb.org")),n(T.FormDivider,null),n(T.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",n("ul",null,n("li",null,"Lowercase: they/them"),n("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',n("br",null),n("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var YT=y(()=>{"use strict";a();l();bo();x()});var Mg,ZT=y(()=>{a();l();Mg="Vendicated/Vencord"});var XT,QT=y(()=>{"use strict";a();l();bi();ZT();XT=`Vencord/${Xo}${Mg?` (https://github.com/${Mg})`:""}`});var Ln,Tc=y(()=>{"use strict";a();l();G();P();wc();Ln=L({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},pronounSource:{type:4,description:"Where to source pronouns from",options:[{label:"Prefer PronounDB, fall back to Discord",value:0,default:!0},{label:"Prefer Discord, fall back to PronounDB (might lead to inconsistency between pronouns in chat and profile)",value:1}]},showSelf:{type:3,description:"Enable or disable showing pronouns for the current user",default:!0},showInMessages:{type:3,description:"Show in messages",default:!0},showInProfile:{type:3,description:"Show in profile",default:!0}})});var xc,JT=y(()=>{"use strict";a();l();xc={hh:"He/Him",hi:"He/It",hs:"He/She",ht:"He/They",ih:"It/Him",ii:"It/Its",is:"It/She",it:"It/They",shh:"She/He",sh:"She/Her",si:"She/It",st:"She/They",th:"They/He",ti:"They/It",ts:"They/She",tt:"They/Them",any:"Any pronouns",other:"Other pronouns",ask:"Ask me my pronouns",avoid:"Avoid pronouns, use my name",unspecified:"Unspecified"}});function j3(e,t=!1){let o=go.getUserProfile(e)?.pronouns;return t?o:go.getGuildMemberProfile(e,jn()?.guild_id)?.pronouns||o}function Mc(e,t=!1){let o=j3(e,t)?.trim().replace(W3," "),[r]=dt(()=>q3(e),{fallbackValue:tw(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return Ln.store.pronounSource===1&&o?[o,"Discord"]:r&&r!=="unspecified"?[Y3(r),"PronounDB"]:[o,"Discord"]}function ew(e,t=!1){let o=Mc(e,t);return!Ln.store.showInProfile||!Ln.store.showSelf&&e===O.getCurrentUser().id?VT:o}function tw(e){let t=Ig[e];return t&&t!=="unspecified"?t:t||null}function q3(e){return new Promise(t=>{let o=tw(e);if(o)return t(o);if(e in $i)return $i[e].push(t);$i[e]=[t],z3()})}async function K3(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await h("https://pronoundb.org/api/v1/lookup-bulk?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":XT}})).json().then(r=>(Object.assign(Ig,r),r))}catch(o){console.error("PronounDB fetching failed: ",o);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(Ig,r),r}}function Y3(e){let{pronounsFormat:t}=H.plugins.PronounDB;return t==="CAPITALIZED"?xc[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?xc[e]:xc[e].toLowerCase()}var VT,Ig,$i,z3,W3,wc=y(()=>{"use strict";a();l();G();Ir();QT();ut();lt();x();Tc();JT();VT=[null,""],Ig={},$i={},z3=Gt(async()=>{let e=Object.keys($i),t=await K3(e);for(let o of e)$i[o]?.forEach(r=>r(t[o])),delete $i[o]});W3=/\n+/g});function ow(e){return!(!Ln.store.showInMessages||e.author.bot||e.author.system||e.type===Z3||!Ln.store.showSelf&&e.author.id===O.getCurrentUser().id)}function X3({message:e}){let[t]=Mc(e.author.id);return t?n("span",{className:ee(Ic.timestampInline,Ic.timestamp)},"\u2022 ",t):null}var Ic,Z3,nw,rw,Q3,iw=y(()=>{"use strict";a();l();ce();Ie();z();x();wc();Tc();Ic=w("timestampInline"),Z3=24;nw=U.wrap(({message:e})=>ow(e)?n(X3,{message:e}):null,{noop:!0}),rw=U.wrap(({message:e})=>ow(e)?n(Q3,{message:e}):null,{noop:!0});Q3=U.wrap(({message:e})=>{let[t]=Mc(e.author.id);return t?n("span",{className:ee(Ic.timestampInline,Ic.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var sw,Ag,aw=y(()=>{"use strict";a();l();KT();N();P();YT();iw();wc();Tc();sw={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Ag=S({name:"PronounDB",authors:[d.Tyman,d.TheKodeToad,d.Ven],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:[{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(arguments[0])"},{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}]},{find:".pronouns,children",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i;/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},sw]},{find:".nameTagSmall)",replacement:[{match:/\.getName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},sw]}],settings:Ln,settingsAboutComponent:xg,PronounsChatComponentWrapper:nw,CompactPronounsChatComponentWrapper:rw,useProfilePronouns:ew})});var Pg,lw=y(()=>{"use strict";a();l();Ei();N();ut();P();x();Pg=S({name:"QuickMention",authors:[d.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){Cn("QuickMention",e=>{let t=re.getChannel(e.channel_id);return t.guild_id&&!Be.can(fe.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>_r(`<@${e.author.id}> `)}})},stop(){Nn("QuickMention")},Icon:()=>n("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function hw(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function pw({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=O.getCurrentUser().id,i=Go.getMessages(e)._array.filter(s=>s.author.id===r);Pc=hw(i,t)}function dw({message:e,_isQuickReply:t}){t||(Ac=hw(Go.getMessages(e.channel_id)._array,e.id))}function mw(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!V3(e)||eN(e)||(e.shiftKey?nN(t):oN(t))}function yw(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let r=Math.max(document.documentElement.clientHeight,unsafeWindow.innerHeight),i=o.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&J3.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function vw(e,t){let o=Go.getMessages(Ae.getChannelId())._array;if(!t){let c=O.getCurrentUser().id;o=o.filter(u=>u.author.id===c)}let r=c=>e?Math.min(o.length-1,c+1):Math.max(-1,c-1),i=c=>{do c=r(c);while(c!==-1&&o[o.length-c-1]?.deleted===!0);return c},s;return t?Ac=s=i(Ac):Pc=s=i(Pc),s===-1?void 0:o[o.length-s-1]}function tN(e){let{enabled:t,userList:o,shouldPingListed:r}=H.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(gw.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function oN(e){let t=re.getChannel(Ae.getChannelId());if(t.guild_id&&!Be.can(fe.SEND_MESSAGES,t))return;let o=vw(e,!0);if(!o)return void F.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ae.getChannelId()});let r=re.getChannel(o.channel_id),i=O.getCurrentUser().id;F.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:tN(o),showMentionToggle:r.guild_id!==null&&o.author.id!==i,_isQuickReply:!0}),yw(r.id,o.id)}function nN(e){let t=re.getChannel(Ae.getChannelId());if(t.guild_id&&!Be.can(fe.SEND_MESSAGES,t))return;let o=vw(e,!1);if(!o)return F.dispatch({type:"MESSAGE_END_EDIT",channelId:Ae.getChannelId()});F.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),yw(o.channel_id,o.id)}var J3,fw,Ac,Pc,gw,Cg,cw,uw,V3,eN,Sw=y(()=>{"use strict";a();l();G();N();P();z();x();J3=w("jumpToMessage"),fw=navigator.platform.includes("Mac"),Ac=-1,Pc=-1,gw=L({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Cg=S({name:"QuickReply",authors:[d.fawn,d.Ven,d.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:gw,start(){F.subscribe("DELETE_PENDING_REPLY",cw),F.subscribe("MESSAGE_END_EDIT",uw),F.subscribe("MESSAGE_START_EDIT",pw),F.subscribe("CREATE_PENDING_REPLY",dw),document.addEventListener("keydown",mw)},stop(){F.unsubscribe("DELETE_PENDING_REPLY",cw),F.unsubscribe("MESSAGE_END_EDIT",uw),F.unsubscribe("MESSAGE_START_EDIT",pw),F.unsubscribe("CREATE_PENDING_REPLY",dw),document.removeEventListener("keydown",mw)}}),cw=()=>Ac=-1,uw=()=>Pc=-1;V3=e=>fw?e.metaKey:e.ctrlKey,eN=e=>e.altKey||!fw&&e.metaKey});var Ng,Rg,bw=y(()=>{"use strict";a();l();N();P();x();Rg=S({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[d.Cyn,d.maisymoe],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.`${t}{var decoded=$self.decodeError.apply(null, arguments);if(decoded)return decoded;${o}}`}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${q.version}/scripts/error-codes/codes.json`;Ng=await h(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes `,t))},stop(){Ng=void 0},decodeError(e,...t){let o=0;return Ng?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var Tw=y(()=>{});var kg={};Ve(kg,{ServerListRenderPosition:()=>Cc,addServerListElement:()=>ga,removeServerListElement:()=>ha,renderAll:()=>aN});function Dg(e){return e===0?iN:sN}function ga(e,t){Dg(e).add(t)}function ha(e,t){Dg(e).delete(t)}var rN,Cc,iN,sN,aN,Nc=y(()=>{"use strict";a();l();Xe();rN=new ie("ServerListAPI"),Cc=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(Cc||{}),iN=new Set,sN=new Set;aN=e=>{let t=[];for(let o of Dg(e))try{t.unshift(o())}catch(r){rN.error("Failed to render server list element:",r)}return t}});function lN(){let e=[];Object.values(pe.getGuilds()).forEach(t=>{vn.getChannels(t.id).SELECTABLE.concat(vn.getChannels(t.id).VOCAL).forEach(o=>{!Dr.hasUnread(o.channel.id)||e.push({channelId:o.channel.id,messageId:Dr.lastMessageId(o.channel.id),readStateType:0})})}),F.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var cN,Lg,ww=y(()=>{"use strict";a();l();Tw();Nc();N();P();x();cN=()=>n(k,{onClick:lN,size:k.Sizes.MIN,color:k.Colors.CUSTOM,className:"vc-ranb-button"},"Read All"),Lg=S({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[d.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>n(cN,null),start(){ga(0,this.renderReadAllButton)},stop(){ha(0,this.renderReadAllButton)}})});var co,Rc=y(()=>{"use strict";a();l();G();P();co=L({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Eg=y(()=>{"use strict";a();l()});async function dN(){at.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function Og(){await dN();let[e,t,o]=await at.getMany([xw(),Mw(),Iw()]);if(await Promise.all([kc(),Lc(),ya()]),co.store.offlineRemovals){if(co.store.groups&&t?.size)for(let[r,i]of t)Hi.has(r)||En(`You are no longer in the group ${i.name}.`,i.iconURL);if(co.store.servers&&e?.size)for(let[r,i]of e)Gi.has(r)||En(`You are no longer in the server ${i.name}.`,i.iconURL);if(co.store.friends&&o?.friends.length)for(let r of o.friends){if(ti.friends.includes(r))continue;let i=await Ot.getUser(r).catch(()=>{});i&&En(`You are no longer friends with ${bn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>yo(i.id))}if(co.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(ti.requests.includes(r)||[1,2,4].includes(Ke.getRelationshipType(r)))continue;let i=await Ot.getUser(r).catch(()=>{});i&&En(`Friend request from ${bn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>yo(i.id))}}}function En(e,t,o){co.store.notices&&Dc.showNotice(e,"OK",()=>Dc.popNotice()),Ue({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function Aw(e){return Gi.get(e)}function Bg(e){Gi.delete(e),kc()}async function kc(){Gi.clear();let e=O.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(pe.getGuilds()))Ge.isMember(t,e)&&Gi.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await at.set(xw(),Gi)}function Pw(e){return Hi.get(e)}function _g(e){Hi.delete(e),Lc()}async function Lc(){Hi.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of re.getSortedPrivateChannels())e===3&&Hi.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await at.set(Mw(),Hi)}async function ya(){ti.friends=[],ti.requests=[];let e=Ke.getRelationships();for(let t in e)switch(e[t]){case 1:ti.friends.push(t);break;case 3:ti.requests.push(t);break}await at.set(Iw(),ti)}var Gi,Hi,ti,xw,Mw,Iw,Ug=y(()=>{"use strict";a();l();nr();Tn();ut();x();Rc();Eg();Gi=new Map,Hi=new Map,ti={friends:[],requests:[]},xw=()=>`relationship-notifier-guilds-${O.getCurrentUser().id}`,Mw=()=>`relationship-notifier-groups-${O.getCurrentUser().id}`,Iw=()=>`relationship-notifier-friends-${O.getCurrentUser().id}`});async function Dw({relationship:{type:e,id:t}}){if(Fg===t){Fg=void 0;return}let o=await Ot.getUser(t).catch(()=>null);if(!!o)switch(e){case 1:co.store.friends&&En(`${bn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>yo(o.id));break;case 3:co.store.friendRequestCancels&&En(`A friend request from ${bn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>yo(o.id));break}}function kw({guild:{id:e,unavailable:t}}){if(!co.store.servers||t)return;if($g===e){Bg(e),$g=void 0;return}let o=Aw(e);o&&(Bg(e),En(`You were removed from the server ${o.name}.`,o.iconURL))}function Lw({channel:{id:e,type:t}}){if(!co.store.groups||t!==3)return;if(Gg===e){_g(e),Gg=void 0;return}let o=Pw(e);o&&(_g(e),En(`You were removed from the group ${o.name}.`,o.iconURL))}var Fg,$g,Gg,Cw,Nw,Rw,Ew=y(()=>{"use strict";a();l();ut();x();Rc();Eg();Ug();Cw=e=>Fg=e,Nw=e=>$g=e,Rw=e=>Gg=e});var Hg,Ow=y(()=>{"use strict";a();l();N();P();Ew();Rc();Ug();Hg=S({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[d.nick],settings:co,patches:[{find:"removeRelationship:(",replacement:{match:/(removeRelationship:\((\i),\i,\i\)=>)/,replace:"$1($self.removeFriend($2),0)||"}},{find:"async leaveGuild(",replacement:{match:/(leaveGuild\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"},closePrivateChannel(",replacement:{match:/(closePrivateChannel\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:kc,GUILD_DELETE:kw,CHANNEL_CREATE:Lc,CHANNEL_DELETE:Lw,RELATIONSHIP_ADD:ya,RELATIONSHIP_UPDATE:ya,RELATIONSHIP_REMOVE(e){Dw(e),ya()},CONNECTION_OPEN:Og},async start(){setTimeout(()=>{Og()},5e3)},removeFriend:Cw,removeGroup:Rw,removeGuild:Nw})});function fN(){return n(ne,{text:"View Server Home"},e=>n(k,{...e,look:k.Looks.BLANK,size:k.Sizes.NONE,innerClassName:mN.icon,onClick:t=>{t.preventDefault(),zg=!0;for(let o of Oc)o(!0)}},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m2.4 8.4 8.38-6.46a2 2 0 0 1 2.44 0l8.39 6.45a2 2 0 0 1-.79 3.54l-.32.07-.82 8.2a2 2 0 0 1-1.99 1.8H16a1 1 0 0 1-1-1v-5a3 3 0 0 0-6 0v5a1 1 0 0 1-1 1H6.31a2 2 0 0 1-1.99-1.8L3.5 12l-.32-.07a2 2 0 0 1-.79-3.54Z"}))))}function gN(){let{forceServerHome:e}=Ec.use(["forceServerHome"]),[t,o]=W(zg);return ae(()=>(Oc.add(o),()=>{Oc.delete(o)}),[]),t||e}function hN(){ae(()=>()=>{zg=!1;for(let e of Oc)e(!1)},[])}var mN,zg,Oc,Ec,jg,Bw=y(()=>{"use strict";a();l();Ro();G();ce();N();P();z();x();mN=w("modeConnected","modeLocked","icon"),zg=!1,Oc=new Set;Ec=L({forceServerHome:{type:3,description:"Force the Server Guide to be the Server Home tab when it is enabled.",default:!1}}),jg=S({name:"ResurrectHome",description:"Re-enables the Server Home tab when there isn't a Server Guide. Also has an option to force the Server Home over the Server Guide, which is accessible through right-clicking the Server Guide.",authors:[d.Dolfies,d.Nuckyz],settings:Ec,patches:[{find:"GuildFeatures.GUILD_HOME_DEPRECATION_OVERRIDE",all:!0,replacement:[{match:/\i\.hasFeature\(\i\.GuildFeatures\.GUILD_HOME_DEPRECATION_OVERRIDE\)/g,replace:"true"}]},{find:"GuildHomeFeedbackExperiment.definition.id",replacement:[{match:/return{showFeedback:.+?,setOnDismissedFeedback:(\i)}/,replace:"return{showFeedback:false,setOnDismissedFeedback:$1}"}]},{find:'"MessageActionCreators"',replacement:{match:/(?<=focusMessage\(\i\){.+?)(?=focus:{messageId:(\i)})/,replace:"before:$1,"}},{find:"61eef9_2",replacement:{match:/getMutableGuildChannelsForGuild\(\i\);return\(0,\i\.useStateFromStores\).+?\]\)(?=}function)/,replace:e=>`${e}&&!$self.useForceServerHome()`}},{find:"487e85_1",replacement:{match:/(?<=text:(\i)\?\i\.\i\.Messages\.SERVER_GUIDE:\i\.\i\.Messages\.GUILD_HOME,)/,replace:"badge:$self.ViewServerHomeButton({serverGuide:$1}),"}},{find:"69386d_5",replacement:{match:/location:"69386d_5".+?;/,replace:"$&$self.useDisableViewServerHome();"}}],ViewServerHomeButton:U.wrap(({serverGuide:e})=>e!==!0?null:n(fN,null)),useForceServerHome:gN,useDisableViewServerHome:hN,contextMenus:{"guild-context"(e,t){let{forceServerHome:o}=Ec.use(["forceServerHome"]);if(!t?.guild)return;pt("hide-muted-channels",e)?.unshift(n(B.MenuCheckboxItem,{key:"force-server-home",id:"force-server-home",label:"Force Server Home",checked:o,action:()=>Ec.store.forceServerHome=!o}))}}})});var yN,vN,Wg,_w=y(()=>{"use strict";a();l();N();P();z();yN=w("spoilerContent"),vN=w("messagesWrapper","messages"),Wg=S({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[d.whqwert],patches:[{find:".removeObscurity,",replacement:{match:/(?<="removeObscurity",(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:o,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=yN,{messagesWrapper:c}=vN,u=o?document.querySelector(`div.${c}`):r.parentElement;for(let p of u.querySelectorAll(`span.${i}.${s}`))p.click()}})});function Uw(e,t){open(t+encodeURIComponent(e),"_blank")}function Fw(e){return n(B.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Bc).map((t,o)=>{let r="search-image-"+t;return n(B.MenuItem,{key:r,id:r,label:n(he,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:o>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Bc[t]).toString().replace("lens.","")}),t),action:()=>Uw(e,Bc[t])})}),n(B.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(he,{style:{alignItems:"center",gap:"0.5em"}},n(jr,{height:16,width:16}),"All"),action:()=>Object.values(Bc).forEach(t=>Uw(e,t))}))}var Bc,SN,bN,qg,$w=y(()=>{"use strict";a();l();Ro();Bt();Mt();N();P();x();Bc={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};SN=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;pt("copy-link",e)?.push(Fw(o))},bN=(e,t)=>{if(!t?.src)return;(pt("copy-native-link",e)??e).push(Fw(t.src))},qg=S({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[d.Ven,d.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],contextMenus:{message:SN,"image-context":bN}})});var Gw=y(()=>{});async function Kg(){gt=await zw()??{}}async function zw(){return(await at.get(Hw))?.[O.getCurrentUser()?.id]}async function On(){return(await zw())?.token}async function zi(e){return at.update(Hw,t=>(t??={},gt=t[O.getCurrentUser().id]??={},e.token&&(gt.token=e.token),e.user&&(gt.user=e.user),t))}function ji(e){ge(t=>n(TN,{...t,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async o=>{try{let r=new URL(o.location);r.searchParams.append("clientMod","vencord");let i=await h(r,{headers:{Accept:"application/json"}});if(!i.ok){let{message:c}=await i.json();wt(c||"An error occured while authorizing",V.Type.FAILURE);return}let{token:s}=await i.json();zi({token:s}),wt("Successfully logged in!",V.Type.SUCCESS),e?.()}catch(r){new ie("ReviewDB").error("Failed to authorize",r)}}}))}var Hw,TN,gt,Bn=y(()=>{"use strict";a();l();nr();Xe();ze();z();x();Hw="rdb-auth",{OAuth2AuthorizeModal:TN}=w("OAuth2AuthorizeModal"),gt={}});var va=y(()=>{"use strict";a();l()});function jw(e,t){let o=O.getCurrentUser().id;return o===e||t.sender.discordID===o||gt.user?.type===1}function Ww(e,t){let o=O.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function qw(e){return e.sender.discordID!==O.getCurrentUser().id}function jt(e,t=V.Type.MESSAGE){V.show({id:V.genId(),message:e,type:t,options:{position:V.Position.BOTTOM}})}var St,_n=y(()=>{"use strict";a();l();st();x();Bn();va();St=Ce("vc-rdb-")});function wN(e){return n(ne,{text:"Unblock user"},t=>n("div",{...t,role:"button",onClick:e.onClick,className:St("block-modal-unblock")},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"var(--status-danger)"},n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}function xN({user:e,isBusy:t,setIsBusy:o}){let[r,i]=W(!1);return r?null:n("div",{className:St("block-modal-row")},n("img",{src:e.profilePhoto,alt:""}),n(T.FormText,{className:St("block-modal-username")},e.username),n(wN,{onClick:t?void 0:async()=>{o(!0);try{await Uc(e.discordID),i(!0)}finally{o(!1)}}}))}function MN(){let[e,t]=W(!1),[o,r,i]=dt(Kw,{onError:s=>new ie("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:r?n(T.FormText,null,"Failed to fetch blocks: $",String(r)):o.length?n(f,null,o.map(s=>n(xN,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):n(T.FormText,null,"No blocked users.")}function _c(){ge(e=>n(Pe,{...e},n(He,{className:St("block-modal-header")},n(T.FormTitle,{style:{margin:0}},"Blocked Users"),n(ft,{onClick:e.onClose})),n(Le,{className:St("block-modal")},gt.token?n(MN,null):n(T.FormText,null,"You are not logged into ReviewDB!"))))}var Yg=y(()=>{"use strict";a();l();Xe();ze();lt();x();Bn();Wi();_n()});var on,Sa=y(()=>{"use strict";a();l();G();P();x();Bn();Yg();_n();on=L({authorize:{type:6,description:"Authorize with ReviewDB",component:()=>n(k,{onClick:()=>ji()},"Authorize with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0},showWarning:{type:3,description:"Display warning to be respectful at the top of the reviews list",default:!0},hideTimestamps:{type:3,description:"Hide timestamps on reviews",default:!1},hideBlockedUsers:{type:3,description:"Hide reviews from blocked users",default:!0},buttons:{type:6,description:"ReviewDB buttons",component:()=>n("div",{className:St("button-grid")},n(k,{onClick:_c},"Manage Blocked Users"),n(k,{color:k.Colors.GREEN,onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),n(k,{onClick:async()=>{let e="https://reviewdb.mantikafasi.dev",t=await On();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),n(k,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server"))}}).withPrivateSettings()});async function oi(e,t={}){return h(Yw+e,{...t,headers:{...t.headers,Authorization:await On()||""}})}async function Zw(e,t=0){let o=0;on.store.showWarning||(o|=AN);let r=new URLSearchParams({flags:String(o),offset:String(t)}),i=await h(`${Yw}/users/${e}/reviews?${r}`),s=i.ok?await i.json():{message:i.status===429?"You are sending requests too fast. Wait a few seconds and try again.":"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return i.ok?s:(jt(s.message,V.Type.FAILURE),{...s,reviews:[{id:0,comment:s.message,star:0,timestamp:0,type:3,sender:{id:0,username:"ReviewDB",profilePhoto:"https://cdn.discordapp.com/avatars/1134864775000629298/3f87ad315b32ee464d84f1270c8d1b37.png?size=256&format=webp&quality=lossless",discordID:"1134864775000629298",badges:[]}}]})}async function Xw(e){return await On()?await oi(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let r=await o.json();return jt(r.message),o.ok?r:null}):(jt("Please authorize to add a review."),ji(),null)}async function Qw(e){return await oi(`/users/${e}/reviews`,{method:"DELETE",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(async t=>{let o=await t.json();return jt(o.message),t.ok?o:null})}async function Jw(e){let t=await oi("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());jt(t.message)}async function Vw(e,t){if(!(await oi("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)jt(`Failed to ${e} user`,V.Type.FAILURE);else if(jt(`Successfully ${e}ed user`,V.Type.SUCCESS),gt?.user?.blockedUsers){let r=e==="block"?[...gt.user.blockedUsers,t]:gt.user.blockedUsers.filter(i=>i!==t);zi({user:{...gt.user,blockedUsers:r}})}}async function Kw(){let e=await oi("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function tx(e){return oi("/users",{method:"POST"}).then(t=>t.json())}async function ox(e){return oi(`/notifications?id=${e}`,{method:"PATCH"})}var Yw,Fc,AN,ex,Uc,Wi=y(()=>{"use strict";a();l();x();Bn();va();Sa();_n();Yw="https://manti.vendicated.dev/api/reviewdb",Fc=50,AN=2;ex=e=>Vw("block",e),Uc=e=>Vw("unblock",e)});function nx({onClick:e}){return n(ne,{text:"Delete Review"},t=>n("div",{...t,className:ee($c.button,$c.dangerous),onClick:e,role:"button"},n(Vn,{width:"20",height:"20"})))}function rx({onClick:e}){return n(ne,{text:"Report Review"},t=>n("div",{...t,className:$c.button,onClick:e,role:"button"},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"}))))}function ix({onClick:e,isBlocked:t}){return n(ne,{text:`${t?"Unblock":"Block"} user`},o=>n("div",{...o,className:$c.button,onClick:e,role:"button"},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"currentColor"},t?n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"}):n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}var $c,sx=y(()=>{"use strict";a();l();Mt();Ie();z();x();$c=w("button","wrapper","disabled","separator")});function Gc(e){let t=e.redirectURL?zn:o=>n("span",{...o,role:"button"},o.children);return n(ne,{text:e.name},({onMouseEnter:o,onMouseLeave:r})=>n(t,{className:St("blocked-badge"),href:e.redirectURL,onClick:e.onClick},n("img",{className:St("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:r,src:e.icon,alt:e.description})))}var ax=y(()=>{"use strict";a();l();x();_n()});var Hc,Zg=y(()=>{"use strict";a();l();ut();Ie();lt();z();x();Bn();va();Wi();Sa();_n();Yg();sx();ax();Hc=bt(()=>{let e=xe.byProps,[{cozyMessage:t,buttons:o,message:r,buttonsInner:i,groupStart:s},{container:c,isHeader:u},{avatar:p,clickable:m,username:g,wrapper:v,cozy:b},I,A]=Cr(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTag","botTagRegular")),M=new Intl.DateTimeFormat;return function({review:D,refetch:C,profileId:$}){let[j,X]=W(!1);function J(){yo(D.sender.discordID)}function Q(){rt.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await On())Qw(D.id).then(be=>{be&&C()});else return jt("You must be logged in to delete reviews.")}})}function _(){rt.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await On())Jw(D.id);else return jt("You must be logged in to report reviews.")}})}let oe=gt?.user?.blockedUsers?.includes(D.sender.discordID)??!1;function se(){if(oe)return Uc(D.sender.discordID);rt.show({title:"Are you sure?",body:"Do you really you want to block this user? They will be unable to leave further reviews on your profile. You can unblock users in the plugin settings.",confirmText:"Block",cancelText:"Nevermind",onConfirm:async()=>{if(await On())ex(D.sender.discordID);else return jt("You must be logged in to block users.")}})}return n("div",{className:ee(St("review"),t,v,r,s,b),style:{marginLeft:"0px",paddingLeft:"52px"}},n("img",{className:ee(p,m),onClick:J,src:D.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px",zIndex:0}}),n("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},n("span",{className:ee(m,g),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>J()},D.sender.username),D.type===3&&n("span",{className:ee(A.botTagVerified,A.botTagRegular,A.botTag,A.px,A.rem),style:{marginLeft:"4px"}},n("span",{className:A.botText},"System"))),oe&&n(Gc,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>_c()}),D.sender.badges.map(be=>n(Gc,{...be})),!on.store.hideTimestamps&&D.type!==3&&n(Po,{timestamp:new Date(D.timestamp*1e3)},M.format(D.timestamp*1e3)),n("div",{className:St("review-comment")},D.comment.length>200&&!j?[De.parseGuildEventDescription(D.comment.substring(0,200)),"...",n("br",null),n("a",{onClick:()=>X(!0)},"Read more")]:De.parseGuildEventDescription(D.comment)),D.id!==0&&n("div",{className:ee(c,u,o),style:{padding:"0px"}},n("div",{className:ee(I.wrapper,i)},qw(D)&&n(rx,{onClick:_}),Ww($,D)&&n(ix,{isBlocked:oe,onClick:se}),jw($,D)&&n(nx,{onClick:Q}))))}})});function ba({discordId:e,name:t,onFetchReviews:o,refetchSignal:r,scrollToTop:i,page:s=1,showInput:c=!1,hideOwnReview:u=!1}){let[p,m]=Io(!0),[g]=dt(()=>Zw(e,(s-1)*Fc),{fallbackValue:null,deps:[r,p,s],onSuccess:v=>{on.store.hideBlockedUsers&&(v.reviews=v.reviews?.filter(b=>!Ke.isBlocked(b.sender.discordID))),i?.(),o(v)}});return g?n(f,null,n(DN,{refetch:m,reviews:g.reviews,hideOwnReview:u,profileId:e}),c&&n(Xg,{name:t,discordId:e,refetch:m,isAuthor:g.reviews?.some(v=>v.sender.discordID===O.getCurrentUser().id)})):null}function DN({refetch:e,reviews:t,hideOwnReview:o,profileId:r}){let i=O.getCurrentUser().id;return n("div",{className:St("view")},t?.map(s=>(s.sender.discordID!==i||!o)&&n(Hc,{key:s.id,review:s,refetch:e,profileId:r})),t?.length===0&&n(T.FormText,{className:St("placeholder")},"Looks like nobody reviewed this user yet. You could be the first!"))}function Xg({discordId:e,isAuthor:t,refetch:o,name:r}){let{token:i}=gt,s=Tt(null),c=CN.FORM;c.disableAutoFocus=!0;let u=RN({id:"0",type:1});return n(f,null,n("div",{onClick:()=>{i||(jt("Opening authorization window..."),ji())}},n(NN,{className:St("input"),channel:u,placeholder:i?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",type:c,disableThemedBackground:!0,setEditorRef:p=>s.current=p,textValue:"",onSubmit:async p=>{if(await Xw({userid:e,comment:p.value})){o();let g=s.current.ref.current.getSlateEditor();PN.delete(g,{at:{anchor:lx.start(g,[]),focus:lx.end(g,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}var lx,PN,CN,NN,RN,Qg=y(()=>{"use strict";a();l();lt();z();x();Bn();Wi();Sa();_n();Zg();({Editor:lx,Transforms:PN}=w("Editor","Transforms")),{ChatInputTypes:CN}=w("ChatInputTypes"),NN=Re("default.CHANNEL_TEXT_AREA","input"),{createChannelRecordFromServer:RN}=w("createChannelRecordFromServer")});function kN({modalProps:e,discordId:t,name:o}){let[r,i]=W(),[s,c]=Io(!0),[u,p]=W(1),m=Tt(null),g=r?.reviewCount,v=r?.reviews.find(b=>b.sender.discordID===gt.user?.discordID);return n(U,null,n(Pe,{...e,size:"medium"},n(He,null,n(te,{variant:"heading-lg/semibold",className:St("modal-header")},o,"'s Reviews",!!g&&n("span",null," (",g," Reviews)")),n(ft,{onClick:e.onClose})),n(Le,{scrollerRef:m},n("div",{className:St("modal-reviews")},n(ba,{discordId:t,name:o,page:u,refetchSignal:s,onFetchReviews:i,scrollToTop:()=>m.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0}))),n(mt,{className:St("modal-footer")},n("div",null,v&&n(Hc,{refetch:c,review:v,profileId:t}),n(Xg,{isAuthor:v!=null,discordId:t,name:o,refetch:c}),!!g&&n(Wa,{currentPage:u,maxVisiblePages:5,pageSize:Fc,totalCount:g,onPageChange:p})))))}function Jg(e,t){ge(o=>n(kN,{modalProps:o,discordId:e,name:t}))}var cx=y(()=>{"use strict";a();l();ce();ze();lt();x();Bn();Wi();_n();Zg();Qg()});var LN,Vg,ux=y(()=>{"use strict";a();l();Gw();ce();Wf();Mt();N();Xe();P();x();Bn();cx();Qg();va();Wi();Sa();_n();LN=(e,t)=>{e.push(n(B.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:jr,action:()=>Jg(t.guild.id,t.guild.name)}))},Vg=S({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[d.mantikafasi,d.Ven],settings:on,contextMenus:{"guild-header-popout":LN},patches:[{find:"showBorder:null",replacement:{match:/user:(\i),setNote:\i,canDM.+?\}\)/,replace:"$&,$self.getReviewsComponent($1)"}}],flux:{CONNECTION_OPEN:Kg},async start(){let e=on.store,{lastReviewId:t,notifyReviews:o}=e,r=e;r.token&&(await zi({token:r.token}),r.token=void 0,new ie("ReviewDB").info("Migrated legacy settings")),await Kg(),setTimeout(async()=>{if(!gt.token)return;let i=await tx(gt.token);if(zi({user:i}),o&&t&&tVencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:gt.token,page:"dashboard/appeal"}))}:{};rt.show({title:i.notification.title,body:De.parse(i.notification.content,!1),...s}),ox(i.notification.id)}},4e3)},getReviewsComponent:U.wrap(e=>{let[t,o]=W();return n(pa,{headerText:"User Reviews",onMoreClick:()=>Jg(e.id,e.username),moreTooltipText:t&&t>50?`View all ${t} reviews`:"Open Review Modal",onDropDownClick:r=>on.store.reviewsDropdownState=!r,defaultState:on.store.reviewsDropdownState},n(ba,{discordId:e.id,name:e.username,onFetchReviews:r=>o(r.reviewCount),showInput:!0}))},{message:"Failed to render Reviews"})})});var qi,eh,px=y(()=>{"use strict";a();l();G();ce();N();P();x();qi=L({chatMentions:{type:3,default:!0,description:"Show role colors in chat mentions (including in the message box)",restartNeeded:!0},memberList:{type:3,default:!0,description:"Show role colors in member list role headers",restartNeeded:!0},voiceUsers:{type:3,default:!0,description:"Show role colors in the voice chat user list",restartNeeded:!0}}),eh=S({name:"RoleColorEverywhere",authors:[d.KingFish,d.lewisakura,d.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:'location:"UserMention',replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>qi.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.default,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>qi.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>qi.store.memberList},{find:".Messages.THREAD_BROWSER_PRIVATE",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.roleGroupColor(arguments[0])]"}],predicate:()=>qi.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\).{0,100}speaking:.{50,200}"div",{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>qi.store.voiceUsers}],settings:qi,getColor(e,{channelId:t,guildId:o}){return(o??=re.getChannel(t)?.guild_id)?Ge.getMember(o,e)?.colorString??null:null},getUserColor(e,t){let o=this.getColor(e,t);return o&&parseInt(o.slice(1),16)},roleGroupColor:U.wrap(({id:e,count:t,title:o,guildId:r,label:i})=>{let s=pe.getRole(r,e);return n("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},{noop:!0}),getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var dx,EN,th,mx=y(()=>{"use strict";a();l();Ro();Mt();N();P();z();x();dx=w("replyToMessage"),EN=(e,{message:t})=>{if(Ae.getChannelId()!==t.channel_id)return;let o=re.getChannel(t?.channel_id);if(!o||o.guild_id&&!Be.can(fe.SEND_MESSAGES,o))return;let r=pt("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(c=>c?.props.id==="pin");r.splice(s+1,0,n(B.MenuItem,{id:"reply",label:Ye.Messages.MESSAGE_ACTION_REPLY,icon:Rp,action:c=>dx.replyToMessage(o,t,c)}));return}let i=pt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply")){i.unshift(n(B.MenuItem,{id:"reply",label:Ye.Messages.MESSAGE_ACTION_REPLY,icon:Rp,action:s=>dx.replyToMessage(o,t,s)}));return}},th=S({name:"SearchReply",description:"Adds a reply button to search results",authors:[d.Aria],contextMenus:{message:EN}})});var oh,fx=y(()=>{"use strict";a();l();N();P();oh=S({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[d.AndrewDLO,d.FieryFlames],patches:[{find:'call_ringing_beat"',replacement:{match:/500===\i\(\)\.random\(1,1e3\)/,replace:"true"}}]})});var gx=y(()=>{});function yx(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),o=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(o)?e:(Date.now()/1e3>o&&(o+=86400),``)}function BN({rootProps:e,close:t}){let[o,r]=W(),[i,s]=W(""),c=Math.round((new Date(o).getTime()||Date.now())/1e3),u=(g,v)=>``,[p,m]=Ct(()=>{let g=u(c,i);return[g,De.parse(g)]},[c,i]);return n(Pe,{...e},n(He,{className:zc("modal-header")},n(T.FormTitle,{tag:"h2"},"Timestamp Picker"),n(ft,{onClick:t})),n(Le,{className:zc("modal-content")},n("input",{type:"datetime-local",value:o,onChange:g=>r(g.currentTarget.value),style:{colorScheme:Wn()===2?"light":"dark"}}),n(T.FormTitle,null,"Timestamp Format"),n(Ao,{options:ON.map(g=>({label:g,value:g})),isSelected:g=>g===i,select:g=>s(g),serialize:g=>g,renderOptionLabel:g=>n("div",{className:zc("format-label")},De.parse(u(c,g.value))),renderOptionValue:()=>m}),n(T.FormTitle,{className:K.bottom8},"Preview"),n(T.FormText,{className:zc("preview-text")},m," (",p,")")),n(mt,null,n(k,{onClick:()=>{_r(p+" "),t()}},"Insert")))}var hx,ON,zc,_N,nh,vx=y(()=>{"use strict";a();l();gx();hr();dn();G();st();N();ut();et();ze();P();x();hx=L({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});ON=["","t","T","d","D","f","F","R"],zc=Ce("vc-st-");_N=({isMainChat:e})=>e?n(tn,{tooltip:"Insert Timestamp",onClick:()=>{let t=ge(o=>n(BN,{rootProps:o,close:()=>Sn(t)}))},buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),n("rect",{width:"24",height:"24"})))):null,nh=S({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[d.Ven,d.Tyler,d.Grzesiek11],dependencies:["MessageEventsAPI","ChatInputButtonAPI"],settings:hx,start(){Vo("SendTimestamps",_N),this.listener=Xt((e,t)=>{hx.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,yx))})},stop(){en("SendTimestamps"),Qt(this.listener)},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(f,null,n(T.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(T.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(T.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",De.parse(yx(t)))))))}})});function UN(){return Tx=Io(),n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},ih," online")}function FN(){return wx=Io(),n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},bx," servers")}function Sx(){ih=0;let e=Ke.getRelationships();for(let t of Object.keys(e))e[t]===1&&an.getStatus(t)!=="offline"&&(ih+=1);Tx?.()}function rh(){bx=pe.getGuildCount(),wx?.()}var ih,bx,Tx,wx,sh,xx=y(()=>{"use strict";a();l();Nc();G();ce();N();lt();P();x();ih=0,bx=0;sh=S({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[d.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=H.plugins.ServerListIndicators;return n(U,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(UN,null),!!(e&1)&&n(FN,null)))},flux:{PRESENCE_UPDATES:Sx,GUILD_CREATE:rh,GUILD_DELETE:rh},start(){ga(0,this.renderIndicator),Sx(),rh()},stop(){ha(0,this.renderIndicator)}})});var Mx=y(()=>{});function Px(e){ge(t=>n(Pe,{...t,size:"medium"},n(GN,{guild:e})))}function Ax(e){return n(Po,{timestamp:new Date(e)})}function GN({guild:e}){let[t,o]=W(),[r,i]=W();ae(()=>{jc.friends=!1,jc.blocked=!1},[]);let[s,c]=W(0),u=e.banner&&Ut.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),p=e.icon&&Ut.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:uo("root")},u&&s===0&&n("img",{className:uo("banner"),src:u,alt:"",onClick:()=>qo(u)}),n("div",{className:uo("header")},p?n("img",{src:p,alt:"",onClick:()=>qo(p)}):n("div",{"aria-hidden":!0,className:ee(Ix.childWrapper,Ix.acronym)},e.acronym),n("div",{className:uo("name-and-description")},n(T.FormTitle,{tag:"h5",className:uo("name")},e.name),e.description&&n(T.FormText,null,e.description))),n($o,{type:"top",look:"brand",className:uo("tab-bar"),selectedItem:s,onItemSelect:c},n($o.Item,{className:uo("tab",{selected:s===0}),id:0},"Server Info"),n($o.Item,{className:uo("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n($o.Item,{className:uo("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),n("div",{className:uo("tab-content")},s===0&&n(zN,{guild:e}),s===1&&n(jN,{guild:e,setCount:o}),s===2&&n(WN,{guild:e,setCount:i})))}function HN(e,t){let o=Ge.getMember(e,t.id)?.avatar,r=o?Ut.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):Ut.getUserAvatarURL(t,!0);return n("div",{className:uo("owner")},n("img",{src:r,alt:"",onClick:()=>qo(r)}),De.parse(`<@${t.id}>`))}function zN({guild:e}){let[t]=dt(()=>Ot.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?HN(e.id,t):"Loading...","Created At":Ax(Co.extractTimestamp(e.id)),"Joined At":e.joinedAt?Ax(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?n("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:vn.getChannels(e.id)?.count-1||"?",Roles:Object.keys(pe.getRoles(e.id)).length-1};return n("div",{className:uo("info")},Object.entries(o).map(([r,i])=>n("div",{className:uo("server-info-pair"),key:r},n(T.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function jN({guild:e,setCount:t}){return Cx("friends",e,Ke.getFriendIDs(),t)}function WN({guild:e,setCount:t}){let o=Object.keys(Ke.getRelationships()).filter(r=>Ke.isBlocked(r));return Cx("blocked",e,o,t)}function Cx(e,t,o,r){let i=[],s=[];for(let c of o)Ge.isMember(t.id,c)?s.push(c):i.push(c);return _e([Ge],()=>Ge.getMemberIds(t.id),null,(c,u)=>c.length===u.length),ae(()=>{!jc[e]&&i.length&&(jc[e]=!0,F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),ae(()=>r(s.length),[s.length]),n(pi,{fade:!0,className:uo("scroller")},s.map(c=>n($N,{user:O.getUser(c),status:an.getStatus(c)||"offline",onSelect:()=>yo(c),onContextMenu:()=>{}})))}var Ix,$N,uo,jc,Nx=y(()=>{"use strict";a();l();Mx();st();ut();Ie();ze();lt();z();x();Ix=w("icon","acronym","childWrapper"),$N=Uo("FriendRow"),uo=Ce("vc-gp-");jc={friends:!1,blocked:!1}});var Rx,ah,Dx=y(()=>{"use strict";a();l();Ro();N();P();x();Nx();Rx=(e,{guild:t})=>{pt("privacy",e)?.push(n(B.MenuItem,{id:"vc-server-profile",label:"Server Info",action:()=>Px(t)}))},ah=S({name:"ServerProfile",description:"Allows you to view info about a server by right clicking it in the server list",authors:[d.Ven,d.Nuckyz],tags:["guild","info"],contextMenus:{"guild-context":Rx,"guild-header-popout":Rx}})});var lh,kx=y(()=>{"use strict";a();l();N();P();lh=S({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[d.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var Lx=y(()=>{});function Ox(){let e=ls(Ex.colors.INTERACTIVE_MUTED).hex(),t=ls(Ex.colors.INTERACTIVE_ACTIVE).hex();return n(qN,{color:e,forcedIconColor:t,size:16,tooltipText:Ye.Messages.CONNECTION_VERIFIED})}var Ex,qN,Bx=y(()=>{"use strict";a();l();z();x();Ex=oo(e=>e.colors?.INTERACTIVE_MUTED?.css),qN=Re(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")});function _x({id:e,theme:t}){let o=go.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(KN,null,n(te,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),n(he,{style:{marginTop:"8px",gap:JN(Wc.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(tR,{connection:i,theme:t})))):null}function tR({connection:e,theme:t}){let o=XN.get(ZN.useLegacyPlatformType(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:Wc.store.iconSize,height:Wc.store.iconSize}}),s=r?Ti:vl;return n(ne,{text:n("span",{className:"vc-sc-tooltip"},e.name,e.verified&&n(Ox,null),n(s,{height:16,width:16})),key:e.id},c=>r?n("a",{...c,className:"vc-user-connection",href:r,target:"_blank",onClick:u=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(u.currentTarget,u)}},i):n("button",{...c,className:"vc-user-connection",onClick:()=>Mo(e.name)},i))}var KN,YN,ZN,XN,QN,JN,Wc,VN,eR,ch,Ux=y(()=>{"use strict";a();l();Lx();G();ce();Bt();Mt();N();Ie();P();z();x();Bx();KN=Re(".lastSection","children:"),YN=Se("ThemeStore"),ZN=w("useLegacyPlatformType"),XN=w("isSupported","getByUrl"),QN=fo(".getPreviewThemeColors","primaryColor:"),JN=e=>(e??0)*2+4,Wc=L({iconSize:{type:1,description:"Icon size (px)",default:32},iconSpacing:{type:4,description:"Icon margin",default:1,options:[{label:"Compact",value:0},{label:"Cozy",value:1},{label:"Roomy",value:2}]}}),VN=U.wrap(e=>n(_x,{id:e.user.id,theme:QN(e).theme})),eR=U.wrap(({id:e})=>n(_x,{id:e,theme:YN.theme}));ch=S({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[d.TheKodeToad],patches:[{find:"{isUsingGuildBio:null!==(",replacement:{match:/,theme:\i\}\)(?=,.{0,150}setNote:)/,replace:"$&,$self.profilePopoutComponent({ user: arguments[0].user, displayProfile: arguments[0].displayProfile })"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}}],settings:Wc,profilePopoutComponent:VN,profilePanelComponent:eR})});var Fx=y(()=>{});function dR({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Un.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,r]=W([]),{type:i,topic:s,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:p,defaultAutoArchiveDuration:m,availableTags:g,id:v,rateLimitPerUser:b,defaultThreadRateLimitPerUser:I,defaultSortOrder:A,defaultReactionEmoji:M,bitrate:R,rtcRegion:D,videoQualityMode:C,permissionOverwrites:$,guild_id:j}=e;return ae(()=>{let X=[],J=pe.getGuild(j).ownerId;Ge.getMember(j,J)||X.push(J),Object.values($).forEach(({type:Q,id:_})=>{Q===1&&!Ge.getMember(j,_)&&X.push(_)}),X.length>0&&F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[j],userIds:X}),H.plugins.PermissionsViewer.enabled&&r(pc(Object.values($).map(Q=>({type:Q.type,id:Q.id,overwriteAllow:Q.allow,overwriteDeny:Q.deny})),j))},[v]),n("div",{className:$x.auto+" "+$x.customTheme+" "+oR.chatContent+" shc-lock-screen-outer-container"},n("div",{className:"shc-lock-screen-container"},n("img",{className:"shc-lock-screen-logo",src:pR}),n("div",{className:"shc-lock-screen-heading-container"},n(te,{variant:"heading-xxl/bold"},"This is a ",Be.can(fe.VIEW_CHANNEL,e)?"locked":"hidden"," ",aR[i]," channel."),e.isNSFW()&&n(ne,{text:"NSFW"},({onMouseLeave:X,onMouseEnter:J})=>n("svg",{onMouseLeave:X,onMouseEnter:J,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},n("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&n(te,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&s&&s.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&s&&s.length>0&&n("div",{className:"shc-lock-screen-topic-container"},De.parseTopic(s,!1,{channelId:v})),c&&n(te,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(Po,{timestamp:new Date(Co.extractTimestamp(c))})),p&&n(te,{variant:"text-md/normal"},"Last message pin: ",n(Po,{timestamp:new Date(p)})),(b??0)>0&&n(te,{variant:"text-md/normal"},"Slowmode: ",Ss(b,"seconds")),(I??0)>0&&n(te,{variant:"text-md/normal"},"Default thread slowmode: ",Ss(I,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&R!=null&&n(te,{variant:"text-md/normal"},"Bitrate: ",R," bits"),D!==void 0&&n(te,{variant:"text-md/normal"},"Region: ",D??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(te,{variant:"text-md/normal"},"Video quality mode: ",uR[C??1]),(m??0)>0&&n(te,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ss(m,"minutes")),u!=null&&n(te,{variant:"text-md/normal"},"Default layout: ",cR[u]),A!=null&&n(te,{variant:"text-md/normal"},"Default sort order: ",lR[A]),M!=null&&n("div",{className:"shc-lock-screen-default-emoji-container"},n(te,{variant:"text-md/normal"},"Default reaction emoji:"),De.defaultRules[M.emojiName?"emoji":"customEmoji"].react({name:M.emojiName?iR.convertSurrogateToName(M.emojiName):Ho.getCustomEmojiById(M.emojiId)?.name??"",emojiId:M.emojiId??void 0,surrogate:M.emojiName??void 0,src:M.emojiName?sR.getURL(M.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&n(te,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),g&&g.length>0&&n("div",{className:"shc-lock-screen-tags-container"},n(te,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:"shc-lock-screen-tags"},g.map(X=>n(rR,{tag:X})))),n("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},n("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},H.plugins.PermissionsViewer.enabled&&n(ne,{text:"Permission Details"},({onMouseLeave:X,onMouseEnter:J})=>n("button",{onMouseLeave:X,onMouseEnter:J,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Ui(o,pe.getGuild(e.guild_id),e.name)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(te,{variant:"text-lg/bold"},"Allowed users and roles:"),n(ne,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:X,onMouseEnter:J})=>n("button",{onMouseLeave:X,onMouseEnter:J,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>Un.store.defaultAllowedUsersAndRolesDropdownState=!t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&n(nR,{channel:e}))))}var $x,oR,nR,rR,iR,sR,aR,lR,cR,uR,pR,Gx,Hx=y(()=>{"use strict";a();l();G();ce();qn();z();x();ca();la();uh();$x=w("auto","content","scrollerBase"),oR=w("chat","content","noChat","chatContent"),nR=Re(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE"),rR=vu(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.includes("increasedActivityPill")}),iR=w("convertSurrogateToName"),sR=w("getURL","getEmojiColors"),aR={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},lR={[0]:"Latest activity",[1]:"Creation date"},cR={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},uR={[1]:"Automatic",[2]:"720p"},pR="/assets/433e3ec4319a9d11b0cbe39342614982.svg";Gx=U.wrap(dR)});var zx,Un,ph,uh=y(()=>{"use strict";a();l();Fx();G();ce();N();Ar();P();z();x();Hx();zx=w("modeMuted","modeSelected","unread","icon"),Un=L({hideUnreads:{description:"Hide Unreads",type:3,default:!0,restartNeeded:!0},showMode:{description:"The mode used to display hidden channels.",type:4,options:[{label:"Plain style with Lock Icon instead",value:0,default:!0},{label:"Muted style with hidden eye icon on the right",value:1}],restartNeeded:!0},defaultAllowedUsersAndRolesDropdownState:{description:"Whether the allowed users and roles dropdown on hidden channels should be open by default",type:3,default:!0}}),ph=S({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[d.BigDuck,d.AverageReactEnjoyer,d.D3SOX,d.Ven,d.Nuckyz,d.Nickyux,d.dzshn],settings:Un,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/,replace:""},{match:/(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,o)=>`${t}${o}`},{match:/(?<=getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:" "}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);return)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".MAX_STAGE_VOICE_USER_LIMIT})",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:"ChannelItemEditButton:function(){",replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<="renderOpenChatButton",\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>Un.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:"UNREAD_IMPORTANT:",predicate:()=>Un.store.showMode===1,replacement:[{match:/(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.name\),.{0,120}\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,replace:(e,t,o,r)=>`${o}?${r}:"",${t}if(${o})return "";`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Un.store.hideUnreads===!1&&Un.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>Un.store.hideUnreads===!0,match:/(?<={channel:(\i),name:\i,.+?unread:(\i).+?;)/,replace:(e,t,o)=>`${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'="ChannelListUnreadsStore",',replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/g,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:".useFlattenedChannelIdListWithThreads)",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<="renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/(?<="renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/"renderMobileToolbar",\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?getHasImportantUnread\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(e=>!$self.isHiddenChannel(e))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${fe.CONNECT}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${fe.CONNECT}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,o)=>(t=t.replace(Bo(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(Bo(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:'+1]})},"overflow"))',replacement:[{match:/maxUsers:\i,users:\i.+?}=(\i).*?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}${o}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}(${o}||!$self.isHiddenChannel(${t},true))&&`}]},{find:".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:".Messages.STAGE_FULL_MODERATOR_TITLE",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?isGuildChannelType\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'="GuildChannelStore",',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??arguments[0]==="@favorites");}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'="NowPlayingViewStore",',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=re.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!Be.can(fe.VIEW_CHANNEL,e)||t&&!Be.can(fe.CONNECT,e)},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){o[r]=i;continue}o[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[r].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,r,i)=>{if(r!==0)return t;let s=i.find(c=>c.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>n(Gx,{channel:e}),LockIcon:U.wrap(()=>n("svg",{className:zx.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:U.wrap(()=>n(ne,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:zx.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z"}))),{noop:!0})})});var dh,mh,jx=y(()=>{"use strict";a();l();G();N();P();dh=L({showTimeouts:{type:3,description:"Show member timeout icons in chat.",default:!0},showInvitesPaused:{type:3,description:"Show the invites paused tooltip in the server list.",default:!0}});Gr("ShowHiddenThings","ShowTimeouts");mh=S({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused"],description:"Displays various moderator-only elements regardless of permissions.",authors:[d.Dolfies],patches:[{find:"showCommunicationDisabledStyles",predicate:()=>dh.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"useShouldShowInvitesDisabledNotif:",predicate:()=>dh.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.Permissions.MANAGE_GUILD,\i\)/,replace:"true"}}],settings:dh})});var Wx=y(()=>{});var Ta,fh,qx=y(()=>{"use strict";a();l();Wx();G();N();P();Ta=L({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),fh=S({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[d.Rini,d.TheKodeToad],patches:[{find:".useCanSeeRemixBadge)",replacement:{match:/(?<=onContextMenu:\i,children:).*?\)}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:Ta,renderUsername:({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:c}=s;Ta.store.displayNames&&(c=s.globalName||c);let{nick:u}=e,p=r?"@":"";return c===u||o&&!Ta.store.inReplies?p+u:Ta.store.mode==="user-nick"?n(f,null,p,c," ",n("span",{className:"vc-smyn-suffix"},u)):Ta.store.mode==="nick-user"?n(f,null,p,u," ",n("span",{className:"vc-smyn-suffix"},c)):p+c}catch{return e?.nick}}})});var gh,hh,mR,yh,Kx=y(()=>{"use strict";a();l();hr();dn();G();N();P();x();gh=!1,hh=L({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(gh=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}}),mR=({isMainChat:e})=>{let[t,o]=W(gh);function r(i){hh.store.persistState&&(gh=i),o(i)}return ae(()=>{let i=(s,c)=>{t&&(hh.store.autoDisable&&r(!1),c.content.startsWith("@silent ")||(c.content="@silent "+c.content))};return Xt(i),()=>void Qt(i)},[t]),e?n(tn,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>r(!t)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#_)",d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z"}),!t&&n(f,null,n("mask",{id:"_"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000","stroke-width":"5.99068",d:"M0 24 24 0"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"})))):null},yh=S({name:"SilentMessageToggle",authors:[d.Nuckyz,d.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI","ChatInputButtonAPI"],settings:hh,start:()=>Vo("SilentMessageToggle",mR),stop:()=>en("SilentMessageToggle")})});var yr,fR,vh,Yx=y(()=>{"use strict";a();l();hr();so();G();N();P();x();yr=L({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}}),fR=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=yr.use(["isEnabled","showIcon"]),r=()=>yr.store.isEnabled=!yr.store.isEnabled;return!e||!o?null:n(tn,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:r},n("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},n("path",{fill:"currentColor",d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}),t&&n("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"})))},vh=S({name:"SilentTyping",authors:[d.Ven,d.Rini],description:"Hide that you are typing",dependencies:["CommandsAPI","ChatInputButtonAPI"],settings:yr,patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}}],commands:[{name:"silenttype",description:"Toggle whether you're hiding that you're typing or not.",inputType:0,options:[{name:"value",description:"whether to hide or not that you're typing (default is toggle)",required:!1,type:5}],execute:async(e,t)=>{yr.store.isEnabled=!!vt(e,"value",!yr.store.isEnabled),ye(t.channel.id,{content:yr.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){yr.store.isEnabled||F.dispatch({type:"TYPING_START_LOCAL",channelId:e})},start:()=>Vo("SilentTyping",fR),stop:()=>en("SilentTyping")})});var Zx,Sh,Xx=y(()=>{"use strict";a();l();G();Bt();N();P();x();Zx=L({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),Sh=S({name:"SortFriendRequests",authors:[d.Megu],description:"Sorts friend requests by date of receipt",settings:Zx,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\.sortBy\(\i=>\i\.comparator\)/,replace:"$&.sortBy((row) => $self.sortList(row))"}},{find:".Messages.FRIEND_REQUEST_CANCEL",replacement:{predicate:()=>Zx.store.showDates,match:/subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/,replace:(e,t,o)=>`subText:$self.makeSubtext(${t},${o})`}}],sortList(e){return e.type===3||e.type===4?-this.getSince(e.user):e.comparator},getSince(e){return new Date(Ke.getSince(e.id))},makeSubtext(e,t){let o=this.getSince(t);return n(he,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},n("span",null,e),!isNaN(o.getTime())&&n("span",null,"Received \u2014 ",o.toDateString()))}})});var Qx,Jx=y(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row { height: 0; opacity: 0; pointer-events: none; transition: 0.2s; transition-property: height; } #vc-spotify-player:hover .vc-spotify-button-row { opacity: 1; height: 32px; pointer-events: auto; /* only transition opacity on show to prevent clipping */ transition-property: height, opacity; } `,classNames:{},dom:null});Qx="src/plugins/spotifyControls/hoverOnly.css"});var Vx=y(()=>{});var Je,eM=y(()=>{"use strict";a();l();G();z();x();Je=mo(()=>{let{Store:e}=ds,t=yn("getActiveSocketAndDevice"),o=yn("SpotifyAPI"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(u){let p=H.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+u.replaceAll("/",(m,g)=>g===0?"":":"):"https://open.spotify.com"+u;VencordNative.native.openExternal(p)}get position(){let u=this.mPosition;return this.isPlaying&&(u+=Date.now()-this.start),u}set position(u){this.mPosition=u,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(u){this.req("put","/volume",{query:{volume_percent:Math.round(u)}}).then(()=>{this.volume=u,this.emitChange()})}setPlaying(u){this.req("put",u?"/play":"/pause")}setRepeat(u){this.req("put","/repeat",{query:{state:u}})}setShuffle(u){this.req("put","/shuffle",{query:{state:u}}).then(()=>{this.shuffle=u,this.emitChange()})}seek(u){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(u)}}).catch(p=>{console.error("[VencordSpotifyControls] Failed to seek",p),this.isSettingPosition=!1}))}req(u,p,m={}){this.device?.is_active&&((m.query??={}).device_id=this.device.id);let{socket:g}=t.getActiveSocketAndDevice();return o.SpotifyAPI[u](g.accountId,g.accessToken,{url:r+p,...m})}}let s=new i(F,{SPOTIFY_PLAYER_STATE(c){s.track=c.track,s.device=c.device??null,s.isPlaying=c.isPlaying??!1,s.volume=c.volumePercent??0,s.repeat=c.actual_repeat||"off",s.position=c.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:c}){s.device=c.find(u=>u.is_active)??c[0]??null,s.emitChange()}});return s})});function bh(e){let t=e/1e3/60,o=Math.floor(t),r=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Ki(e,t){return()=>n("svg",{className:ee(ot("button-icon"),ot(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function wa(e){return n("button",{className:ot("button"),...e},e.children)}function TR({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(B.Menu,{navId:`spotify-${e}-menu`,onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(B.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>Mo("https://open.spotify.com"+t),icon:Ti}),n(B.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>Je.openExternal(t),icon:jr}))}function wR(e,t){return o=>Kt.openContextMenu(o,()=>n(TR,{name:e,path:t}))}function xR(){let[e,t,o]=_e([Je],()=>[Je.isPlaying,Je.shuffle,Je.repeat]),[r,i]=(()=>{switch(o){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${o}`)}})();return n(he,{className:ot("button-row"),style:{gap:0}},n(wa,{className:ee(ot("button"),ot(t?"shuffle-on":"shuffle-off")),onClick:()=>Je.setShuffle(!t)},n(bR,null)),n(wa,{onClick:()=>Je.prev()},n(yR,null)),n(wa,{onClick:()=>Je.setPlaying(!e)},e?n(hR,null):n(gR,null)),n(wa,{onClick:()=>Je.next()},n(vR,null)),n(wa,{className:ee(ot("button"),ot(i)),onClick:()=>Je.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:ot("repeat-1")},"1"),n(SR,null)))}function IR(){let{duration:e}=Je.track,[t,o,r]=_e([Je],()=>[Je.mPosition,Je.isSettingPosition,Je.isPlaying]),[i,s]=W(t);return ae(()=>{if(r&&!o){s(Je.position);let c=setInterval(()=>{s(u=>u+1e3)},1e3);return()=>clearInterval(c)}},[t,o,r]),n("div",{id:ot("progress-bar")},n(T.FormText,{variant:"text-xs/medium",className:ot("progress-time")+" "+ot("time-left"),"aria-label":"Progress"},bh(i)),n(B.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:c=>{o||(s(c),MR(c))},renderValue:bh}),n(T.FormText,{variant:"text-xs/medium",className:ot("progress-time")+" "+ot("time-right"),"aria-label":"Total Duration"},bh(e)))}function AR({track:e}){let t=_e([Je],()=>Je.volume);return n(B.Menu,{navId:"spotify-album-menu",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(B.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Je.openExternal(`/album/${e.album.id}`),icon:jr}),n(B.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>qo(e.album.image.url),icon:Wr}),n(B.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,r)=>n(B.MenuSliderControl,{...o,ref:r,value:t,minValue:0,maxValue:100,onChange:Gt(i=>Je.setVolume(i))})}))}function Th(e,t,o){return t?{role:"link",onClick:()=>Je.openExternal(o),onContextMenu:wR(e,o)}:{}}function PR({track:e}){let t=e?.album?.image,[o,r]=W(!1),i=n(f,null,t&&n("img",{id:ot("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Kt.openContextMenu(s,()=>n(AR,{track:e}))}}));return o&&t?n("div",{id:ot("album-expanded-wrapper")},i):n("div",{id:ot("info-wrapper")},i,n("div",{id:ot("titles")},n(T.FormText,{variant:"text-sm/semibold",id:ot("song-title"),className:ot("ellipoverflow"),title:e.name,...Th("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(T.FormText,{variant:"text-sm/normal",className:ot("ellipoverflow")},"by\xA0",e.artists.map((s,c)=>n(q.Fragment,{key:s.name},n("span",{className:ot("artist"),style:{fontSize:"inherit"},title:s.name,...Th("Artist",s.id,`/artist/${s.id}`)},s.name),c!==e.artists.length-1&&n("span",{className:ot("comma")},", ")))),e.album.name&&n(T.FormText,{variant:"text-sm/normal",className:ot("ellipoverflow")},"on\xA0",n("span",{id:ot("album-title"),className:ot("album"),style:{fontSize:"inherit"},title:e.album.name,...Th("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function tM(){let e=_e([Je],()=>Je.track,null,(c,u)=>c?.id?c.id===u?.id:c?.name===u?.name),t=_e([Je],()=>Je.device,null,(c,u)=>c?.id===u?.id),o=_e([Je],()=>Je.isPlaying),[r,i]=W(!1);if(q.useEffect(()=>{if(i(!1),!o){let c=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(c)}},[o]),!e||!t?.is_active||r)return null;let s={"--vc-spotify-track-image":`url(${e?.album?.image?.url||""})`};return n("div",{id:ot("player"),style:s},n(PR,{track:e}),n(IR,null),n(xR,null))}var ot,gR,hR,yR,vR,SR,bR,MR,oM=y(()=>{"use strict";a();l();Vx();Bt();Mt();Ir();ut();Ie();x();eM();ot=e=>`vc-spotify-${e}`;gR=Ki("M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z","play"),hR=Ki("M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z","pause"),yR=Ki("M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zm3.66 6.82l5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64z","previous"),vR=Ki("M7.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L7.58 7.11C6.91 6.65 6 7.12 6 7.93v8.14c0 .81.91 1.28 1.58.82zM16 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z","next"),SR=Ki("M7 7h10v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V5H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1V7zm10 10H7v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.36V19h11c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1v3z","repeat"),bR=Ki("M10.59 9.17L6.12 4.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.46 4.46 1.42-1.4zm4.76-4.32l1.19 1.19L4.7 17.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L17.96 7.46l1.19 1.19c.31.31.85.09.85-.36V4.5c0-.28-.22-.5-.5-.5h-3.79c-.45 0-.67.54-.36.85zm-.52 8.56l-1.41 1.41 3.13 3.13-1.2 1.2c-.31.31-.09.85.36.85h3.79c.28 0 .5-.22.5-.5v-3.79c0-.45-.54-.67-.85-.35l-1.19 1.19-3.13-3.14z","shuffle");MR=Gt(e=>{Je.seek(e)})});function nM(e){(e?So:Ko)(Qx)}var wh,rM=y(()=>{"use strict";a();l();G();st();ce();N();P();Jx();oM();wh=S({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[d.Ven,d.afn,d.KraXen72,d.Av32000],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>nM(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1}},patches:[{find:"showTaglessAccountPanel:",replacement:{match:/(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?showTaglessAccountPanel:)/,replace:"$self.PanelWrapper,{VencordOriginal:$1,"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>nM(H.plugins.SpotifyControls.hoverControls),PanelWrapper({VencordOriginal:e,...t}){return n(f,null,n(U,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n(tM,null)),n(e,{...t}))}})});var xh,Mh,iM=y(()=>{"use strict";a();l();G();N();P();xh=L({noSpotifyAutoPause:{description:"Disable Spotify auto-pause",type:3,default:!0,restartNeeded:!0},keepSpotifyActivityOnIdle:{description:"Keep Spotify activity playing when idling",type:3,default:!1,restartNeeded:!0}}),Mh=S({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[d.Cyn,d.Nuckyz],settings:xh,patches:[{find:'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',replacement:{match:/SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,replace:(e,t)=>`${e}(${t}.body.product="premium")&&`}},{find:'"displayName","SpotifyStore")',replacement:[{predicate:()=>xh.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>xh.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function Ah(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let o=CR.getPendingReply(e);ro.sendMessage(e,t,void 0,ro.getSendMessageOptionsForReply(o)).then(()=>{o&&F.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Ih,CR,Ph,sM=y(()=>{"use strict";a();l();so();N();P();z();x();Ih=w("getPlayerState"),CR=w("getPendingReply");Ph=S({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[d.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let o=Ih.getTrack();if(o===null){ye(t.channel.id,{content:"You're not listening to any music."});return}Ah(t.channel.id,{content:`https://open.spotify.com/track/${o.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let o=Ih.getTrack();if(o===null){ye(t.channel.id,{content:"You're not listening to any music."});return}Ah(t.channel.id,{content:`https://open.spotify.com/album/${o.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let o=Ih.getTrack();if(o===null){ye(t.channel.id,{content:"You're not listening to any music."});return}Ah(t.channel.id,{content:o.artists[0].external_urls.spotify})}}]})});function NR({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(q.Fragment,null,n("span",null,i.sinceStart.toFixed(3),"s"),n("span",null,i.sinceLast.toFixed(3),"s"),n("span",null,r?.toFixed(0)??""),n("span",null,n("pre",null,e," ",t??" ",o)))}function RR({title:e,logs:t,traceEnd:o}){let r=t.find(c=>c.timestamp)?.timestamp??0,i=r,s=t.map(c=>{let u=c.timestamp??i,p=(u-r)/1e3,m=(u-i)/1e3;return i=u,{sinceStart:p,sinceLast:m}});return n(T.FormSection,{title:e,tag:"h1"},n("code",null,o&&n("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),n("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},n("span",null,"Start"),n("span",null,"Interval"),n("span",null,"Delta"),n("span",{style:{marginBottom:5}},"Event"),xa.logs.map((c,u)=>n(NR,{key:u,...c,instance:s[u]})))))}function DR({trace:e}){let t=e.split(` `);return n(T.FormSection,{title:"Server Trace",tag:"h2"},n("code",null,n(he,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(o=>n("span",null,o)))))}function kR(){if(!xa?.logs)return n("div",null,"Loading...");let e=xa.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(q.Fragment,null,n(RR,{title:"Startup Timings",logs:xa.logs,traceEnd:xa.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(DR,{trace:e}))}var xa,aM,lM=y(()=>{"use strict";a();l();ce();Bt();z();x();xa=w("markWithDelta","markAndLog","markAt");aM=U.wrap(kR)});var Ch,cM=y(()=>{"use strict";a();l();N();P();lM();Ch=S({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[d.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:aM})});function uM({streamKey:e},t){!e.endsWith(O.getCurrentUser().id)||F.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var Nh,pM=y(()=>{"use strict";a();l();N();P();x();Nh=S({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[d.Kodarru],flux:{STREAM_CREATE:e=>uM(e,!0),STREAM_DELETE:e=>uM(e,!1)}})});var qc,Rh,dM=y(()=>{"use strict";a();l();G();N();P();x();qc=L({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Rh=S({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[d.FieryFlames,d.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"!$self.shouldPlayBurstReaction($1)"}},{find:".trackEmojiSearchEmpty,200",replacement:{match:/(\.trackEmojiSearchEmpty,200(?=.+?isBurstReaction:(\i).+?(\i===\i\.EmojiIntention.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.shouldSuperReactByDefault&&${r})`}}],settings:qc,shouldPlayBurstReaction(e){return!!(qc.store.unlimitedSuperReactionPlaying||e<=qc.store.superReactionPlayingLimit)},get shouldSuperReactByDefault(){return qc.store.superReactByDefault&&O.getCurrentUser().premiumType!=null}})});function yM(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function ER(e){try{return yM(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function Dh({initialValue:e,onChange:t,placeholder:o}){let[r,i]=W(e);return n(ct,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function mM({title:e,rulesArray:t,rulesKey:o,update:r}){let i=e==="Using Regex";async function s(u){u!==t.length-1&&(t.splice(u,1),await at.set(o,t),r())}async function c(u,p,m){p===t.length-1&&t.push(hM()),t[p][m]=u,t[p].find===""&&t[p].replace===""&&t[p].onlyIfIncludes===""&&p!==t.length-1&&t.splice(p,1),await at.set(o,t),r()}return n(f,null,n(T.FormTitle,{tag:"h4"},e),n(he,{flexDirection:"column",style:{gap:"0.5em"}},t.map((u,p)=>n(q.Fragment,{key:`${u.find}-${p}`},n(he,{flexDirection:"row",style:{gap:0}},n(he,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(Dh,{placeholder:"Find",initialValue:u.find,onChange:m=>c(m,p,"find")}),n(Dh,{placeholder:"Replace",initialValue:u.replace,onChange:m=>c(m,p,"replace")}),n(Dh,{placeholder:"Only if includes",initialValue:u.onlyIfIncludes,onChange:m=>c(m,p,"onlyIfIncludes")})),n(k,{size:k.Sizes.MIN,onClick:()=>s(p),style:{background:"none",color:"var(--status-danger)",...p===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(Vn,null))),i&&ER(u.find)))))}function OR(){let[e,t]=W("");return n(f,null,n(T.FormTitle,{tag:"h4"},"Test Rules"),n(ct,{placeholder:"Type a message",onChange:t}),n(ct,{placeholder:"Message with rules applied",editable:!1,value:vM(e)}))}function vM(e){if(e.length===0)return e;if(Yc)for(let t of Yc)!t.find||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",` `)).replace(/^\s|\s$/g,""));if(Zc){for(let t of Zc)if(!!t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=yM(t.find);e=e.replace(o,t.replace.replaceAll("\\n",` `))}catch{new ie("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var fM,gM,hM,Kc,Yc,Zc,LR,BR,kh,SM=y(()=>{"use strict";a();l();nr();dn();G();Bt();Mt();N();Xe();lt();P();x();fM="TextReplace_rulesString",gM="TextReplace_rulesRegex",hM=()=>({find:"",replace:"",onlyIfIncludes:""}),Kc=()=>[hM()],Yc=Kc(),Zc=Kc(),LR=L({replace:{type:6,description:"",component:()=>{let e=Io();return n(f,null,n(mM,{title:"Using String",rulesArray:Yc,rulesKey:fM,update:e}),n(mM,{title:"Using Regex",rulesArray:Zc,rulesKey:gM,update:e}),n(OR,null))}}});BR="1102784112584040479",kh=S({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[d.AutumnVN,d.TheKodeToad],dependencies:["MessageEventsAPI"],settings:LR,async start(){Yc=await at.get(fM)??Kc(),Zc=await at.get(gM)??Kc(),this.preSend=Xt((e,t)=>{e!==BR&&(t.content=vM(t.content))})},stop(){Qt(this.preSend)}})});var Lh,bM=y(()=>{"use strict";a();l();N();P();x();Lh=S({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[d.Ven],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===O.getCurrentUser()?.id}}})});var Eh,TM=y(()=>{"use strict";a();l();N();P();Eh=S({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[d.fawn],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var wM=y(()=>{});var Rt,Ma=y(()=>{"use strict";a();l();G();P();Rt=L({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}}).withPrivateSettings()});var Xc,Oh=y(()=>{"use strict";a();l();Xc={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tr:"Turkish",tk:"Turkmen",ak:"Twi",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"}});async function Ia(e,t){let o=Rt.store[e+"Input"],r=Rt.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:o,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await h(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${o} -> ${r}) ${s.status} ${s.statusText}`);let{src:c,sentences:u}=await s.json();return{src:c,text:u.map(p=>p?.trans).filter(Boolean).join("")}}var Fn,Aa=y(()=>{"use strict";a();l();st();Ma();Fn=Ce("vc-trans-")});function UR({settingsKey:e,includeAuto:t}){let o=Rt.use([e])[e],r=Ct(()=>{let i=Object.entries(Xc).map(([s,c])=>({value:s,label:c}));return t||i.shift(),i},[]);return n("section",{className:K.bottom16},n(T.FormTitle,{tag:"h3"},Rt.def[e].description),n(za,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Rt.store[e]=i}))}function FR(){let e=Rt.use(["autoTranslate"]).autoTranslate;return n(qt,{value:e,onChange:t=>Rt.store.autoTranslate=t,note:Rt.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function xM({rootProps:e}){return n(Pe,{...e},n(He,{className:Fn("modal-header")},n(T.FormTitle,{tag:"h2"},"Translate"),n(ft,{onClick:e.onClose})),n(Le,{className:Fn("modal-content")},_R.map(t=>n(UR,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(T.FormDivider,{className:K.bottom16}),n(FR,null)))}var _R,MM=y(()=>{"use strict";a();l();et();ze();x();Oh();Ma();Aa();_R=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Yi({height:e=24,width:t=24,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:ee(Fn("icon"),o)},n("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}var IM,Bh=y(()=>{"use strict";a();l();hr();et();Ie();ze();x();Ma();MM();Aa();IM=({isMainChat:e})=>{let{autoTranslate:t}=Rt.use(["autoTranslate"]);if(!e)return null;let o=()=>{let r=!t;Rt.store.autoTranslate=r,r&&Rt.store.showAutoTranslateAlert!==!1&&rt.show({title:"Vencord Auto-Translate Enabled",body:n(f,null,n(T.FormText,null,"You just enabled auto translate (by right clicking the Translate icon). Any message you send will automatically be translated before being sent."),n(T.FormText,{className:K.top16},"If this was an accident, disable it again, or it will change your message content before sending.")),cancelText:"Disable Auto-Translate",confirmText:"Got it",secondaryConfirmText:"Don't show again",onConfirmSecondary:()=>Rt.store.showAutoTranslateAlert=!1,onCancel:()=>Rt.store.autoTranslate=!1})};return n(tn,{tooltip:"Open Translate Modal",onClick:r=>{if(r.shiftKey)return o();ge(i=>n(xM,{rootProps:i}))},onContextMenu:()=>o(),buttonProps:{"aria-haspopup":"dialog"}},n(Yi,{className:Fn({"auto-translate":t,"chat-button":!0})}))}});function Uh(e,t){_h.get(e)(t)}function $R({onDismiss:e}){return n("button",{onClick:e,className:Fn("dismiss")},"Dismiss")}function AM({message:e}){let[t,o]=W();return ae(()=>{if(!e.vencordEmbeddedBy)return _h.set(e.id,o),()=>void _h.delete(e.id)},[]),t?n("span",{className:Fn("accessory")},n(Yi,{width:16,height:16}),De.parse(t.text)," ","(translated from ",Xc[t.src]??t.src," - ",n($R,{onDismiss:()=>o(void 0)}),")"):null}var _h,PM=y(()=>{"use strict";a();l();x();Oh();Bh();Aa();_h=new Map});var GR,Fh,CM=y(()=>{"use strict";a();l();wM();hr();Ro();nc();dn();Ei();N();P();x();Ma();Bh();PM();Aa();GR=(e,{message:t})=>{if(!t.content)return;let o=pt("copy-text",e);!o||o.splice(o.findIndex(r=>r?.props?.id==="copy-text")+1,0,n(B.MenuItem,{id:"vc-trans",label:"Translate",icon:Yi,action:async()=>{let r=await Ia("received",t.content);Uh(t.id,r)}}))},Fh=S({name:"Translate",description:"Translate messages with Google Translate",authors:[d.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI","ChatInputButtonAPI"],settings:Rt,contextMenus:{message:GR},translate:Ia,start(){na("vc-translation",e=>n(AM,{message:e.message})),Vo("vc-translate",IM),Cn("vc-translate",e=>e.content?{label:"Translate",icon:Yi,message:e,channel:re.getChannel(e.channel_id),onClick:async()=>{let t=await Ia("received",e.content);Uh(e.id,t)}}:null),this.preSend=Xt(async(e,t)=>{!Rt.store.autoTranslate||!t.content||(t.content=(await Ia("sent",t.content)).text)})},stop(){Qt(this.preSend),en("vc-translate"),Nn("vc-translate"),ra("vc-translation")}})});var NM=y(()=>{});function $h({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var Qc,HR,Gh,Hh=y(()=>{"use strict";a();l();G();ce();N();ut();P();x();Qc=L({showAvatars:{type:3,default:!0,description:"Show avatars in the typing indicator"},showRoleColors:{type:3,default:!0,description:"Show role colors in the typing indicator"},alternativeFormatting:{type:3,default:!0,description:"Show a more useful message when several users are typing"}});HR=U.wrap(function({user:e,guildId:t}){return n("strong",{role:"button",onClick:()=>{yo(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Qc.store.showRoleColors?Ge.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Qc.store.showAvatars&&n("div",{style:{marginTop:"4px"}},n(mi,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Ge.getNick(t,e.id)||!t&&Ke.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),Gh=S({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[d.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,replace:"$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,replace:"$1"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=(\i)\.length\?\i.\i\.Messages.THREE_USERS_TYPING\.format\({\i:(\i),(?:\i:)?(\i),\i:\i}\):)\i\.\i\.Messages\.SEVERAL_USERS_TYPING/,replace:(e,t,o,r)=>`$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>Qc.store.alternativeFormatting}],settings:Qc,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:$h,mutateChildren(e,t,o){if(!Array.isArray(o))return o;let r=0;return o.map(i=>i.type==="strong"?n(HR,{...e,user:t[r++]}):i)}})});function vr(e,t){let o=O.getUser(t);return Ge.getNick(e,t)??o.globalName??o.username}function qR({channelId:e}){let t=_e([RM],()=>({...RM.getTypingUsers(e)}),null,(u,p)=>{let m=Object.keys(u),g=Object.keys(p);return m.length===g.length&&g.every(v=>u[v]!=null)}),o=_e([Ae],()=>Ae.getChannelId()),r=re.getChannel(e).guild_id;if(!Zi.store.includeMutedChannels&&WR.isChannelMuted(r,e)||!Zi.store.includeCurrentChannel&&o===e)return null;let i=O.getCurrentUser()?.id,s=Object.keys(t).filter(u=>u!==i&&!(Ke.isBlocked(u)&&!Zi.store.includeBlockedUsers)),c;switch(s.length){case 0:break;case 1:{c=Ye.Messages.ONE_USER_TYPING.format({a:vr(r,s[0])});break}case 2:{c=Ye.Messages.TWO_USERS_TYPING.format({a:vr(r,s[0]),b:vr(r,s[1])});break}case 3:{c=Ye.Messages.THREE_USERS_TYPING.format({a:vr(r,s[0]),b:vr(r,s[1]),c:vr(r,s[2])});break}default:{c=H.plugins.TypingTweaks.enabled?$h({a:vr(r,s[0]),b:vr(r,s[1]),count:s.length-2}):Ye.Messages.SEVERAL_USERS_TYPING;break}}return s.length>0?n(ne,{text:c},u=>n("div",{className:"vc-typing-indicator",...u},(Zi.store.indicatorMode&2)===2&&n(jR,{users:s.map(p=>O.getUser(p)),guildId:r,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"}),(Zi.store.indicatorMode&1)===1&&n("div",{className:"vc-typing-indicator-dots"},n(zR,{dotRadius:3,themed:!0})))):null}var zR,jR,RM,WR,Zi,zh,DM=y(()=>{"use strict";a();l();NM();G();ce();N();P();z();x();Hh();zR=Uo("Dots","AnimatedDots"),jR=Re("defaultRenderUser","showDefaultAvatarsForNullUsers"),RM=Se("TypingStore"),WR=Se("UserGuildSettingsStore");Zi=L({includeCurrentChannel:{type:3,description:"Whether to show the typing indicator for the currently selected channel",default:!0},includeMutedChannels:{type:3,description:"Whether to show the typing indicator for muted channels.",default:!1},includeBlockedUsers:{type:3,description:"Whether to show the typing indicator for blocked users.",default:!1},indicatorMode:{type:4,description:"How should the indicator be displayed?",options:[{label:"Avatars and animated dots",value:3,default:!0},{label:"Animated dots",value:1},{label:"Avatars",value:2}]}}),zh=S({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[d.Nuckyz,d.fawn,d.Sqaaakoi],settings:Zi,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/\.name\),.{0,120}\.children.+?:null(?<=,channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>n(U,{noop:!0},n(qR,{channelId:e}))})});var jh,kM=y(()=>{"use strict";a();l();dn();N();P();jh=S({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[d.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,r)=>Math.min(o,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let o=t.split(` `);if(o.length<2)return t;let r="";return o[o.length-1]==="```"&&(r=o.pop()),`${o[0]} ${this.unindent(o.slice(1).join(` `))} ${r}`})},start(){this.preSend=Xt((e,t)=>this.unindentMsg(t)),this.preEdit=Kr((e,t,o)=>this.unindentMsg(o))},stop(){Qt(this.preSend),Yr(this.preEdit)}})});var KR,Wh,LM=y(()=>{"use strict";a();l();G();xl();N();P();KR=L({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:or(2,16),default:4}}),Wh=S({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[d.nakoyasha],settings:KR,patches:[{find:".Messages.AVATAR_UPLOAD_EDIT_MEDIA",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]})});var qh,YR,Kh,EM=y(()=>{"use strict";a();l();Ro();Mt();N();P();x();qh=1<<2,YR=(e,{channel:t,message:{author:o,embeds:r,flags:i,id:s}})=>{let c=(i&qh)!==0;if(!c&&!r.length)return;let u=t.isPrivate()||!!(Be.getChannelPermissions({id:t.id})&fe.EMBED_LINKS);if(o.id===O.getCurrentUser().id&&!u)return;let p=pt("delete",e),m=p?.findIndex(g=>g?.props?.id==="delete");!m||!p||p.splice(m-1,0,n(B.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:c?"Unsuppress Embeds":"Suppress Embeds",color:c?void 0:"danger",icon:c?bl:Tl,action:()=>Et.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:c?i&~qh:i|qh}})}))},Kh=S({name:"UnsuppressEmbeds",authors:[d.rad,d.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:YR}})});var OM,Yh,BM=y(()=>{"use strict";a();l();so();wl();G();N();P();OM=L({resultsAmount:{type:1,description:"The amount of results you want to get (more gives better results, but is slower)",default:10}}),Yh=S({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[d.jewdev],dependencies:["CommandsAPI"],settings:OM,commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let o=encodeURIComponent(e[0].value),{list:r}=await h(`https://api.urbandictionary.com/v0/define?term=${o}&per_page=${OM.store.resultsAmount}`).then(c=>c.json());if(!r.length)return void ye(t.channel.id,{content:"No results found."});let i=r.reduce((c,u)=>c.thumbs_up>u.thumbs_up?c:u),s=c=>c.replaceAll(`\r `,` `).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(u,p)=>`[${p}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(p)} "Define '${p}' on Urban Dictionary")`).trim();return void ye(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${i.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(i.author)}`},title:i.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(i.word)}`,description:s(i.definition),fields:[{name:"Example",value:s(i.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${o} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${i.thumbs_up.toString()} | \u{1F44E} ${i.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(i.written_on).toISOString()}]})}catch(o){ye(t.channel.id,{content:`Something went wrong: \`${o}\``})}}}]})});var _M=y(()=>{});var ZR,XR,QR,UM,FM=y(()=>{"use strict";a();l();_M();z();x();ZR=w("selectChannel","selectVoiceChannel"),XR=fo(".lastSection","children:"),QR=1n<<20n,UM=({channel:e,label:t,showHeader:o})=>n(XR,null,o&&n(T.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),n(k,{className:"vc-uvs-button",color:k.Colors.TRANSPARENT,size:k.Sizes.SMALL,onClick:()=>{Be.can(QR,e)?ZR.selectVoiceChannel(e.id):V.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:V.Type.FAILURE,options:{position:V.Position.BOTTOM}})}},t))});var JR,Zh,$M,Xh,GM=y(()=>{"use strict";a();l();G();ce();N();P();z();x();FM();JR=Se("VoiceStateStore"),Zh=L({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),$M=U.wrap(({user:e})=>{let{channelId:t}=JR.getVoiceStateForUser(e.id)??{};if(!t)return null;let o=re.getChannel(t);if(!o)return null;let r=pe.getGuild(o.guild_id);if(!r)return null;let i=`${r.name} | ${o.name}`;return n(UM,{channel:o,label:i,showHeader:Zh.store.showVoiceChannelSectionHeader})}),Xh=S({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[d.LordElias],settings:Zh,patchModal({user:e}){return Zh.store.showInUserProfileModal?n("div",{className:"vc-uvs-modal-margin"},n($M,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===O.getCurrentUser().id;return n("div",{className:t?"vc-uvs-popout-margin-self":""},n($M,{user:e}))},patches:[{find:".popularApplicationCommandIds,",replacement:{match:/applicationId:\i\.id}\),(?=.{0,50}setNote:\i)/,replace:"$&$self.patchPopout(arguments[0]),"}},{find:".Messages.MUTUAL_GUILDS_WITH_END_COUNT",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var HM,zM=y(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] { background: center / cover no-repeat; } [class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"], [class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] { top: 76px; } [style*="background-image"] [class*="background_"] { background-color: transparent !important; } `,classNames:{},dom:null});HM="src/plugins/usrbg/index.css"});var VR,$n,Jc,Qh,jM=y(()=>{"use strict";a();l();G();st();bo();N();P();zM();VR="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",$n={},Jc=L({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),Qh=S({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[d.AutumnVN,d.pylix,d.TheKodeToad],settings:Jc,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Jc.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:$n,settingsAboutComponent:()=>n(Qe,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile_")&&$n[t])return{backgroundImage:`url(${$n[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Jc.store.nitroFirst)&&$n[t.id])return $n[t.id]},premiumHook({userId:e}){if($n[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!$n[t.id]||Jc.store.nitroFirst)},async start(){So(HM);let e=await h(VR);e.ok&&($n=await e.json(),this.data=$n)}})});function eD({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,c]=W(e.userId);if(s)return n(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let u=r(e.content,i);return n(o,{...e,inlinePreview:i.formatInline},n("span",{onMouseEnter:()=>{let p=u?.[0]?.props?.children;if(typeof p!="string")return;let m=p.match(/<@!?(\d+)>/)?.[1];if(!m||Vc.has(m))return;if(O.getUser(m))return c(m);let g=()=>{Vc.add(m),WM.unshift(()=>Ot.getUser(m).then(()=>{c(m),Vc.delete(m)}).catch(v=>{v?.status===429&&(WM.unshift(()=>Fo(1e3).then(g)),Vc.delete(m))}).finally(()=>Fo(300)))};g()}},u))}var Vc,WM,Jh,qM=y(()=>{"use strict";a();l();ce();N();Ie();Fr();P();x();Vc=new Set,WM=new vo(5);Jh=S({name:"ValidUser",description:"Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",authors:[d.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,100}return null==.{0,70}\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}},{find:"unknownUserMentionPlaceholder:",replacement:{match:/unknownUserMentionPlaceholder:/,replace:"$&false&&"}}],renderMention(e,t,o,r,i){return n(U,{noop:!0},n(eD,{RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var Vh,e1,KM=y(()=>{"use strict";a();l();N();P();x();Vh={},e1=S({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[d.Ven,d.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,o)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let o=re.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Ae.getVoiceChannelId()===o){e();return}let r=Vh[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete Vh[o]):r.timeout=setTimeout(()=>{delete Vh[o]},500)}})});function tu(e,t=H.plugins.VcNarrator){if(!e)return;let o=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new ie("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(o.voice=r,o.volume=t.volume,o.rate=t.rate,speechSynthesis.speak(o))}function eu(e){let t=H.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function ou(e,t,o,r,i){return e.replaceAll("{{USER}}",eu(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",eu(o)||"channel").replaceAll("{{DISPLAY_NAME}}",eu(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",eu(i)||(i?"Someone":""))}function tD({channelId:e,oldChannelId:t},o){if(o&&e!==t1&&(t=t1,t1=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function oD(e,t){let o=Object.assign({},H.plugins.VcNarrator,e),r=O.getCurrentUser(),i=ho.getGuildId();tu(ou(o[t+"Message"],r.username,"general",r.globalName??r.username,Ge.getNick(i,r.id)??r.username),o)}var YM,t1,o1,ZM=y(()=>{"use strict";a();l();G();hi();N();Xe();et();qn();P();z();x();YM=w("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");o1=S({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[d.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=ho.getGuildId(),o=Ae.getVoiceChannelId(),r=O.getCurrentUser().id;if(re.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:c,oldChannelId:u}=i,p=s===r;if(!p&&(!o||c!==o&&u!==o))continue;let[m,g]=tD(i,p);if(!m)continue;let v=H.plugins.VcNarrator[m+"Message"],b=p&&!H.plugins.VcNarrator.sayOwnName?"":O.getUser(s).username,I=b&&(O.getUser(s).globalName??b),A=b&&(Ge.getNick(t,s)??b),M=re.getChannel(g).name;tu(ou(v,b,M,I,A))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ae.getVoiceChannelId(),t=YM.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";tu(ou(H.plugins.VcNarrator[o+"Message"],"",re.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ae.getVoiceChannelId(),t=YM.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";tu(ou(H.plugins.VcNarrator[o+"Message"],"",re.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new ie("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:unsafeWindow.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} Muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,o]=Ct(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(c=>c.lang.startsWith("en"))]},[]),r=Ct(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(cn,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let s="No narrator voices found. ";s+=navigator.platform?.toLowerCase().includes("linux")?"Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag":"Try installing some in the Narrator settings of your Operating System",i=n(cn,null,s)}return n(T.FormSection,null,n(T.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(T.FormText,null,"The special placeholders ",n("code",null,"{{USER}}"),", ",n("code",null,"{{DISPLAY_NAME}}"),", ",n("code",null,"{{NICKNAME}}")," and ",n("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),o&&n(f,null,n(T.FormTitle,{className:K.top20,tag:"h3"},"Play Example Sounds"),n("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>n(k,{key:s,onClick:()=>oD(e,s)},$r([s]))))),i)}})});var XM=y(()=>{});function rD(e){let{useQuickCss:t}=xt(["useQuickCss"]),o=[];for(let r of Object.values(Vencord.Plugins.plugins))r.toolboxActions&&Vencord.Plugins.isPluginEnabled(r.name)&&o.push(n(B.MenuGroup,{label:r.name,key:`vc-toolbox-${r.name}`},Object.entries(r.toolboxActions).map(([i,s])=>{let c=`vc-toolbox-${r.name}-${i}`;return n(B.MenuItem,{id:c,key:c,label:i,action:s})})));return n(B.Menu,{navId:"vc-toolbox",onClose:e},n(B.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:il}),n(B.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:t,label:"Enable QuickCSS",action:()=>{H.useQuickCss=!t}}),n(B.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...o)}function iD(e){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},n("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function sD(){let[e,t]=W(!1);return n(as,{position:"bottom",align:"right",animation:as.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>rD(()=>t(!1))},(o,{isShown:r})=>n(nD,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>iD(r),selected:r}))}function aD({children:e}){return e.splice(e.length-1,0,n(U,{noop:!0},n(sD,null))),n(f,null,e)}var nD,n1,QM=y(()=>{"use strict";a();l();XM();sl();G();ce();N();P();z();x();nD=Uo("Icon","Divider");n1=S({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[d.Ven,d.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:U.wrap(aD,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function Pa(e){let t=e.startsWith("/")?"png":r1.store.format,o=new URL(e,unsafeWindow.location.href);o.searchParams.set("size",r1.store.imgSize),o.pathname=o.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=o.toString(),o.searchParams.set("size","4096");let r=o.toString();qo(e,{original:r,height:256})}var r1,lD,cD,i1,JM=y(()=>{"use strict";a();l();G();Mt();N();ut();P();x();r1=L({format:{type:4,description:"Choose the image format to use for non animated images. Animated images will always use .gif",options:[{label:"webp",value:"webp",default:!0},{label:"png",value:"png"},{label:"jpg",value:"jpg"}]},imgSize:{type:4,description:"The image size to use",options:["128","256","512","1024","2048","4096"].map(e=>({label:e,value:e,default:e==="1024"}))}});lD=(e,{user:t,guildId:o})=>{if(!t)return;let r=Ge.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(B.MenuGroup,null,n(B.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Pa(Ut.getUserAvatarURL(t,!0)),icon:Wr}),r&&n(B.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Pa(Ut.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0})),icon:Wr})))},cD=(e,{guild:t})=>{if(!t)return;let{id:o,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,n(B.MenuGroup,null,r?n(B.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Pa(Ut.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:Wr}):null,i?n(B.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Pa(Ut.getGuildBannerURL(t,!0)),icon:Wr}):null))},i1=S({name:"ViewIcons",authors:[d.Ven,d.TheKodeToad,d.Nuckyz],description:"Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu",tags:["ImageUtilities"],settings:r1,openImage:Pa,contextMenus:{"user-context":lD,"guild-context":cD},patches:[{find:"User Profile Modal - Context Menu",replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}},{find:".NITRO_BANNER,",replacement:{match:/style:\{(?=backgroundImage:(null!=\i)\?"url\("\.concat\((\i),)/,replace:'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,'}},{find:".avatarPositionPanel",replacement:{match:/(?<=avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function s1(e){return n("div",{className:uD.markup},De.defaultRules.codeBlock.react(e,null,{}))}var uD,VM=y(()=>{"use strict";a();l();z();x();uD=w("markup","codeContainer")});function pD(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function dD(e){let t=pD(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let o=t;return delete o.editHistory,delete o.deleted,o.attachments?.forEach(r=>delete r.deleted),t}function oI(e,t,o){let r=ge(i=>n(U,null,n(Pe,{...i,size:"large"},n(He,null,n(te,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(ft,{onClick:()=>Sn(r)})),n(Le,null,n("div",{style:{padding:"16px 0"}},!!o&&n(f,null,n(T.FormTitle,{tag:"h5"},"Content"),n(s1,{content:o,lang:""}),n(T.FormDivider,{className:K.bottom20})),n(T.FormTitle,{tag:"h5"},t," Data"),n(s1,{content:e,lang:"json"}))),n(mt,null,n(he,{cellSpacing:10},n(k,{onClick:()=>Mo(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(k,{onClick:()=>Mo(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function eI(e){e=dD(e);let t=JSON.stringify(e,null,4);return oI(t,"Message",e.content)}function a1(e){return(t,o)=>{let r=o[e.toLowerCase()];if(!r||o.label===Ye.Messages.CHANNEL_ACTIONS_MENU_LABEL)return;let i=t.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),t=s.children}t.splice(-1,0,n(B.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>oI(JSON.stringify(r,null,4),e),icon:tI}))}}var tI,nu,l1,nI=y(()=>{"use strict";a();l();Ei();G();VM();ce();Bt();N();et();Ie();ze();P();x();tI=()=>n("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},n("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),n("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));nu=L({clickMethod:{description:"Change the button to view the raw content/data of any message.",type:4,options:[{label:"Left Click to view the raw content.",value:"Left",default:!0},{label:"Right click to view the raw content.",value:"Right"}]}});l1=S({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[d.KingFish,d.Ven,d.rad,d.ImLvna],dependencies:["MessagePopoverAPI"],settings:nu,contextMenus:{"guild-context":a1("Guild"),"channel-context":a1("Channel"),"user-context":a1("User")},start(){Cn("ViewRaw",e=>{let t=()=>{nu.store.clickMethod==="Right"?Mo(e.content):eI(e)},o=i=>{nu.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Mo(e.content)):(i.preventDefault(),i.stopPropagation(),eI(e))};return{label:nu.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:tI,message:e,channel:re.getChannel(e.channel_id),onClick:t,onContextMenu:o}})},stop(){Nn("ViewRaw")}})});var rI=y(()=>{});var Xi,ru=y(()=>{"use strict";a();l();G();P();Xi=L({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var W0e,iI=y(()=>{"use strict";a();l();x();ru();W0e=VencordNative.pluginHelpers.VoiceMessages});var Sr,c1=y(()=>{"use strict";a();l();st();Sr=Ce("vc-vmsg-")});var mD,sI,aI=y(()=>{"use strict";a();l();lt();z();c1();mD=Re("waveform:","onVolumeChange"),sI=({src:e,waveform:t,recording:o})=>{let r=ss({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(mD,{key:e,src:e,waveform:t}):n("div",{className:Sr("preview",o?"preview-recording":[])},n("div",{className:Sr("preview-indicator")}),n("div",{className:Sr("preview-time")},s),n("div",{className:Sr("preview-label")},o?"RECORDING":"----"))}});var lI,cI=y(()=>{"use strict";a();l();x();ru();lI=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=W(!1),[i,s]=W(!1),[c,u]=W(),[p,m]=W([]),g=b=>{r(b),t?.(b)};function v(){!o?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:Xi.store.echoCancellation,noiseSuppression:Xi.store.noiseSuppression}}).then(I=>{let A=[];m(A);let M=new MediaRecorder(I);u(M),M.addEventListener("dataavailable",R=>{A.push(R.data)}),M.start(),g(!0)}):c&&(c.addEventListener("stop",()=>{e(new Blob(p,{type:"audio/ogg; codecs=opus"})),g(!1)}),c.stop())}return n(f,null,n(k,{onClick:v},o?"Stop":"Start"," recording"),n(k,{disabled:!o,onClick:()=>{s(!i),i?c?.resume():c?.pause()}},i?"Resume":"Pause"," recording"))}});function vD(e,t){let o=Ae.getChannelId(),r=gD.getPendingReply(o);r&&F.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new fD.CloudUpload({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isClip:!1,isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{Et.post({url:`/channels/${o}/messages`,body:{flags:1<<13,channel_id:o,content:"",nonce:Co.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?ro.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>wt("Failed to upload voice message",V.Type.FAILURE)),i.upload()}function SD(){let[e,t]=W();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function bD({modalProps:e}){let[t,o]=W(!1),[r,i]=W(),[s,c]=SD();ae(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[u]=dt(async()=>{if(!r)return uI;let g=await new AudioContext().decodeAudioData(await r.arrayBuffer()),v=g.getChannelData(0),b=new Uint8Array(kr.clamp(Math.floor(g.duration*10),Math.min(32,v.length),256)),I=Math.floor(v.length/b.length);for(let R=0;R{i(m),c(m)},onRecordingChange:o}),n(k,{onClick:async()=>{let m=await dl("audio/*");m&&(i(m),c(m))}},"Upload File")),n(T.FormTitle,null,"Preview"),n(sI,{src:s,waveform:u.waveform,recording:t}),p&&n(Nt,{className:`vc-plugins-restart-card ${K.top16}`},n(T.FormText,null,"Voice Messages have to be OggOpus to be playable on iOS. This file is ",n("code",null,r.type)," so it will not be playable on iOS."),n(T.FormText,{className:K.top8},"To fix it, first convert it to OggOpus, for example using the ",n(Qe,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),n(mt,null,n(k,{disabled:!r,onClick:()=>{vD(r,u),e.onClose(),wt("Now sending voice message... Please be patient",V.Type.MESSAGE)}},"Send")))}var fD,gD,u1,hD,yD,p1,uI,pI=y(()=>{"use strict";a();l();rI();Mt();bo();N();et();ze();lt();P();ml();z();x();iI();ru();c1();aI();cI();fD=w("CloudUpload"),gD=Se("PendingReplyStore"),u1=w("optionName","optionIcon","optionLabel"),hD=lI,yD=(e,t)=>{t.channel.guild_id&&!(Be.can(fe.SEND_VOICE_MESSAGES,t.channel)&&Be.can(fe.SEND_MESSAGES,t.channel))||e.push(n(B.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:u1.optionLabel},n(p0,{className:u1.optionIcon,height:24,width:24}),n("div",{className:u1.optionName},"Send voice message")),action:()=>ge(o=>n(bD,{modalProps:o}))}))},p1=S({name:"VoiceMessages",description:"Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",authors:[d.Ven,d.Vap,d.Nickyux],settings:Xi,contextMenus:{"channel-attach":yD}}),uI={waveform:"AAAAAAAAAAAA",duration:1}});async function TD(e){let t=await h(e);if(t.status===200)return await t.blob()}function mI(e){let t=new URL(e);return t.host===dI?e:(t.searchParams.delete("width"),t.searchParams.delete("height"),t.origin===wD?(t.host=dI,t.searchParams.delete("size"),t.searchParams.delete("quality"),t.searchParams.delete("format")):t.searchParams.set("quality","lossless"),t.toString())}var iu,ni,wD,dI,d1,fI=y(()=>{"use strict";a();l();G();N();P();ml();z();x();iu=w("contextMenuCallbackNative");ni=L({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0}}),wD="https://media.discordapp.net",dI="cdn.discordapp.com";d1=S({name:"WebContextMenus",description:"Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)",authors:[d.Ven],enabledByDefault:!0,required:!1,settings:ni,start(){ni.store.addBack&&(unsafeWindow.removeEventListener("contextmenu",iu.contextMenuCallbackWeb),unsafeWindow.addEventListener("contextmenu",iu.contextMenuCallbackNative),this.changedListeners=!0)},stop(){this.changedListeners&&(unsafeWindow.removeEventListener("contextmenu",iu.contextMenuCallbackNative),unsafeWindow.addEventListener("contextmenu",iu.contextMenuCallbackWeb))},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\i\.\i\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/!\i\.isPlatformEmbedded/,replace:"false"},{match:/return\s*?\[\i\.\i\.canCopyImage\(\)/,replace:"return [true"},{match:/(?<=COPY_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=SAVE_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',all:!0,predicate:()=>ni.store.addBack,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:()=>ni.store.addBack,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:()=>ni.store.addBack,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,replace:"||true?"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:()=>ni.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>ni.store.addBack,replacement:{match:/let\{text:\i=""/,replace:"return [null,null];$&"}},{find:'"MediaEngineWebRTC");',replacement:{match:/supports\(\i\)\{switch\(\i\)\{case (\i).Features/,replace:"$&.DISABLE_VIDEO:return true;case $1.Features"}}],async copyImage(e){e=mI(e);let t=await h(e).then(o=>o.blob());if(t.type!=="image/png"){let o=await createImageBitmap(t),r=document.createElement("canvas");r.width=o.width,r.height=o.height,r.getContext("2d").drawImage(o,0,0),await new Promise(i=>{r.toBlob(s=>{t=s,i()},"image/png")})}navigator.clipboard.write([new ClipboardItem({"image/png":t})])},async saveImage(e){e=mI(e);let t=await TD(e);if(!t)return;let o=new URL(e).pathname.split("/").pop(),r=new File([t],o,{type:t.type});pl(r)},copy(){let e=document.getSelection();!e||no.copy(e.toString())},cut(){this.copy(),zo.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=(await navigator.clipboard.read())[0];if(!e)return;let t=new DataTransfer;for(let o of e.types)if(o==="image/png"){let r=new File([await e.getType(o)],"unknown.png",{type:o});t.items.add(r)}else if(o==="text/plain"){let r=await e.getType(o);t.setData(o,await r.text())}document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});var m1,f1,gI=y(()=>{"use strict";a();l();N();P();z();x();m1=w("JUMP_TO_GUILD","SERVER_NEXT"),f1=S({name:"WebKeybinds",description:"Re-adds keybinds missing in the web version of Discord: ctrl+t, ctrl+shift+t, ctrl+tab, ctrl+shift+tab, ctrl+1-9, ctrl+,. Only works fully on Vesktop/ArmCord, not inside your browser",authors:[d.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&navigator.platform.includes("Mac"))switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(ho.getGuildId()&&jo.transitionToGuild("@me"),zo.safeDispatch("TOGGLE_DM_CREATE")):F.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case",":e.preventDefault(),gi.open("My Account");break;case"Tab":(e.shiftKey?m1.SERVER_PREV:m1.SERVER_NEXT).action(e);break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),m1.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}})});function AD(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return Et.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:o},oldFormErrors:!0}).then(i=>F.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})).catch(console.error).finally(()=>Fo(250))}function PD(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=hI[r]??={fetched:!1,users:{}};return i.fetched||(ID.unshift(()=>AD(e,t,o)),i.fetched=!0),i.users}function CD(e){return function(o,r){return n(ne,{text:e.slice(4).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:MD.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-4))}}function ND(e){e.stopPropagation()}var xD,MD,g1,ID,hI,h1,yI=y(()=>{"use strict";a();l();ce();N();Ie();Fr();lt();P();z();x();xD=Re("defaultRenderUser","showDefaultAvatarsForNullUsers"),MD=w("moreUsers","emptyUser","avatarContainer","clickableAvatar"),g1=null,ID=new vo;h1=S({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[d.Ven,d.KannaDev,d.newwares],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'"MessageReactionsStore"',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}},{find:"cleanAutomaticAnchor(){",replacement:{match:/constructor\(\i\)\{(?=.{0,100}automaticAnchor)/,replace:"$&$self.setScrollObj(this);"}}],setScrollObj(e){g1=e},renderUsers(e){return e.message.reactions.length>10?null:n(U,{noop:!0},n(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:o}){let r=Io();q.useLayoutEffect(()=>{g1?.scrollCounter>0&&g1.setAutomaticAnchor(null)}),q.useEffect(()=>{let c=u=>{u.messageId===e.id&&r()};return F.subscribe("MESSAGE_REACTION_ADD_USERS",c),()=>F.unsubscribe("MESSAGE_REACTION_ADD_USERS",c)},[e.id]);let i=PD(e,t,o),s=Object.values(i).filter(Boolean);for(let c of s)F.dispatch({type:"USER_UPDATE",user:c});return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:ND},n(xD,{users:s,guildId:re.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:CD(s)})))},set reactions(e){hI=e}})});var y1,vI=y(()=>{"use strict";a();l();so();N();P();y1=S({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[d.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let o=vt(e,"search","");if(!o)return ye(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:o}),i=await h("https://en.wikipedia.org/w/api.php?"+r).then(p=>p.json()).catch(p=>(console.log(p),ye(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!i)return;if(!i.query?.search?.length)return console.log(i),ye(t.channel.id,{content:"No results given"});let s=await h(`https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info%7Cdescription%7Cimages%7Cimageinfo%7Cpageimages&list=&meta=&indexpageids=1&pageids=${i.query.search[0].pageid}&formatversion=2&origin=*`).then(p=>p.json()).then(p=>p.query.pages[0]).catch(p=>(console.log(p),ye(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let c=s.thumbnail,u=c&&{url:c.source.replace(/(50px-)/ig,"1000px-"),height:c.height*100,width:c.width*100};ye(t.channel.id,{embeds:[{type:"rich",title:i.query.search[0].title,url:`https://wikipedia.org/w/index.php?curid=${i.query.search[0].pageid}`,color:"0x8663BE",description:i.query.search[0].snippet.replace(/( |<([^>]+)>)/ig,"").replace(/(")/ig,'"')+"...",image:u,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});var We,Hr=y(()=>{a();l();cy();uy();py();dy();my();fy();gy();hy();yy();vy();Sy();by();td();Z0();X0();Q0();J0();tv();ov();cd();cv();uv();pv();mv();fv();Ev();Bv();_v();Hv();jv();Wv();Zv();rS();iS();sS();aS();pS();yS();SS();HS();zS();KS();ZS();XS();yb();wb();xb();Ab();Pb();Cb();Nb();Db();Eb();Ob();Fb();Hb();zb();Kb();Fm();Jb();e2();o2();i2();Jm();p2();g2();w2();M2();I2();A2();C2();N2();R2();D2();k2();L2();E2();B2();_2();U2();F2();$2();G2();H2();z2();j2();W2();q2();K2();Y2();Z2();V2();eT();ua();mT();hT();fa();FT();HT();qT();aw();lw();Sw();bw();ww();Ow();Bw();_w();$w();ux();px();mx();fx();vx();xx();Dx();kx();Ux();uh();jx();qx();Kx();Yx();Xx();rM();iM();sM();cM();pM();dM();SM();bM();TM();CM();DM();Hh();kM();LM();EM();BM();GM();jM();qM();KM();ZM();QM();JM();nI();pI();fI();gI();yI();vI();We={[Hu.name]:Hu,[zu.name]:zu,[ju.name]:ju,[Wu.name]:Wu,[qu.name]:qu,[Ku.name]:Ku,[Yu.name]:Yu,[Zu.name]:Zu,[Xu.name]:Xu,[Qu.name]:Qu,[Ju.name]:Ju,[Vu.name]:Vu,[Gs.name]:Gs,[od.name]:od,[nd.name]:nd,[id.name]:id,[sd.name]:sd,[ad.name]:ad,[ld.name]:ld,[dd.name]:dd,[md.name]:md,[fd.name]:fd,[gd.name]:gd,[hd.name]:hd,[yd.name]:yd,[bd.name]:bd,[Td.name]:Td,[wd.name]:wd,[xd.name]:xd,[Md.name]:Md,[Id.name]:Id,[Ld.name]:Ld,[Ed.name]:Ed,[Bd.name]:Bd,[_d.name]:_d,[Ud.name]:Ud,[Hd.name]:Hd,[zd.name]:zd,[jd.name]:jd,[im.name]:im,[sm.name]:sm,[lm.name]:lm,[um.name]:um,[pm.name]:pm,[Sm.name]:Sm,[bm.name]:bm,[Tm.name]:Tm,[wm.name]:wm,[xm.name]:xm,[Mm.name]:Mm,[Im.name]:Im,[Am.name]:Am,[Cm.name]:Cm,[Nm.name]:Nm,[Rm.name]:Rm,[km.name]:km,[Lm.name]:Lm,[Om.name]:Om,[Gm.name]:Gm,[Hm.name]:Hm,[jm.name]:jm,[Km.name]:Km,[Ym.name]:Ym,[ef.name]:ef,[of.name]:of,[af.name]:af,[uf.name]:uf,[pf.name]:pf,[df.name]:df,[mf.name]:mf,[gf.name]:gf,[vf.name]:vf,[Sf.name]:Sf,[bf.name]:bf,[Tf.name]:Tf,[wf.name]:wf,[xf.name]:xf,[Mf.name]:Mf,[If.name]:If,[Af.name]:Af,[Pf.name]:Pf,[Cf.name]:Cf,[Nf.name]:Nf,[Rf.name]:Rf,[Df.name]:Df,[kf.name]:kf,[Lf.name]:Lf,[Ef.name]:Ef,[Of.name]:Of,[Bf.name]:Bf,[Uf.name]:Uf,[Ff.name]:Ff,[Gf.name]:Gf,[Kf.name]:Kf,[Yf.name]:Yf,[Zf.name]:Zf,[rg.name]:rg,[ig.name]:ig,[hg.name]:hg,[wg.name]:wg,[Ag.name]:Ag,[Pg.name]:Pg,[Cg.name]:Cg,[Rg.name]:Rg,[Lg.name]:Lg,[Hg.name]:Hg,[jg.name]:jg,[Wg.name]:Wg,[qg.name]:qg,[Vg.name]:Vg,[eh.name]:eh,[th.name]:th,[oh.name]:oh,[nh.name]:nh,[sh.name]:sh,[ah.name]:ah,[lh.name]:lh,[ch.name]:ch,[ph.name]:ph,[mh.name]:mh,[fh.name]:fh,[yh.name]:yh,[vh.name]:vh,[Sh.name]:Sh,[wh.name]:wh,[Mh.name]:Mh,[Ph.name]:Ph,[Ch.name]:Ch,[Nh.name]:Nh,[Rh.name]:Rh,[kh.name]:kh,[Lh.name]:Lh,[Eh.name]:Eh,[Fh.name]:Fh,[zh.name]:zh,[Gh.name]:Gh,[jh.name]:jh,[Wh.name]:Wh,[Kh.name]:Kh,[Yh.name]:Yh,[Xh.name]:Xh,[Qh.name]:Qh,[Jh.name]:Jh,[e1.name]:e1,[o1.name]:o1,[n1.name]:n1,[i1.name]:i1,[l1.name]:l1,[p1.name]:p1,[d1.name]:d1,[f1.name]:f1,[h1.name]:h1,[y1.name]:y1}});var S1={};Ve(S1,{BadgePosition:()=>el,_getBadges:()=>RD,addBadge:()=>yg,removeBadge:()=>vg});function yg(e){e.component&&=U.wrap(e.component,{noop:!0}),v1.add(e)}function vg(e){return v1.delete(e)}function RD(e){let t=[];for(let r of v1)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let o=We.BadgeAPI.getDonorBadges(e.user.id);return o&&t.unshift(...o),t}var el,v1,tl=y(()=>{"use strict";a();l();ce();Hr();el=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(el||{}),v1=new Set});var b1={};Ve(b1,{Badges:()=>OD,ChatButtons:()=>zD,Commands:()=>kD,ContextMenu:()=>HD,DataStore:()=>at,MemberListDecorators:()=>UD,MessageAccessories:()=>LD,MessageDecorations:()=>_D,MessageEvents:()=>DD,MessagePopover:()=>ED,Notices:()=>Dc,Notifications:()=>GD,ServerList:()=>BD,Settings:()=>FD,Styles:()=>$D});var DD,Dc,kD,at,LD,ED,OD,BD,_D,UD,FD,$D,GD,HD,zD,nr=y(()=>{"use strict";a();l();tl();hr();so();Ro();wo();cg();nc();mg();dn();Ei();yl();Tn();Nc();G();st();DD=kd,Dc=Np,kD=Op,at=Oo,LD=nf,ED=Dm,OD=S1,BD=kg,_D=dg,UD=lg,FD=bp,$D=np,GD=ip,HD=Yp,zD=Tg});var M1={};Ve(M1,{toggle:()=>w1});function x1(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function jD(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");x1("vencord-os-theme-values").textContent=`:root{${t}}`}async function w1(e){Qi?Qi.disabled=!e:e&&(Qi=x1("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{Qi.textContent=t,Qi.disabled=!H.useQuickCss}),Qi.textContent=await VencordNative.quickCss.get())}async function T1(){SI??=x1("vencord-themes");let{themeLinks:e,enabledThemes:t}=H,o=[...e];for(let r of t){let i=await VencordNative.themes.getThemeData(r);if(!i)continue;let s=new Blob([i],{type:"text/css"});o.push(URL.createObjectURL(s))}SI.textContent=o.map(r=>`@import url("${r.trim()}");`).join(` `)}var Qi,SI,I1=y(()=>{"use strict";a();l();G();document.addEventListener("DOMContentLoaded",()=>{jD(),T1(),w1(H.useQuickCss),Ht.addChangeListener("useQuickCss",w1),Ht.addChangeListener("themeLinks",T1),Ht.addChangeListener("enabledThemes",T1)})});var A1={};Ve(A1,{Common:()=>Pu,LazyComponentWebpack:()=>hu,_initWebpack:()=>Oa,_resolveReady:()=>Ea,addListener:()=>WI,cache:()=>sn,extract:()=>Ua,extractAndLoadChunks:()=>_1,extractAndLoadChunksLazy:()=>li,filters:()=>xe,find:()=>po,findAll:()=>Pr,findBulk:()=>Cr,findByCode:()=>_a,findByCodeLazy:()=>fo,findByProps:()=>yn,findByPropsLazy:()=>w,findComponentByCode:()=>yu,findComponentByCodeLazy:()=>Re,findComponentLazy:()=>vu,findExportedComponentLazy:()=>Uo,findLazy:()=>oo,findModuleFactory:()=>E1,findModuleId:()=>Ba,findStore:()=>O1,findStoreLazy:()=>Se,handleModuleNotFound:()=>_o,lazyWebpackSearchHistory:()=>jI,listeners:()=>gu,onceReady:()=>fu,proxyLazyWebpack:()=>mo,removeListener:()=>qI,search:()=>Su,subscriptions:()=>L1,waitFor:()=>yt,wreq:()=>to});var su=y(()=>{"use strict";a();l();x();z()});function TI(e){function t(o){try{wI(o[1])}catch(r){Lo.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,o)}t.$$vencordOriginal=e.push,t.bind=(...o)=>t.$$vencordOriginal.bind(...o),Object.defineProperty(e,"push",{get:()=>t,set(o){t.$$vencordOriginal=o},configurable:!0})}function wI(e){let{subscriptions:t,listeners:o}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],c="0,"+s.toString().replaceAll(` `,""),u=s,p=new Set,m=e[i]=function(g,v,b){try{s(g,v,b)}catch(I){if(s===u)throw I;return Lo.error("Error in patched chunk",I),void u(g,v,b)}if(v=g.exports,!!v){if(v===unsafeWindow&&b.c){Object.defineProperty(b.c,i,{value:b.c[i],enumerable:!1,configurable:!0,writable:!0});return}for(let I of o)try{I(v,i)}catch(A){Lo.error("Error in webpack listener",A)}for(let[I,A]of t)try{I(v)?(t.delete(I),A(v,i)):v.default&&I(v.default)&&(t.delete(I),A(v.default,i))}catch(M){Lo.error("Error while firing callback for webpack chunk",M)}}};m.toString=()=>s.toString(),m.original=u;for(let g=0;gc.replace(I,A));if(!(v.predicate&&!v.predicate())&&c.includes(v.find)){p.add(v.plugin);let I=s,A=c;for(let M of v.replacement){if(M.predicate&&!M.predicate())continue;let R=s,D=c;os(M,v.plugin);try{let C=b(M.match,M.replace);if(C===c){if(v.noWarn||Lo.warn(`Patch by ${v.plugin} had no effect (Module id is ${i}): ${M.match}`),v.group){Lo.warn(`Undoing patch group ${v.find} by ${v.plugin} because replacement ${M.match} had no effect`),c=A,s=I,p.delete(v.plugin);break}}else c=C,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...p].join(", ")} ${C} //# sourceURL=WebpackModule${i}`)}catch(C){if(Lo.error(`Patch by ${v.plugin} errored (Module id is ${i}): ${M.match} `,C),p.delete(v.plugin),v.group){Lo.warn(`Undoing patch group ${v.find} by ${v.plugin} because replacement ${M.match} errored`),c=A,s=I;break}c=D,s=R}}v.all||r.splice(g--,1)}}}}var bI,Lo,xI=y(()=>{"use strict";a();l();N();Xe();Ar();La();su();Lo=new ie("WebpackInterceptor","#8caaee");unsafeWindow[nn]?(Lo.info(`Patching ${nn}.push (was already existent, likely from cache!)`),Oa(unsafeWindow[nn]),TI(unsafeWindow[nn])):(Object.defineProperty(unsafeWindow,nn,{get:()=>bI,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Lo.info(`Patching ${nn}.push`),TI(e)),Oa(e)&&(Lo.info("Successfully initialised Vencord webpack"),delete unsafeWindow[nn],unsafeWindow[nn]=e)),bI=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Lo.info("Found webpack module factory"),wI(e)),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}))});var MI=y(()=>{"use strict";a();l();G();hi();Bt();bo();et();Ie();ze();Xn();lt();zr();x();bi();Jn()});async function WD(){if(H.cloud.authenticated&&!await nt("Vencord_cloudSecret")){Ue({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>gi.open("VencordCloud")});return}H.cloud.settingsSync&&H.cloud.authenticated&&(Ur.Vencord_settingsDirty?(await Si(),delete Ur.Vencord_settingsDirty):await fl(!1)&&Ue({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Cs}))}async function qD(){if(await fu,Fs("WebpackReady"),WD(),!1)try{}catch(e){}}var zm=y(()=>{"use strict";a();l();nr();Rl();Ou();I1();zr();su();I1();xI();MI();P();wo();Tn();G();Rl();Qa();Xn();Ns();zr();su();x();Fs("Init");qD();document.addEventListener("DOMContentLoaded",()=>{Fs("DOMContentLoaded")},{once:!0})});var KD={};Ve(KD,{Api:()=>b1,PlainSettings:()=>Mn,Plugins:()=>Jp,QuickCss:()=>M1,Settings:()=>H,Updater:()=>Ip,Util:()=>Eu,Webpack:()=>A1});a();l();a();l();a();l();a();l();var R1=` Vencord QuickCSS Editor