// ==UserScript== // @name Vencord // @description A Discord client mod - Web version // @version 1.11.9.1744298100698 // @author Vendicated (https://github.com/Vendicated) // @namespace https://github.com/Vendicated/Vencord // @supportURL https://github.com/Vendicated/Vencord // @icon https://raw.githubusercontent.com/Vendicated/Vencord/refs/heads/main/browser/icon.png // @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 d5=Object.create;var xc=Object.defineProperty;var m5=Object.getOwnPropertyDescriptor;var f5=Object.getOwnPropertyNames;var g5=Object.getPrototypeOf,h5=Object.prototype.hasOwnProperty;var la=(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 Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var Nv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),it=(e,t)=>{for(var o in t)xc(e,o,{get:t[o],enumerable:!0})},Av=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of f5(t))!h5.call(e,i)&&i!==o&&xc(e,i,{get:()=>t[i],enumerable:!(r=m5(t,i))||r.enumerable});return e};var Rv=(e,t,o)=>(o=e!=null?d5(g5(e)):{},Av(t||!e||!e.__esModule?xc(o,"default",{value:e,enumerable:!0}):o,e)),kv=e=>Av(xc({},"__esModule",{value:!0}),e);function y5(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 v5(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=()=>wg("arrayBuffer",c),s.text=()=>wg("text",c),s.json=async()=>JSON.parse(await wg("text",c)),s.headers=y5(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=g(()=>{"use strict";h=v5});var f,n,l=g(()=>{"use strict";f=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var An={};it(An,{clear:()=>T5,createStore:()=>Tc,del:()=>Nn,delMany:()=>x5,entries:()=>Cg,get:()=>zt,getMany:()=>S5,keys:()=>Ig,promisifyRequest:()=>bo,set:()=>Ao,setMany:()=>b5,update:()=>li,values:()=>w5});function bo(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Tc(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=bo(o);return(i,s)=>r.then(c=>s(c.transaction(t,i).objectStore(t)))}function Xo(){return Mg||(Mg=Tc("VencordData","VencordStore")),Mg}function zt(e,t=Xo()){return t("readonly",o=>bo(o.get(e)))}function Ao(e,t,o=Xo()){return o("readwrite",r=>(r.put(t,e),bo(r.transaction)))}function b5(e,t=Xo()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),bo(o.transaction)))}function S5(e,t=Xo()){return t("readonly",o=>Promise.all(e.map(r=>bo(o.get(r)))))}function li(e,t,o=Xo()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(bo(r.transaction))}catch(c){s(c)}}}))}function Nn(e,t=Xo()){return t("readwrite",o=>(o.delete(e),bo(o.transaction)))}function x5(e,t=Xo()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),bo(o.transaction)))}function T5(e=Xo()){return e("readwrite",t=>(t.clear(),bo(t.transaction)))}function Pg(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},bo(e.transaction)}function Ig(e=Xo()){return e("readonly",t=>{if(t.getAllKeys)return bo(t.getAllKeys());let o=[];return Pg(t,r=>o.push(r.key)).then(()=>o)})}function w5(e=Xo()){return e("readonly",t=>{if(t.getAll)return bo(t.getAll());let o=[];return Pg(t,r=>o.push(r.value)).then(()=>o)})}function Cg(e=Xo()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([bo(t.getAllKeys()),bo(t.getAll())]).then(([r,i])=>r.map((s,c)=>[s,i[c]]));let o=[];return e("readonly",r=>Pg(r,i=>o.push([i.key,i.value])).then(()=>o))})}var Mg,Vo=g(()=>{"use strict";a();l();});function fo(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var ci=g(()=>{"use strict";a();l()});function M5(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 Lv=g(()=>{"use strict";a();l()});var ca,Ng=g(()=>{"use strict";a();l();ca=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 P5,Ag,ua,pa,Rg,kg,wc,da,I5,d,os,I=g(()=>{"use strict";a();l();P5="Vencord.Webpack.Common.React",Ag="1017176847865352332",ua="1015060230222131221",pa="1042507929485586532",Rg="1026534353167208489",kg="1026504932959977532",wc="1026515880080842772",da="1108135649699180705",I5="1222936386626129920",d=Object.freeze({Ven:{name:"Vee",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n,badge:!1},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:"sunnie",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},arHSM:{name:"arHSM",id:841509053422632990n},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:"lillith <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},UlyssesZhan:{name:"UlyssesZhan",id:586808226058862623n},ant0n:{name:"ant0n",id:145224646868860928n},Board:{name:"BoardTM",id:285475344817848320n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Lexi:{name:"Lexi",id:506101469787717658n},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},Noxillio:{name:"Noxillio",id:138616536502894592n},Kyuuhachi:{name:"Kyuuhachi",id:236588665420251137n},nin0dev:{name:"nin0dev",id:886685857560539176n},Elvyra:{name:"Elvyra",id:708275751816003615n},HappyEnderman:{name:"Happy enderman",id:1083437693347827764n},Vishnya:{name:"Vishnya",id:282541644484575233n},Inbestigator:{name:"Inbestigator",id:761777382041714690n},newwares:{name:"newwares",id:421405303951851520n},JohnyTheCarrot:{name:"JohnyTheCarrot",id:132819036282159104n},puv:{name:"puv",id:469441552251355137n},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},HAHALOSAH:{name:"HAHALOSAH",id:903418691268513883n},GabiRP:{name:"GabiRP",id:507955112027750401n},ImBanana:{name:"Im_Banana",id:635250116688871425n},xocherry:{name:"xocherry",id:221288171013406720n},ScattrdBlade:{name:"ScattrdBlade",id:678007540608532491n},goodbee:{name:"goodbee",id:658968552606400512n},Moxxie:{name:"Moxxie",id:712653921692155965n},Ethan:{name:"Ethan",id:721717126523781240n},nyx:{name:"verticalsync.",id:1207087393929171095n},nekohaxx:{name:"nekohaxx",id:1176270221628153886n},Antti:{name:"Antti",id:312974985876471810n},Joona:{name:"Joona",id:297410829589020673n},sadan:{name:"sadan",id:521819891141967883n},Kylie:{name:"Cookie",id:721853658941227088n},AshtonMemer:{name:"AshtonMemer",id:373657230530052099n},surgedevs:{name:"Chloe",id:1084592643784331324n},Lumap:{name:"Lumap",id:585278686291427338n},Obsidian:{name:"Obsidian",id:683171006717755446n},SerStars:{name:"SerStars",id:861631850681729045n},niko:{name:"niko",id:341377368075796483n},relitrix:{name:"Relitrix",id:423165393901715456n},RamziAH:{name:"RamziAH",id:1279957227612147747n},SomeAspy:{name:"SomeAspy",id:516750892372852754n},jamesbt365:{name:"jamesbt365",id:158567567487795200n},samsam:{name:"samsam",id:836452332387565589n}}),os=Object.freeze(Object.fromEntries(Object.entries(d).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t])))});function tn(e,t=5){let o=0,r;return()=>(r===void 0&&t>o++&&(r=e(),r===void 0&&t===o&&console.error("Lazy factory failed:",e)),r)}function At(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[qn]:void 0,[en](){return!s[qn]&&t>i++&&(s[qn]=e(),!s[qn]&&t===i&&console.error("Lazy factory failed:",e)),s[qn]}});return new Proxy(s,{...Mc,get(c,u,p){if(u===qn||u===en)return Reflect.get(c,u,p);if(!o&&r)return At(()=>Reflect.get(c[en](),u,p),t,!0);let m=c[en]();if(typeof m=="object"||typeof m=="function")return Reflect.get(m,u,p);throw new Error("proxyLazy called on a primitive value")}})}var Ev,Mc,en,qn,So=g(()=>{"use strict";a();l();Ev=["arguments","caller","prototype"],Mc={},en=Symbol.for("vencord.lazy.get"),qn=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Mc[e]=(t,...o)=>Reflect[e](t[en](),...o);Mc.ownKeys=e=>{let t=e[en](),o=Reflect.ownKeys(t);for(let r of Ev)o.includes(r)||o.push(r);return o};Mc.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Ev.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[en](),t);return o&&Object.defineProperty(e,t,o),o}});function ct(e,t=5){let o=tn(e,t),r=i=>{let s=o()??C5;return n(s,{...i})};return r.$$vencordInternal=o,r}var C5,ma=g(()=>{"use strict";a();l();So();C5=()=>null});var ee,Ne=g(()=>{"use strict";a();l();ee=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 _v(e,t,o,r){return BigInt(e)|BigInt(t)<<16n|BigInt(o)<<32n|BigInt(r)<<48n}function Kn(e,t){return BigInt(e[t])|BigInt(e[t+1])<<8n|BigInt(e[t+2])<<16n|BigInt(e[t+3])<<24n|BigInt(e[t+4])<<32n|BigInt(e[t+5])<<40n|BigInt(e[t+6])<<48n|BigInt(e[t+7])<<56n}function Ht(e,t){return e<>Fv-t}function Te(e){return BigInt.asUintN(64,e)}function Pc(e,t=0){return new Dg(t).update(e).digest()}var Ot,ao,Ov,fa,Bv,Fv,N5,A5,Dg,Lg=g(()=>{a();l();Ot=11400714785074694791n,ao=14029467366897019727n,Ov=1609587929392839161n,fa=9650029242287828579n,Bv=2870177450012600261n,Fv=64n,N5=2n**Fv-1n,A5=new TextEncoder;Dg=class{#t;#o;#n;#r;#i;#s;#a;#e;constructor(t=0){this.reset(t)}reset(t=this.#t){return this.#t=BigInt.asUintN(32,BigInt(t)),this.#o=Te(this.#t+Ot+ao),this.#n=Te(this.#t+ao),this.#r=this.#t,this.#i=Te(this.#t-Ot),this.#s=null,this.#a=0,this.#e=0,this}update(t){typeof t=="string"&&(t=A5.encode(t));let o=0,r=t.length,i=o+r;if(r===0)return this;if(this.#a+=r,this.#e===0&&(this.#s=new Uint8Array(32)),this.#e+r<32)return this.#s.set(t.subarray(0,r),this.#e),this.#e+=r,this;if(this.#e>0){this.#s.set(t.subarray(0,32-this.#e),this.#e);let s=0,c;c=Kn(this.#s,s),this.#o=Te(Ht(Te(this.#o+c*ao),31n)*Ot),s+=8,c=Kn(this.memory,s),this.#n=Te(Ht(Te(this.#n+c*ao),31n)*Ot),s+=8,c=Kn(this.memory,s),this.#r=Te(Ht(Te(this.#r+c*ao),31n)*Ot),s+=8,c=Kn(this.memory,s),this.#i=Te(Ht(Te(this.#i+c*ao),31n)*Ot),o+=32-this.#e,this.#e=0}if(o<=i-32){let s=i-32;do{let c;c=Kn(t,o),this.#o=Te(Ht(Te(this.#o+c*ao),31n)*Ot),o+=8,c=Kn(t,o),this.#n=Te(Ht(Te(this.#n+c*ao),31n)*Ot),o+=8,c=Kn(t,o),this.#r=Te(Ht(Te(this.#r+c*ao),31n)*Ot),o+=8,c=Kn(t,o),this.#i=Te(Ht(Te(this.#i+c*ao),31n)*Ot),o+=8}while(o<=s)}return o=32?(i=Ht(this.#o,1n)+Ht(this.#n,7n)+Ht(this.#r,12n)+Ht(this.#i,18n),i=Te(i^Ht(Te(this.#o*ao),31n)*Ot),i=Te(i*Ot+fa),i=Te(i^Ht(Te(this.#n*ao),31n)*Ot),i=Te(i*Ot+fa),i=Te(i^Ht(Te(this.#r*ao),31n)*Ot),i=Te(i*Ot+fa),i=Te(i^Ht(Te(this.#i*ao),31n)*Ot),i=Te(i*Ot+fa)):i=Te(this.#t+Bv),i+=BigInt(this.#a);r<=o-8;)c=Kn(t,r),c=Te(Ht(Te(c*ao),31n)*Ot),i=Te(Ht(i^c,27n)*Ot+fa),r+=8;for(r+4<=o&&(c=_v(t[r+1]<<8|t[r],t[r+3]<<8|t[r+2],0,0),i=Te(Ht(i^Te(c*Ot),23n)*ao+Ov),r+=4);r>33n),i=Te((i^s)*ao),s=Te(i>>29n),i=Te((i^s)*Ov),s=Te(i>>32n),i=Te(i^s),i}}});function k5(e){e=BigInt(e);let t=[],o=Math.ceil(Math.floor(Math.log2(Number(e))+1)/8);for(let i=0;i>BigInt(8*i)&BigInt(255)));let r=new Uint8Array(t);return R5?r:r.reverse()}function Rn(e){let t=Pc(e,0),o=k5(t);return[ns[o[0]>>2],ns[(o[0]&3)<<4|o[1]>>4],ns[(o[1]&15)<<2|o[2]>>6],ns[o[2]&63],ns[o[3]>>2],ns[(o[3]&3)<<4|o[3]>>4]].join("")}var ns,R5,rs=g(()=>{"use strict";a();l();Lg();ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),R5=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})()});function Rt(e){let t=typeof e=="string"?e:e.source;if(t=t.replaceAll(/#{intl::([\w$+/]*)(?:::(\w+))?}/g,(i,s,c)=>{let u=c==="raw"?s:Rn(s),p=typeof e=="string";return!Number.isNaN(Number(u[0]))||u.includes("+")||u.includes("/")?p?`["${u}"]`:String.raw`(?:\["${u}"\])`.replaceAll("+","\\+"):p?`.${u}`:String.raw`(?:\.${u})`}),typeof e=="string")return t;let o=t.replaceAll("\\i",String.raw`(?:[A-Za-z_$][\w$]*)`),r=new RegExp(o,e.flags);return r.toString=e.toString.bind(e),r}function ga(e,t){return typeof e!="function"?e.replaceAll("$self",t):(...o)=>e(...o).replaceAll("$self",t)}function Ic(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 ui(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Ic(o.match,Rt),o.replace=Ic(o.replace,r=>ga(r,t)),Object.defineProperties(e,o)}function Eg(e){let t=Object.getOwnPropertyDescriptors(e);t.find=Ic(t.find,Rt),Object.defineProperties(e,t)}var Bo=g(()=>{"use strict";a();l();rs()});function D5(e,t,o){return function(...r){return[t.apply(this,r),0]}}function L5(e,t,o){return t}var Uv,Yn,Cc=g(()=>{"use strict";a();l();Ne();Uv=D5,Yn=L5});var Oc={};it(Oc,{ChunkIdsRegex:()=>Ec,DefaultExtractAndLoadChunksRegex:()=>Lc,LazyComponentWebpack:()=>Rc,_blacklistBadModules:()=>Ac,_initWebpack:()=>ba,_resolveReady:()=>ha,cache:()=>jo,extract:()=>wa,extractAndLoadChunks:()=>_g,extractAndLoadChunksLazy:()=>Zn,factoryListeners:()=>va,filters:()=>F,find:()=>qo,findAll:()=>kr,findBulk:()=>Dr,findByCode:()=>Ta,findByCodeLazy:()=>ve,findByProps:()=>xa,findByPropsLazy:()=>L,findComponentByCode:()=>kc,findComponentByCodeLazy:()=>le,findComponentLazy:()=>Dc,findExportedComponentLazy:()=>Wv,findLazy:()=>Tt,findModuleFactory:()=>Sa,findModuleId:()=>Lr,findStore:()=>Og,findStoreLazy:()=>be,fluxStores:()=>di,handleModuleNotFound:()=>kn,lazyWebpackSearchHistory:()=>Hv,mapMangledModule:()=>Bg,mapMangledModuleLazy:()=>ze,moduleListeners:()=>Nc,onceReady:()=>mi,proxyLazyWebpack:()=>Ro,search:()=>is,stringMatches:()=>ya,waitFor:()=>Ke,waitForSubscriptions:()=>fi,wreq:()=>yt});function ba(e){yt=e,jo=e.c,Reflect.defineProperty(e.c,Symbol.toStringTag,{value:"ModuleCache",configurable:!0,writable:!0,enumerable:!1})}function Gv(e){return e==null||e===unsafeWindow||e===document||e===document.documentElement||e[Symbol.toStringTag]==="DOMTokenList"||e[Symbol.toStringTag]==="IntlMessagesProxy"?!0:e[$v]!==void 0?(Reflect.deleteProperty(e,$v),!0):e instanceof E5}function zv(e,t){let o=Object.getOwnPropertyDescriptor(e,t);o!=null&&Reflect.defineProperty(e,t,{...o,enumerable:!1})}function Ac(e,t,o){if(Gv(t))return zv(e,o),!0;if(typeof t!="object")return!1;let r=!0;for(let i in t)Gv(t[i])?zv(t,i):r=!1;return r}function kn(e,...t){let o=new Error(`webpack.${e} found no module`);pi.error(o,"Filter:",t)}function kr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in jo){let r=jo[o];if(!(!r?.loaded||r.exports==null)&&(e(r.exports)&&t.push(r.exports),typeof r.exports=="object"))for(let i in r.exports){let s=r.exports[i];s&&e(s)&&t.push(s)}}return t}function Sa(...e){let t=Lr(...e);return t?yt.m[t]:null}function Ro(e,t){return At(e,t)}function Rc(e,t){return ct(e,t)}function Tt(e){return At(()=>qo(e))}function xa(...e){let t=qo(F.byProps(...e),{isIndirect:!0});return t||kn("findByProps",...e),t}function L(...e){return At(()=>xa(...e))}function Ta(...e){let t=qo(F.byCode(...e),{isIndirect:!0});return t||kn("findByCode",...e),t}function ve(...e){return At(()=>Ta(...e))}function Og(e){let t=di[e];if(t==null){for(let o of gi.Store.getAll?.()??[]){let r=o.getName();r===e&&(t=o),di[r]==null&&(di[r]=o)}t==null&&(t=qo(F.byStoreName(e),{isIndirect:!0}))}return t||kn("findStore",e),t}function be(e){return At(()=>Og(e))}function kc(...e){let t=qo(F.componentByCode(...e),{isIndirect:!0});return t||kn("findComponentByCode",...e),t}function Dc(e){return ct(()=>{let t=qo(e,{isIndirect:!0});return t||kn("findComponent",e),t})}function le(...e){return ct(()=>{let t=qo(F.componentByCode(...e),{isIndirect:!0});return t||kn("findComponentByCode",...e),t})}function Wv(...e){return ct(()=>{let t=qo(F.byProps(...e),{isIndirect:!0});return t||kn("findExportedComponent",...e),t[e[0]]})}function O5(e,t){let o=new Set,r=t?Object.getOwnPropertyNames:Object.keys;do r(e).forEach(i=>i!=="__esModule"&&o.add(i)),e=Object.getPrototypeOf(e);while(e!=null);return o}function ze(e,t,o=!1){return At(()=>Bg(e,t,o))}async function _g(e,t=Lc){let o=Sa(...e);if(!o){let p=new Error("extractAndLoadChunks: Couldn't find module factory");return pi.warn(p,"Code:",e,"Matcher:",t),!1}let r=String(o).match(Rt(t));if(!r){let p=new Error("extractAndLoadChunks: Couldn't find chunk loading in module factory code");return pi.warn(p,"Code:",e,"Matcher:",t),!1}let[,i,s]=r;if(s==null){let p=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the chunk ids array or the entry point id");return pi.warn(p,"Code:",e,"Matcher:",t),!1}let c=Number(s),u=Number.isNaN(c)?s:c;if(i){let p=Array.from(i.matchAll(Ec)).map(m=>{let y=Number(m[1]);return Number.isNaN(y)?m[1]:y});await Promise.all(p.map(m=>yt.e(m)))}if(yt.m[u]==null){let p=new Error("extractAndLoadChunks: Entry point is not loaded in the module factories, perhaps one of the chunks failed to load");return pi.warn(p,"Code:",e,"Matcher:",t),!1}return yt(u),!0}function Zn(e,t=Lc){return tn(()=>_g(e,t))}function Ke(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=F.byProps(e);else if(Array.isArray(e))e=F.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(jo!=null){let[r,i]=qo(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}fi.set(e,t)}function is(...e){e=e.map(Rt);let t={},o=yt.m;for(let r in o){let i=o[r];ya(i.toString(),e)&&(t[r]=i)}return t}function wa(e){let t=yt.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 pi,ha,mi,yt,jo,di,ya,F,fi,Nc,va,E5,$v,qo,Dr,Lr,Hv,Bg,Lc,Ec,G=g(()=>{"use strict";a();l();So();ma();Ne();Bo();Cc();T();pi=new ee("Webpack"),mi=new Promise(e=>ha=e),di={},ya=(e,t)=>t.every(o=>typeof o=="string"?e.includes(o):(o.global&&(o.lastIndex=0),o.test(e))),F={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>{let t=e.map(Rt),o=r=>typeof r!="function"?!1:ya(Function.prototype.toString.call(r),t);return o.$$vencordProps=[...e],o},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=F.byCode(...e),o=r=>{let i=r;for(;i!=null;){if(t(i))return!0;if(i.$$typeof)if(i.type)i=i.type;else if(i.render)i=i.render;else return!1;else return!1}return!1};return o.$$vencordProps=[...e],o}},fi=new Map,Nc=new Set,va=new Set;E5=Object.getPrototypeOf(Int8Array),$v="is this a proxy that returns values for any key?";qo=Yn("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 jo){let s=jo[i];if(!(!s?.loaded||s.exports==null)){if(t(s.exports))return r?[s.exports,i]:s.exports;if(typeof s.exports=="object")for(let c in s.exports){let u=s.exports[c];if(u&&t(u))return r?[u,i]:u}}}return o||kn("find",t),r?[null,null]:null});Dr=Yn("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 qo(t[0]);let r=t,i=0,s=Array(o);e:for(let c in jo){let u=jo[c];if(!(!u?.loaded||u.exports==null))for(let p=0;p{"use strict";a();l();G();B5=Tt(e=>e.image&&e.modal&&!e.applicationIcon),Bc=L("buttonWrapper","buttonContent")});function W(...e){return e.filter(Boolean).join(" ")}function on(e){return new Promise(t=>setTimeout(t,e))}function Yt(e,t="Copied to clipboard!"){eo.SUPPORTS_COPY?eo.copy(e):t="Your browser does not support copying to clipboard",oe.show({message:t,id:oe.genId(),type:oe.Type.SUCCESS})}function _5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Qn(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function F5(e){try{return new URL(e)}catch{return null}}function ss(e){return e}function Ug(e,t,o=t+"s"){return e===1?`${e} ${t}`:`${e} ${o}`}function Ma(e,...t){return t.some(o=>o==null)?"":String.raw({raw:e},...t)}function $g(e,t){try{let o=e();return o instanceof Promise?o.catch(()=>t):o}catch{return t}}var Fg,U5,nn,fe=g(()=>{"use strict";a();l();T();I();Fg=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,unsafeWindow.innerHeight);return!(t.bottom<0||t.top-o>=0)};U5=navigator.userAgent.includes("Mobi"),nn=e=>Object.hasOwn(os,e)});function kt(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=q({value:o.fallbackValue,error:null,pending:!0});return ue(()=>{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 Jn(e){let t=as(o=>o+1,0);return e?t:t[1]}function Pa({interval:e=1e3,deps:t=[]}){let[o,r]=q(0),i=Re(()=>Date.now(),t);return ue(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var Gg,$5,wt=g(()=>{"use strict";a();l();T();fe();ma();Gg=()=>null,$5=(e=!1)=>{let t=te.useRef(null),[o,r]=q(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(Fg(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 mt(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=ct(()=>o);return Ke(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function to(e,t){Ke(F.byStoreName(e),t,{isIndirect:!0})}var zg=g(()=>{"use strict";a();l();wt();G()});var G5,z5,H5,W5,x,oo,A,Ko,Hg,qv,re,Xn,Bt,_c,X,j5,Yo,ls,cs,us,Wg,xo,jg,Vn,Ia,Ca,rn,q5,Er,K5,Y5,Fc,Na,Aa,lo,ps,hi,Uc,Kv=g(()=>{"use strict";a();l();ma();G();zg();G5=mt("FormTitle",F.componentByCode('["defaultMargin".concat','="h5"')),z5=mt("FormText",F.componentByCode(".SELECTABLE),",".DISABLED:")),H5=mt("FormSection",F.componentByCode(".titleId)")),W5=mt("FormDivider",F.componentByCode(".divider,",",style:",'"div"',/\.divider,\i\),style:/)),x={FormTitle:G5,FormText:z5,FormSection:H5,FormDivider:W5},oo=mt("Card",F.componentByCode(".editable),",".outline:")),A=mt("Button",F.componentByCode("#{intl::A11Y_LOADING_STARTED}))),!1")),Ko=mt("Switch",F.componentByCode(".labelRow,ref:",".disabledText")),Hg=mt("Checkbox",F.componentByCode(".checkboxWrapperDisabled:")),qv=ze(".tooltipTop,bottom:",{Tooltip:F.componentByCode("this.renderTooltip()]"),TooltipContainer:F.componentByCode('="div"')}),re=ct(()=>qv.Tooltip),Xn=ct(()=>qv.TooltipContainer),Bt=mt("TextInput",F.componentByCode(".error]:this.hasError()")),_c=mt("TextArea",F.componentByCode("this.getPaddingRight()},id:")),X=mt("Text",F.componentByCode('case"always-white"')),j5=mt("Heading",F.componentByCode(">6?{","variant:")),Yo=mt("Select",F.componentByCode('.selectPositionTop]:"top"===','"Escape"===')),ls=mt("SearchableSelect",F.componentByCode('.selectPositionTop]:"top"===',".multi]:")),cs=mt("Slider",F.componentByCode('"markDash".concat(')),us=mt("Popout",F.componentByCode("ref:this.ref,","renderPopout:this.renderPopout,")),Wg=mt("Dialog",F.componentByCode('role:"dialog",tabIndex:-1')),xo=mt("TabBar",F.componentByCode("ref:this.tabBarRef,className:")),jg=mt("Paginator",F.componentByCode('rel:"prev",children:')),Vn=mt("Clickable",F.componentByCode("this.context?this.renderNonInteractive():")),Ia=mt("Avatar",F.componentByCode(".size-1.375*"));Ke(F.byCode('="ltr",orientation:',"customTheme:","forwardRef"),e=>Ca=e);Ke(["thin","auto","customTheme"],e=>rn=e);q5=ct(()=>Ca(rn.none,rn.fade,rn.customTheme)),Er=ct(()=>Ca(rn.thin,rn.fade,rn.customTheme)),K5=ct(()=>Ca(rn.auto,rn.fade,rn.customTheme)),{FocusLock_:Y5}=ze('document.getElementById("app-mount"))',{FocusLock_:F.componentByCode(".containerRef")}),Fc=ct(()=>Y5);Ke(e=>{if(typeof e!="function")return!1;let t=String(e);return t.includes(".resolve({theme:null")&&!t.includes("useMemo")},e=>Na=e);Aa=mt("MaskedLink",F.componentByCode("MASKED_LINK)")),lo=mt("Timestamp",F.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}")),ps=mt("Flex",["Justify","Align","Wrap"]),hi=mt("OAuth2AuthorizeModal",F.componentByCode(".authorize,children:",".contentBackground")),Uc=ze(".assign({colorNames:",{Transition:F.componentByCode('["items","children"]',",null,"),animated:F.byProps("div","text")})});var B,Dt,Yv=g(()=>{"use strict";a();l();G();B={};Ke(e=>e.name==="MenuCheckboxItem",(e,t)=>{let o=yt(t);for(let r of Object.values(o))typeof r=="function"&&r.name.startsWith("Menu")&&(B[r.name]=r)});Ke(F.componentByCode('path:["empty"]'),e=>B.Menu=e);Ke(F.componentByCode("sliderContainer","slider","handleSize:16","=100"),e=>B.MenuSliderControl=e);Ke(F.componentByCode('role:"searchbox',"top:2","query:"),e=>B.MenuSearchControl=e);Dt=ze('type:"CONTEXT_MENU_OPEN',{closeContextMenu:F.byCode("CONTEXT_MENU_CLOSE"),openContextMenu:F.byCode("renderLazy:"),openContextMenuLazy:e=>typeof e=="function"&&e.toString().length<100})});var te,q,ue,yi,Re,vt,as,$c,vi,Zv=g(()=>{"use strict";a();l();G();vi=L("createPortal","render");Ke("useState",e=>{te=e,{useEffect:ue,useState:q,useLayoutEffect:yi,useMemo:Re,useRef:vt,useReducer:as,useCallback:$c}=te})});var gi,no,Zt,Ra,Be,er,bi,sn,pe,E,Qt,Ee,To,ae,ke,_e,an,ln,ka,Da,Se,Qv=g(()=>{"use strict";a();l();G();zg();gi=L("connectStores"),no=L("ChannelMessage","SlashCommand"),Ra=L("openPrivateChannel"),Se=ve("useStateFromStores");to("DraftStore",e=>Da=e);to("UserStore",e=>E=e);to("UserProfileStore",e=>Qt=e);to("ChannelStore",e=>ae=e);to("SelectedChannelStore",e=>Ee=e);to("SelectedGuildStore",e=>To=e);to("GuildStore",e=>pe=e);to("GuildMemberStore",e=>ke=e);to("RelationshipStore",e=>_e=e);to("PermissionStore",e=>Be=e);to("PresenceStore",e=>sn=e);to("ReadStateStore",e=>bi=e);to("GuildChannelStore",e=>er=e);to("MessageStore",e=>Zt=e);to("WindowStore",e=>ka=e);to("EmojiStore",e=>an=e);to("ThemeStore",e=>ln=e)});var Jv={};var Xv=g(()=>{"use strict";a();l()});var Vv={};var eb=g(()=>{"use strict";a();l()});var Kg={};it(Kg,{DisplayProfile:()=>qg});var qg,tb=g(()=>{"use strict";a();l();qg=class{userId;banner;bio;pronouns;accentColor;themeColors;popoutAnimationParticleType;profileEffectId;_userProfile;_guildMemberProfile;canUsePremiumProfileCustomization;canEditThemes;premiumGuildSince;premiumSince;premiumType;primaryColor}});var La,ob=g(()=>{"use strict";a();l();G();La={FrecencyUserSettingsActionCreators:Tt(e=>e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")),PreloadedUserSettingsActionCreators:Tt(e=>e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings"))}});function ut(e,t=nb.MESSAGE,o){oe.show(oe.create(e,t,o))}var z,ko,Lt,Mt,Or,Z5,ds,Yg,Si,cn,wo,Fe,ft,nb,Q5,oe,go,xi,Ea,Ti,eo,un,ms,fs,Ie,wi,Zg,_o,Gc,Qg,Jg,_t,Oa,J5,X5,V5,Br,rb=g(()=>{"use strict";a();l();G();Ke(["dispatch","subscribe"],e=>{z=e,Vencord.Plugins.subscribeAllPluginsFluxEvents(e);let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),ha()};e.subscribe("CONNECTION_OPEN",t)});Ke(["dispatchToLastSubscribed"],e=>ko=e);Lt=ze('ME:"/users/@me"',{Endpoints:F.byProps("USER","ME"),UserFlags:F.byProps("STAFF","SPAMMER"),FriendsSections:e=>e.PENDING==="PENDING"&&e.ADD_FRIEND}),Mt=Tt(e=>typeof e=="object"&&e.del&&e.put),Or=L("parseTwoDigitYear"),Z5=L("highlight","registerLanguage"),{match:ds,P:Yg}=ze("@ts-pattern/matcher",{match:F.byCode("return new"),P:F.byProps("when")}),Si=L("debounce","cloneDeep"),cn=ze('defaultLocale:"en-US"',{t:e=>e?.[Symbol.toStringTag]==="IntlMessagesProxy",intl:e=>e!=null&&Object.getPrototypeOf(e)?.withFormatters!=null},!0);Ke(["fromTimestamp","extractTimestamp"],e=>wo=e);Ke("parseTopic",e=>Fe=e);Ke(["show","close"],e=>ft=e);nb={MESSAGE:"message",SUCCESS:"success",FAILURE:"failure",CUSTOM:"custom",CLIP:"clip",LINK:"link",FORWARD:"forward",BOOKMARK:"bookmark",CLOCK:"clock"},Q5={TOP:0,BOTTOM:1},oe={Type:nb,Position:Q5,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Ke("showToast",e=>{oe.show=e.showToast,oe.pop=e.popToast,oe.create=e.createToast});go={getUser:ve(".USER(")},xi=L("clearAll","addFile"),Ea={promptToUpload:ve("#{intl::ATTACHMENT_TOO_MANY_ERROR_TITLE}")},Ti=ze("getAssetImage: size must === [",{fetchAssetIds:F.byCode('.startsWith("http:")',".dispatch({"),getAssetFromImageURL:F.byCode("].serialize(",',":"'),getAssetImage:F.byCode("getAssetImage: size must === ["),getAssets:F.byCode(".assets")}),eo=ze('queryCommandEnabled("copy")',{copy:F.byCode(".copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),un=ze("Transitioning to ",{transitionTo:F.byCode("transitionTo -"),transitionToGuild:F.byCode("transitionToGuild -"),back:F.byCode("goBack()"),forward:F.byCode("goForward()")}),ms=ze('"Thread must have a parent ID."',{transitionToChannel:F.byCode(".preload"),transitionToThread:F.byCode('"Thread must have a parent ID."')});Ke(["open","saveAccountChanges"],e=>fs=e);Ie=Tt(e=>typeof e.ADMINISTRATOR=="bigint"),{zustandCreate:wi}=ze(["useSyncExternalStoreWithSelector:","Object.assign"],{zustandCreate:F.byCode(/=>(\i)\?\i\(\1/)}),{zustandPersist:Zg}=ze(".onRehydrateStorage)?",{zustandPersist:F.byCode(/(\(\i,\i\))=>.+?\i\1/)}),_o=L("editMessage","sendMessage"),Gc=L("clearCache","_channelMessages"),Qg=L("openUserProfileModal","closeUserProfileModal"),Jg=L("resolveInvite"),_t=L("getGuildBannerURL","getUserAvatarURL"),Oa=ze("expression-picker-last-active-view",{openExpressionPicker:F.byCode(/setState\({activeView:(?:(?!null)\i),activeViewType:/),closeExpressionPicker:F.byCode("setState({activeView:null"),toggleMultiExpressionPicker:F.byCode(".EMOJI,"),toggleExpressionPicker:F.byCode(/getState\(\)\.activeView===\i\?\i\(\):\i\(/),setExpressionPickerView:F.byCode(/setState\({activeView:\i,lastActiveView:/),setSearchQuery:F.byCode("searchQuery:"),useExpressionPickerStore:F.byCode(/\(\i,\i=\i\)=>/)}),J5=ze('type:"POPOUT_WINDOW_OPEN"',{open:F.byCode('type:"POPOUT_WINDOW_OPEN"'),close:F.byCode('type:"POPOUT_WINDOW_CLOSE"'),setAlwaysOnTop:F.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"')}),X5=L("useName","getGlobalName"),V5=ze(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/,{getDisplayProfile:F.byCode(".getGuildMemberProfile("),useDisplayProfile:F.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)}),Br=ze("millisecondsInUnit:",{calendarFormat:F.byCode("sameElse"),dateFormat:F.byCode('":'),isSameDay:F.byCode("Math.abs(+"),diffAsUnits:F.byCode("days:0","millisecondsInUnit")})});var gs={};it(gs,{Alerts:()=>ft,Animations:()=>Uc,ApplicationAssetUtils:()=>Ti,Avatar:()=>Ia,Button:()=>A,ButtonWrapperClasses:()=>Bc,Card:()=>oo,ChannelRouter:()=>ms,ChannelStore:()=>ae,Checkbox:()=>Hg,Clickable:()=>Vn,Clipboard:()=>eo,ComponentDispatch:()=>ko,ComponentTypes:()=>Jv,Constants:()=>Lt,ContextMenuApi:()=>Dt,DateUtils:()=>Br,Dialog:()=>Wg,DisplayProfileUtils:()=>V5,DraftStore:()=>Da,DraftType:()=>no,EmojiStore:()=>an,ExpressionPickerStore:()=>Oa,Flex:()=>ps,Flux:()=>gi,FluxDispatcher:()=>z,FocusLock:()=>Fc,Forms:()=>x,GuildChannelStore:()=>er,GuildMemberStore:()=>ke,GuildStore:()=>pe,Heading:()=>j5,IconUtils:()=>_t,InviteActions:()=>Jg,MaskedLink:()=>Aa,Menu:()=>B,MenuTypes:()=>Vv,MessageActions:()=>_o,MessageCache:()=>Gc,MessageStore:()=>Zt,ModalImageClasses:()=>B5,NavigationRouter:()=>un,OAuth2AuthorizeModal:()=>hi,P:()=>Yg,Paginator:()=>jg,Parser:()=>Fe,PermissionStore:()=>Be,PermissionsBits:()=>Ie,Popout:()=>us,PopoutActions:()=>J5,PresenceStore:()=>sn,PrivateChannelsStore:()=>Ra,React:()=>te,ReactDOM:()=>vi,ReadStateStore:()=>bi,RelationshipStore:()=>_e,RestAPI:()=>Mt,ScrollerAuto:()=>K5,ScrollerNone:()=>q5,ScrollerThin:()=>Er,SearchableSelect:()=>ls,Select:()=>Yo,SelectedChannelStore:()=>Ee,SelectedGuildStore:()=>To,SettingsRouter:()=>fs,Slider:()=>cs,SnowflakeUtils:()=>wo,Switch:()=>Ko,TabBar:()=>xo,Text:()=>X,TextArea:()=>_c,TextInput:()=>Bt,ThemeStore:()=>ln,Timestamp:()=>lo,Toasts:()=>oe,Tooltip:()=>re,TooltipContainer:()=>Xn,UploadHandler:()=>Ea,UploadManager:()=>xi,UserProfileActions:()=>Qg,UserProfileStore:()=>Qt,UserSettingsActionCreators:()=>La,UserStore:()=>E,UserUtils:()=>go,UsernameUtils:()=>X5,UtilTypes:()=>Kg,WindowStore:()=>ka,createScroller:()=>Ca,hljs:()=>Z5,i18n:()=>cn,lodash:()=>Si,match:()=>ds,moment:()=>Or,scrollerClasses:()=>rn,showToast:()=>ut,useCallback:()=>$c,useEffect:()=>ue,useLayoutEffect:()=>yi,useMemo:()=>Re,useReducer:()=>as,useRef:()=>vt,useState:()=>q,useStateFromStores:()=>Se,useToken:()=>Na,zustandCreate:()=>wi,zustandPersist:()=>Zg});var T=g(()=>{"use strict";a();l();jv();Kv();Yv();Zv();Qv();Xv();eb();tb();ob();rb()});var Fo,hs,Ae,Ue,De,bt,pt,Xg,Ba,_a,Ce,tr,Dn,Ye=g(()=>{"use strict";a();l();G();wt();Fo=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Fo||{}),hs=ze(':"thin")',{ModalRoot:F.componentByCode('.MODAL,"aria-labelledby":'),ModalHeader:F.componentByCode(",id:"),ModalContent:F.componentByCode(".content,"),ModalFooter:F.componentByCode(".footer,"),ModalCloseButton:F.componentByCode(".close]:")}),Ae=ct(()=>hs.ModalRoot),Ue=ct(()=>hs.ModalHeader),De=ct(()=>hs.ModalContent),bt=ct(()=>hs.ModalFooter),pt=ct(()=>hs.ModalCloseButton),Xg=ve("hasMediaOptions","shouldHideMediaOptions"),Ba=ze(".modalKey?",{openModalLazy:F.byCode(".modalKey?"),openModal:F.byCode(",instant:"),closeModal:F.byCode(".onCloseCallback()"),closeAllModals:F.byCode(".getState();for")}),{openModalLazy:_a,openModal:Ce,closeModal:tr,closeAllModals:Dn}=Ba});function we(e,t){return ib(Rn(e),t,e)}function ib(e,t,o){try{return t==null?cn.intl.string(cn.t[e]):cn.intl.format(cn.t[e],t)}catch(r){return eA.error(`Failed to get intl message for key: ${o??e}`,r),o??""}}async function Mi(e){let{invite:t}=await Jg.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return z.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;z.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),z.subscribe("INVITE_MODAL_CLOSE",r=()=>{z.unsubscribe("INVITE_MODAL_CLOSE",r),z.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function Uo(){return ae.getChannel(Ee.getChannelId())}function or(){return pe.getGuild(Uo()?.guild_id)}function tA(e){Ra.openPrivateChannel(e)}function _r(){return La.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function Pi(e){ko.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function ys(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return _o.sendMessage(e,i,o,r)}function $o(e,t){return Xg({items:[{type:"IMAGE",original:e.original??e.url,...e}],...t})}async function Go(e){if(!await go.getUser(e))throw new Error("No such user: "+e);let o=To.getGuildId();Qg.openUserProfileModal({userId:e,guildId:o,channelId:Ee.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Vg(e,t){let o=Qt.getUserProfile(e);if(o)return o;z.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await Mt.get({url:Lt.Endpoints.USER_PROFILE(e),query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return z.dispatch({type:"USER_UPDATE",user:r.user}),await z.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&z.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),Qt.getUserProfile(e)}function nr(e){return e.discriminator==="0"?e.username:e.tag}function zc(e,t,o){let r=_t.getEmojiURL({id:e,animated:t,size:o});return t?r.replace(".webp",".gif"):r}var eA,Fa,Me=g(()=>{"use strict";a();l();T();rs();Ne();Ye();eA=new ee("IntlManager");Fa=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Fa||{})});function Hc(e){return!!e}function rr(e){return e!=null}var vs=g(()=>{"use strict";a();l()});var Ii,Wc=g(()=>{"use strict";a();l();({localStorage:Ii}=unsafeWindow)});var sb,H,He=g(()=>{"use strict";a();l();sb="",H={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;H[`${e}${t}`]=o,sb+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:sb,id:"vencord-margins"})),{once:!0})});function bs(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},bs(e[o],r)):e[o]??=r}return e}var jc=g(()=>{"use strict";a();l()});function Ci(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Ua=g(()=>{"use strict";a();l()});var Mo,Fr=g(()=>{"use strict";a();l();Mo=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 ab(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ga(e,t,o=!1){let r=Or.duration(e,t),i=uA.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} ${ab(m,p===1,o)}`)}return u.length?u:`0 ${ab(t,!1,o)}`}function pA(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 Ni(e,t){let o="```";return`${o}${t||""} ${e.replaceAll("```","\\`\\`\\`")} ${o}`}function dA(e,...t){let o=String.raw({raw:e},...t),r=o.match(/^[ \t]*(?=\S)/gm);if(!r)return o.trim();let i=r.reduce((s,c)=>Math.min(s,c.length),1/0);return o.replace(new RegExp(`^[ \\t]{${i}}`,"gm"),"").trim()}function mA(e){return"``"+$a+e.replaceAll("`",$a+"`"+$a)+$a+"``"}var pn,oA,nA,rA,iA,sA,aA,lA,cA,zo,uA,$a,Zo=g(()=>{"use strict";a();l();T();pn=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),oA=e=>e.toLowerCase().split("_"),nA=e=>e.toLowerCase().split("-"),rA=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),iA=e=>e.toLowerCase().split(" "),sA=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),aA=e=>e.join("_").toUpperCase(),lA=e=>e.join("-").toLowerCase(),cA=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),zo=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),uA=["years","months","weeks","days","hours","minutes","seconds"];$a="\u200B"});var eh={};it(eh,{CONTRIB_ROLE_ID:()=>Rg,ChangeList:()=>ca,DONOR_ROLE_ID:()=>pa,Devs:()=>d,DevsById:()=>os,KNOWN_ISSUES_CHANNEL_ID:()=>I5,LazyComponent:()=>ct,Logger:()=>ee,Margins:()=>H,ModalAPI:()=>Ba,ModalCloseButton:()=>pt,ModalContent:()=>De,ModalFooter:()=>bt,ModalHeader:()=>Ue,ModalRoot:()=>Ae,ModalSize:()=>Fo,Modals:()=>hs,NoopComponent:()=>Gg,Queue:()=>Mo,REACT_GLOBAL:()=>P5,REGULAR_ROLE_ID:()=>kg,SUPPORT_CATEGORY_ID:()=>da,SUPPORT_CHANNEL_ID:()=>wc,SYM_LAZY_CACHED:()=>qn,SYM_LAZY_GET:()=>en,Theme:()=>Fa,VENBOT_USER_ID:()=>Ag,VENCORD_GUILD_ID:()=>ua,ZWSP:()=>$a,canonicalizeDescriptor:()=>Ic,canonicalizeFind:()=>Eg,canonicalizeMatch:()=>Rt,canonicalizeReplace:()=>ga,canonicalizeReplacement:()=>ui,checkIntersecting:()=>Fg,classes:()=>W,closeAllModals:()=>Dn,closeModal:()=>tr,copyWithToast:()=>Yt,debounce:()=>fo,fetchUserProfile:()=>Vg,formatDuration:()=>Ga,getCurrentChannel:()=>Uo,getCurrentGuild:()=>or,getEmojiURL:()=>zc,getIntlMessage:()=>we,getIntlMessageFromHash:()=>ib,getTheme:()=>_r,getUniqueUsername:()=>nr,humanFriendlyJoin:()=>pA,identity:()=>ss,insertTextIntoChatInputBox:()=>Pi,interpolateIfDefined:()=>Ma,isMobile:()=>U5,isNonNullish:()=>rr,isObject:()=>_5,isObjectEmpty:()=>Qn,isPluginDev:()=>nn,isTruthy:()=>Hc,localStorage:()=>Ii,makeCodeblock:()=>Ni,makeLazy:()=>tn,mergeDefaults:()=>bs,onceDefined:()=>M5,onlyOnce:()=>Ci,openImageModal:()=>$o,openInviteModal:()=>Mi,openMediaModal:()=>Xg,openModal:()=>Ce,openModalLazy:()=>_a,openPrivateChannel:()=>tA,openUserProfile:()=>Go,parseUrl:()=>F5,pluralise:()=>Ug,proxyLazy:()=>At,runtimeHashMessageKey:()=>Rn,sendMessage:()=>ys,sleep:()=>on,stripIndent:()=>dA,toInlineCode:()=>mA,tryOrElse:()=>$g,useAwaiter:()=>kt,useForceUpdater:()=>Jn,useIntersection:()=>$5,useTimer:()=>Pa,wordsFromCamel:()=>pn,wordsFromKebab:()=>nA,wordsFromPascal:()=>rA,wordsFromSnake:()=>oA,wordsFromTitle:()=>iA,wordsToCamel:()=>sA,wordsToKebab:()=>lA,wordsToPascal:()=>cA,wordsToSnake:()=>aA,wordsToTitle:()=>zo});var th=g(()=>{"use strict";a();l();ci();Lv();Ng();I();Me();vs();rs();So();ma();Wc();Ne();He();jc();fe();Ye();Ua();Bo();Fr();wt();Zo();});var db=g(()=>{});function Ho(e){return n("div",{...e,className:W(e.className,"vc-error-card")},e.children)}var Ai=g(()=>{"use strict";a();l();db();fe()});var bA,SA,mb,nh,k,se=g(()=>{"use strict";a();l();Ne();He();wt();T();Ai();bA="#e78284",SA=new ee("React ErrorBoundary",bA),mb={},nh=ct(()=>class extends te.PureComponent{state={error:mb,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}),SA.error(`${this.props.message||"A component threw an Error"} `,t,o.componentStack)}render(){if(this.state.error===mb)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{wrappedProps:this.props.wrappedProps,...this.state},this.props.children);let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(Ho,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:H.top8},this.state.stack)))}});nh.wrap=(e,t)=>o=>n(nh,{...t,wrappedProps:o},n(e,{...o}));k=nh});var fb=g(()=>{});function za(e){return n("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",height:"16",width:"16",...e,className:W("vc-heart-icon",e.className)},n("path",{fill:"#db61a2",fillRule:"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 Kc=g(()=>{"use strict";a();l();fe()});function Ha({look:e=A.Looks.LINK,color:t=A.Colors.TRANSPARENT,...o}){return n(A,{...o,look:e,color:t,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated"),innerClassName:"vc-donate-button"},n(za,null),"Donate")}var Yc=g(()=>{"use strict";a();l();T();Kc()});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 Wt=g(()=>{"use strict";a();l()});var gb=g(()=>{});var rh,hb,Zc,yb=g(()=>{"use strict";a();l();rh=Symbol("SettingsStore.isProxy"),hb=Symbol("SettingsStore.getRawTarget"),Zc=class{pathListeners=new Map;globalListeners=new Set;proxyContexts=new WeakMap;proxyHandler=(()=>{let t=this;return{get(o,r,i){if(r===rh)return!0;if(r===hb)return o;let s=Reflect.get(o,r,i),c=t.proxyContexts.get(o);if(c==null)return s;let{root:u,path:p}=c;if(!(r in o)&&t.getDefaultValue!=null&&(s=t.getDefaultValue({target:o,key:r,root:u,path:p})),typeof s=="object"&&s!==null&&!s[rh]){let m=`${p}${p&&"."}${r}`;return t.makeProxy(s,u,m)}return s},set(o,r,i){if(i?.[rh]&&(i=i[hb]),o[r]===i)return!0;if(!Reflect.set(o,r,i))return!1;let s=t.proxyContexts.get(o);if(s==null)return!0;let{root:c,path:u}=s,p=`${u}${u&&"."}${r}`;return t.notifyListeners(p,i,c),!0},deleteProperty(o,r){if(!Reflect.deleteProperty(o,r))return!1;let i=t.proxyContexts.get(o);if(i==null)return!0;let{root:s,path:c}=i,u=`${c}${c&&"."}${r}`;return t.notifyListeners(u,void 0,s),!0}}})();constructor(t,o={}){this.plain=t,this.store=this.makeProxy(t),Object.assign(this,o)}makeProxy(t,o=t,r=""){return this.proxyContexts.set(t,{root:o,path:r}),new Proxy(t,this.proxyHandler)}notifyListeners(t,o,r){let i=t.split(".");if(i.length>2&&i[0]==="plugins"){let s=i.slice(0,3),c=s.join("."),u=s.reduce((p,m)=>p[m],r);this.globalListeners.forEach(p=>p(r,c)),this.pathListeners.get(c)?.forEach(p=>p(u))}else this.globalListeners.forEach(s=>s(r,t));this.pathListeners.get(t)?.forEach(s=>s(o))}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 vb=g(()=>{});var Qc,ih=g(()=>{"use strict";a();l();vb();U();se();fe();T();Qc=k.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:c,onClose:u,image:p,permanent:m,className:y,dismissOnClick:b}){let{timeout:S,position:N}=Ft(["notifications.timeout","notifications.position"]).notifications,P=Se([ka],()=>ka.isFocused()),[w,R]=q(!1),[D,O]=q(0),$=Re(()=>Date.now(),[S,w,P]);ue(()=>{if(w||!P||S===0||m)return void O(0);let V=setInterval(()=>{let ie=Date.now()-$;ie>=S?u():O(ie)},10);return()=>clearInterval(V)},[S,w,P]);let j=D/S;return n("button",{className:W("vc-notification-root",y),style:N==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{c?.(),b!==!1&&u()},onContextMenu:V=>{V.preventDefault(),V.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:V=>{V.preventDefault(),V.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:""}),S!==0&&!m&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-j)*100}%`,backgroundColor:i||"var(--brand-500)"}}))},{onError:({props:e})=>e.onClose()})});var lh={};it(lh,{classNameFactory:()=>me,classNameToSelector:()=>Sb,compileStyle:()=>ah,disableStyle:()=>mn,enableStyle:()=>dn,isStyleEnabled:()=>sh,requireStyle:()=>Wa,setStyleClassNames:()=>TA,styleMap:()=>bb,toggleStyle:()=>xA});function Wa(e){let t=bb.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function dn(e){let t=Wa(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),ah(t),document.head.appendChild(t.dom),!0)}function mn(e){let t=Wa(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var bb,xA,sh,TA,ah,Sb,me,Ze=g(()=>{"use strict";a();l();bb=unsafeWindow.VencordStyles??=new Map;xA=e=>sh(e)?mn(e):dn(e),sh=e=>Wa(e).dom?.isConnected??!1,TA=(e,t,o=!0)=>{let r=Wa(e);r.classNames=t,o&&sh(r.name)&&ah(r)},ah=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?Sb(r):t})},Sb=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),me=(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(" ")}});function ch({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Jc=g(()=>{"use strict";a();l()});function ja({value:e,onChange:t,validate:o}){let[r,i]=te.useState(e),[s,c]=te.useState();function u(p){i(p);let m=o(p);m===!0?(c(void 0),t(p)):c(m)}return n(f,null,n(Bt,{type:"text",value:r,onChange:u,error:s}))}var Xc=g(()=>{"use strict";a();l();T()});function qa(e){return n("div",{className:wA.markup},Fe.defaultRules.codeBlock.react(e,null,{}))}var wA,Vc=g(()=>{"use strict";a();l();G();T();wA=L("markup","codeContainer")});var xb=g(()=>{});function Pt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:W(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ri({height:e=24,width:t=24,className:o}){return n(Pt,{height:e,width:t,className:W(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none",fillRule:"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 ki(e){return n(Pt,{...e,className:W(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M3 16a1 1 0 0 1-1-1v-5a8 8 0 0 1 8-8h5a1 1 0 0 1 1 1v.5a.5.5 0 0 1-.5.5H10a6 6 0 0 0-6 6v5.5a.5.5 0 0 1-.5.5H3Z"}),n("path",{d:"M6 18a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4v-4h-3a5 5 0 0 1-5-5V6h-4a4 4 0 0 0-4 4v8Z"}),n("path",{d:"M21.73 12a3 3 0 0 0-.6-.88l-4.25-4.24a3 3 0 0 0-.88-.61V9a3 3 0 0 0 3 3h2.73Z"})))}function ir(e){return n(Pt,{...e,className:W(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 fn(e){return n(Pt,{...e,className:W(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 Ka(e){return n(Pt,{...e,className:W(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",d:"M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5-4.75a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm-.77 3.96a1 1 0 1 0-1.96-.42l-1.04 4.86a2.77 2.77 0 0 0 4.31 2.83l.24-.17a1 1 0 1 0-1.16-1.62l-.24.17a.77.77 0 0 1-1.2-.79l1.05-4.86Z",clipRule:"evenodd"}))}function uh(e){return n(Pt,{"aria-label":we("GUILD_OWNER"),...e,className:W(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 ph(e){return n(Pt,{...e,className:W(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 Ya(e){return n(Pt,{...e,className:W(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 Za(e){return n(Pt,{...e,className:W(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 dh(e){return n(Pt,{...e,className:W(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 Qa(e){return n(Pt,{...e,className:W(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.56 1.1c-.46.05-.7.53-.64.98.18 1.16-.19 2.2-.98 2.53-.8.33-1.79-.15-2.49-1.1-.27-.36-.78-.52-1.14-.24-.77.59-1.45 1.27-2.04 2.04-.28.36-.12.87.24 1.14.96.7 1.43 1.7 1.1 2.49-.33.8-1.37 1.16-2.53.98-.45-.07-.93.18-.99.64a11.1 11.1 0 0 0 0 2.88c.06.46.54.7.99.64 1.16-.18 2.2.19 2.53.98.33.8-.14 1.79-1.1 2.49-.36.27-.52.78-.24 1.14.59.77 1.27 1.45 2.04 2.04.36.28.87.12 1.14-.24.7-.95 1.7-1.43 2.49-1.1.8.33 1.16 1.37.98 2.53-.07.45.18.93.64.99a11.1 11.1 0 0 0 2.88 0c.46-.06.7-.54.64-.99-.18-1.16.19-2.2.98-2.53.8-.33 1.79.14 2.49 1.1.27.36.78.52 1.14.24.77-.59 1.45-1.27 2.04-2.04.28-.36.12-.87-.24-1.14-.96-.7-1.43-1.7-1.1-2.49.33-.8 1.37-1.16 2.53-.98.45.07.93-.18.99-.64a11.1 11.1 0 0 0 0-2.88c-.06-.46-.54-.7-.99-.64-1.16.18-2.2-.19-2.53-.98-.33-.8.14-1.79 1.1-2.49.36-.27.52-.78.24-1.14a11.07 11.07 0 0 0-2.04-2.04c-.36-.28-.87-.12-1.14.24-.7.96-1.7 1.43-2.49 1.1-.8-.33-1.16-1.37-.98-2.53.07-.45-.18-.93-.64-.99a11.1 11.1 0 0 0-2.88 0ZM16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",clipRule:"evenodd"}))}function MA(e){return n(Pt,{...e,className:W(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 sr(e){return n(Pt,{...e,className:W(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 Ja(e){return n(Pt,{...e,className:W(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{fillRule:"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 Xa(e){return n(Pt,{...e,className:W(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"}))}function mh(e){return n(Pt,{...e,className:W(e.className,"vc-safety-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M4.27 5.22A2.66 2.66 0 0 0 3 7.5v2.3c0 5.6 3.3 10.68 8.42 12.95.37.17.79.17 1.16 0A14.18 14.18 0 0 0 21 9.78V7.5c0-.93-.48-1.78-1.27-2.27l-6.17-3.76a3 3 0 0 0-3.12 0L4.27 5.22ZM6 7.68l6-3.66V12H6.22C6.08 11.28 6 10.54 6 9.78v-2.1Zm6 12.01V12h5.78A11.19 11.19 0 0 1 12 19.7Z"}))}function fh(e){return n(Pt,{...e,className:W(e.className,"vc-notes-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M8 3C7.44771 3 7 3.44772 7 4V5C7 5.55228 7.44772 6 8 6H16C16.5523 6 17 5.55228 17 5V4C17 3.44772 16.5523 3 16 3H15.1245C14.7288 3 14.3535 2.82424 14.1002 2.52025L13.3668 1.64018C13.0288 1.23454 12.528 1 12 1C11.472 1 10.9712 1.23454 10.6332 1.64018L9.8998 2.52025C9.64647 2.82424 9.27121 3 8.8755 3H8Z"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M19 4.49996V4.99996C19 6.65681 17.6569 7.99996 16 7.99996H8C6.34315 7.99996 5 6.65681 5 4.99996V4.49996C5 4.22382 4.77446 3.99559 4.50209 4.04109C3.08221 4.27826 2 5.51273 2 6.99996V19C2 20.6568 3.34315 22 5 22H19C20.6569 22 22 20.6568 22 19V6.99996C22 5.51273 20.9178 4.27826 19.4979 4.04109C19.2255 3.99559 19 4.22382 19 4.49996ZM8 12C7.44772 12 7 12.4477 7 13C7 13.5522 7.44772 14 8 14H16C16.5523 14 17 13.5522 17 13C17 12.4477 16.5523 12 16 12H8ZM7 17C7 16.4477 7.44772 16 8 16H13C13.5523 16 14 16.4477 14 17C14 17.5522 13.5523 18 13 18H8C7.44772 18 7 17.5522 7 17Z"}))}function PA(e){return n(Pt,{...e,className:W(e.className,"vc-folder-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 5a3 3 0 0 1 3-3h3.93a2 2 0 0 1 1.66.9L12 5h7a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5Z"}))}function gh(e){return n(Pt,{...e,className:W(e.className,"vc-log-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3.11 8H6v10.82c0 .86.37 1.68 1 2.27.46.43 1.02.71 1.63.84A1 1 0 0 0 9 22h10a4 4 0 0 0 4-4v-1a2 2 0 0 0-2-2h-1V5a3 3 0 0 0-3-3H4.67c-.87 0-1.7.32-2.34.9-.63.6-1 1.42-1 2.28 0 .71.3 1.35.52 1.75a5.35 5.35 0 0 0 .48.7l.01.01h.01L3.11 7l-.76.65a1 1 0 0 0 .76.35Zm1.56-4c-.38 0-.72.14-.97.37-.24.23-.37.52-.37.81a1.69 1.69 0 0 0 .3.82H6v-.83c0-.29-.13-.58-.37-.8C5.4 4.14 5.04 4 4.67 4Zm5 13a3.58 3.58 0 0 1 0 3H19a2 2 0 0 0 2-2v-1H9.66ZM3.86 6.35ZM11 8a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2h-5Zm-1 5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1Z"}))}function hh(e){return n(Pt,{...e,className:W(e.className,"vc-restart-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 14.93-4H15a1 1 0 1 0 0 2h6a1 1 0 0 0 1-1V3a1 1 0 1 0-2 0v3a9.98 9.98 0 0 0-18 6 10 10 0 0 0 16.29 7.78 1 1 0 0 0-1.26-1.56A8 8 0 0 1 4 12Z"}))}function Va(e){return n(Pt,{...e,className:W(e.className,"vc-paintbrush-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M15.35 7.24C15.9 6.67 16 5.8 16 5a3 3 0 1 1 3 3c-.8 0-1.67.09-2.24.65a1.5 1.5 0 0 0 0 2.11l1.12 1.12a3 3 0 0 1 0 4.24l-5 5a3 3 0 0 1-4.25 0l-5.76-5.75a3 3 0 0 1 0-4.24l4.04-4.04.97-.97a3 3 0 0 1 4.24 0l1.12 1.12c.58.58 1.52.58 2.1 0ZM6.9 9.9 4.3 12.54a1 1 0 0 0 0 1.42l2.17 2.17.83-.84a1 1 0 0 1 1.42 1.42l-.84.83.59.59 1.83-1.84a1 1 0 0 1 1.42 1.42l-1.84 1.83.17.17a1 1 0 0 0 1.42 0l2.63-2.62L6.9 9.9Z"}))}function yh(e){return n(Pt,{...e,className:W(e.className,"vc-pencil-icon"),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 el(e){return n(Pt,{...e,viewBox:"-3 -3 30 30"},n("path",{fill:e.fill||"currentColor",d:"M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.11.82-.26.82-.577v-2.17c-3.338.726-4.042-1.61-4.042-1.61-.546-1.387-1.333-1.757-1.333-1.757-1.09-.745.083-.73.083-.73 1.205.084 1.84 1.237 1.84 1.237 1.07 1.835 2.807 1.305 3.492.998.108-.775.42-1.305.763-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.467-2.38 1.235-3.22-.123-.303-.535-1.523.117-3.176 0 0 1.008-.322 3.3 1.23.957-.266 1.98-.398 3-.403 1.02.005 2.043.137 3 .403 2.29-1.552 3.297-1.23 3.297-1.23.653 1.653.24 2.873.118 3.176.77.84 1.233 1.91 1.233 3.22 0 4.61-2.803 5.625-5.475 5.92.43.37.823 1.102.823 2.222v3.293c0 .32.218.694.825.577C20.565 21.797 24 17.298 24 12c0-6.63-5.37-12-12-12z"}))}function vh(e){return n(Pt,{...e,viewBox:"0 0 24 24"},n("path",{fill:e.fill||"currentColor",d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zM4 12c0-.899.156-1.762.431-2.569L6 11l2 2v2l2 2 1 1v1.931C7.061 19.436 4 16.072 4 12zm14.33 4.873C17.677 16.347 16.687 16 16 16v-1a2 2 0 0 0-2-2h-4v-3a2 2 0 0 0 2-2V7h1a2 2 0 0 0 2-2v-.411C17.928 5.778 20 8.65 20 12a7.947 7.947 0 0 1-1.67 4.873z"}))}var It=g(()=>{"use strict";a();l();xb();Me();fe()});function ot(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var Po=g(()=>{"use strict";a();l()});var Tb=g(()=>{});function xh({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:W(eu.container,"default-colors",e?eu.checked:void 0),style:{backgroundColor:e?bh:Sh,opacity:o?.3:1}},n("svg",{className:eu.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:bh,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:bh,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(f,null,n("path",{fill:Sh,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:Sh,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:eu.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var bh,Sh,eu,Th=g(()=>{"use strict";a();l();Tb();fe();G();bh="var(--brand-500)",Sh="var(--primary-400)",eu=L("slider","input","container")});var wh={};it(wh,{Badge:()=>ch,CheckedTextInput:()=>ja,CodeBlock:()=>qa,CogWheel:()=>Qa,CopyIcon:()=>ki,DeleteIcon:()=>sr,ErrorBoundary:()=>k,ErrorCard:()=>Ho,Flex:()=>he,FolderIcon:()=>PA,GithubIcon:()=>el,Heart:()=>za,ImageIcon:()=>fn,ImageInvisible:()=>Za,ImageVisible:()=>Ya,InfoIcon:()=>Ka,Link:()=>ot,LinkIcon:()=>Ri,LogIcon:()=>gh,Microphone:()=>dh,NoEntrySignIcon:()=>Xa,NotesIcon:()=>fh,OpenExternalIcon:()=>ir,OwnerCrownIcon:()=>uh,PaintbrushIcon:()=>Va,PencilIcon:()=>yh,PlusIcon:()=>Ja,ReplyIcon:()=>MA,RestartIcon:()=>hh,SafetyIcon:()=>mh,ScreenshareIcon:()=>ph,Switch:()=>xh,WebsiteIcon:()=>vh});var Ss=g(()=>{"use strict";a();l();Jc();Xc();Vc();Yc();se();Ai();Wt();Kc();It();Po();Th()});function IA(){let e=Ft().notifications;return n("div",{style:{padding:"1em 0"}},n(x.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(Ho,{style:{padding:"1em"},className:H.bottom8},n(x.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(x.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(x.FormText,{className:H.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(Yo,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:ss}),n(x.FormTitle,{tag:"h5",className:H.top16+" "+H.bottom8},"Notification Position"),n(Yo,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:ss}),n(x.FormTitle,{tag:"h5",className:H.top16+" "+H.bottom8},"Notification Timeout"),n(x.FormText,{className:H.bottom16},"Set to 0s to never automatically time out"),n(cs,{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(x.FormTitle,{tag:"h5",className:H.top16+" "+H.bottom8},"Notification Log Limit"),n(x.FormText,{className:H.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(cs,{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}))}function tu(){Ce(e=>n(Ae,{...e,size:"medium"},n(Ue,null,n(X,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Settings"),n(pt,{onClick:e.onClose})),n(De,null,n(IA,null))))}var Mh=g(()=>{"use strict";a();l();U();He();fe();Ye();T();Ss()});var wb,Mb=g(()=>{a();l();wb="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"});var Pb,Ib=g(()=>{a();l();Mb();Pb=(e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=wb[o[e]&63];return t}});async function Nb(e){if(e.noPersist)return;let t=Q.notifications.logLimit;t!==0&&(await li(ou,o=>{let r=o??[],{onClick:i,onClose:s,richBody:c,permanent:u,noPersist:p,dismissOnClick:m,...y}=e;return r.unshift({...y,timestamp:Date.now(),id:Pb()}),r.length>t&&t!==200&&(r.length=t),r}),tl.forEach(o=>o()))}async function CA(e){let t=await Cb(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await Ao(ou,t),tl.forEach(r=>r()))}function NA(){let[e,t]=as(s=>s+1,0);ue(()=>(tl.add(t),()=>void tl.delete(t)),[]);let[o,r,i]=kt(Cb,{fallbackValue:[],deps:[e]});return[o,i]}function AA({data:e}){let[t,o]=q(!1),r=te.useRef(null);return ue(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:xs("wrapper",{removing:t}),ref:r},n(Qc,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>CA(e.timestamp),200))},richBody:n("div",{className:xs("body")},e.body,n(lo,{timestamp:new Date(e.timestamp),className:xs("timestamp")}))}))}function RA({log:e,pending:t}){return!e.length&&!t?n("div",{className:xs("container")},n("div",{className:xs("empty")}),n(x.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:xs("container")},e.map(o=>n(AA,{data:o,key:o.id})))}function kA({modalProps:e,close:t}){let[o,r]=NA();return n(Ae,{...e,size:"large"},n(Ue,null,n(X,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(pt,{onClick:t})),n(De,null,n(RA,{log:o,pending:r})),n(bt,null,n(he,null,n(A,{onClick:tu},"Notification Settings"),n(A,{disabled:o.length===0,color:A.Colors.RED,onClick:()=>{ft.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 Ao(ou,[]),tl.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log"))))}function ol(){let e=Ce(t=>n(kA,{modalProps:t,close:()=>tr(e)}))}var ou,Cb,xs,tl,nu=g(()=>{"use strict";a();l();Vo();U();Ze();Wt();Mh();Ye();wt();T();Ib();ih();ou="notification-log",Cb=async()=>await zt(ou)??[],xs=me("vc-notification-log-"),tl=new Set});function EA(){if(!Ph){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),Ph=vi.createRoot(e)}return Ph}function OA(e,t){let o=EA();return new Promise(r=>{o.render(n(Qc,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function BA(){if(typeof Notification>"u")return!1;let{useNative:e}=Q.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Ab(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Qe(e){if(Nb(e),BA()&&await Ab()){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 DA.push(()=>OA(e,LA++))}var DA,Ph,LA,Rb=g(()=>{"use strict";a();l();U();Fr();T();ih();nu();DA=new Mo,LA=42});var Ih={};it(Ih,{requestPermission:()=>Ab,showNotification:()=>Qe});var ar=g(()=>{"use strict";a();l();Rb()});function Gb(e,t){return qA(e,t||{},0,0)}function zb(e,t){return HA(e,{i:2},t&&t.out,t&&t.dictionary)}var ho,Wo,Eh,ru,iu,Rh,Eb,Ob,Bb,kh,_b,_A,kb,Dh,lr,Je,Ln,Ur,Je,Je,Je,Je,il,Je,FA,UA,$A,GA,Ch,gn,Nh,Oh,Fb,zA,ur,HA,cr,nl,Ah,Lh,Db,rl,Ub,Lb,WA,$b,jA,qA,KA,YA,Hb=g(()=>{a();l();ho=Uint8Array,Wo=Uint16Array,Eh=Int32Array,ru=new ho([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]),iu=new ho([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]),Rh=new ho([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Eb=function(e,t){for(var o=new Wo(31),r=0;r<31;++r)o[r]=t+=1<>1|(Je&21845)<<1,lr=(lr&52428)>>2|(lr&13107)<<2,lr=(lr&61680)>>4|(lr&3855)<<4,Dh[Je]=((lr&65280)>>8|(lr&255)<<8)>>1;Ln=function(e,t,o){for(var r=e.length,i=0,s=new Wo(t);i>p]=m}else for(u=new Wo(r),i=0;i>15-e[i]);return u},Ur=new ho(288);for(Je=0;Je<144;++Je)Ur[Je]=8;for(Je=144;Je<256;++Je)Ur[Je]=9;for(Je=256;Je<280;++Je)Ur[Je]=7;for(Je=280;Je<288;++Je)Ur[Je]=8;il=new ho(32);for(Je=0;Je<32;++Je)il[Je]=5;FA=Ln(Ur,9,0),UA=Ln(Ur,9,1),$A=Ln(il,5,0),GA=Ln(il,5,1),Ch=function(e){for(var t=e[0],o=1;ot&&(t=e[o]);return t},gn=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Nh=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},Oh=function(e){return(e+7)/8|0},Fb=function(e,t,o){return(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length),new ho(e.subarray(t,o))},zA=["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"],ur=function(e,t,o){var r=new Error(t||zA[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ur),!o)throw r;return r},HA=function(e,t,o,r){var i=e.length,s=r?r.length:0;if(!i||t.f&&!t.l)return o||new ho(0);var c=!o,u=c||t.i!=2,p=t.i;c&&(o=new ho(i*3));var m=function(Cn){var _=o.length;if(Cn>_){var J=new ho(Math.max(_*2,Cn));J.set(o),o=J}},y=t.f||0,b=t.p||0,S=t.b||0,N=t.l,P=t.d,w=t.m,R=t.n,D=i*8;do{if(!N){y=gn(e,b,1);var O=gn(e,b+1,3);if(b+=3,O)if(O==1)N=UA,P=GA,w=9,R=5;else if(O==2){var ie=gn(e,b,31)+257,ne=gn(e,b+10,15)+4,Y=ie+gn(e,b+5,31)+1;b+=14;for(var Z=new ho(Y),ce=new ho(19),ge=0;ge>4;if($<16)Z[ge++]=$;else{var et=0,Ge=0;for($==16?(Ge=3+gn(e,b,3),b+=2,et=Z[ge-1]):$==17?(Ge=3+gn(e,b,7),b+=3):$==18&&(Ge=11+gn(e,b,127),b+=7);Ge--;)Z[ge++]=et}}var Oe=Z.subarray(0,ie),Pe=Z.subarray(ie);w=Ch(Oe),R=Ch(Pe),N=Ln(Oe,w,1),P=Ln(Pe,R,1)}else ur(1);else{var $=Oh(b)+4,j=e[$-4]|e[$-3]<<8,V=$+j;if(V>i){p&&ur(0);break}u&&m(S+j),o.set(e.subarray($,V),S),t.b=S+=j,t.p=b=V*8,t.f=y;continue}if(b>D){p&&ur(0);break}}u&&m(S+131072);for(var No=(1<>4;if(b+=et&15,b>D){p&&ur(0);break}if(et||ur(2),io<256)o[S++]=io;else if(io==256){rt=b,N=null;break}else{var so=io-254;if(io>264){var ge=io-257,ht=ru[ge];so=gn(e,b,(1<>4;Oo||ur(3),b+=Oo&15;var Pe=_A[Wn];if(Wn>3){var ht=iu[Wn];Pe+=Nh(e,b)&(1<D){p&&ur(0);break}u&&m(S+131072);var Rr=S+so;if(S>8},nl=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},Ah=function(e,t){for(var o=[],r=0;rS&&(S=s[r].s);var N=new Wo(S+1),P=Lh(o[y-1],N,0);if(P>t){var r=0,w=0,R=P-t,D=1<t)w+=D-(1<>=R;w>0;){var $=s[r].s;N[$]=0&&w;--r){var j=s[r].s;N[j]==t&&(--N[j],++w)}P=t}return{t:new ho(N),l:P}},Lh=function(e,t,o){return e.s==-1?Math.max(Lh(e.l,t,o+1),Lh(e.r,t,o+1)):t[e.s]=o},Db=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new Wo(++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{c:o.subarray(0,r),n:t}},rl=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&&!ce[Rh[xe-1]];--xe);var gt=m+5<<3,je=rl(i,Ur)+rl(s,il)+c,$e=rl(i,S)+rl(s,w)+c+14+3*xe+rl(ne,ce)+2*ne[16]+3*ne[17]+7*ne[18];if(p>=0&><=je&><=$e)return Ub(t,y,e.subarray(p,p+m));var et,Ge,Oe,Pe;if(cr(t,y,1+($e15&&(cr(t,y,io[Y]>>5&127),y+=io[Y]>>12)}}else et=FA,Ge=Ur,Oe=$A,Pe=il;for(var Y=0;Y255){var so=ht>>18&31;nl(t,y,et[so+257]),y+=Ge[so+257],so>7&&(cr(t,y,ht>>23&31),y+=ru[so]);var Oo=ht&31;nl(t,y,Oe[Oo]),y+=Pe[Oo],Oo>3&&(nl(t,y,ht>>5&8191),y+=iu[Oo])}else nl(t,y,et[ht]),y+=Ge[ht]}return nl(t,y,et[256]),y+Ge[256]},WA=new Eh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),$b=new ho(0),jA=function(e,t,o,r,i,s){var c=s.z||e.length,u=new ho(r+c+5*(1+Math.ceil(c/7e3))+i),p=u.subarray(r,u.length-i),m=s.l,y=(s.r||0)&7;if(t){y&&(p[0]=s.r>>3);for(var b=WA[t-1],S=b>>13,N=b&8191,P=(1<7e3||ce>24576)&&(et>423||!m)){y=Lb(e,p,0,j,V,ie,Y,ce,xe,Z-xe,y),ce=ne=Y=0,xe=Z;for(var Ge=0;Ge<286;++Ge)V[Ge]=0;for(var Ge=0;Ge<30;++Ge)ie[Ge]=0}var Oe=2,Pe=0,No=N,xt=je-$e&32767;if(et>2&>==$(Z-xt))for(var rt=Math.min(S,et)-1,io=Math.min(32767,Z),so=Math.min(258,et);xt<=io&&--No&&je!=$e;){if(e[Z+Oe]==e[Z+Oe-xt]){for(var ht=0;htOe){if(Oe=ht,Pe=xt,ht>rt)break;for(var Oo=Math.min(xt,ht-2),Wn=0,Ge=0;GeWn&&(Wn=Xt,$e=Rr)}}}je=$e,$e=w[je],xt+=je-$e&32767}if(Pe){j[ce++]=268435456|kh[Oe]<<18|kb[Pe];var Cn=kh[Oe]&31,_=kb[Pe]&31;Y+=ru[Cn]+iu[_],++V[257+Cn],++ie[_],ge=Z+Oe,++ne}else j[ce++]=e[Z],++V[e[Z]]}}for(Z=Math.max(Z,ge);Z=c&&(p[y/8|0]=m,J=c),y=Ub(p,y+1,e.subarray(Z,J))}s.i=c}return Fb(u,0,r+Oh(y)+i)},qA=function(e,t,o,r,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),c=new ho(s.length+e.length);c.set(s),c.set(e,s.length),e=c,i.w=s.length}return jA(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,o,r,i)};KA=typeof TextDecoder<"u"&&new TextDecoder,YA=0;try{KA.decode($b,{stream:!0}),YA=1}catch{}});async function Wb(){let e=await zt("Vencord_cloudSecret")??{},t=Bh();return e[t]?(await li("Vencord_cloudSecret",o=>(o??={},o[`${t}:${sl()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${sl()}`]}async function ZA(e){await li("Vencord_cloudSecret",t=>(t??={},t[`${Bh()}:${sl()}`]=e,t))}async function au(){await li("Vencord_cloudSecret",e=>(e??={},delete e[`${Bh()}:${sl()}`],e))}async function _h(){if(await Wb()!==void 0){Q.cloud.authenticated=!0;return}try{let o=await h(new URL("/v1/oauth/settings",$r()));var{clientId:e,redirectUri:t}=await o.json()}catch{Qe({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),Q.cloud.authenticated=!1;return}Ce(o=>n(hi,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){Q.cloud.authenticated=!1;return}try{let i=await h(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(su.info("Authorized with secret"),await ZA(s),Qe({title:"Cloud Integration",body:"Cloud integrations enabled!"}),Q.cloud.authenticated=!0):(Qe({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),Q.cloud.authenticated=!1)}catch(i){su.error("Failed to authorize",i),Qe({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),Q.cloud.authenticated=!1}}}))}async function Ts(){let e=await Wb();return unsafeWindow.btoa(`${e}:${sl()}`)}var su,$r,Bh,sl,Fh=g(()=>{"use strict";a();l();Vo();ar();U();T();Ne();Ye();su=new ee("Cloud","#39b7e0"),$r=()=>new URL(Q.cloud.url),Bh=()=>$r().origin,sl=()=>{let e=E.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function ws(){unsafeWindow.VesktopNative.app.relaunch()}var pr=g(()=>{"use strict";a();l()});function lu(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 cu(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 uu=g(()=>{"use strict";a();l()});async function jb(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(En,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 qb({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 Kb(){let e=`vencord-settings-backup-${Or().format("YYYY-MM-DD")}.json`,t=await qb(),o=new TextEncoder().encode(t);lu(new File([o],e,{type:"application/json"}))}async function Zb(e=!0){{let t=await cu("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await jb(o.result),e&&QA()}catch(r){new ee("SettingsSync").error(r),e&&JA(r)}},o.readAsText(t)}}async function Ms(e){let t=await qb({minify:!0});try{let o=await h(new URL("/v1/settings",$r()),{method:"PUT",headers:{Authorization:await Ts(),"Content-Type":"application/octet-stream"},body:Gb(new TextEncoder().encode(t))});if(!o.ok){hn.error(`Failed to sync up, API returned ${o.status}`),Qe({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();En.cloud.settingsSyncVersion=r,VencordNative.settings.set(En),hn.info("Settings uploaded to cloud successfully"),e&&Qe({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){hn.error("Failed to sync up",o),Qe({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function pu(e=!0,t=!1){try{let o=await h(new URL("/v1/settings",$r()),{method:"GET",headers:{Authorization:await Ts(),Accept:"application/octet-stream","If-None-Match":Q.cloud.settingsSyncVersion.toString()}});if(o.status===404)return hn.info("No settings on the cloud"),e&&Qe({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return hn.info("Settings up to date"),e&&Qe({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return hn.error(`Failed to sync down, API returned ${o.status}`),Qe({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=Q.cloud.settingsSyncVersion;if(!t&&rlocation.reload(),noPersist:!0}),!0}catch(o){return hn.error("Failed to sync down",o),Qe({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${o.toString()}).`,color:"var(--red-360)"}),!1}}async function Qb(){try{let e=await h(new URL("/v1/settings",$r()),{method:"DELETE",headers:{Authorization:await Ts()}});if(!e.ok){hn.error(`Failed to delete, API returned ${e.status}`),Qe({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}hn.info("Settings deleted from cloud successfully"),Qe({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){hn.error("Failed to delete",e),Qe({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var Yb,QA,JA,hn,al=g(()=>{"use strict";a();l();ar();U();T();Hb();Fh();Ne();pr();uu();Yb=(e,t)=>oe.show({type:e,message:t,id:oe.genId()}),QA=()=>Yb(oe.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),JA=e=>Yb(oe.Type.FAILURE,`Failed to import settings: ${String(e)}`);hn=new ee("Cloud:Settings","#39b7e0")});function v(e){return e}var M=g(()=>{"use strict";a();l()});var Gh={};it(Gh,{PlainSettings:()=>En,Settings:()=>Q,SettingsStore:()=>jt,definePluginSettings:()=>C,migratePluginSetting:()=>$h,migratePluginSettings:()=>dr,useSettings:()=>Ft});function Ft(e){let[,t]=te.useReducer(()=>({}),{});return ue(()=>e?(e.forEach(o=>jt.addChangeListener(o,t)),()=>e.forEach(o=>jt.removeChangeListener(o,t))):(jt.addGlobalChangeListener(t),()=>jt.removeGlobalChangeListener(t)),[e]),jt.store}function dr(e,...t){let{plugins:o}=jt.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],jt.markAsChanged();break}}}function $h(e,t,o){let r=jt.plain.plugins[e];r&&(!Object.hasOwn(r,t)||Object.hasOwn(r,o)||(r[o]=r[t],delete r[t],jt.markAsChanged()))}function C(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return Q.plugins[o.pluginName]},get plain(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return En.plugins[o.pluginName]},use:r=>Ft(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var XA,VA,Uh,e3,jt,En,Q,U=g(()=>{"use strict";a();l();ci();yb();Wc();Ne();jc();al();M();T();On();XA=new ee("Settings"),VA={autoUpdate:!0,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],eagerPatches:!1,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}},Uh=VencordNative.settings.get();bs(Uh,VA);e3=fo(async()=>{Q.cloud.settingsSync&&Q.cloud.authenticated&&(await Ms(),delete Ii.Vencord_settingsDirty)},6e4),jt=new Zc(Uh,{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}});jt.addGlobalChangeListener((e,t)=>{jt.plain.cloud.settingsSyncVersion=Date.now(),Ii.Vencord_settingsDirty=!0,e3(),VencordNative.settings.set(jt.plain,t)});En=Uh,Q=jt.store});var Jb=g(()=>{});var jh={};it(jh,{currentNotice:()=>ll,nextNotice:()=>Xb,noticesQueue:()=>Hh,popNotice:()=>Wh,showNotice:()=>cl});function Wh(){zh.dismiss()}function Xb(){ll=Hh.shift(),ll&&zh.show(...ll,"VencordNotice")}function cl(e,t,o){Hh.push(["GENERIC",e,t,o]),ll||Xb()}var zh,Hh,ll,du=g(()=>{"use strict";a();l();G();Ke(e=>e.show&&e.dismiss&&!e.suppressAll,e=>zh=e);Hh=[],ll=null});var Vb=g(()=>{});function ul(){return`-${wo.fromTimestamp(Date.now())}`}function at(e,t){let o=t3({channelId:e,content:"",embeds:[]});return _o.receiveMessage(e,bs(t,o)),t}function qt(e,t,o){return e.find(r=>r.name===t)?.value??o}var t3,qh=g(()=>{"use strict";a();l();jc();G();T();t3=ve('username:"Clyde"')});var Ps,mr,Kh,Yh=g(()=>{"use strict";a();l();Ps=(b=>(b[b.SUB_COMMAND=1]="SUB_COMMAND",b[b.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",b[b.STRING=3]="STRING",b[b.INTEGER=4]="INTEGER",b[b.BOOLEAN=5]="BOOLEAN",b[b.USER=6]="USER",b[b.CHANNEL=7]="CHANNEL",b[b.ROLE=8]="ROLE",b[b.MENTIONABLE=9]="MENTIONABLE",b[b.NUMBER=10]="NUMBER",b[b.ATTACHMENT=11]="ATTACHMENT",b))(Ps||{}),mr=(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))(mr||{}),Kh=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Kh||{})});var Jh={};it(Jh,{ApplicationCommandInputType:()=>mr,ApplicationCommandOptionType:()=>Ps,ApplicationCommandType:()=>Kh,BUILT_IN:()=>Bn,OptionalMessageOption:()=>_n,RequiredMessageOption:()=>pl,_handleCommand:()=>n3,_init:()=>o3,commands:()=>Zh,findOption:()=>qt,generateId:()=>ul,prepareOption:()=>Qh,registerCommand:()=>Is,sendBotMessage:()=>at,unregisterCommand:()=>dl});function Qh(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===eS?r[o]=_n:t===tS&&(r[o]=pl),t.choices?.forEach(i=>i.displayName||=i.name),Qh(r[o])}),e}function r3(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,options:o.options!==void 0?o.options:void 0,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};Is(r,t)})}function Is(e,t){if(!Bn){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Bn.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.untranslatedName??=e.name,e.untranslatedDescription??=e.description,e.id??=`-${Bn.length+oS+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Qh(e),e.options?.[0]?.type===1){r3(e,t);return}Zh[e.name]=e,Bn.push(e)}function dl(e){let t=Bn.findIndex(o=>o.name===e);return t===-1?!1:(Bn.splice(t,1),delete Zh[e],!0)}var Bn,Zh,eS,tS,_n,pl,oS,o3,n3,Qo=g(()=>{"use strict";a();l();Ne();Zo();qh();Yh();qh();Yh();Zh={},eS=Symbol("OptionalMessageOption"),tS=Symbol("RequiredMessageOption"),_n=eS,pl=tS,o3=function(e){try{Bn=e,_n=e.find(t=>(t.untranslatedName||t.displayName)==="shrug").options[0],pl=e.find(t=>(t.untranslatedName||t.displayName)==="me").options[0],oS=Math.abs(Bn.map(t=>Number(t.id)).sort((t,o)=>t-o)[0])-Bn.length}catch(t){new ee("CommandsAPI").error("Failed to load CommandsApi",t," - cmds is",e)}return e},n3=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),at(o.channel.id,{content:`${s}: ${Ni(c)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var Fn,Cs=g(()=>{a();l();Fn="77bed92"});var Di,nS=g(()=>{a();l();Di="Vendicated/Vencord"});var MG,Xh=g(()=>{"use strict";a();l();Cs();nS();MG=`Vencord/${Fn}${Di?` (https://github.com/${Di})`:""}`});function rS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let c=t[r]??e.default,[u,p]=te.useState(c??!1),[m,y]=te.useState(null);te.useEffect(()=>{s(m!==null)},[m]);function b(S){let N=e.isValid?.call(o,S)??!0;typeof N=="string"?y(N):N?(y(null),p(S),i(S)):y("Invalid input provided.")}return n(x.FormSection,null,n(Ko,{value:u,onChange:b,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},zo(pn(r))),m&&n(x.FormText,{style:{color:"var(--text-danger)"}},m))}var iS=g(()=>{"use strict";a();l();Zo();T()});function sS({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var aS=g(()=>{"use strict";a();l()});function Vh({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function c(S){return e.type===2?BigInt(S):Number(S)}let[u,p]=te.useState(`${t[r]??e.default??0}`),[m,y]=te.useState(null);te.useEffect(()=>{s(m!==null)},[m]);function b(S){let N=e.isValid?.call(o,S)??!0;y(null),typeof N=="string"?y(N):N||y("Invalid input provided."),e.type===1&&BigInt(S)>=i3?(p(`${Number.MAX_SAFE_INTEGER}`),i(c(S))):(p(S),i(c(S)))}return n(x.FormSection,null,n(x.FormTitle,null,zo(pn(r))),n(x.FormText,{className:H.bottom20,type:"description"},e.description),n(Bt,{type:"number",pattern:"-?[0-9]+",value:u,onChange:b,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),m&&n(x.FormText,{style:{color:"var(--text-danger)"}},m))}var i3,lS=g(()=>{"use strict";a();l();He();Zo();M();T();i3=BigInt(Number.MAX_SAFE_INTEGER)});function cS({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let c=t[s]??e.options?.find(S=>S.default)?.value,[u,p]=te.useState(c??null),[m,y]=te.useState(null);te.useEffect(()=>{i(m!==null)},[m]);function b(S){let N=e.isValid?.call(o,S)??!0;typeof N=="string"?y(N):N?(y(null),p(S),r(S)):y("Invalid input provided.")}return n(x.FormSection,null,n(x.FormTitle,null,zo(pn(s))),n(x.FormText,{className:H.bottom16,type:"description"},e.description),n(Yo,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:b,isSelected:S=>S===u,serialize:S=>String(S),...e.componentProps}),m&&n(x.FormText,{style:{color:"var(--text-danger)"}},m))}var uS=g(()=>{"use strict";a();l();He();Zo();T()});function co(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function pS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let c=t[r]??e.default,[u,p]=te.useState(null);te.useEffect(()=>{s(u!==null)},[u]);function m(y){let b=e.isValid?.call(o,y)??!0;typeof b=="string"?p(b):b?(p(null),i(y)):p("Invalid input provided.")}return n(x.FormSection,null,n(x.FormTitle,null,zo(pn(r))),n(x.FormText,{className:H.bottom20,type:"description"},e.description),n(cs,{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:y=>String(y.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var e1=g(()=>{"use strict";a();l();He();Zo();T()});function dS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[c,u]=te.useState(t[r]??e.default??null),[p,m]=te.useState(null);te.useEffect(()=>{s(p!==null)},[p]);function y(b){let S=e.isValid?.call(o,b)??!0;m(typeof S=="string"?S:S?null:"Invalid input provided."),u(b),i(b)}return n(x.FormSection,null,n(x.FormTitle,null,zo(pn(r))),n(x.FormText,{className:H.bottom20,type:"description"},e.description),n(Bt,{type:"text",value:c,onChange:y,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,maxLength:null,...e.componentProps}),p&&n(x.FormText,{style:{color:"var(--text-danger)"}},p))}var mS=g(()=>{"use strict";a();l();He();Zo();T()});var Gr=g(()=>{"use strict";a();l();Jc();iS();aS();lS();uS();e1();mS()});var fS=g(()=>{});function s3(){let e=_r()===2?"#000000":"#FFFFFF";return n(el,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function a3(){let e=_r()===2?"#000000":"#FFFFFF";return n(vh,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function gS({text:e,href:t,Icon:o}){return n(re,{text:e},r=>n(Aa,{...r,href:t},n(o,null)))}var mu,fu,t1=g(()=>{"use strict";a();l();fS();Me();T();Ss();mu=e=>n(gS,{...e,Icon:a3}),fu=e=>n(gS,{...e,Icon:s3})});function yS(e){let t=new c3({username:e.username,id:e.id??ul(),avatar:e.avatar,bot:!0});return z.dispatch({type:"USER_UPDATE",user:t}),t}function vS({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=te.useState([]),c=Ft().plugins[e.name],[u,p]=te.useState({}),[m,y]=te.useState({}),[b,S]=te.useState(null),N=()=>Object.values(m).every($=>!$),P=!!(c&&e.options&&!Qn(e.options));te.useEffect(()=>{(async()=>{for(let $ of e.authors.slice(0,6)){let j=$.id?await go.getUser(`${$.id}`).catch(()=>yS({username:$.name})):yS({username:$.name});s(V=>[...V,j])}})()},[e.authors]);async function w(){if(!e.options){o();return}if(e.beforeSave){let j=await Promise.resolve(e.beforeSave(u));if(j!==!0){S(j);return}}let $=!1;for(let[j,V]of Object.entries(u)){let ie=e.options[j];c[j]=V,ie.type!==7&&ie?.restartNeeded&&($=!0)}$&&t(),o()}function R(){if(!P||!e.options)return n(x.FormText,null,"There are no settings for this plugin.");{let $=Object.entries(e.options).map(([j,V])=>{if(V.type===7||V.hidden)return null;function ie(Z){p(ce=>({...ce,[j]:Z}))}function ne(Z){y(ce=>({...ce,[j]:Z}))}let Y=u3[V.type];return n(Y,{id:j,key:j,option:V,onChange:ie,onError:ne,pluginSettings:c,definedSettings:e.settings})});return n(he,{flexDirection:"column",style:{gap:12,marginBottom:16}},$)}}function D($,j){let V=e.authors.length-j,ie=e.authors.length-V,ne=ie+e.authors.length-j;return n(re,{text:e.authors.slice(ie,ne).map(Y=>Y.name).join(", ")},({onMouseEnter:Y,onMouseLeave:Z})=>n("div",{className:o1.moreUsers,onMouseEnter:Y,onMouseLeave:Z},"+",V))}let O=As[e.name];return n(Ae,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Ue,{separator:!1},n(X,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(pt,{onClick:o})),n(De,null,n(x.FormSection,null,n(he,{className:hS("info")},n(x.FormText,{className:hS("description")},e.description),!O.userPlugin&&n("div",{className:"vc-settings-modal-links"},n(mu,{text:"View more info",href:`https://vencord.dev/plugins/${e.name}`}),n(fu,{text:"View source code",href:`https://github.com/${Di}/tree/main/src/plugins/${O.folderName}`}))),n(x.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(l3,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:D,renderUser:$=>n(Vn,{className:o1.clickableAvatar,onClick:()=>Ns($)},n("img",{className:o1.avatar,src:$.getAvatarURL(void 0,80,!0),alt:$.username,title:$.username}))}))),!!e.settingsAboutComponent&&n("div",{className:W(H.bottom8,"vc-text-selectable")},n(x.FormSection,null,n(k,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:u})))),n(x.FormSection,{className:H.bottom16},n(x.FormTitle,{tag:"h3"},"Settings"),R())),P&&n(bt,null,n(he,{flexDirection:"column",style:{width:"100%"}},n(he,{style:{marginLeft:"auto"}},n(A,{onClick:o,size:A.Sizes.SMALL,color:A.Colors.PRIMARY,look:A.Looks.LINK},"Cancel"),n(re,{text:"You must fix all errors before saving",shouldShow:!N()},({onMouseEnter:$,onMouseLeave:j})=>n(A,{size:A.Sizes.SMALL,color:A.Colors.BRAND,onClick:w,onMouseEnter:$,onMouseLeave:j,disabled:!N()},"Save & Close"))),b&&n(X,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",b))))}function zr(e,t){Ce(o=>n(vS,{...o,plugin:e,onRestartNeeded:()=>t?.(e.name)}))}var hS,l3,o1,c3,u3,ml=g(()=>{"use strict";a();l();Vb();Qo();U();Ze();se();Wt();Xh();So();He();fe();Ye();M();G();T();On();Gr();gu();t1();hS=me("vc-plugin-modal-"),l3=le("defaultRenderUser","showDefaultAvatarsForNullUsers"),o1=L("moreUsers","emptyUser","avatarContainer","clickableAvatar"),c3=At(()=>E.getCurrentUser().constructor);u3={0:dS,1:Vh,2:Vh,3:rS,4:cS,5:pS,6:sS,7:()=>null}});var bS=g(()=>{});function hu({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:c,setEnabled:u,description:p,onMouseEnter:m,onMouseLeave:y}){let b=vt(null),S=vt(null);return n("div",{className:Hr("card",{"card-disabled":e}),onMouseEnter:m,onMouseLeave:y},n("div",{className:Hr("header")},n("div",{className:Hr("name-author")},n(X,{variant:"text-md/bold",className:Hr("name")},n("div",{ref:S,className:Hr("title-container")},n("div",{ref:b,className:Hr("title"),onMouseOver:()=>{let N=b.current,P=S.current;N.style.setProperty("--offset",`${P.clientWidth-N.scrollWidth}px`),N.style.setProperty("--duration",`${Math.max(.5,(N.scrollWidth-P.clientWidth)/7)}s`)}},o)),t&&n(ch,{text:"NEW",color:"#ED4245"})),!!s&&n(X,{variant:"text-md/normal",className:Hr("author")},s)),r,n(xh,{checked:c,onChange:u,disabled:e})),n(X,{className:Hr("note"),variant:"text-sm/normal"},p),i)}var Hr,n1=g(()=>{"use strict";a();l();bS();Ze();Jc();Th();T();Hr=me("vc-addon-")});var SS=g(()=>{});var xS=g(()=>{});var s1={};it(s1,{UpdateLogger:()=>r1,changes:()=>fl,checkForUpdates:()=>hl,getRepo:()=>TS,isNewer:()=>vu,isOutdated:()=>gl,maybePromptToUpdate:()=>yl,update:()=>bu,updateError:()=>i1});async function yu(e){let t=await e;if(t.ok)return t.value;throw i1=t.error,t.error}async function hl(){return fl=await yu(VencordNative.updater.getUpdates()),fl.some(e=>e.hash===Fn)?(vu=!0,gl=!1):gl=fl.length>0}async function bu(){if(!gl)return!0;let e=await yu(VencordNative.updater.update());if(e&&(gl=!1,!await yu(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function yl(e,t=!1){return;try{if(await hl()){let r=confirm(e);if(r&&vu)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await bu(),ws())}}catch(o){r1.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var r1,gl,vu,i1,fl,TS,Li=g(()=>{"use strict";a();l();Cs();Ne();pr();r1=new ee("Updater","white"),gl=!1,vu=!1;TS=()=>yu(VencordNative.updater.getRepo())});function wS(){yl("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 MS=g(()=>{"use strict";a();l();Li()});function Jo({title:e,children:t}){return n(x.FormSection,null,n(X,{variant:"heading-lg/semibold",tag:"h2",className:H.bottom16},e),t)}function Un(e,t){return k.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:p3})}var p3,fr=g(()=>{"use strict";a();l();SS();xS();se();MS();He();Ua();T();p3=Ci(wS)});var PS=g(()=>{});var p1={};it(p1,{ChatBarButton:()=>yn,_injectButtons:()=>m3,addChatBarButton:()=>c1,removeChatBarButton:()=>u1});function m3(e,t){if(!t.disabled)for(let[o,r]of l1)e.push(n(k,{noop:!0,key:o,onError:i=>d3.error(`Failed to render ${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var a1,l1,d3,c1,u1,yn,Wr=g(()=>{"use strict";a();l();PS();se();Ne();G();T();Ke(["buttonContainer","channelTextArea"],e=>a1=e);l1=new Map,d3=new ee("ChatButtons");c1=(e,t)=>l1.set(e,t),u1=e=>l1.delete(e),yn=k.wrap(e=>n(re,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("div",{className:`expression-picker-chat-input-button ${a1?.buttonContainer??""} vc-chatbar-button`},n(A,{"aria-label":e.tooltip,size:"",look:A.Looks.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${Bc.button} ${a1?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,onAuxClick:e.onAuxClick,...e.buttonProps},n("div",{className:Bc.buttonWrapper},e.children)))),{noop:!0})});var g1={};it(g1,{_usePatchContextMenu:()=>h3,addContextMenuPatch:()=>m1,addGlobalContextMenuPatch:()=>f3,findGroupChildrenByChildId:()=>st,globalPatches:()=>Su,navPatches:()=>vl,removeContextMenuPatch:()=>f1,removeGlobalContextMenuPatch:()=>g3});function m1(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=vl.get(o);r||(r=new Set,vl.set(o,r)),r.add(t)}}function f3(e){Su.add(e)}function f1(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>vl.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function g3(e){return Su.delete(e)}function st(e,t,o=!1){for(let r of t){if(r==null)continue;if(Array.isArray(r)){let s=st(e,r,o);if(s!==null)return s}if(Array.isArray(e)&&e.some(s=>o?r.props?.id?.includes(s):r.props?.id===s)||(o?r.props?.id?.includes(e):r.props?.id===e))return t;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=st(e,i,o);if(s!==null)return s}}return null}function h3(e){e={...e,children:d1(e.children)},e.contextMenuAPIArguments??=[];let t=vl.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){IS.error(`Patch for ${e.navId} errored,`,r)}for(let o of Su)try{o(e.navId,e.children,...e.contextMenuAPIArguments)}catch(r){IS.error("Global patch errored,",r)}return e}function d1(e){return Array.isArray(e)?e.map(d1):(te.isValidElement(e)&&(e=te.cloneElement(e),e?.props?.children&&(e.type!==B.MenuControlItem||e.type===B.MenuControlItem&&e.props.control!=null)&&(e.props.children=d1(e.props.children))),e)}var IS,vl,Su,Io=g(()=>{"use strict";a();l();Ne();T();IS=new ee("ContextMenu"),vl=new Map,Su=new Set});var h1={};it(h1,{__getDecorators:()=>y3,addMemberListDecorator:()=>Ei,decoratorsFactories:()=>xu,removeMemberListDecorator:()=>Oi});function Ei(e,t,o){xu.set(e,{render:t,onlyIn:o})}function Oi(e){xu.delete(e)}function y3(e){let t=!!e.guildId,o=Array.from(xu.entries(),([r,{render:i,onlyIn:s}])=>s==="guilds"&&!t||s==="dms"&&t?null:n(k,{noop:!0,key:r,message:`Failed to render ${r} Member List Decorator`},n(i,{...e})));return n("div",{className:"vc-member-list-decorators-wrapper"},o)}var xu,bl=g(()=>{"use strict";a();l();se();xu=new Map});var y1={};it(y1,{_modifyAccessories:()=>v3,accessories:()=>Tu,addMessageAccessory:()=>Sl,removeMessageAccessory:()=>xl});function Sl(e,t,o){Tu.set(e,{render:t,position:o})}function xl(e){Tu.delete(e)}function v3(e,t){for(let[o,r]of Tu.entries()){let i=n(k,{message:`Failed to render ${o} Message Accessory`,key:o},n(r.render,{...t}));e.splice(r.position!=null?r.position<0?e.length+r.position:r.position:e.length,0,i)}return e}var Tu,wu=g(()=>{"use strict";a();l();se();Tu=new Map});var v1={};it(v1,{__addDecorationsToMessage:()=>b3,addMessageDecoration:()=>Bi,decorationsFactories:()=>Mu,removeMessageDecoration:()=>_i});function Bi(e,t){Mu.set(e,t)}function _i(e){Mu.delete(e)}function b3(e){let t=Array.from(Mu.entries(),([o,r])=>n(k,{noop:!0,message:`Failed to render ${o} Message Decoration`,key:o},n(r,{...e})));return n("div",{className:"vc-message-decorations-wrapper"},t)}var Mu,Tl=g(()=>{"use strict";a();l();se();Mu=new Map});var P1={};it(P1,{_handleClick:()=>T3,_handlePreEdit:()=>x3,_handlePreSend:()=>S3,addMessageClickListener:()=>w1,addMessagePreEditListener:()=>wl,addMessagePreSendListener:()=>Fi,removeMessageClickListener:()=>M1,removeMessagePreEditListener:()=>Ml,removeMessagePreSendListener:()=>Ui});async function S3(e,t,o,r){o.replyOptions=r;for(let i of S1)try{if((await i(e,t,o))?.cancel)return!0}catch(s){b1.error(`MessageSendHandler: Listener encountered an unknown error `,s)}return!1}async function x3(e,t,o){for(let r of x1)try{if((await r(e,t,o))?.cancel)return!0}catch(i){b1.error(`MessageEditHandler: Listener encountered an unknown error `,i)}return!1}function Fi(e){return S1.add(e),e}function wl(e){return x1.add(e),e}function Ui(e){return S1.delete(e)}function Ml(e){return x1.delete(e)}function T3(e,t,o){e=Zt.getMessage(t.id,e.id)??e;for(let r of T1)try{r(e,t,o)}catch(i){b1.error(`MessageClickHandler: Listener encountered an unknown error `,i)}}function w1(e){return T1.add(e),e}function M1(e){return T1.delete(e)}var b1,S1,x1,T1,Pl=g(()=>{"use strict";a();l();Ne();T();b1=new ee("MessageEvents","#e5c890"),S1=new Set,x1=new Set;T1=new Set});var N1={};it(N1,{_buildPopoverElements:()=>M3,addMessagePopoverButton:()=>I1,buttons:()=>Pu,removeMessagePopoverButton:()=>C1});function I1(e,t){Pu.set(e,t)}function C1(e){Pu.delete(e)}function M3(e,t){let o=[];for(let[r,i]of Pu.entries())try{let s=i(t);s&&(s.key??=r,o.push(n(k,{noop:!0},n(e,{...s}))))}catch(s){w3.error(`[${r}]`,s)}return n(f,null,o)}var w3,Pu,A1=g(()=>{"use strict";a();l();se();Ne();w3=new ee("MessagePopover"),Pu=new Map});var L1={};it(L1,{SYM_IS_PROXIED_FACTORY:()=>R1,SYM_ORIGINAL_FACTORY:()=>qr,SYM_PATCHED_BY:()=>D1,SYM_PATCHED_SOURCE:()=>k1,allWebpackInstances:()=>Iu,getBuildNumber:()=>AS,getFactoryPatchedBy:()=>C3,getFactoryPatchedSource:()=>I3,patchTimings:()=>P3,patches:()=>jr});function I3(e,t=yt){return t.m[e]?.[k1]}function C3(e,t=yt){return t.m[e]?.[D1]}function RS(e,t,o,r,i=!1){if(R3(e,t,o,r,i))return!0;k3(t,o);let s=new Proxy(Q.eagerPatches?DS(t,o):o,A3);return Reflect.set(e,t,s,r)}function R3(e,t,o,r,i){let s,c;for(let u of Iu)if(!(i&&u.m===e)&&Object.hasOwn(u.m,t)){s=u.m[t],c=u.m;break}return s!=null?(c!==e&&s[R1]?Reflect.set(e,t,s,r):kS(t,o),s[qr]!=null&&(s[qr]=o),!0):!1}function kS(e,t){for(let o of Iu)vn(o.m,e,{value:t})}function k3(e,t){for(let o of va)try{o(t,e)}catch(r){bn.error(`Error in Webpack factory listener: `,r,o)}}function NS(e,t,o){let r=e[qr];e===r&&delete e[qr];let[i,s,c]=o;if(kS(i.id,r),yt==null&&!CS&&(CS=!0,typeof c=="function"&&c.m!=null&&c.c!=null)){let{stack:p}=new Error,m=p?.match(/\/assets\/(.+?\.js)/)?.[1];bn.warn(`WebpackRequire was not initialized, falling back to WebpackRequire passed to the first called wrapped module factory (id: ${String(i.id)}`+Ma`, WebpackInstance origin: ${m}`+")"),ba(c)}let u;try{u=e.apply(t,o)}catch(p){if(e===r)throw p;return bn.error(`Error in patched module factory: `,p),r.apply(t,o)}if(s=i.exports,typeof c=="function"&&c.c&&Ac(c.c,s,i.id)||s==null)return u;for(let p of Nc)try{p(s,i.id)}catch(m){bn.error(`Error in Webpack module listener: `,m,p)}for(let[p,m]of fi)try{if(p(s)){fi.delete(p),m(s,i.id);continue}if(typeof s!="object")continue;for(let y in s){let b=s[y];if(b!=null&&p(b)){fi.delete(p),m(b,i.id);break}}}catch(y){bn.error(`Error while firing callback for Webpack waitFor subscription: `,y,p,m)}return u}function DS(e,t){let o="0,"+String(t),r=o,i=t,s=new Set;for(let c=0;cu.toBuild){jr.splice(c--,1);continue}if(!(typeof u.find=="string"?o.includes(u.find):(u.find.global&&(u.find.lastIndex=0),u.find.test(o))))continue;let b=Uv(`patch by ${u.plugin}`,(w,R)=>(typeof w!="string"&&w.global&&(w.lastIndex=0),o.replace(w,R))),S=o,N=t,P=!1;for(let w of u.replacement){if(m&&w.fromBuild!=null&&pw.toBuild)continue;u.plugin==="Vesktop"&&ui(w,"VCDP");let R=o,D=t;try{let[O,$]=b(w.match,w.replace);if(O===o){if(u.noWarn||w.noWarn||bn.warn(`Patch by ${u.plugin} had no effect (Module id is ${String(e)}): ${w.match}`),u.group){bn.warn(`Undoing patch group ${u.find} by ${u.plugin} because replacement ${w.match} had no effect`),o=S,i=N,P&&s.delete(u.plugin);break}continue}let j=[...s];s.has(u.plugin)||j.push(u.plugin),o=O,r=`// Webpack Module ${String(e)} - Patched by ${j.join(", ")} ${O} //# sourceURL=WebpackModule${String(e)}`,i=(0,eval)(r),s.has(u.plugin)||(s.add(u.plugin),P=!0)}catch(O){if(bn.error(`Patch by ${u.plugin} errored (Module id is ${String(e)}): ${w.match} `,O),P&&s.delete(u.plugin),u.group){bn.warn(`Undoing patch group ${u.find} by ${u.plugin} because replacement ${w.match} errored`),o=S,i=N;break}o=R,i=D}}u.all||jr.splice(c--,1)}return i[qr]=t,i}var jr,R1,qr,k1,D1,Iu,P3,AS,bn,CS,vn,N3,A3,Cu=g(()=>{"use strict";a();l();U();So();Ne();fe();Bo();Cc();G();jr=[],R1=Symbol("WebpackPatcher.isProxiedFactory"),qr=Symbol("WebpackPatcher.originalFactory"),k1=Symbol("WebpackPatcher.patchedSource"),D1=Symbol("WebpackPatcher.patchedBy"),Iu=new Set,P3=[],AS=tn(()=>{try{let t=function(i){let s=i.match(/.concat\("(\d+?)"\)/);return s==null?-1:Number(s[1])};var e=t;let o=String(yt.m[128014]);if(o.includes("Trying to open a changelog for an invalid build number")){let i=t(o);if(i!==-1)return i}let r=Sa("Trying to open a changelog for an invalid build number");return t(String(r))}catch{return-1}});bn=new ee("WebpackInterceptor","#8caaee"),CS=!1,vn=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));vn(Function.prototype,"m",{enumerable:!1,set(e){vn(this,"m",{value:e});let{stack:t}=new Error;if(!t?.includes("http")||t.match(/at \d+? \(/)||!String(this).includes("exports:{}"))return;let o=t.match(/\/assets\/(.+?\.js)/)?.[1];vn(this,"p",{enumerable:!1,set(c){vn(this,"p",{value:c}),clearTimeout(r),c==="/assets/"&&(yt==null&&this.c!=null&&(bn.info("Main WebpackInstance found"+Ma` in ${o}`+", initializing internal references to WebpackRequire"),ba(this)),s())}}),vn(this,"O",{enumerable:!1,set(c){vn(this,"O",{value:c}),clearTimeout(i);let u=this;vn(c,"j",{enumerable:!1,set(p){vn(this,"j",{value:p}),u.p==null&&s()}})}});let r=setTimeout(()=>Reflect.deleteProperty(this,"p"),0),i=setTimeout(()=>Reflect.deleteProperty(this,"O"),0),s=()=>{bn.info("Found Webpack module factories"+Ma` in ${o}`),Iu.add(this);for(let u in e)RS(e,u,e[u],e,!0);vn(e,Symbol.toStringTag,{value:"ModuleFactories",enumerable:!1});let c=new Proxy(e,N3);vn(this,"m",{value:c}),this.d=function(u,p){for(let m in p)Object.hasOwn(p,m)&&!Object.hasOwn(u,m)&&Object.defineProperty(u,m,{enumerable:!0,configurable:!0,get:p[m]})}}}});N3={set:RS},A3={apply(e,t,o){if(e[qr]!=null)return NS(e,t,o);let r=e.name,i=DS(r,e);return NS(i,t,o)},get(e,t,o){if(t===R1)return!0;let r=e[qr]??e;if(t==="toString"||t===k1||t===D1){let i=Reflect.get(r,t,r);return t==="toString"?i.bind(r):i}return Reflect.get(e,t,o)}}});var Nu={};it(Nu,{PMLogger:()=>D3,addPatch:()=>OS,isPluginEnabled:()=>Cl,patches:()=>jr,plugins:()=>L3,startAllPlugins:()=>Nl,startDependenciesRecursive:()=>BS,startPlugin:()=>B1,stopPlugin:()=>B3,subscribeAllPluginsFluxEvents:()=>O3,subscribePluginFluxEvents:()=>O1,unsubscribePluginFluxEvents:()=>_S});function Cl(e){return(We[e]?.required||We[e]?.isDependency||Il[e]?.enabled)??!1}function OS(e,t,o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`){let r=e;if(r.plugin=t,!(r.predicate&&!r.predicate())){Eg(r),Array.isArray(r.replacement)||(r.replacement=[r.replacement]);for(let i of r.replacement)ui(i,o);r.replacement=r.replacement.filter(({predicate:i})=>!i||i()),jr.push(r)}}function BS(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!Il[r].enabled){let i=We[r];if(BS(i),Il[r].enabled=!0,i.isDependency=!0,i.patches){Kt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}B1(i)||o.push(r)}}),{restartNeeded:t,failures:o}}function O1(e,t){if(e.flux&&!E1.has(e.name)){E1.add(e.name),Kt.debug("Subscribing to flux events of plugin",e.name);for(let[o,r]of Object.entries(e.flux)){let i=e.flux[o]=function(){try{let s=r.apply(e,arguments);return s instanceof Promise?s.catch(c=>Kt.error(`${e.name}: Error while handling ${o} `,c)):s}catch(s){Kt.error(`${e.name}: Error while handling ${o} `,s)}};t.subscribe(o,i)}}}function _S(e,t){if(e.flux){E1.delete(e.name),Kt.debug("Unsubscribing from flux events of plugin",e.name);for(let[o,r]of Object.entries(e.flux))t.unsubscribe(o,r)}}function O3(e){LS=!0;for(let t in We)Cl(t)&&O1(We[t],e)}var Kt,D3,L3,LS,E1,ES,Il,E3,gr,Nl,B1,B3,Au=g(()=>{"use strict";a();l();kl();Wr();Qo();Io();bl();wu();Tl();Pl();A1();U();Ze();Ne();Bo();M();T();Cu();On();Cc();Kt=new ee("PluginManager","#a6d189"),D3=Kt,L3=We,LS=!1,E1=new Set,ES=Object.values(We),Il=Q.plugins;E3=["onBeforeMessageEdit","onBeforeMessageSend","onMessageClick","renderChatBarButton","renderMemberListDecorator","renderMessageAccessory","renderMessageDecoration","renderMessagePopoverButton"],gr=new Set;for(let e of ES)if(Cl(e.name)){e.dependencies?.forEach(t=>{let o=We[t];if(!o){let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);Kt.warn(r);return}Il[t].enabled=!0,o.isDependency=!0}),e.commands?.length&&gr.add("CommandsAPI"),(e.onBeforeMessageEdit||e.onBeforeMessageSend||e.onMessageClick)&&gr.add("MessageEventsAPI"),e.renderChatBarButton&&gr.add("ChatInputButtonAPI"),e.renderMemberListDecorator&&gr.add("MemberListDecoratorsAPI"),e.renderMessageAccessory&&gr.add("MessageAccessoriesAPI"),e.renderMessageDecoration&&gr.add("MessageDecorationsAPI"),e.renderMessagePopoverButton&&gr.add("MessagePopoverAPI"),e.userProfileBadge&&gr.add("BadgeAPI");for(let t of E3)e[t]&&=e[t].bind(e)}for(let e of gr)We[e].isDependency=!0,Il[e].enabled=!0;for(let e of ES){if(e.settings){e.options??={},e.settings.pluginName=e.name;for(let t in e.settings.def){let o=e.settings.def[t],r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.options)for(let t in e.options){let o=e.options[t];o.onChange!=null&&jt.addChangeListener(`plugins.${e.name}.${t}`,o.onChange)}if(e.patches&&Cl(e.name))for(let t of e.patches)OS(t,e.name)}Nl=Yn("startAllPlugins",function(t){Kt.info(`Starting plugins (stage ${t})`);for(let o in We)if(Cl(o)){if((We[o].startAt??"WebpackReady")!==t)continue;B1(We[o])}});B1=Yn("startPlugin",function(t){let{name:o,commands:r,contextMenus:i,managedStyle:s,userProfileBadge:c,onBeforeMessageEdit:u,onBeforeMessageSend:p,onMessageClick:m,renderChatBarButton:y,renderMemberListDecorator:b,renderMessageAccessory:S,renderMessageDecoration:N,renderMessagePopoverButton:P}=t;if(t.start){if(Kt.info("Starting plugin",o),t.started)return Kt.warn(`${o} already started`),!1;try{t.start()}catch(w){return Kt.error(`Failed to start ${o} `,w),!1}}if(t.started=!0,r?.length){Kt.debug("Registering commands of plugin",o);for(let w of r)try{Is(w,o)}catch(R){return Kt.error(`Failed to register command ${w.name} `,R),!1}}if(LS&&O1(t,z),i){Kt.debug("Adding context menus patches of plugin",o);for(let w in i)m1(w,i[w])}return s&&dn(s),c&&Al(c),u&&wl(u),p&&Fi(p),m&&w1(m),y&&c1(o,y),b&&Ei(o,b),N&&Bi(o,N),S&&Sl(o,S),P&&I1(o,P),!0},e=>`startPlugin ${e.name}`),B3=Yn("stopPlugin",function(t){let{name:o,commands:r,contextMenus:i,managedStyle:s,userProfileBadge:c,onBeforeMessageEdit:u,onBeforeMessageSend:p,onMessageClick:m,renderChatBarButton:y,renderMemberListDecorator:b,renderMessageAccessory:S,renderMessageDecoration:N,renderMessagePopoverButton:P}=t;if(t.stop){if(Kt.info("Stopping plugin",o),!t.started)return Kt.warn(`${o} already stopped`),!1;try{t.stop()}catch(w){return Kt.error(`Failed to stop ${o} `,w),!1}}if(t.started=!1,r?.length){Kt.debug("Unregistering commands of plugin",o);for(let w of r)try{dl(w.name)}catch(R){return Kt.error(`Failed to unregister command ${w.name} `,R),!1}}if(_S(t,z),i){Kt.debug("Removing context menus patches of plugin",o);for(let w in i)f1(w,i[w])}return s&&mn(s),c&&Rl(c),u&&Ml(u),p&&Ui(p),m&&M1(m),y&&u1(o),b&&Oi(o),N&&_i(o),S&&xl(o),P&&C1(o),!0},e=>`stopPlugin ${e.name}`)});function G3(e){oe.show({message:e,type:oe.Type.FAILURE,id:oe.genId(),options:{position:oe.Position.BOTTOM}})}function z3({required:e}){return n(oo,{className:$n("info-card",{"restart-card":e})},e?n(f,null,n(x.FormTitle,{tag:"h5"},"Restart required!"),n(x.FormText,{className:$n("dep-text")},"Restart now to apply new plugins and their settings"),n(A,{onClick:()=>location.reload(),className:$n("restart-button")},"Restart")):n(f,null,n(x.FormTitle,{tag:"h5"},"Plugin Management"),n(x.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(x.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ru({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let c=Q.plugins[e.name],u=()=>Vencord.Plugins.isPluginEnabled(e.name);function p(){let m=u();if(!m){let{restartNeeded:b,failures:S}=_3(e);if(S.length){FS.error(`Failed to start dependencies for ${e.name}: ${S.join(", ")}`),cl("Failed to start dependencies: "+S.join(", "),"Close",()=>null);return}else if(b){c.enabled=!0,o(e.name);return}}if(e.patches?.length){c.enabled=!m,o(e.name);return}if(m&&!e.started){c.enabled=!m;return}if(!(m?U3(e):F3(e))){c.enabled=!1;let b=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;FS.error(b),G3(b);return}c.enabled=!m}return n(hu,{name:e.name,description:e.description,isNew:s,enabled:u(),setEnabled:p,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>zr(e,o),className:W($3.button,$n("info-button"))},e.options&&!Qn(e.options)?n(Qa,{className:$n("info-icon")}):n(Ka,{className:$n("info-icon")}))})}function H3({search:e}){let t=Object.entries($S).filter(([r])=>r.toLowerCase().includes(e)),o={desktop:"Discord Desktop app or Vesktop",discordDesktop:"Discord Desktop app",vesktop:"Vesktop app",web:"Vesktop app and the Web version of Discord",dev:"Developer version of Vencord"};return n(X,{variant:"text-md/normal",className:H.top16},t.length?n(f,null,n(x.FormText,null,"Are you looking for:"),n("ul",null,t.map(([r,i])=>n("li",{key:r},n("b",null,r),": Only available on the ",o[i])))):"No plugins meet the search criteria.")}function _1(){let e=Ft(),t=te.useMemo(()=>new ca,[]);te.useEffect(()=>()=>void(t.hasChanges&&ft.show({title:"Restart required",body:n(f,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((P,w)=>n(f,null,w>0&&", ",Fe.parse("`"+P+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=te.useMemo(()=>{let P={};for(let w in We){let R=We[w].dependencies;if(R)for(let D of R)P[D]??=[],P[D].push(w)}return P},[]),r=Re(()=>Object.values(We).sort((P,w)=>P.name.localeCompare(w.name)),[]),[i,s]=te.useState({value:"",status:0}),c=i.value.toLowerCase(),u=P=>s(w=>({...w,value:P})),p=P=>s(w=>({...w,status:P})),m=P=>{let{status:w}=i,R=Vencord.Plugins.isPluginEnabled(P.name);return R&&w===2||!R&&w===1||w===3&&!y?.includes(P.name)?!1:c.length?P.name.toLowerCase().includes(c)||P.description.toLowerCase().includes(c)||P.tags?.some(D=>D.toLowerCase().includes(c)):!0},[y]=kt(()=>zt("Vencord_existingPlugins").then(P=>{let w=Date.now()/1e3,R={},D=Object.values(r).map($=>$.name),O=[];for(let{name:$}of r)(R[$]=P?.[$]??w)+60*60*24*2>w&&O.push($);return Ao("Vencord_existingPlugins",R),Si.isEqual(O,D)?[]:O})),b=[],S=[],N=i.value.includes("API");for(let P of r){if(P.hidden||!P.options&&P.name.endsWith("API")&&!N||!m(P))continue;if(P.required||P.isDependency||o[P.name]?.some(R=>e.plugins[R].enabled)){let R=P.required||!o[P.name]?"This plugin is required for Vencord to function.":W3(o[P.name]?.filter(D=>e.plugins[D].enabled));S.push(n(re,{text:R,key:P.name},({onMouseLeave:D,onMouseEnter:O})=>n(Ru,{onMouseLeave:D,onMouseEnter:O,onRestartNeeded:$=>t.handleChange($),disabled:!0,plugin:P,key:P.name})))}else b.push(n(Ru,{onRestartNeeded:R=>t.handleChange(R),disabled:!1,plugin:P,isNew:y?.includes(P.name),key:P.name}))}return n(Jo,{title:"Plugins"},n(z3,{required:t.hasChanges}),n(x.FormTitle,{tag:"h5",className:W(H.top20,H.bottom8)},"Filters"),n("div",{className:W(H.bottom20,$n("filter-controls"))},n(Bt,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:u}),n("div",{className:US.inputWrapper},n(Yo,{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:p,isSelected:P=>P===i.status,closeOnSelect:!0,className:US.inputDefault}))),n(x.FormTitle,{className:H.top20},"Plugins"),b.length||S.length?n("div",{className:$n("grid")},b.length?b:n(X,{variant:"text-md/normal"},"No plugins meet the search criteria.")):n(H3,{search:c}),n(x.FormDivider,{className:H.top20}),n(x.FormTitle,{tag:"h5",className:W(H.top20,H.bottom8)},"Required Plugins"),n("div",{className:$n("grid")},S.length?S:n(X,{variant:"text-md/normal"},"No plugins meet the search criteria.")))}function W3(e){return n(te.Fragment,null,n(x.FormText,null,"This plugin is required by:"),e.map(t=>n(x.FormText,{key:t,className:$n("dep-text")},t)))}var _3,F3,U3,$n,FS,US,$3,F1=g(()=>{"use strict";a();l();Jb();Vo();du();U();Ze();It();ml();n1();fr();Ng();So();Ne();He();fe();wt();G();T();On();({startDependenciesRecursive:_3,startPlugin:F3,stopPlugin:U3}=At(()=>(Au(),kv(Nu)))),$n=me("vc-plugins-"),FS=new ee("PluginSettings","#a6d189"),US=L("inputWrapper","inputDefault","error"),$3=L("button","disabled","enabled")});function Ns(e){Ce(t=>n(Ae,{...t},n(k,null,n(De,{className:Rs("root")},n(j3,{user:e})))))}function j3({user:e}){Ft();let t=Se([Qt],()=>Qt.getUserProfile(e.id));ue(()=>{!t&&!e.bot&&e.id&&Vg(e.id)},[e.id,e.bot,t]);let o=t?.connectedAccounts?.find(c=>c.type==="github")?.name,r=t?.connectedAccounts?.find(c=>c.type==="domain")?.name,i=Re(()=>{let c=Object.values(We);return(os[e.id]?c.filter(p=>p.authors.includes(os[e.id])):c.filter(p=>p.authors.some(m=>m.name===e.username))).filter(p=>!p.name.endsWith("API")).sort((p,m)=>Number(p.required??!1)-Number(m.required??!1))},[e.id,e.username]),s=n(ot,{href:"https://vencord.dev/source"},"contributed");return n(f,null,n("div",{className:Rs("header")},n("img",{className:Rs("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(x.FormTitle,{tag:"h2",className:Rs("name")},e.username),n("div",{className:W("vc-settings-modal-links",Rs("links"))},r&&n(mu,{text:r,href:`https://${r}`}),o&&n(fu,{text:o,href:`https://github.com/${o}`}))),i.length?n(x.FormText,null,"This person has ",s," to ",Ug(i.length,"plugin"),"!"):n(x.FormText,null,"This person has not made any plugins. They likely ",s," to Vencord in other ways!"),!!i.length&&n("div",{className:Rs("plugins")},i.map(c=>n(Ru,{key:c.name,plugin:c,disabled:c.required??!1,onRestartNeeded:()=>ut("Restart to apply changes!")}))))}var Rs,gu=g(()=>{"use strict";a();l();gb();U();Ze();se();Po();I();Me();fe();Ye();T();On();F1();t1();Rs=me("vc-author-modal-")});async function GS(e=!1){U1={};let t={};e&&(t.cache="no-cache"),U1=await h("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var q3,K3,U1,ks,$1=g(()=>{"use strict";a();l();fb();kl();Yc();se();Wt();Kc();gu();I();Ne();He();fe();Ye();M();T();q3="https://vencord.dev/assets/favicon.png",K3={description:"Vencord Contributor",image:q3,position:0,shouldShow:({userId:e})=>nn(e),onClick:(e,{userId:t})=>Ns(E.getUser(t))},U1={};ks=v({name:"BadgeAPI",description:"API to add badges to users.",authors:[d.Megu,d.Ven,d.TheSun],required:!0,patches:[{find:".FULL_SIZE]:26",replacement:{match:/(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/,replace:";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])"}},{find:"#{intl::PROFILE_USER_BADGES}",replacement:[{match:/(alt:" ","aria-hidden":!0,src:)(.+?)(?=,)(?<=href:(\i)\.link.+?)/,replace:(e,t,o,r)=>`...${r}.props,${t}${r}.image??(${o})`},{match:/(?<="aria-label":(\i)\.description,.{0,200})children:/,replace:"children:$1.component?$self.renderBadgeComponent({...$1}) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick&&{onClick:vcE=>$1.onClick(vcE,$1)}),$&"}]}],toolboxActions:{async"Refetch Badges"(){await GS(!0),oe.show({id:oe.genId(),message:"Successfully refetched badges!",type:oe.Type.SUCCESS})}},userProfileBadge:K3,async start(){await GS()},getBadges(e){if(!e)return[];try{return e.userId??=e.user?.id,G1(e)}catch(t){return new ee("BadgeAPI#hasBadges").error(t),[]}},renderBadgeComponent:k.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return U1[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=Ce(r=>n(k,{noop:!0,onError:()=>{tr(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(Ae,{...r},n(Ue,null,n(he,{style:{width:"100%",justifyContent:"center"}},n(x.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(za,null),"Vencord Donor"))),n(De,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(x.FormText,null,"This Badge is a special perk for Vencord Donors"),n(x.FormText,{className:H.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(bt,null,n(he,{style:{width:"100%",justifyContent:"center"}},n(Ha,null))))))}}))}})});var Du,zS=g(()=>{"use strict";a();l();I();M();Du=v({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[d.Ven],patches:[{find:'"sticker")',replacement:{match:/return\((!)?\i\.\i(?:\|\||&&)(?=\(.+?(\i)\.push)/,replace:(e,t,o)=>t?`${e}(Vencord.Api.ChatButtons._injectButtons(${o},arguments[0]),true)&&`:`${e}(Vencord.Api.ChatButtons._injectButtons(${o},arguments[0]),false)||`}}]})});var Lu,HS=g(()=>{"use strict";a();l();I();M();Lu=v({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 Eu,WS=g(()=>{"use strict";a();l();I();M();Eu=v({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:"navId:",all:!0,noWarn:!0,replacement:[{match:/navId:(?=.+?([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?`contextMenuAPIArguments:typeof arguments!=='undefined'?arguments:[],${e}`:e}]}]})});var Ou,jS=g(()=>{"use strict";a();l();I();M();Ou=v({name:"DynamicImageModalAPI",authors:[d.sadan,d.Nuckyz],description:"Allows you to omit either width or height when opening an image modal",patches:[{find:".dimensionlessImage,",replacement:{match:/(?<="IMAGE"===\i&&\(\i=)\i(?=\?)/,replace:"true"}}]})});var qS,KS=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/_api/memberListDecorators/style.css",{name:"src/plugins/_api/memberListDecorators/style.css",source:`.vc-member-list-decorators-wrapper { display: flex; align-items: center; justify-content: center; gap: 0.25em; } .vc-member-list-decorators-wrapper:not(:empty) { /* Margin to match default Discord decorators */ margin-left: 0.25em; } `,classNames:{},dom:null});qS="src/plugins/_api/memberListDecorators/style.css"});var Bu,YS=g(()=>{"use strict";a();l();I();M();KS();Bu=v({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[d.TheSun,d.Ven],managedStyle:qS,patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/#{intl::GUILD_OWNER}(?=.+?decorators:(\i)\(\)).+?\1=?\(\)=>.+?children:\[/,replace:"$&(typeof vencordProps=='undefined'?null: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 ZS,_u,QS=g(()=>{"use strict";a();l();I();Bo();M();ZS={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"},_u=v({name:"MenuItemDemanglerAPI",description:"Demangles Discord's Menu Item module",authors:[d.Ven],required:!0,patches:[{find:'"Menu API',replacement:{match:/function.{0,80}type===(\i\.\i)\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let o=[],r=Rt(/\(\i\.type===(\i\.\i)\)/g),i=/type:"(\w+)"/g,s;for(;(s=r.exec(e))!==null;){let c=s[1];i.lastIndex=r.lastIndex;let u=i.exec(e)?.[1];if(u&&u in ZS){let p=ZS[u];o.push(`Object.defineProperty(${c},"name",{value:"${p}"})`)}}return o.length<6&&console.warn("[MenuItemDemanglerAPI] Expected to at least remap 6 items, only remapped",o.length),`${o.join(";")};${e}`}}}]})});var Fu,JS=g(()=>{"use strict";a();l();I();M();Fu=v({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[d.Cyn],patches:[{find:"#{intl::REMOVE_ATTACHMENT_BODY}",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var XS,VS=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/_api/messageDecorations/style.css",{name:"src/plugins/_api/messageDecorations/style.css",source:`.vc-message-decorations-wrapper { display: inline-flex; align-items: center; justify-content: center; gap: 0.25em; } .vc-message-decorations-wrapper:not(:empty) { /* Margin to match default Discord decorators */ margin-left: 0.25em; /* Align vertically */ position: relative; vertical-align: top; top: 0.1rem; height: calc(1rem + 4px); max-height: calc(1rem + 4px) } `,classNames:{},dom:null});XS="src/plugins/_api/messageDecorations/style.css"});var Uu,e2=g(()=>{"use strict";a();l();I();M();VS();Uu=v({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[d.TheSun],managedStyle:XS,patches:[{find:'"Message Username"',replacement:{match:/#{intl::GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE}.+?renderPopout:.+?(?=\])/,replace:"$&,Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var $u,t2=g(()=>{"use strict";a();l();I();M();$u=v({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[d.Arjix,d.hunt,d.Ven],patches:[{find:"#{intl::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({shouldClear:false,shouldRefocus:true});`}},{find:".handleSendMessage,onResize",replacement:{match:/let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptions\(\{.+?\}\);(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i)=>e+`if(await Vencord.Api.MessageEvents._handlePreSend(${o}.id,${t},${i},${r}))return{shouldClear:false,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 Gu,o2=g(()=>{"use strict";a();l();I();M();Gu=v({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[d.KingFish,d.Ven,d.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/(?<=:null),(.{0,40}togglePopout:.+?}\)),(.+?)\]}\):null,(?<=\((\i\.\i),{label:.+?:null,(\i&&!\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,replace:(e,t,o,r,i,s)=>`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${r},${s}),${i}?${t}:null,${i}&&${o},`}}]})});var zu,n2=g(()=>{"use strict";a();l();I();M();zu=v({name:"MessageUpdaterAPI",description:"API for updating and re-rendering messages.",authors:[d.Nuckyz],patches:[{find:"}renderEmbeds(",replacement:{match:/(?<=this.props,\i,\[)"message",/,replace:""}}]})});var Hu,r2=g(()=>{"use strict";a();l();I();M();Hu=v({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[d.Ven],required:!0,patches:[{find:'"NoticeStore"',replacement:[{match:/(?<=!1;)\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 Wu,i2=g(()=>{"use strict";a();l();I();M();Wu=v({name:"ServerListAPI",authors:[d.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"#{intl::DISCODO_DISABLED}",replacement:{match:/(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"#{intl::SERVERS}),children",replacement:{match:/(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var ju,s2=g(()=>{"use strict";a();l();I();M();ju=v({name:"UserSettingsAPI",description:"Patches Discord's UserSettings to expose their group and name.",authors:[d.Nuckyz],patches:[{find:",updateSetting:",replacement:[{match:/(?<=INFREQUENT_USER_ACTION.{0,20},)useSetting:/,replace:"userSettingsAPIGroup:arguments[0],userSettingsAPIName:arguments[1],$&"},{match:/updateSetting:.{0,100}SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE/,replace:"userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&"},{match:/updateSetting:.{0,60}USER_SETTINGS_OVERRIDE_CLEAR/,replace:"userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&"}]}]})});var a2,qu,l2=g(()=>{"use strict";a();l();U();I();Ne();M();a2=C({disableAnalytics:{type:3,description:"Disable Discord's tracking (analytics/'science')",default:!0,restartNeeded:!0}}),qu=v({name:"NoTrack",description:"Disable Discord's tracking (analytics/'science'), metrics and Sentry crash reporting",authors:[d.Cyn,d.Ven,d.Nuckyz,d.Arrow],required:!0,settings:a2,patches:[{find:"AnalyticsActionHandlers.handle",predicate:()=>a2.store.disableAnalytics,replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=void 0&&"},{match:/(?:increment|distribution)\(\i(?:,\i)?\){/g,replace:"$&return;"}]},{find:".BetterDiscord||null!=",replacement:{match:/(?=let \i=window;)/,replace:"return false;"}}],startAt:"Init",start(){Object.defineProperty(Function.prototype,"g",{configurable:!0,set(e){Object.defineProperty(this,"g",{value:e,configurable:!0,enumerable:!0,writable:!0});let{stack:t}=new Error;if(this.c!=null||!t?.includes("http")||!String(this).includes("exports:{}"))return;let o=t.match(/http.+?(?=:\d+?:\d+?$)/m)?.[0];if(!o)return;let r=new XMLHttpRequest;if(r.open("GET",o,!1),r.send(),!!r.responseText.includes(".DiscordSentry="))throw new ee("NoTrack","#8caaee").info("Disabling Sentry by erroring its WebpackInstance"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(unsafeWindow,"DiscordSentry"),new Error("Sentry successfully disabled")}}),Object.defineProperty(unsafeWindow,"DiscordSentry",{configurable:!0,set(){new ee("NoTrack","#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(unsafeWindow,"DiscordSentry")}})}})});function Y3(){return n(Jo,{title:"Backup & Restore"},n(oo,{className:W("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(X,{variant:"text-md/normal",className:H.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(X,{variant:"text-md/normal",className:H.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(A,{onClick:()=>Zb(),size:A.Sizes.SMALL},"Import Settings"),n(A,{onClick:Kb,size:A.Sizes.SMALL},"Export Settings")))}var c2,u2=g(()=>{"use strict";a();l();Wt();He();fe();al();T();fr();c2=Un(Y3,"Backup & Restore")});function p2(e){let t={display:e.inline?"inline-grid":"grid",gridTemplateColumns:`repeat(${e.columns}, 1fr)`,gap:e.gap,...e.style};return n("div",{...e,style:t},e.children)}var d2=g(()=>{"use strict";a();l()});function Z3(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function Q3(){let e=await h(new URL("/v1/",$r()),{method:"DELETE",headers:{Authorization:await Ts()}});if(!e.ok){su.error(`Failed to erase data, API returned ${e.status}`),Qe({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}Q.cloud.authenticated=!1,await au(),Qe({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function J3(){let{cloud:e}=Ft(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(x.FormSection,{title:"Settings Sync",className:H.top16},n(x.FormText,{variant:"text-md/normal",className:H.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(Ko,{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(A,{size:A.Sizes.SMALL,disabled:!t,onClick:()=>Ms(!0)},"Sync to Cloud"),n(re,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(A,{onMouseLeave:o,onMouseEnter:r,size:A.Sizes.SMALL,color:A.Colors.RED,disabled:!t,onClick:()=>pu(!0,!0)},"Sync from Cloud")),n(A,{size:A.Sizes.SMALL,color:A.Colors.RED,disabled:!t,onClick:()=>Qb()},"Delete Cloud Settings")))}function X3(){let e=Ft(["cloud.authenticated","cloud.url"]);return n(Jo,{title:"Vencord Cloud"},n(x.FormSection,{title:"Cloud Settings",className:H.top16},n(x.FormText,{variant:"text-md/normal",className:H.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(ot,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(ot,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(Ko,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t?_h():e.cloud.authenticated=t},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(x.FormTitle,{tag:"h5"},"Backend URL"),n(x.FormText,{className:H.bottom8},"Which backend to use when using cloud integrations."),n(ja,{key:"backendUrl",value:e.cloud.url,onChange:async t=>{e.cloud.url=t,e.cloud.authenticated=!1,au()},validate:Z3}),n(p2,{columns:2,gap:"1em",className:H.top8},n(A,{size:A.Sizes.MEDIUM,disabled:!e.cloud.authenticated,onClick:async()=>{await au(),e.cloud.authenticated=!1,await _h()}},"Reauthorise"),n(A,{size:A.Sizes.MEDIUM,color:A.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>ft.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:Q3,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data")),n(x.FormDivider,{className:H.top16})),n(J3,null))}var m2,f2=g(()=>{"use strict";a();l();ar();U();Xc();d2();Po();Fh();He();al();T();fr();m2=Un(X3,"Cloud")});var VK,g2=g(()=>{"use strict";a();l();Vc();ci();He();Bo();Zo();G();T();fr();VK=fo(function({find:e,setModule:t,setError:o}){let r=is(e),i=Object.keys(r),s=i.length;s===0?o("No match. Perhaps that module is lazy loaded?"):s!==1?o("Multiple matches. Please refine your filter"):t([i[0],r[i[0]]])})});var h2,y2=g(()=>{"use strict";a();l();F1();fr();h2=Un(_1,"Plugins")});var v2=g(()=>{});function hr(e){let{Icon:t,action:o,text:r,disabled:i}=e;return n("button",{className:z1("pill"),onClick:o,disabled:i},n(t,{className:z1("img")}),r)}function Ku(e){return n(oo,{className:z1("card")},e.children)}var z1,H1=g(()=>{"use strict";a();l();v2();Ze();T();z1=me("vc-settings-quickActions-")});function tR({link:e}){let[t,o,r]=kt(()=>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(x.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function oR({themeLinks:e}){return e.length?n(f,null,n(x.FormTitle,{className:H.top20,tag:"h5"},"Validator"),n(x.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>{let{label:o,link:r}=(()=>{let i=/^@(light|dark) (.*)/.exec(t);if(!i)return{label:t,link:t};let[,s,c]=i;return{label:`[${s} mode only] ${c}`,link:c}})();return n(oo,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:r},n(x.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},o),n(tR,{link:r}))}))):null}function nR({theme:e,enabled:t,onChange:o,onDelete:r}){return n(hu,{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(sr,null)),footer:n(he,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(ot,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(ot,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&Mi(e.invite).catch(()=>ut("Invalid or expired invite"))}},"Discord Server"))})}function rR(){let e=Ft(["themeLinks","enabledThemes"]),t=vt(null),[o,r]=q(0),[i,s]=q(e.themeLinks.join(` `)),[c,u]=q(null),[p,,m]=kt(VencordNative.themes.getThemesDir);ue(()=>{y()},[]);async function y(){let R=await VencordNative.themes.getThemesList();u(R)}function b(R,D){if(D){if(e.enabledThemes.includes(R))return;e.enabledThemes=[...e.enabledThemes,R]}else e.enabledThemes=e.enabledThemes.filter(O=>O!==R)}async function S(R){if(R.stopPropagation(),R.preventDefault(),!R.currentTarget?.files?.length)return;let{files:D}=R.currentTarget,O=Array.from(D,$=>{let{name:j}=$;if(j.endsWith(".css"))return new Promise((V,ie)=>{let ne=new FileReader;ne.onload=()=>{VencordNative.themes.uploadTheme(j,ne.result).then(V).catch(ie)},ne.readAsText($)})});await Promise.all(O),y()}function N(){return n(f,null,n(oo,{className:"vc-settings-card"},n(x.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(ot,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(ot,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(x.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(x.FormSection,{title:"Local Themes"},n(Ku,null,n(f,null,n(hr,{text:n("span",{style:{position:"relative"}},"Upload Theme",n(V3,{ref:t,onChange:S,multiple:!0,filters:[{extensions:["css"]}]})),Icon:Ja}),n(hr,{text:"Load missing Themes",action:y,Icon:hh}),n(hr,{text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor(),Icon:Va}),Q.plugins.ClientTheme.enabled&&n(hr,{text:"Edit ClientTheme",action:()=>zr(We.ClientTheme),Icon:yh}))),n("div",{className:eR("grid")},c?.map(R=>n(nR,{key:R.fileName,enabled:e.enabledThemes.includes(R.fileName),onChange:D=>b(R.fileName,D),onDelete:async()=>{b(R.fileName,!1),await VencordNative.themes.deleteTheme(R.fileName),y()},theme:R})))))}function P(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(R=>R.trim()).filter(Boolean))]}function w(){return n(f,null,n(oo,{className:"vc-settings-card vc-text-selectable"},n(x.FormTitle,{tag:"h5"},"Paste links to css files here"),n(x.FormText,null,"One link per line"),n(x.FormText,null,"You can prefix lines with @light or @dark to toggle them based on your Discord theme"),n(x.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(x.FormSection,{title:"Online Themes",tag:"h5"},n(_c,{value:i,onChange:s,className:"vc-settings-theme-links",placeholder:"Theme Links",spellCheck:!1,onBlur:P,rows:10}),n(oR,{themeLinks:e.themeLinks})))}return n(Jo,{title:"Themes"},n(xo,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(xo.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(xo.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&N(),o===1&&w())}var V3,eR,b2,S2=g(()=>{"use strict";a();l();U();Ze();Wt();It();Po();ml();Me();He();pr();wt();G();T();On();n1();H1();fr();V3=Tt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),eR=me("vc-settings-theme-");b2=Un(rR,"Themes")});var Yu=g(()=>{"use strict";a();l();U();Ai();Wt();Po();He();fe();Ye();pr();wt();Li();T();Cs();fr()});var x2=g(()=>{});function Zu({title:e,subtitle:t,description:o,cardImage:r,backgroundImage:i,backgroundColor:s,buttonTitle:c,buttonOnClick:u,children:p}){let m={backgroundColor:s||"#9c85ef",backgroundImage:`url(${i||""})`};return n(oo,{className:Sn("card","card-special"),style:m},n("div",{className:Sn("card-flex")},n("div",{className:Sn("card-flex-main")},n(x.FormTitle,{className:Sn("title"),tag:"h5"},e),n(x.FormText,{className:Sn("subtitle")},t),n(x.FormText,{className:Sn("text")},o),p),r&&n("div",{className:Sn("image-container")},n("img",{role:"presentation",src:r,alt:"",className:Sn("image")}))),c&&n(f,null,n(x.FormDivider,{className:Sn("seperator")}),n(Vn,{onClick:u,className:Sn("hyperlink")},n(x.FormText,{className:Sn("hyperlink-text")},c))))}var Sn,T2=g(()=>{"use strict";a();l();x2();Ze();T();Sn=me("vc-special-")});function uR(){let[e,,t]=kt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=Ft(),r=te.useMemo(()=>Math.random()>.5?iR:sR,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),c=!1,u=E.getCurrentUser(),p=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},!1,!1,!1,!1,!1];return n(Jo,{title:"Vencord Settings"},pR(u?.id)?n(Zu,{title:"Donations",subtitle:"Thank you for donating!",description:"You can manage your perks at any time by messaging @vending.machine.",cardImage:aR,backgroundImage:w2,backgroundColor:"#ED87A9"},n(M2,null)):n(Zu,{title:"Support the Project",description:"Please consider supporting the development of Vencord by donating!",cardImage:r,backgroundImage:w2,backgroundColor:"#c3a3ce"},n(M2,null)),nn(u?.id)&&n(Zu,{title:"Contributions",subtitle:"Thank you for contributing!",description:"Since you've contributed to Vencord you now have a cool new badge!",cardImage:lR,backgroundImage:cR,backgroundColor:"#EDCC87",buttonTitle:"See what you've contributed to",buttonOnClick:()=>Ns(u)}),n(x.FormSection,{title:"Quick Actions"},n(Ku,null,n(hr,{Icon:gh,text:"Notification Log",action:ol}),n(hr,{Icon:Va,text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),!1,!1,n(hr,{Icon:el,text:"View Source Code",action:()=>VencordNative.native.openExternal("https://github.com/"+Di)}))),n(x.FormDivider,null),n(x.FormSection,{className:H.top16,title:"Settings",tag:"h5"},n(x.FormText,{className:H.bottom20,style:{color:"var(--text-muted)"}},"Hint: You can change the position of this settings section in the"," ",n(A,{look:A.Looks.BLANK,style:{color:"var(--text-link)",display:"inline-block"},onClick:()=>zr(Vencord.Plugins.plugins.Settings)},"settings of the Settings plugin"),"!"),p.map(m=>m&&n(Ko,{key:m.key,value:o[m.key],onChange:y=>o[m.key]=y,note:m.note},m.title))),c&&n(f,null,n(x.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(Yo,{className:H.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:m=>o.macosVibrancyStyle=m,isSelected:m=>o.macosVibrancyStyle===m,serialize:ss})),n(x.FormSection,{className:H.top16,title:"Vencord Notifications",tag:"h5"},n(he,null,n(A,{onClick:tu},"Notification Settings"),n(A,{onClick:ol},"View Notification Log"))))}function M2(){return n(Ha,{look:A.Looks.FILLED,color:A.Colors.WHITE,style:{marginTop:"1em"}})}function pR(e){let t=ks.getDonorBadges(e);return ke.getMember(ua,e)?.roles.includes(pa)||!!t}var $Z,iR,sR,aR,lR,w2,cR,P2,I2=g(()=>{"use strict";a();l();nu();U();Ze();Yc();gu();ml();Xh();I();He();fe();pr();wt();T();$1();Ss();Mh();H1();fr();T2();$Z=me("vc-settings-"),iR="https://cdn.discordapp.com/emojis/1026533090627174460.png",sR="https://media.discordapp.net/stickers/1039992459209490513.png",aR="https://cdn.discordapp.com/emojis/1238120638020063377.png",lR="https://cdn.discordapp.com/emojis/1026533070955872337.png",w2="https://media.discordapp.net/stickers/1311070116305436712.png?size=2048",cR="https://media.discordapp.net/stickers/1311070166481895484.png?size=2048";P2=Un(uR,"Vencord Settings")});var Ds,W1=g(()=>{"use strict";a();l();U();u2();f2();g2();y2();S2();Yu();I2();I();Me();M();Cs();Ds=v({name:"Settings",description:"Adds Settings UI and debug info",authors:[d.Ven,d.Megu],required:!0,patches:[{find:".versionHash",replacement:[{match:/\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},$self.makeInfoElements(${t}, ${o})`)},{match:/copyValue:\i\.join\(" "\)/,replace:"$& + $self.getInfoString()"}]},{find:".SEARCH_NO_RESULTS&&0===",replacement:[{match:/(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/,replace:(e,t,o,r,i)=>`${o} $self.addSettings(${r}, ${i}, ${t}) ${o}`},{match:/({(?=.+?function (\i).{0,160}(\i)=\i\.useMemo.{0,140}return \i\.useMemo\(\(\)=>\i\(\3).+?(?:function\(\){return |\(\)=>))\2/,replace:(e,t,o)=>`${t}$self.wrapSettingsHook(${o})`}]},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",replacement:{match:/(?<=function\((\i),\i\)\{)(?=let \i=Object.values\(\i.\i\).*?(\i\.\i)\.open\()/,replace:"$2.open($1);return;"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:P2,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:h2,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:b2,className:"vc-themes"},!1,{section:"VencordCloud",label:"Cloud",element:m2,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:c2,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},isRightSpot({header:e,settings:t}){let o=t?.[0];if(o==="LOGOUT"||o==="SOCIAL_LINKS")return!0;let{settingsLocation:r}=Q.plugins.Settings;if(r==="bottom")return o==="LOGOUT";if(r==="belowActivity")return o==="CHANGELOG";if(e)try{let i={top:we("USER_SETTINGS"),aboveNitro:we("BILLING_SETTINGS"),belowNitro:we("APP_SETTINGS"),aboveActivity:we("ACTIVITY_SETTINGS")};return!i[r]||i[r].endsWith("_SETTINGS")?o==="PREMIUM":e===i[r]}catch{return o==="PREMIUM"}},patchedSettings:new WeakSet,addSettings(e,t,o){this.patchedSettings.has(e)||!this.isRightSpot(t)||(this.patchedSettings.add(e),e.push(...this.makeSettingsCategories(o)))},wrapSettingsHook(e){return(...t)=>{let o=e(...t);return this.patchedSettings.has(o)||o.unshift(...this.makeSettingsCategories({HEADER:"HEADER",DIVIDER:"DIVIDER",CUSTOM:"CUSTOM"})),o}},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",default:!0},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity"},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}]}},get electronVersion(){return VencordNative.native.getVersions().electron||unsafeWindow.legcord?.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)"},getInfoRows(){let{electronVersion:e,chromiumVersion:t,additionalInfo:o}=this,r=[`Vencord ${Fn}${o}`];return e&&r.push(`Electron ${e}`),t&&r.push(`Chromium ${t}`),r},getInfoString(){return` `+this.getInfoRows().join(` `)},makeInfoElements(e,t){return this.getInfoRows().map((o,r)=>n(e,{key:r,...t},o))}})});var q1={};it(q1,{UserSettings:()=>j1,getUserSetting:()=>C2,getUserSettingLazy:()=>Co});function C2(e,t){if(!Vencord.Plugins.isPluginEnabled("UserSettingsAPI"))throw new Error("Cannot use UserSettingsAPI without setting as dependency.");for(let o in j1){let r=j1[o];if(r.userSettingsAPIGroup===e&&r.userSettingsAPIName===t)return r}}function Co(e,t){return At(()=>C2(e,t))}var j1,yr=g(()=>{"use strict";a();l();So();Ne();G();j1=Ro(()=>{let e=Lr('"textAndImages","renderSpoilers"');return e==null?new ee("UserSettingsAPI ").error("Didn't find settings module."):yt(e)})});async function A2(){let{RELEASE_CHANNEL:e}=unsafeWindow.GLOBAL_ENV,t="legcord"in unsafeWindow?`Legcord v${unsafeWindow.legcord.version}`:`${typeof unsafeWindow<"u"?"UserScript":"Web"} (${navigator.userAgent})`,o={Vencord:`v1.11.9 \u2022 [${Fn}]()${Ds.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1744298100693)}`,Client:`${e} ~ ${t}`,Platform:unsafeWindow.navigator.platform},r={"NoRPC enabled":Vencord.Plugins.isPluginEnabled("NoRPC"),"Activity Sharing disabled":$g(()=>!hR.getSetting(),!1),"Vencord DevBuild":!1,"Has UserPlugins":Object.values(As).some(s=>s.userPlugin),"More than two weeks out of date":1744298100693>> ${Object.entries(o).map(([s,c])=>`**${s}**: ${c}`).join(` `)}`;return i+=` `+Object.entries(r).filter(([,s])=>s).map(([s])=>`\u26A0\uFE0F ${s}`).join(` `),i.trim()}function R2(){let e=s=>s.endsWith("API")||We[s].required,t=Object.keys(We).filter(s=>Vencord.Plugins.isPluginEnabled(s)&&!e(s)),o=t.filter(s=>!As[s].userPlugin),r=t.filter(s=>As[s].userPlugin),i=`**Enabled Plugins (${o.length}):** ${Ni(o.join(", "))}`;return r.length&&(i+=`**Enabled UserPlugins (${r.length}):** ${Ni(r.join(", "))}`),i}var dR,mR,fR,gR,hR,N2,UQ,yR,Qu,k2=g(()=>{"use strict";a();l();U();yr();se();Wt();Po();Yu();I();Me();Ne();He();fe();pr();Ua();Zo();M();Li();T();Cs();On();W1();dR=/```js\n(.+?)```/s,mR=["1024286218801926184"],fR=[Rg,kg,pa],gR=async function(){}.constructor,hR=Co("status","showCurrentGame"),N2=e=>e.parent_id===da||mR.includes(e.id);UQ=Ci(hl),yR=C({}).withPrivateSettings(),Qu=v({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[d.Ven],dependencies:["UserSettingsAPI"],settings:yR,patches:[{find:"#{intl::BEGINNING_DM}",replacement:{match:/#{intl::BEGINNING_DM},{.+?}\),(?=.{0,300}(\i)\.isMultiUserDM)/,replace:"$& $self.renderContributorDmWarningCard({ channel: $1 }),"}}],commands:[{name:"vencord-debug",description:"Send Vencord debug info",predicate:e=>nn(E.getCurrentUser()?.id)||N2(e.channel),execute:async()=>({content:await A2()})},{name:"vencord-plugins",description:"Send Vencord plugin list",predicate:e=>nn(E.getCurrentUser()?.id)||N2(e.channel),execute:()=>({content:R2()})}],flux:{async CHANNEL_SELECT({channelId:e}){if(!(e===wc||ae.getChannel(e)?.parent_id===da))return;let o=E.getCurrentUser()?.id;if(!o||nn(o))return;let r=ke.getSelfMember(ua)?.roles;!r||fR.some(i=>r.includes(i))}},renderMessageAccessory(e){let t=[];if(e.channel.parent_id===da&&Be.can(Ie.SEND_MESSAGES,e.channel)&&((e.message.content.includes("/vencord-debug")||e.message.content.includes("/vencord-plugins"))&&t.push(n(A,{key:"vc-dbg",onClick:async()=>ys(e.channel.id,{content:await A2()})},"Run /vencord-debug"),n(A,{key:"vc-plg-list",onClick:async()=>ys(e.channel.id,{content:R2()})},"Run /vencord-plugins")),e.message.author.id===Ag)){let r=dR.exec(e.message.content||e.message.embeds[0]?.rawDescription||"");r&&t.push(n(A,{key:"vc-run-snippet",onClick:async()=>{try{await gR(r[1])(),ut("Success!",oe.Type.SUCCESS)}catch(i){new ee(this.name).error("Error while running snippet:",i),ut("Failed to run snippet :(",oe.Type.FAILURE)}}},"Run Snippet"))}return t.length?n(he,null,t):null},renderContributorDmWarningCard:k.wrap(({channel:e})=>{let t=e.getRecipientId();return!nn(t)||_e.isFriend(t)||nn(E.getCurrentUser()?.id)?null:n(oo,{className:`vc-plugins-restart-card ${H.top8}`},"Please do not private message Vencord plugin developers for support!",n("br",null),"Instead, use the Vencord support channel: ",Fe.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),!ae.getChannel(wc)&&" (Click the link to join)")},{noop:!0})})});var vR,bR,Ju,Dl,SR,Ll,Xu,D2=g(()=>{"use strict";a();l();U();se();I();Me();M();G();T();vR=le("UserProfilePopoutWrapper: user cannot be undefined"),bR=L("accountProfilePopoutWrapper"),Ju=!1,Dl={current:null},SR=k.wrap(()=>{let{prioritizeServerProfile:e}=Ll.use(["prioritizeServerProfile"]);return n(B.Menu,{navId:"vc-ap-server-profile",onClose:Dt.closeContextMenu},n(B.MenuItem,{id:"vc-ap-view-alternate-popout",label:e?"View Account Profile":"View Server Profile",disabled:Uo()?.getGuildId()==null,action:t=>{Ju=!0,Dl.current?.props.onMouseDown(),Dl.current?.props.onClick(t)}}),n(B.MenuCheckboxItem,{id:"vc-ap-prioritize-server-profile",label:"Prioritize Server Profile",checked:e,action:()=>Ll.store.prioritizeServerProfile=!e}))},{noop:!0}),Ll=C({prioritizeServerProfile:{type:3,description:"Prioritize Server Profile when left clicking your account panel",default:!1}}),Xu=v({name:"AccountPanelServerProfile",description:"Right click your account panel in the bottom left to view your profile in the current server",authors:[d.Nuckyz,d.relitrix],settings:Ll,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",group:!0,replacement:[{match:/let{speaking:\i/,replace:"$self.useAccountPanelRef();$&"},{match:/(\.AVATAR,children:.+?renderPopout:(\i)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,replace:(e,t,o,r,i)=>`${t}$self.UserProfile({popoutProps:${o},currentUser:${i},originalRenderPopout:()=>{${r}}})`},{match:/\.AVATAR,children:.+?onRequestClose:\(\)=>\{/,replace:"$&$self.onPopoutClose();"},{match:/(?<=#{intl::SET_STATUS}\),)/,replace:"ref:$self.accountPanelRef,onContextMenu:$self.openAccountPanelContextMenu,"}]}],get accountPanelRef(){return Dl},useAccountPanelRef(){return ue(()=>()=>{Dl.current=null},[]),Dl=vt(null)},openAccountPanelContextMenu(e){Dt.openContextMenu(e,SR)},onPopoutClose(){Ju=!1},UserProfile:k.wrap(({popoutProps:e,currentUser:t,originalRenderPopout:o})=>{if(Ll.store.prioritizeServerProfile&&Ju||!Ll.store.prioritizeServerProfile&&!Ju)return o();let r=Uo();return r?.getGuildId()==null?o():n("div",{className:bR.accountProfilePopoutWrapper},n(vR,{...e,userId:t.id,guildId:r.getGuildId(),channelId:r.id}))},{noop:!0})})});var Vu,L2=g(()=>{"use strict";a();l();I();M();Vu=v({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${t}`:e}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(\.CUSTOM_STATUS.+?animate:)\i/,replace:"$1!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(\.headerContent.+?guildBanner:\i,animate:)\i/,replace:"$1!0"}}]})});var ep,E2=g(()=>{"use strict";a();l();U();I();M();dr("AlwaysExpandRoles","ShowAllRoles");ep=v({name:"AlwaysExpandRoles",description:"Always expands the role list in profile popouts",authors:[d.surgedevs],patches:[{find:'action:"EXPAND_ROLES"',replacement:[{match:/(roles:\i(?=.+?(\i)\(!0\)[,;]\i\({action:"EXPAND_ROLES"}\)).+?\[\i,\2\]=\i\.useState\()!1\)/,replace:(e,t,o)=>`${t}!0)`},{match:/(?<=useLayoutEffect\(\(\)=>{if\()\i/,replace:e=>"false"}]}]})});var K1,tp,O2=g(()=>{"use strict";a();l();U();I();M();K1=C({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}}),tp=v({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:()=>K1.store.domain},{find:"bitbucket.org",replacement:{match:/function \i\(\i\){(?=.{0,30}pathname:\i)/,replace:"$&return null;"},predicate:()=>K1.store.file}],settings:K1})});var xR,TR,wR,Kr,op,B2=g(()=>{"use strict";a();l();U();se();I();M();G();xR=ve(".actionBarIcon)"),TR=L("popFirstFile","update"),wR=/\.tar\.\w+$/,Kr=C({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:()=>Kr.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>Kr.store.method!==1}}),op=v({name:"AnonymiseFileNames",authors:[d.fawn],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:",replacement:{match:/uploadFiles:(\i),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),"}},{find:'addFilesTo:"message.attachments"',replacement:{match:/(\i.uploadFiles\((\i),)/,replace:"$2.forEach(f=>f.filename=$self.anonymise(f)),$1"}},{find:"#{intl::ATTACHMENT_UTILITIES_SPOILER}",replacement:{match:/(?<=children:\[)(?=.{10,80}tooltip:.{0,100}#{intl::ATTACHMENT_UTILITIES_SPOILER})/,replace:"arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null,"}}],settings:Kr,renderIcon:k.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??Kr.store.anonymiseByDefault;return n(xR,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,TR.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??Kr.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=wR.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(Kr.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:Kr.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return Kr.store.consistent+i;case 2:return Date.now()+i}}})});async function _2(e,t){return(await Ti.fetchAssetIds(e,[t]))[0]}async function PR(e){let t={};return await MR(t,e),t.application}var MR,F2,Ls,np,U2=g(()=>{"use strict";a();l();du();Po();I();M();G();T();MR=ve('"Invalid Origin"',".application");F2={};np=v({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[d.Ducko],reporterTestable:2,settingsAboutComponent:()=>n(f,null,n(x.FormTitle,{tag:"h3"},"How to use arRPC"),n(x.FormText,null,n(ot,{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 _2(o.application_id,r.large_image)),r?.small_image&&(r.small_image=await _2(o.application_id,r.small_image)),o){let i=o.application_id;F2[i]||=await PR(i);let s=F2[i];o.name||=s.name}z.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("legcord"in unsafeWindow)return;if(Ls&&Ls.close(),Ls=new WebSocket("ws://127.0.0.1:1337"),Ls.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(Ls.readyState===WebSocket.OPEN),1e3))){cl("Failed to connect to arRPC, is it running?","Retry",()=>{Wh(),this.start()});return}oe.show({message:"Connected to arRPC",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})},stop(){z.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),Ls?.close()}})});var $2,rp,G2=g(()=>{"use strict";a();l();U();I();M();$2=C({source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}),rp=v({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[d.Xinto,d.Glitch],settings:$2,patches:[{find:"#{intl::BAN_CONFIRM_TITLE}",replacement:{match:/src:\i\("?\d+"?\)/g,replace:"src:$self.source"}}],get source(){return $2.store.source}})});var z2=g(()=>{});var H2,IR,W2,j2=g(()=>{"use strict";a();l();se();G();T();Z1();H2=be("ChannelRTCStore"),IR=le('("guildsnav")'),W2=k.wrap(e=>{let t=Se([Es],()=>Es.getExpandedFolders()),o=Se([H2],()=>H2.isFullscreenInContext()),r=n(IR,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(u=>`.${u}`).join("")),c={display:o?"none":"flex",gridArea:"betterFoldersSidebar"};return!s||!$t.store.sidebarAnim?i?n("div",{style:c},r):null:n(Uc.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(u,p)=>p&&n(Uc.animated.div,{style:{...u,...c}},r))},{noop:!0})});function AR(e){return CR.getGuildFolders().find(t=>t.guildIds.includes(e))}function J1(){for(let e of Es.getExpandedFolders())X1.toggleGuildFolderExpand(e)}var Es,CR,NR,X1,q2,Q1,$t,ip,Z1=g(()=>{"use strict";a();l();z2();U();I();Me();M();G();T();j2();Es=be("ExpandedGuildFolderStore"),CR=be("SortedGuildStore"),NR=Tt(e=>e.prototype?.moveNextTo),X1=L("move","toggleGuildFolderExpand"),q2=null,Q1=!1;$t=C({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}}),ip=v({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[d.juby,d.AutumnVN,d.Nuckyz],settings:$t,patches:[{find:'("guildsnav")',predicate:()=>$t.store.sidebar,replacement:[{match:/let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i,)/,replace:"$&,isBetterFolders"},{match:/\[(\i)\]=(\(0,\i\.\i\).{0,40}getGuildsTree\(\).+?}\))(?=,)/,replace:(e,t,o)=>`[betterFoldersOriginalTree]=${o},${t}=$self.getGuildTree(!!arguments[0]?.isBetterFolders,betterFoldersOriginalTree,arguments[0]?.betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?}\)(?::null)?\](?=}\))/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0]?.isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0]?.isBetterFolders))"},{match:/switch\(\i\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,/,replace:'$&isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".toggleGuildFolderExpand(",predicate:()=>$t.store.sidebar&&$t.store.showFolderIcon!==1,replacement:[{match:/(\],\(\)=>)(\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:".expandedFolderBackground,",predicate:()=>$t.store.sidebar,replacement:[{predicate:()=>$t.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0]?.isBetterFolders&&${t};`},{predicate:()=>!$t.store.keepIcons,match:/(?=,\{from:\{height)/,replace:"&&$self.shouldShowTransition(arguments[0])"},{predicate:()=>!$t.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}$self.shouldRenderContents(arguments[0],${t})?null:`},{predicate:()=>$t.store.showFolderIcon!==1,match:/\.isExpanded\),.{0,30}children:\[/,replace:"$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&"},{predicate:()=>$t.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:"},{predicate:()=>!$t.store.keepIcons,match:/(?=className:.{0,50}folderIcon)/,replace:"style:arguments[0]?.isBetterFolders?{}:{marginBottom:0},"}]},{find:"APPLICATION_LIBRARY,render:",predicate:()=>$t.store.sidebar,group:!0,replacement:[{match:/(?<=[[,])((?:!?\i&&)+)\(.{0,50}({className:\i\.guilds,themeOverride:\i})\)/g,replace:(e,t,o)=>`${e},${t}$self.FolderSideBar(${o})`},{match:/(?<=className:)(\i\.base)(?=,)/,replace:"`${$self.gridStyle} ${$1}`"}]},{find:"#{intl::DISCODO_DISABLED}",predicate:()=>$t.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!$t.store.closeAllFolders&&!$t.store.forceOpen)&&q2!==e.guildId){q2=e.guildId;let t=AR(e.guildId);t?.folderId?$t.store.forceOpen&&!Es.isFolderExpanded(t.folderId)&&X1.toggleGuildFolderExpand(t.folderId):$t.store.closeAllFolders&&J1()}},TOGGLE_GUILD_FOLDER_EXPAND(e){$t.store.closeOthers&&!Q1&&(Q1=!0,z.wait(()=>{let t=Es.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&X1.toggleGuildFolderExpand(o);Q1=!1}))},LOGOUT(){J1()}},gridStyle:"vc-betterFolders-sidebar-grid",getGuildTree(e,t,o){return Re(()=>{if(!e||o==null)return t;let r=new NR;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},[e,t,o])},makeGuildsBarGuildListFilter(e){return t=>{if(!e)return!0;try{return t?.props?.["aria-label"]===we("SERVERS")}catch(o){console.error(o)}return!0}},makeGuildsBarTreeFilter(e){return t=>e?t?.props?.className?.includes("itemsContainer")&&t.props.children!=null?(t.props.children=t.props.children.filter(o=>o?.props?.onScroll!=null),!0):!1:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch($t.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},shouldShowTransition(e){return e?.folderNode?.id===1?!0:!!e?.isBetterFolders},shouldRenderContents(e,t){return e?.folderNode?.id===1?!1:!e?.isBetterFolders&&t},FolderSideBar:W2,closeFolders:J1})});var sp,K2=g(()=>{"use strict";a();l();I();M();sp=v({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:"#{intl::GIF}",replacement:{match:/alt:(\i)=(\i\.\i\.string\(\i\.\i#{intl::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 ap,Y2=g(()=>{"use strict";a();l();I();M();ap=v({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[d.Samwich],patches:[{find:'"state",{resultType:',replacement:[{match:/(?<="state",{resultType:)null/,replace:'"Favorites"'}]}]})});var V1,lp,Z2=g(()=>{"use strict";a();l();U();I();Bo();M();V1=C({hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>Q.plugins.BetterNotesBox.hide,default:!1}}),lp=v({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[d.Ven],settings:V1,patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>V1.store.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>{if(t.match(/}=.+/)){let r=e.match(Rt(/hideNote:(\i)=!?\d/));return r?`hideNote:${r[1]}=!0`:e}return"hideNote:!0"}}},{find:"#{intl::NOTE_PLACEHOLDER}",replacement:{match:/#{intl::NOTE_PLACEHOLDER}\),/,replace:"$&spellCheck:!$self.noSpellCheck,"}}],get noSpellCheck(){return V1.store.noSpellCheck}})});function kR(){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 DR(){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 Q2,RR,J2,cp,X2=g(()=>{"use strict";a();l();U();yr();It();I();Me();M();G();T();Q2=L("open","selectRole","updateGuild"),RR=Co("appearance","developerMode");J2=C({roleIconFileFormat:{type:4,description:"File format to use when viewing role icons",options:[{label:"png",value:"png",default:!0},{label:"webp",value:"webp"},{label:"jpg",value:"jpg"}]}}),cp=v({name:"BetterRoleContext",description:"Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile",authors:[d.Ven,d.goodbee],dependencies:["UserSettingsAPI"],settings:J2,start(){RR.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=or();if(!o)return;let r=pe.getRole(o.id,t);r&&(r.colorString&&e.unshift(n(B.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>eo.copy(r.colorString),icon:DR})),Be.getGuildPermissionProps(o).canManageRoles&&e.unshift(n(B.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await Q2.open(o.id,"ROLES"),Q2.selectRole(t)},icon:kR})),r.icon&&e.push(n(B.MenuItem,{id:"vc-view-role-icon",label:"View Role Icon",action:()=>{$o({url:`${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/role-icons/${r.id}/${r.icon}.${J2.store.roleIconFileFormat}`,height:128,width:128})},icon:fn})))}}})});var up,V2=g(()=>{"use strict";a();l();U();I();M();T();up=v({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:()=>Q.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:"#{intl::ADD_ROLE_A11Y_LABEL}",all:!0,predicate:()=>Q.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!Q.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",all:!0,predicate:()=>Q.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!Q.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){eo.copy(e),oe.show({message:"Copied to Clipboard!",type:oe.Type.SUCCESS,id:oe.genId(),options:{duration:1e3,position:oe.Position.BOTTOM}})}})});var ex,tx,ox,nx,rx,ix,sx,ax,lx,cx=g(()=>{"use strict";a();l();wt();G();ex=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"})),tx=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"})),ox=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"})),nx=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"})),rx=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"})),ix=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"})),sx=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"})),ax=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{fillRule:"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"})),lx=ct(()=>Ta("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"))});function El(e){return`${e.os} \xB7 ${e.platform}`}function Ol(){return St.set(ux(),Do)}async function px(){(await St.get(ux())||new Map).forEach((t,o)=>{Do.set(o,t)})}function dx(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 mx(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return ex;case"Android Chrome":case"Chrome iOS":case"Chrome":return tx;case"Edge":return ox;case"Firefox":return nx;case"Internet Explorer":return rx;case"Opera Mini":case"Opera":return ix;case"Mobile Safari":case"Safari":return sx;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return lx;default:return ax}}var ux,Do,ey=g(()=>{"use strict";a();l();vr();T();cx();ux=()=>`BetterSessions_savedSessions_${E.getCurrentUser().id}`,Do=new Map});function fx({props:e,session:t,state:o}){let[r,i]=o,[s,c]=te.useState(Do.get(t.id_hash)?.name??"");function u(){Do.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:El(t.client_info)),Ol(),e.onClose()}return n(Ae,{...e},n(Ue,null,n(x.FormTitle,{tag:"h4"},"Rename")),n(De,null,n(x.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),n(Bt,{style:{marginBottom:"10px"},placeholder:El(t.client_info),value:s,onChange:c,onKeyDown:p=>{p.key==="Enter"&&u()}}),n(A,{style:{marginBottom:"20px",paddingLeft:"1px",paddingRight:"1px",opacity:.6},look:A.Looks.LINK,color:A.Colors.LINK,size:A.Sizes.NONE,onClick:()=>c("")},"Reset Name")),n(bt,null,n(A,{color:A.Colors.BRAND,onClick:u},"Save"),n(A,{color:A.Colors.TRANSPARENT,look:A.Looks.LINK,onClick:()=>e.onClose()},"Cancel")))}var gx=g(()=>{"use strict";a();l();Ye();T();ey()});function hx({session:e,state:t}){return n(A,{look:A.Looks.LINK,color:A.Colors.LINK,size:A.Sizes.NONE,style:{paddingTop:"0px",paddingBottom:"0px",top:"-2px"},onClick:()=>Ce(o=>n(fx,{props:o,session:e,state:t}))},"Rename")}var yx=g(()=>{"use strict";a();l();Ye();T();gx()});var LR,ER,vx,OR,BR,ty,pp,bx=g(()=>{"use strict";a();l();ar();U();se();I();M();G();T();yx();ey();LR=be("AuthSessionsStore"),ER=L("saveAccountChanges","open"),vx=L("timestampTooltip","blockquoteContainer"),OR=L("sessionIcon"),BR=le("!1,lowerBadgeSize:"),ty=C({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}}),pp=v({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:ty,patches:[{find:"#{intl::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 &&"}]}],renderName:k.wrap(({session:e})=>{let t=Do.get(e.id_hash),o=te.useState(t?.name?`${t.name}*`:El(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(hx,{session:e,state:o}))},{noop:!0}),renderTimestamp:k.wrap(({session:e,timeLabel:t})=>n(re,{text:e.approx_last_used_time.toLocaleString(),tooltipClassName:vx.timestampTooltip},o=>n("span",{...o,className:vx.timestamp},t)),{noop:!0}),renderIcon:k.wrap(({session:e,DeviceIcon:t})=>{let o=mx(e.client_info.platform);return n(BR,{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})),lowerBadgeSize:{width:20,height:20}},n("div",{className:OR.sessionIcon,style:{backgroundColor:dx(e.client_info.os)}},n(t,{width:28,height:28,color:"currentColor"})))},{noop:!0}),async checkNewSessions(){let e=await Mt.get({url:Lt.Endpoints.AUTH_SESSIONS});for(let t of e.body.user_sessions)Do.has(t.id_hash)||(Do.set(t.id_hash,{name:"",isNew:!0}),Qe({title:"BetterSessions",body:`New session: ${t.client_info.os} \xB7 ${t.client_info.platform} \xB7 ${t.client_info.location}`,permanent:!0,onClick:()=>ER.open("Sessions")}));Ol()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=LR.getSessions().map(t=>t.id_hash);e.forEach(t=>{Do.has(t)||Do.set(t,{name:"",isNew:!1})}),e.length>0&&Do.forEach((t,o)=>{e.includes(o)||Do.delete(o)}),Do.forEach(t=>{t.isNew=!1}),Ol()}},async start(){await px(),this.checkNewSessions(),ty.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,ty.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}})});function _R(){ft.show({title:"Restart required",body:n("p",null,"You have changed settings that require a restart."),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})}function oy(){let e=Re(()=>Object.values(We).sort((c,u)=>c.name.localeCompare(u.name)),[]),[t,o]=q(""),r=t.toLowerCase(),i=c=>Vencord.Plugins.isPluginEnabled(c.name)&&c.options&&!Qn(c.options)&&(c.name.toLowerCase().includes(r)||c.description.toLowerCase().includes(r)||c.tags?.some(u=>u.toLowerCase().includes(r))),s=e.filter(i);return n(f,null,n(B.MenuControlItem,{id:"vc-plugins-search",control:(c,u)=>n(B.MenuSearchControl,{...c,query:t,onChange:o,ref:u,placeholder:we("SEARCH")})}),!!s.length&&n(B.MenuSeparator,null),s.map(c=>n(B.MenuItem,{key:c.name,id:c.name,label:c.name,action:()=>zr(c,_R)})))}var Sx=g(()=>{"use strict";a();l();ml();Me();fe();T();On()});function UR({mode:e,baseLayer:t=!1,...o}){let r=e==="HIDDEN",i=vt(null);ue(()=>()=>{ko.dispatch("LAYER_POP_START"),ko.dispatch("LAYER_POP_COMPLETE")},[]);let s=n("div",{ref:i,"aria-hidden":r,className:FR({[dp.layer]:!0,[dp.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(Fc,{containerRef:i},s)}var FR,dp,Os,mp,xx=g(()=>{"use strict";a();l();U();Ze();I();Me();Ne();M();G();T();Sx();FR=me("");Ke(["animating","baseLayer","bg","layer","layers"],e=>dp=e);Os=C({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}});mp=v({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[d.Kyuuhachi],settings:Os,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=\((\i),"contextType",\i\.\i\);)/,replace:"$1=$self.Layer;",predicate:()=>Os.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>Os.store.eagerLoad}]},{find:'minimal:"contentColumnMinimal"',replacement:[{match:/(?=\(0,\i\.\i\)\((\i),\{from:\{position:"absolute")/,replace:"(_cb=>_cb(void 0,$1))||"},{match:/\i\.animated\.div/,replace:'"div"'}],predicate:()=>Os.store.disableFade},{find:"#{intl::USER_SETTINGS_WITH_BUILD_OVERRIDE}",replacement:{match:/(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await [^};]*?\)\)).*?,(?=\1\(this)/,replace:"$&(async ()=>$2)(),"},predicate:()=>Os.store.eagerLoad},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",replacement:[{match:/(EXPERIMENTS:.+?)(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/,replace:"$1$self.wrapMenu($2)"},{match:/case \i\.\i\.DEVELOPER_OPTIONS:return \i;/,replace:"$&case 'VencordPlugins':return $self.PluginsSubmenu();"}]}],PluginsSubmenu:oy,Layer(e){try{[Fc.$$vencordInternal(),ko,dp].forEach(t=>t.test)}catch{return new ee("BetterSettings").error("Failed to find some components"),e.children}return n(UR,{...e})},wrapMenu(e){if(!Os.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:we("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,{key:r,id:r.replace(/\W/,"_"),label:r,action:s[0].props.action},s):s})}}}})});var fp,Tx=g(()=>{"use strict";a();l();I();M();fp=v({name:"BetterUploadButton",authors:[d.fawn,d.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:'"ChannelAttachButton"',replacement:[{match:/\.attachButtonInner,"aria-label":.{0,50},onDoubleClick:(.+?:void 0),.{0,30}?\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,",noWarn:!0},{match:/\.attachButtonInner,"aria-label":.{0,50},onDoubleClick:(.+?:void 0),.{0,100}\},(\i)\).{0,100}children:\i/,replace:"$&,onClick:$1,onContextMenu:$2.onClick,"}]}]})});var wx,Mx,Px=g(()=>{"use strict";a();l();G();wx=be("ApplicationStreamPreviewStore"),Mx=be("ApplicationStreamingStore")});var $R,Ix,GR,zR,gp,Cx=g(()=>{"use strict";a();l();It();I();Me();M();T();Px();$R=async({guildId:e,channelId:t,ownerId:o})=>{let r=await wx.getPreviewURL(e,t,o);r&&$o({url:r,height:720,width:1280})},Ix=(e,{userId:t})=>{let o=Mx.getAnyStreamForUser(t);if(!o)return;let r=n(B.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:ph,action:()=>o&&$R(o),disabled:!o});e.push(n(B.MenuSeparator,null),r)},GR=(e,{stream:t})=>Ix(e,{userId:t.ownerId}),zR=(e,{user:t})=>{if(t)return Ix(e,{userId:t.id})},gp=v({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[d.phil],contextMenus:{"user-context":zR,"stream-context":GR}})});function Nx(){Bl.textContent=` .vc-nsfw-img [class^=imageContainer], .vc-nsfw-img [class^=wrapperPaused] { filter: blur(${Q.plugins.BlurNSFW.blurAmount}px); transition: filter 0.2s; &:hover { filter: blur(0); } } `}var Bl,hp,Ax=g(()=>{"use strict";a();l();U();I();M();hp=v({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[d.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.container/,replace:"$&+(this.props.channel.nsfw? ' vc-nsfw-img': '')"}]}],options:{blurAmount:{type:1,description:"Blur Amount (in pixels)",default:10,onChange:Nx}},start(){Bl=document.createElement("style"),Bl.id="VcBlurNsfw",document.head.appendChild(Bl),Nx()},stop(){Bl?.remove()}})});function HR(e){let t=Q.plugins.CallTimer.format==="human",o=y=>t?y:y.toString().padStart(2,"0"),r=y=>t?y:"",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 yp,Rx=g(()=>{"use strict";a();l();U();se();I();wt();M();yp=v({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:"$1[$2,$self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(k,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Pa({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},HR(t)))}})});var kx,Dx=g(()=>{"use strict";a();l();kx=["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","si@soundcloud.com"]});var Lx,WR,vp,Ex=g(()=>{"use strict";a();l();I();M();Dx();Lx=/[\\^$.*+?()[\]{}|]/g,WR=RegExp(Lx.source),vp=v({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[d.adryd],start(){this.createRules()},onBeforeMessageSend(e,t){return this.onSend(t)},onBeforeMessageEdit(e,t,o){return this.onSend(o)},escapeRegExp(e){return e&&WR.test(e)?e.replace(Lx,"\\$&"):e||""},createRules(){let e=kx;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)))}})});var Ox=g(()=>{});function Fx(e){let t=e.toString(16).padStart(6,"0");_l.store.color=t,Ux(t)}function Bx(e){KR({theme:e})}function YR(){let e=Se([ln],()=>ln.theme),t=e==="light",o=t?"dark":"light",i=Se([_x],()=>_x.gradientPreset)!==void 0,s=nk(_l.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:Gi("settings")},n("div",{className:Gi("container")},n("div",{className:Gi("settings-labels")},n(x.FormTitle,{tag:"h3"},"Theme Color"),n(x.FormText,null,"Add a color to your Discord client theme")),n(jR,{color:parseInt(_l.store.color,16),onChange:Fx,showEyeDropper:!1,suggestedColors:qR})),(c||i)&&n(f,null,n(x.FormDivider,{className:W(H.top8,H.bottom8)}),n("div",{className:`client-theme-contrast-warning ${c?t?"theme-dark":"theme-light":""}`},n("div",{className:Gi("warning")},n(x.FormText,{className:Gi("warning-text")},"Warning, your theme won't look good:"),c&&n(x.FormText,{className:Gi("warning-text")},"Selected color won't contrast well with text"),i&&n(x.FormText,{className:Gi("warning-text")},"Nitro themes aren't supported")),c&&u&&n(A,{onClick:()=>Bx(o),color:A.Colors.RED},"Switch to ",o," mode"),i&&n(A,{onClick:()=>Bx(e),color:A.Colors.RED},"Disable Nitro Theme"))))}function bp(e,t,o){return Object.entries(e).filter(([r])=>t==null||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 VR(e){let t={},o={};for(let[,r,i]of e.matchAll(QR))t[r]=parseFloat(i);for(let[,r,i]of e.matchAll(ZR))o[r]=parseFloat(i);ny("clientThemeOffsets",[`.theme-light { ${bp(t,JR,"--primary-345-hsl")} }`,`.theme-dark { ${bp(t,XR,"--primary-600-hsl")} }`,`.visual-refresh.theme-light { ${bp(o,null,"--neutral-2-hsl")} }`,`.visual-refresh.theme-dark { ${bp(o,null,"--neutral-69-hsl")} }`].join(` `))}function ek(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=xp(o,P=>Sp(P,r)).join(`, `),c=xp(o,P=>Sp(P,i)).join(`, `),u=`${s} { background: var(--primary-100) }`,p=`${c} { background-color: var(--primary-100) }`,m=/\.theme-light\{([^}]*--[^:}]*(?:background|bg)[^:}]*:var\(--white-500\)[^}]*)\}/m,y=/^(--[^:]*(?:background|bg)[^:]*):var\(--white-500\)/m,b=xp(o,P=>Sp(P,m)).map(P=>P.split(";")).flat(),N=`.theme-light { ${xp(b,P=>Sp(P,y)).map(P=>`${P}: var(--primary-100);`).join(` `)} }`;ny("clientThemeLightModeFixes",[u,p,N].join(` `))}function Sp(e,t){let o=e.match(t);return o===null?null:o[1]}function xp(e,t){return e.map(t).filter(Boolean)}function Ux(e){let{hue:t,saturation:o,lightness:r}=ok(e),i=document.getElementById("clientThemeVars");i||(i=ny("clientThemeVars")),i.textContent=`:root { --theme-h: ${t}; --theme-s: ${o}%; --theme-l: ${r}%; }`}function ny(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 tk(){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 ok(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 nk(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 Gi,jR,qR,KR,_x,_l,Tp,ZR,QR,JR,XR,$x=g(()=>{"use strict";a();l();Ox();U();Ze();I();He();fe();M();G();T();Gi=me("vc-clientTheme-"),jR=le("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),qR=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];KR=ve('type:"UNSYNCED_USER_SETTINGS_UPDATE','"system"===');_x=be("ClientThemesBackgroundStore");_l=C({color:{type:6,default:"313338",component:YR},resetColor:{type:6,component:()=>n(A,{onClick:()=>Fx(3224376)},"Reset Theme Color")}}),Tp=v({name:"ClientTheme",authors:[d.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:_l,startAt:"DOMContentLoaded",async start(){Ux(_l.store.color);let e=await tk();VR(e),ek(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove(),document.getElementById("clientThemeLightModeFixes")?.remove()}}),ZR=/(--neutral-\d{1,3}-hsl):.*?(\S*)%;/g,QR=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,JR=/^--primary-[1-5]\d{2}-hsl/g,XR=/^--primary-[5-9]\d{2}-hsl/g});var wp,Gx=g(()=>{"use strict";a();l();I();M();wp=v({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:'$1status_$:$2="online"'}}]})});function ik({settingKey:e}){let{allowLevel:t}=Hi.use(["allowLevel"]),o=t[e];return n(Hg,{value:o,onChange:(r,i)=>Hi.store.allowLevel[e]=i,size:20},n(X,{variant:"text-sm/normal"},e[0].toUpperCase()+e.slice(1)))}var xn,rk,zi,sk,Hi,Mp,zx=g(()=>{"use strict";a();l();U();Ss();I();He();M();T();xn=()=>{},rk={logDangerously:xn,log:xn,verboseDangerously:xn,verbose:xn,info:xn,warn:xn,error:xn,trace:xn,time:xn,fileOnly:xn},zi=new Set;sk=k.wrap(()=>n(x.FormSection,null,n(x.FormTitle,{tag:"h3"},"Filter List"),n(x.FormText,{className:H.bottom8,type:x.FormText.Types.DESCRIPTION},"Always allow loggers of these types"),n(he,{flexDirection:"row"},Object.keys(Hi.store.allowLevel).map(e=>n(ik,{key:e,settingKey:e}))))),Hi=C({disableLoggers:{type:3,description:"Disables Discords loggers",default:!1,restartNeeded:!0},disableSpotifyLogger:{type:3,description:"Disable the Spotify logger, which leaks account information and access token",default:!0,restartNeeded:!0},whitelistedLoggers:{type:0,description:"Semi colon separated list of loggers to allow even if others are hidden",default:"GatewaySocket; Routing/Utils",onChange(e){zi.clear(),e.split(";").map(t=>t.trim()).forEach(zi.add.bind(zi))}},allowLevel:{type:6,component:sk,default:{error:!0,warn:!1,trace:!1,log:!1,info:!1,debug:!1}}}),Mp=v({name:"ConsoleJanitor",description:"Disables annoying console messages/errors",authors:[d.Nuckyz,d.sadan],settings:Hi,startAt:"Init",start(){zi.clear(),this.settings.store.whitelistedLoggers?.split(";").map(e=>e.trim()).forEach(zi.add.bind(zi))},Noop:xn,NoopLogger:()=>rk,shouldLog(e,t){return zi.has(e)||Hi.store.allowLevel[t]===!0},patches:[{find:"https://github.com/highlightjs/highlight.js/issues/2277",replacement:{match:/\(console.log\(`Deprecated.+?`\),/,replace:"("}},{find:'The "interpolate" function is deprecated in v10 (use "to" instead)',replacement:{match:/,console.warn\(\i\+'The "interpolate" function is deprecated in v10 \(use "to" instead\)'\)/,replace:""}},{find:'console.warn("Window state not initialized"',replacement:{match:/console\.warn\("Window state not initialized",\i\),/,replace:""}},{find:"is not a valid locale.",replacement:{match:/\i\.error(?=\(""\.concat\(\i," is not a valid locale."\)\))/,replace:"$self.Noop"}},{find:'"AppCrashedFatalReport: getLastCrash not supported."',replacement:{match:/console\.log(?=\("AppCrashedFatalReport: getLastCrash not supported\."\))/,replace:"$self.Noop"}},{find:"RPCServer:WSS",replacement:{match:/\i\.error\("Error: "\.concat\((\i)\.message/,replace:'!$1.message.includes("EADDRINUSE")&&$&'}},{find:"Tried getting Dispatch instance before instantiated",replacement:{match:/null==\i&&\i\.warn\("Tried getting Dispatch instance before instantiated"\),/,replace:""}},{find:"Unable to determine render window for element",replacement:{match:/console\.warn\("Unable to determine render window for element",\i\),/,replace:""}},{find:"failed to send analytics events",replacement:{match:/console\.error\("\[analytics\] failed to send analytics events query: "\.concat\(\i\)\)/,replace:""}},{find:"Slow dispatch on",replacement:{match:/\i\.totalTime>\i&&\i\.verbose\("Slow dispatch on ".+?\)\);/,replace:""}},{find:"\u03A3:",predicate:()=>Hi.store.disableLoggers,replacement:{match:/(?<=&&)(?=console)/,replace:"$self.shouldLog(arguments[0],arguments[1])&&"}},{find:'("Spotify")',predicate:()=>Hi.store.disableSpotifyLogger,replacement:{match:/new \i\.\i\("Spotify"\)/,replace:"$self.NoopLogger()"}}]})});var Hx=g(()=>{"use strict";a();l();Ne();Bo();G();G()});function ry(){function e(i){let s=new Map;return function(...c){let u=String(c);if(s.has(u))return s.get(u);let p=kr(i(...c)),m=(()=>{switch(p.length){case 0:return null;case 1:return p[0];default:let y=[...new Set(p)];return y.length>1&&console.warn(`Warning: This filter matches ${y.length} exports. Make it more specific! `,y),p[0]}})();return m&&u&&s.set(u,m),m}}let t,o=e(i=>i),r=e(F.byProps);return{...Object.fromEntries(Object.keys(gs).map(i=>[i,{getter:()=>gs[i]}])),wp:Oc,wpc:{getter:()=>jo},wreq:{getter:()=>yt},wpPatcher:{getter:()=>Vencord.WebpackPatcher},wpInstances:{getter:()=>Vencord.WebpackPatcher.allWebpackInstances},wpsearch:is,wpex:wa,wpexs:i=>wa(Lr(i)),loadLazyChunks:()=>{throw new Error("loadLazyChunks is dev only.")},find:o,findAll:kr,findByProps:r,findAllByProps:(...i)=>kr(F.byProps(...i)),findByCode:e(F.byCode),findAllByCode:i=>kr(F.byCode(i)),findComponentByCode:e(F.componentByCode),findAllComponentsByCode:(...i)=>kr(F.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(F.byStoreName),PluginsApi:{getter:()=>Vencord.Plugins},plugins:{getter:()=>Vencord.Plugins.plugins},Settings:{getter:()=>Vencord.Settings},Api:{getter:()=>Vencord.Api},Util:{getter:()=>Vencord.Util},reload:()=>location.reload(),restart:ak("restart"),canonicalizeMatch:Rt,canonicalizeReplace:ga,canonicalizeReplacement:ui,runtimeHashMessageKey:Rn,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(y=>{let b=y.cloneNode(!0);y.parentElement?.tagName==="HEAD"?p.head.append(b):b.id?.startsWith("vencord-")||b.id?.startsWith("vcd-")?p.documentElement.append(b):p.body.append(b)}));let m=vi.createRoot(p.body.appendChild(document.createElement("div")));m.render(te.createElement(i,s)),p.addEventListener("close",()=>m.unmount(),{once:!0})},preEnable:i=>(Vencord.Settings.plugins[i]??={enabled:!0}).enabled=!0,channel:{getter:()=>Uo(),preload:!1},channelId:{getter:()=>Ee.getChannelId(),preload:!1},guild:{getter:()=>or(),preload:!1},guildId:{getter:()=>To.getGuildId(),preload:!1},me:{getter:()=>E.getCurrentUser(),preload:!1},meId:{getter:()=>E.getCurrentUser().id,preload:!1},messages:{getter:()=>Zt.getMessages(Ee.getChannelId()),preload:!1},openModal:{getter:()=>Ba.openModal},openModalLazy:{getter:()=>Ba.openModalLazy},Stores:di,setExperiment:(i,s)=>{z.dispatch({type:"EXPERIMENT_OVERRIDE_BUCKET",experimentId:i,experimentBucket:s})}}}function Wx(e,t,o){let r=t.getter();if(!r||t.preload===!1)return r;function i(c){if(c[en])o?r[en]():r[qn];else if(c.$$vencordInternal)return o?c.$$vencordInternal():c;return c}let s=i(r);if(typeof s=="object"&&s!==null){let c=Object.getOwnPropertyDescriptors(s);for(let u in c){if(s[u]==null)continue;let p=c[u];if(p.writable===!0||p.set!=null){let m=s[u],y=i(m);y!=null&&m!==y&&(s[u]=y)}}}return s!=null&&(Pp(unsafeWindow.shortcutList,e,{value:s}),Pp(unsafeWindow,e,{value:s})),s}var ak,Pp,Ip,jx=g(()=>{"use strict";a();l();I();Me();rs();So();Ye();pr();Bo();M();G();G();T();Hx();ak=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},Pp=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));Ip=v({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[d.Ven],patches:[{find:'this,"_changeCallbacks",',replacement:{match:/\i\(this,"_changeCallbacks",/,replace:"Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&"}}],startAt:"Init",start(){let e=ry();unsafeWindow.shortcutList={};for(let[t,o]of Object.entries(e))"getter"in o?(Pp(unsafeWindow.shortcutList,t,{get:()=>Wx(t,o,!0)}),Pp(unsafeWindow,t,{get:()=>unsafeWindow.shortcutList[t]})):(unsafeWindow.shortcutList[t]=o,unsafeWindow[t]=o);mi.then(()=>{setTimeout(()=>this.eagerLoad(!1),1e3)})},async eagerLoad(e){await mi;let t=ry();for(let[o,r]of Object.entries(t))if(!(!Object.hasOwn(r,"getter")||r.preload===!1))try{Wx(o,r,e)}catch{}},stop(){delete unsafeWindow.shortcutList;for(let e in ry())delete unsafeWindow[e]}})});function ck(e,t){let{id:o,name:r}=e.dataset;if(!o)return t?lk(r):`:${r}:`;let i=new URL(e.firstChild.src),s=i.searchParams.get("animated")==="true",c=i.pathname.endsWith(".gif");return`<${s||c?"a":""}:${r.replace(/~\d+$/,"")}:${o}>`}var lk,qx,Cp,Kx=g(()=>{"use strict";a();l();U();I();fe();M();G();T();({convertNameToSurrogate:lk}=L("convertNameToSurrogate"));qx=C({copyUnicode:{type:3,description:"Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",default:!0}}),Cp=v({name:"CopyEmojiMarkdown",description:"Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",authors:[d.HappyEnderman,d.Vishnya],settings:qx,contextMenus:{"expression-picker"(e,{target:t}){t.dataset.type==="emoji"&&e.push(n(B.MenuItem,{id:"vc-copy-emoji-markdown",label:"Copy Emoji Markdown",action:()=>{Yt(ck(t,qx.store.copyUnicode),"Success! Copied emoji markdown.")}}))}}})});var Yx=g(()=>{});var uk,Np,Zx=g(()=>{"use strict";a();l();Yx();se();It();I();fe();M();T();uk=()=>n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21.7 5.3a1 1 0 0 1 0 1.4l-12 12a1 1 0 0 1-1.4 0l-6-6a1 1 0 1 1 1.4-1.4L9 16.58l11.3-11.3a1 1 0 0 1 1.4 0Z"})),Np=v({name:"CopyFileContents",description:"Adds a button to text file attachments to copy their contents",authors:[d.Obsidian,d.Nuckyz],patches:[{find:"#{intl::PREVIEW_BYTES_LEFT}",replacement:{match:/\.footerGap.+?url:\i,fileName:\i,fileSize:\i}\),(?<=fileContents:(\i),bytesLeft:(\i).+?)/g,replace:"$&$self.addCopyButton({fileContents:$1,bytesLeft:$2}),"}}],addCopyButton:k.wrap(({fileContents:e,bytesLeft:t})=>{let[o,r]=q(!1);return n(re,{text:o?"Copied!":t>0?"File too large to copy":"Copy File Contents"},i=>n("div",{...i,className:"vc-cfc-button",role:"button",onClick:()=>{!o&&t<=0&&(Yt(e),r(!0),setTimeout(()=>r(!1),2e3))}},o?n(uk,null):t>0?n(Xa,{color:"var(--channel-icon)"}):n(ki,null)))},{noop:!0})})});var pk,Ap,Qx=g(()=>{"use strict";a();l();It();I();M();T();pk=(e,{user:t})=>{t&&e.push(n(B.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>eo.copy(``),icon:Ri}))},Ap=v({name:"CopyUserURLs",authors:[d.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":pk}})});var Tn,dk,mk,iy,Jx,sy,ay,Rp,Xx=g(()=>{"use strict";a();l();ar();U();I();Ne();Ye();M();Li();G();T();Tn=new ee("CrashHandler"),{ModalStack:dk,DraftManager:mk}=Ro(()=>{let[e,t]=Dr(F.byProps("pushLazy","popAll"),F.byProps("clearDraft","saveDraft"));return{ModalStack:e,DraftManager:t}}),iy=C({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}}),Jx=!1,sy=!1,ay=!0,Rp=v({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[d.Nuckyz],enabledByDefault:!0,settings:iy,patches:[{find:"#{intl::ERRORS_UNEXPECTED_CRASH}",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!sy&&(sy=!0,setTimeout(()=>{try{if(!ay){try{Qe({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}ay=!1,setTimeout(()=>ay=!0,1e3)}catch{}try{Jx||(Jx=!0,yl("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{iy.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){Tn.error("Failed to handle crash",o)}},1))},handlePreventCrash(e){try{Qe({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=Ee.getChannelId();for(let o in no)Number.isNaN(Number(o))&&mk.clearDraft(t,no[o])}catch(t){Tn.debug("Failed to clear drafts.",t)}try{Oa.closeExpressionPicker()}catch(t){Tn.debug("Failed to close expression picker.",t)}try{z.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){Tn.debug("Failed to close open context menu.",t)}try{dk.popAll()}catch(t){Tn.debug("Failed to close old modals.",t)}try{Dn()}catch(t){Tn.debug("Failed to close all open modals.",t)}try{z.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){Tn.debug("Failed to close user popout.",t)}try{z.dispatch({type:"LAYER_POP_ALL"})}catch(t){Tn.debug("Failed to pop all layers.",t)}try{z.dispatch({type:"DEV_TOOLS_SETTINGS_UPDATE",settings:{displayTools:!1,lastOpenTabId:"analytics"}})}catch(t){Tn.debug("Failed to close DevTools.",t)}if(iy.store.attemptToNavigateToHome)try{un.transitionToGuild("@me")}catch(t){Tn.debug("Failed to navigate to home",t)}setImmediate(()=>sy=!1);try{e.setState({error:null,info:null})}catch(t){Tn.debug("Failed to update crash handler component.",t)}}})});var kp,Vx=g(()=>{"use strict";a();l();U();I();M();kp=v({name:"CtrlEnterSend",authors:[d.UlyssesZhan],description:"Use Ctrl+Enter to send messages (customizable)",settings:C({submitRule:{description:"The way to send a message",type:4,options:[{label:"Ctrl+Enter (Enter or Shift+Enter for new line) (cmd+enter on macOS)",value:"ctrl+enter"},{label:"Shift+Enter (Enter for new line)",value:"shift+enter"},{label:"Enter (Shift+Enter for new line; Discord default)",value:"enter"}],default:"ctrl+enter"},sendMessageInTheMiddleOfACodeBlock:{description:"Whether to send a message in the middle of a code block",type:3,default:!0}}),patches:[{find:".selectPreviousCommandOption(",replacement:{match:/(?<=(\i)\.which(?:!==|===)\i\.\i.ENTER(\|\||&&)).{0,100}(\(0,\i\.\i\)\(\i\)).{0,100}(?=(?:\|\||&&)\(\i\.preventDefault)/,replace:(e,t,o,r)=>`${o==="||"?"!":""}$self.shouldSubmit(${t},${r})`}},{find:"!this.hasOpenCodeBlock()",replacement:{match:/!(\i).shiftKey&&!(this.hasOpenCodeBlock\(\))&&\(.{0,100}?\)/,replace:"$self.shouldSubmit($1, $2)"}}],shouldSubmit(e,t){let o=!1;switch(this.settings.store.submitRule){case"shift+enter":o=e.shiftKey;break;case"ctrl+enter":o=navigator.platform.includes("Mac")?e.metaKey:e.ctrlKey;break;case"enter":o=!e.shiftKey&&!e.ctrlKey;break}return this.settings.store.sendMessageInTheMiddleOfACodeBlock||(o&&=!t),o}})});async function tT(e){return(await Ti.fetchAssetIds(Bs.store.appID,[e]))[0]}function uo(){Dp(!0),Q.plugins.CustomRPC.enabled&&Dp()}function rT(){return Bs.store.type!==1}function hk(e){return!rT()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":e&&e.length>512?"Streaming link must be not longer than 512 characters.":!0}function oT(){return Bs.store.timestampMode!==3}function nT(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//.test(e)?"Don't use a Discord link. Use an Imgur image link instead.":/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image (e.g. https://i.imgur.com/...). Right click the image and click 'Copy image address'":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image (e.g. https://media.tenor.com/...). Right click the GIF and click 'Copy image address'":!0}async function iT(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:c,endTime:u,imageBig:p,imageBigTooltip:m,imageSmall:y,imageSmallTooltip:b,buttonOneText:S,buttonOneURL:N,buttonTwoText:P,buttonTwoURL:w}=Bs.store;if(!t)return;let R={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1};switch(i===1&&(R.url=s),Bs.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}S&&(R.buttons=[S,P].filter(Hc),R.metadata={button_urls:[N,w].filter(Hc)}),p&&(R.assets={large_image:await tT(p),large_text:m||void 0}),y&&(R.assets={...R.assets,small_image:await tT(y),small_text:b||void 0});for(let D in R){if(D==="type")continue;let O=R[D];(!O||O.length===0)&&delete R[D]}return R}async function Dp(e){let t=await iT();z.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var fk,gk,eT,Bs,Lp,sT=g(()=>{"use strict";a();l();U();yr();Ai();Wt();Po();I();vs();He();fe();wt();M();G();T();fk=ve("profileThemeStyle:","--profile-gradient-primary-color"),gk=le(".party?(0",".card"),eT=Co("status","showCurrentGame");Bs=C({appID:{type:0,description:"Application ID (required)",onChange:uo,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:uo,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:uo,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:uo,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:uo,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:uo,disabled:rT,isValid:hk},timestampMode:{type:4,description:"Timestamp mode",onChange:uo,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time (not reset after 24h)",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp in milliseconds (only for custom timestamp mode)",onChange:uo,disabled:oT,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp in milliseconds (only for custom timestamp mode)",onChange:uo,disabled:oT,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:uo,isValid:nT},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:uo,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:uo,isValid:nT},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:uo,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:uo,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:uo},buttonTwoText:{type:0,description:"Button 2 text",onChange:uo,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:uo}});Lp=v({name:"CustomRPC",description:"Add a fully customisable Rich Presence (Game status) to your Discord profile",authors:[d.captain,d.AutumnVN,d.nin0dev],dependencies:["UserSettingsAPI"],start:Dp,stop:()=>Dp(!0),settings:Bs,patches:[{find:".party?(0",all:!0,replacement:{match:/\i\.id===\i\.id\?null:/,replace:""}}],settingsAboutComponent:()=>{let e=kt(iT),t=eT.useSetting(),{profileThemeStyle:o}=fk({});return n(f,null,!t&&n(Ho,{className:W(H.top16,H.bottom16),style:{padding:"1em"}},n(x.FormTitle,null,"Notice"),n(x.FormText,null,"Activity Sharing isn't enabled, people won't be able to see your custom rich presence!"),n(A,{color:A.Colors.TRANSPARENT,className:H.top8,onClick:()=>eT.updateSetting(!0)},"Enable")),n(he,{flexDirection:"column",style:{gap:".5em"},className:H.top16},n(x.FormText,null,"Go to the ",n(ot,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(x.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(x.FormText,null,"If you want to use an image link, download your image and reupload the image to ",n(ot,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and selecting "Copy image address".'),n(x.FormText,null,"You can't see your own buttons on your profile, but everyone else can see it fine."),n(x.FormText,null,'Some weird unicode text ("fonts" \u{1D591}\u{1D58E}\u{1D590}\u{1D58A} \u{1D599}\u{1D58D}\u{1D58E}\u{1D598}) may cause the rich presence to not show up, try using normal letters instead.')),n(x.FormDivider,{className:H.top8}),n("div",{style:{width:"284px",...o,marginTop:8,borderRadius:8,background:"var(--bg-mod-faint)"}},e[0]&&n(gk,{activity:e[0],user:E.getCurrentUser(),currentUser:E.getCurrentUser()})))}})});var ly,Ep,aT=g(()=>{"use strict";a();l();vr();U();Gr();I();M();T();ly=C({idleTimeout:{description:"Minutes before Discord goes idle (0 to disable auto-idle)",type:5,markers:co(0,60,5),default:10,stickToMarkers:!1,restartNeeded:!0},remainInIdle:{description:"When you come back to Discord, remain idle until you confirm you want to go online",type:3,default:!0}}),Ep=v({name:"CustomIdle",description:"Allows you to set the time before Discord goes idle (or disable auto-idle)",authors:[d.newwares],settings:ly,patches:[{find:'type:"IDLE",idle:',replacement:[{match:/(?<=Date\.now\(\)-\i>)\i\.\i\|\|/,replace:"$self.getIdleTimeout()||"},{match:/Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,replace:"$1"},{match:/\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,replace:"$self.handleOnline()"}]}],handleOnline(){if(!ly.store.remainInIdle){z.dispatch({type:"IDLE",idle:!1});return}let e="Welcome back! Click the button to go online. Click the X to stay idle until reload.";br.currentNotice?.[1]===e||br.noticesQueue.some(([,t])=>t===e)||br.showNotice(e,"Exit idle",()=>{br.popNotice(),z.dispatch({type:"IDLE",idle:!1})})},getIdleTimeout(){let{idleTimeout:e}=ly.store;return e===0?1/0:e*6e4}})});var lT=g(()=>{});async function vk(){try{let{embed:e}=this.props,{replaceElements:t,dearrowByDefault:o}=Op.store;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let r=yk.exec(e.video.url)?.[1];if(!r)return;let i=await h(`https://sponsor.ajay.app/api/branding?videoID=${r}`);if(!i.ok)return;let{titles:s,thumbnails:c}=await i.json(),u=s[0]?.votes>=0,p=c[0]?.votes>=0&&!c[0].original;if(!u&&!p)return;if(e.dearrow={enabled:o},u&&t!==2){let m=s[0].title.replace(/(^|\s)>(\S)/g,"$1$2");e.dearrow.oldTitle=o?e.rawTitle:m,o&&(e.rawTitle=m)}if(p&&t!==1){let m=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${r}&time=${c[0].timestamp}`;e.dearrow.oldThumb=o?e.thumbnail.proxyURL:m,o&&(e.thumbnail.proxyURL=m)}this.forceUpdate()}catch(e){new ee("Dearrow").error("Failed to dearrow embed",e)}}function bk({component:e}){let{embed:t}=e.props;return t?.dearrow?n(re,{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;Op.store.dearrowByDefault=!i,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",className:"vc-dearrow-icon"},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 yk,Op,Bp,cT=g(()=>{"use strict";a();l();lT();U();se();I();Ne();M();T();yk=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;Op=C({hideButton:{description:"Hides the Dearrow button from YouTube embeds",type:3,default:!1,restartNeeded:!0},replaceElements:{description:"Choose which elements of the embed will be replaced",type:4,restartNeeded:!0,options:[{label:"Everything (Titles & Thumbnails)",value:0,default:!0},{label:"Titles",value:1},{label:"Thumbnails",value:2}]},dearrowByDefault:{description:"Dearrow videos automatically",type:3,default:!0,restartNeeded:!1}}),Bp=v({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[d.Ven],settings:Op,embedDidMount:vk,renderButton(e){return n(k,{noop:!0},n(bk,{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($1),",predicate:()=>!Op.store.hideButton}]}]})});var uT=g(()=>{});var Sk,Yr,pT,dT,mT,Wi,_p,_s,Fl,cy,Zr=g(()=>{"use strict";a();l();Sk="https://decor.fieryflames.dev",Yr=Sk+"/api",pT=Yr+"/authorize",dT="https://ugc.decor.fieryflames.dev",mT="1096966363416899624",Wi="100101099111114",_p="11497119",_s="1096357702931841148",Fl="dXp2SdxDcP",cy=1e3*60*60*4});var xk,Qr,Ul=g(()=>{"use strict";a();l();vr();So();Ne();Ye();T();Zr();xk={async getItem(e){return St.get(e).then(t=>t??null)},async setItem(e,t){await St.set(e,t)},async removeItem(e){await St.del(e)}},Qr=At(()=>wi(Zg((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[E.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[E.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>Ce(i=>n(hi,{...i,scopes:["identify"],responseType:"code",redirectUri:pT,permissions:0n,clientId:mT,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&&(ut(`Failed to authorize: ${c.message}`,oe.Type.FAILURE),new ee("Decor").error("Failed to authorize",c),r(c))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",storage:xk,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function Fp(e,t){let o=await h(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${Qr.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var fT,gT,hT,uy,yT,vT,Up=g(()=>{"use strict";a();l();Zr();Ul();fT=async e=>{if(e?.length===0)return{};let t=new URL(Yr+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await h(t).then(o=>o.json())},gT=async(e="@me")=>Fp(Yr+`/users/${e}/decorations`).then(t=>t.json()),hT=async(e="@me")=>Fp(Yr+`/users/${e}/decoration`).then(t=>t.json()),uy=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"),Fp(Yr+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},yT=async e=>{await Fp(Yr+`/decorations/${e}`,{method:"DELETE"})},vT=async()=>h(Yr+"/decorations/presets").then(e=>e.json())});function py(e){return`${e.animated?"a_":""}${e.hash}`}function $p(e){return{asset:py(e),skuId:Wi}}var Gp=g(()=>{"use strict";a();l();Zr()});function bT(e){try{let[t,o]=q(e?Sr.getState().getAsset(e.id)??null:null);return ue(()=>{let r=(()=>{try{return Sr.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);s&&t!==s&&o(s)})}catch{return()=>{}}})();try{if(e){let{fetch:i}=Sr.getState();i(e.id)}}catch{}return r},[]),t?{asset:t,skuId:Wi}:null}catch(t){console.error(t)}return null}var Sr,dy=g(()=>{"use strict";a();l();ci();So();T();Up();Zr();Sr=At(()=>wi((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:fo(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=[...o],s=await fT(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();So();T();Up();Gp();dy();Gn=At(()=>wi((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await gT(),r=await hT();e({decorations:o,selectedDecoration:r})},async create(o){let r=await uy(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await yT(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}),uy(o),Sr.getState().set(E.getCurrentUser().id,o?py(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var qe,Us,$s,ST,Jr=g(()=>{"use strict";a();l();Ze();G();qe=me("vc-decor-"),Us=L("modalFooterShopButton"),$s=Zn([".COLLECTIBLES_SHOP_FULLSCREEN&&"]),ST=Zn(["stickerInspected]:"])});var $l,xT,zp,my,TT,ji=g(()=>{"use strict";a();l();G();T();xT=e=>$l=e,zp=Rc(()=>{let e=kc(".shopPreviewBanner");return te.memo(e)}),TT=e=>my=e});function fy(e){return n($l,{...e,isSelected:!1},n(Ja,null),n(X,{variant:"text-xs/normal",color:"header-primary"},we("CREATE")))}var wT=g(()=>{"use strict";a();l();It();Me();T();ji()});function gy(e){return n($l,{...e},n(Xa,null),n(X,{variant:"text-xs/normal",color:"header-primary"},we("NONE")))}var MT=g(()=>{"use strict";a();l();It();Me();T();ji()});function hy({decoration:e}){let{delete:t}=Gn();return n(B.Menu,{navId:qe("decoration-context-menu"),onClose:Dt.closeContextMenu,"aria-label":"Decoration Options"},n(B.MenuItem,{id:qe("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:ki,action:()=>eo.copy(e.hash)}),e.authorId===E.getCurrentUser().id&&n(B.MenuItem,{id:qe("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:sr,action:()=>ft.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:qe("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var PT=g(()=>{"use strict";a();l();It();T();Fs();Jr()});function yy(e){let{decoration:t}=e;return n(my,{...e,onContextMenu:o=>{Dt.openContextMenu(o,()=>n(hy,{decoration:t}))},avatarDecoration:$p(t)})}var IT=g(()=>{"use strict";a();l();T();Gp();ji();PT()});function vy({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:qe("sectioned-grid-list-grid")},r.map(i=>n(te.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var CT=g(()=>{"use strict";a();l();T();Jr()});function by(e){return n("div",{className:W(qe("sectioned-grid-list-container"),Tk.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:qe("sectioned-grid-list-section")},e.renderSectionHeader(t),n(vy,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var Tk,NT=g(()=>{"use strict";a();l();fe();G();Jr();CT();Tk=L("managedReactiveScroller")});function Mk(e){let[t,o]=q(null);return ue(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function Pk(e){let[t,o]=q(""),[r,i]=q(null),[s,c]=q(!1),[u,p]=q(null);ue(()=>{u&&p(null)},[r]);let{create:m}=Gn(),y=Mk(r),b=Re(()=>y?{asset:y,skuId:_p}:null,[y]);return n(Ae,{...e,size:"medium",className:Us.modal},n(Ue,{separator:!1,className:qe("modal-header")},n(X,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(pt,{onClick:e.onClose})),n(De,{className:qe("create-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(AT,{messageType:RT.WARNING},"Make sure your decoration does not violate ",n(ot,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:qe("create-decoration-modal-form-preview-container")},n("div",{className:qe("create-decoration-modal-form")},u!==null&&n(X,{color:"text-danger",variant:"text-xs/normal"},u.message),n(x.FormSection,{title:"File"},n(wk,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(x.FormText,{type:"description",className:H.top8},"File should be APNG or PNG.")),n(x.FormSection,{title:"Name"},n(Bt,{placeholder:"Companion Cube",value:t,onChange:o}),n(x.FormText,{type:"description",className:H.top8},"This name will be used when referring to this decoration."))),n("div",null,n(zp,{avatarDecorationOverride:b,user:E.getCurrentUser()}))),n(AT,{messageType:RT.INFO,className:H.bottom8},"To receive updates on your decoration's review, join ",n(ot,{href:`https://discord.gg/${Fl}`,onClick:async S=>{S.preventDefault(),pe.getGuild(_s)?(Dn(),z.dispatch({type:"LAYER_POP_ALL"}),un.transitionToGuild(_s)):await Mi(Fl)&&(Dn(),z.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server")," and allow direct messages."))),n(bt,{className:qe("modal-footer")},n(A,{onClick:()=>{c(!0),m({alt:t,file:r}).then(e.onClose).catch(S=>{c(!1),p(S)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(A,{onClick:e.onClose,color:A.Colors.PRIMARY,look:A.Looks.LINK},"Cancel")))}var wk,AT,RT,Hp,Sy=g(()=>{"use strict";a();l();se();Po();Me();He();Ye();G();T();Zr();Fs();Jr();ji();wk=le("fileUploadInput,"),{HelpMessage:AT,HelpMessageTypes:RT}=ze('POSITIVE="positive',{HelpMessageTypes:F.byProps("POSITIVE","WARNING","INFO"),HelpMessage:F.byCode(".iconDiv")});Hp=()=>Promise.all([$s(),ST()]).then(()=>Ce(e=>n(Pk,{...e})))});function Ik(e){return n(Ae,{...e,size:"small",className:Us.modal},n(Ue,{separator:!1,className:qe("modal-header")},n(X,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(pt,{onClick:e.onClose})),n(De,{scrollbarType:"none"},n(x.FormText,null,"By submitting a decoration, you agree to ",n(ot,{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(bt,{className:qe("modal-footer")},n(A,{onClick:()=>{Gs.store.agreedToGuidelines=!0,e.onClose(),Hp()}},"Continue"),n(A,{onClick:e.onClose,color:A.Colors.PRIMARY,look:A.Looks.LINK},"Go Back")))}var kT,DT=g(()=>{"use strict";a();l();Po();Ye();T();Wp();Jr();Sy();kT=()=>$s().then(()=>Ce(e=>n(Ik,{...e})))});function Nk(){let[e,t]=q([]);return ue(()=>{vT().then(t)},[]),e}function Rk({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=q([]);return ue(()=>{Ak.push(async()=>{if(e.authorIds)for(let s of e.authorIds){let c=E.getUser(s)??await go.getUser(s).catch(()=>null);c!=null&&i(u=>[...u,c])}})},[e.authorIds]),n("div",null,n(he,null,n(x.FormTitle,{style:{flexGrow:1}},e.title),o&&n(Ck,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:H.bottom8})),t&&n(x.FormText,{type:"description",className:H.bottom8},e.subtitle))}function kk(e){let[t,o]=q(void 0),r=typeof t<"u",i=t!=null?$p(t):t,{decorations:s,selectedDecoration:c,fetch:u,select:p}=Gn();ue(()=>{u()},[]);let m=r?t:c,y=typeof m?.authorId<"u",b=s.some(O=>O.reviewed===!1),S=Nk(),N=S.flatMap(O=>O.decorations),P=S.find(O=>O.id===m?.presetId),w=typeof P<"u",D=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(O=>!N.some($=>$.hash===O.hash)),"create"]},...S.map(O=>({title:O.name,subtitle:O.description||void 0,sectionKey:`preset-${O.id}`,items:O.decorations,authorIds:O.authorIds}))];return n(Ae,{...e,size:"dynamic",className:Us.modal},n(Ue,{separator:!1,className:qe("modal-header")},n(X,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(pt,{onClick:e.onClose})),n(De,{className:qe("change-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(by,{renderItem:O=>{if(typeof O=="string")switch(O){case"none":return n(gy,{className:qe("change-decoration-modal-decoration"),isSelected:m===null,onSelect:()=>o(null)});case"create":return n(re,{text:"You already have a decoration pending review",shouldShow:b},$=>n(fy,{className:qe("change-decoration-modal-decoration"),...$,onSelect:b?()=>{}:Gs.store.agreedToGuidelines?Hp:kT}))}else return n(re,{text:"Pending review",shouldShow:O.reviewed===!1},$=>n(yy,{...$,className:qe("change-decoration-modal-decoration"),onSelect:O.reviewed!==!1?()=>o(O):()=>{},isSelected:m?.hash===O.hash,decoration:O}))},getItemKey:O=>typeof O=="string"?O:O.hash,getSectionKey:O=>O.sectionKey,renderSectionHeader:O=>n(Rk,{section:O}),sections:D}),n("div",{className:qe("change-decoration-modal-preview")},n(zp,{avatarDecorationOverride:i,user:E.getCurrentUser()}),w&&n(x.FormTitle,{className:""},"Part of the ",P.name," Preset"),typeof m=="object"&&n(X,{variant:"text-sm/semibold",color:"header-primary"},m?.alt),y&&n(X,{key:`createdBy-${m.authorId}`},"Created by ",Fe.parse(`<@${m.authorId}>`)),w&&n(A,{onClick:()=>Yt(P.id)},"Copy Preset ID")))),n(bt,{className:W(qe("change-decoration-modal-footer",qe("modal-footer")))},n("div",{className:qe("change-decoration-modal-footer-btn-container")},n(A,{onClick:()=>{p(t).then(e.onClose)},disabled:!r},"Apply"),n(A,{onClick:e.onClose,color:A.Colors.PRIMARY,look:A.Looks.LINK},"Cancel")),n("div",{className:qe("change-decoration-modal-footer-btn-container")},n(A,{onClick:()=>ft.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:qe("danger-btn"),cancelText:"Cancel",onConfirm(){Qr.getState().remove(E.getCurrentUser().id),e.onClose()}}),color:A.Colors.PRIMARY,look:A.Looks.LINK},"Log Out"),n(re,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},O=>n(A,{...O,onClick:async()=>{pe.getGuild(_s)?(e.onClose(),z.dispatch({type:"LAYER_POP_ALL"}),un.transitionToGuild(_s)):await Mi(Fl)&&(Dn(),z.dispatch({type:"LAYER_POP_ALL"}))},color:A.Colors.PRIMARY,look:A.Looks.LINK},"Discord Server")))))}var Ck,Ak,xy,LT=g(()=>{"use strict";a();l();se();Wt();Me();He();fe();Ye();Fr();G();T();Up();Zr();Ul();Fs();Gp();Wp();Jr();ji();wT();MT();IT();NT();Sy();DT();Ck=le("defaultRenderUser","showDefaultAvatarsForNullUsers");Ak=new Mo;xy=()=>$s().then(()=>Ce(e=>n(kk,{...e})))});function Gl({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=Qr(),{selectedDecoration:i,select:s,fetch:c}=Gn();return ue(()=>{r.isAuthorized()&&c()},[r.token]),n(Dk,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&qe("section-remove-margin")},n(he,null,n(A,{onClick:()=>{r.isAuthorized()?xy():r.authorize().then(xy).catch(()=>{})},size:A.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(A,{onClick:()=>s(null),color:A.Colors.PRIMARY,size:A.Sizes.SMALL,look:A.Looks.LINK},"Remove Decoration")))}var Dk,Ty=g(()=>{"use strict";a();l();Wt();G();T();Ul();Fs();Jr();LT();Dk=le(".customizationSectionBackground")});var Gs,Wp=g(()=>{"use strict";a();l();U();Po();He();fe();Ye();M();T();Ty();Gs=C({changeDecoration:{type:6,component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(Gl,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(x.FormText,{type:"description",className:W(H.top8,H.bottom8)},"You can also access Decor decorations from the ",n(ot,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),Dn(),z.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(x.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 jp,ET=g(()=>{"use strict";a();l();uT();se();I();M();T();Zr();Ul();Fs();dy();Wp();ji();Ty();jp=v({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:/(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}\)},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem,",replacement:[{match:/(?<==)\i=>{let{children.{20,200}decorationGridItem/,replace:"$self.DecorationGridItem=$&",noWarn:!0},{match:/(?<==)\i=>{let{user:\i,avatarDecoration/,replace:"$self.DecorationGridDecoration=$&",noWarn:!0},{match:/(?<==)\i=>{var{children.{20,200}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{var{user:\i,avatarDecoration/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.\i\.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:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:[{match:/(?<=\i\)\({avatarDecoration:)(\i)(?=,)(?<=currentUser:(\i).+?)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:Gs,flux:{CONNECTION_OPEN:()=>{Qr.getState().init(),Gn.getState().clear(),Sr.getState().fetch(E.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Sr.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){xT(e)},set DecorationGridDecoration(e){TT(e)},SKU_ID:Wi,useUserDecorAvatarDecoration:bT,async start(){Sr.getState().fetch(E.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===Wi){let o=e.asset.split("_");return e.asset.startsWith("a_")&&!t&&o.shift(),`${dT}/${o.join("_")}.png`}else if(e?.skuId===_p)return e.asset},DecorSection:k.wrap(Gl)})});var qp,OT=g(()=>{"use strict";a();l();I();M();qp=v({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:"#{intl::BOT_CALL_IDLE_DISCONNECT_2}",replacement:{match:/,?(?=\i\(this,"idleTimeout",new \i\.\i\))/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]})});var Kp,BT=g(()=>{"use strict";a();l();I();M();T();Kp=v({name:"DontRoundMyTimestamps",authors:[d.Lexi],description:"Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",start(){Or.relativeTimeRounding(Math.floor)},stop(){Or.relativeTimeRounding(Math.round)}})});function wy(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}.${Bk[e.format_type]}?size=4096&lossless=true`}async function _T(e){let t=Lk.getStickerById(e);if(t)return t;let{body:o}=await Mt.get({url:Lt.Endpoints.STICKER(e)});return z.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function _k(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 FT(wy(t)));let{body:r}=await Mt.post({url:Lt.Endpoints.GUILD_STICKER_PACKS(e),body:o});z.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:E.getCurrentUser()}})}async function Fk(e,t){let o=await FT(wy(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return Ek({guildId:e,name:t.name.split("~")[0],image:r})}function Uk(e){let t=E.getCurrentUser().id;return Object.values(pe.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Be.getGuildPermissions({id:o.id})&Ie.CREATE_GUILD_EXPRESSIONS)===Ie.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=Ok(o),{emojis:c}=an.getGuilds()[o.id],u=0;for(let p of c)p.animated===i&&!p.managed&&u++;return uo.name.localeCompare(r.name))}async function FT(e){let t=await h(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function $k(e,t){try{t.t==="Sticker"?await _k(e,t):await Fk(e,t),oe.show({message:`Successfully cloned ${t.name} to ${pe.getGuild(e)?.name??"your server"}!`,type:oe.Type.SUCCESS,id:oe.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new ee("EmoteCloner").error("Failed to clone",t.name,"to",e,o),oe.show({message:"Failed to clone: "+r,type:oe.Type.FAILURE,id:oe.genId()})}}function Hk({data:e}){let[t,o]=te.useState(!1),[r,i]=te.useState(e.name),[s,c]=te.useReducer(p=>p+1,0),u=te.useMemo(()=>Uk(e),[e.id,s]);return n(f,null,n(x.FormTitle,{className:H.top20},"Custom Name"),n(ja,{value:r,onChange:p=>{e.name=p,i(p)},validate:p=>e.t==="Emoji"&&p.length>2&&p.length<32&&zk.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(re,{key:p.id,text:p.name},({onMouseLeave:m,onMouseEnter:y})=>n("div",{onMouseLeave:m,onMouseEnter:y,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),$k(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(x.FormText,{style:{fontSize:Gk(p.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},p.acronym))))))}function Yp(e,t){return n(B.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>_a(async()=>{let o=await t(),r={t:e,...o},i=wy(r);return s=>n(Ae,{...s},n(Ue,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(x.FormText,null,"Clone ",r.name)),n(De,null,n(Hk,{data:r})))})})}function UT(e){let t=new URL(e);return t.pathname.endsWith(".gif")||t.searchParams.get("animated")==="true"}var Lk,Ek,Ok,Bk,Gk,zk,Wk,jk,Zp,$T=g(()=>{"use strict";a();l();Io();Xc();I();Ne();He();Ye();M();G();T();Lk=be("StickersStore"),Ek=ve(".GUILD_EMOJIS(","EMOJI_UPLOAD_START"),Ok=ve(".additionalEmojiSlots"),Bk=[,"png","png","json","gif"];Gk=e=>[20,20,18,18,16,14,12][e.length]??4,zk=/^\w+$/i;Wk=(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}\\.`)),p=t.message.reactions.find(b=>b.emoji.id===o);if(!u&&!p)return;let m=(u&&u[1])??p?.emoji.name??"FakeNitroEmoji";return Yp("Emoji",()=>({id:o,name:m,isAnimated:UT(r??i)}));case"sticker":return t.message.stickerItems.find(b=>b.id===o)?.format_type===3?void 0:Yp("Sticker",()=>_T(o))}})();c&&st("copy-link",e)?.push(c)},jk=(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(Yp("Emoji",()=>({id:o,name:r,isAnimated:s&&UT(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(Yp("Sticker",()=>_T(o)))},Zp=v({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:Wk,"expression-picker":jk}})});var My,GT=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/experiments/hideBugReport.css",{name:"src/plugins/experiments/hideBugReport.css",source:`#staff-help-popout-staff-help-bug-reporter { display: none; } `,classNames:{},dom:null});My="src/plugins/experiments/hideBugReport.css"});var Qp,qk,zT,Jp,HT=g(()=>{"use strict";a();l();U();Ze();se();Ai();I();He();M();G();T();GT();Qp=L("key","combo"),qk=Tt(e=>e?.definition?.id==="2024-09_bug_reporter"),zT=C({toolbarDevMenu:{type:3,description:"Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",default:!1,restartNeeded:!0}}),Jp=v({name:"Experiments",description:"Enable Access to Experiments & other dev-only features in Discord!",authors:[d.Megu,d.Ven,d.Nickyux,d.BanTheNons,d.Nuckyz],settings:zT,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:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}},{find:"toolbar:function",replacement:{match:/hasBugReporterAccess:(\i)/,replace:"_hasBugReporterAccess:$1=true"},predicate:()=>zT.store.toolbarDevMenu},{find:"useCanFavoriteChannel",replacement:{match:/\i\.isDM\(\)\|\|\i\.isThread\(\)/,replace:"false"}},{find:"isDecoupledGameClippingEnabled(){",replacement:{match:/\i\.isStaff\(\)/,replace:"true"}}],start:()=>!qk.getCurrentConfig().hasBugReporterAccess&&dn(My),stop:()=>mn(My),settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(te.Fragment,null,n(x.FormTitle,{tag:"h3"},"More Information"),n(x.FormText,{variant:"text-md/normal"},"You can open Discord's DevTools via "," ",n("div",{className:Qp.combo,style:{display:"inline-flex"}},n("kbd",{className:Qp.key},t)," +"," ",n("kbd",{className:Qp.key},o)," +"," ",n("kbd",{className:Qp.key},"O")," ")))},WarningCard:k.wrap(()=>n(Ho,{id:"vc-experiments-warning-card",className:H.bottom16},n(x.FormTitle,{tag:"h2"},"Hold on!!"),n(x.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(x.FormText,{className:H.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know."),n(x.FormText,{className:H.top8},'No, you cannot use server-side features like checking the "Send to Client" box.')),{noop:!0})})});var Xp,WT=g(()=>{"use strict";a();l();I();M();Xp=v({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 qT=Nv((mae,jT)=>{"use strict";a();l();var xr=jT.exports;(function e(t,o,r){function i(u,p){if(!o[u]){if(!t[u]){var m=typeof la=="function"&&la;if(!p&&m)return m(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}var y=o[u]={exports:{}};t[u][0].call(y.exports,function(b){var S=t[u][1][b];return i(S||b)},y,y.exports,e,t,o,r)}return o[u].exports}for(var s=typeof la=="function"&&la,c=0;c"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",D=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function O(){var _=setTimeout;return function(){return _(j,1)}}var $=new Array(1e3);function j(){for(var _=0;_i+r.playTime;)i+=r.playTime;i+=P.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 y=-1,b=p=p||0,S=p+(m=m||u.length-p);b>>8^r[255&(y^u[b])];return-1^y}},{}],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,y){return u.parseURL(m).then(function(b){return b.addContext(y),b.play(),b})},u.animateImage=function(m){return m.setAttribute("data-is-apng","progress"),u.parseURL(m.src).then(function(y){m.setAttribute("data-is-apng","yes");var b=document.createElement("canvas");b.width=y.width,b.height=y.height,Array.prototype.slice.call(m.attributes).forEach(function(D){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(D.nodeName)==-1&&b.setAttributeNode(D.cloneNode(!1))}),b.setAttribute("data-apng-src",m.src),m.alt!=""&&b.appendChild(document.createTextNode(m.alt));var S="",N="",P=0,w="";m.style.width!=""&&m.style.width!="auto"?S=m.style.width:m.hasAttribute("width")&&(S=m.getAttribute("width")+"px"),m.style.height!=""&&m.style.height!="auto"?N=m.style.height:m.hasAttribute("height")&&(N=m.getAttribute("height")+"px"),S!=""&&N==""&&(P=parseFloat(S),w=S.match(/\D+$/)[0],N=Math.round(b.height*P/b.width)+w),N!=""&&S==""&&(P=parseFloat(N),w=N.match(/\D+$/)[0],S=Math.round(b.width*P/b.height)+w),b.style.width=S,b.style.height=N;var R=m.parentNode;R.insertBefore(b,m),R.removeChild(m),y.addContext(b.getContext("2d")),y.play()},function(){m.setAttribute("data-is-apng","no")})},u.releaseCanvas=function(m){var y=m.getContext("2d");"_apng_animation"in y&&y._apng_animation.removeContext(y)}}).call(this,typeof xr<"u"?xr: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(w){var R=new Uint8Array(w);return new r(function(D,O){for(var $=0;$>>0;for(var O=1;O<4;O++)D+=w[O+R]<<8*(3-O);return D},m=function(w,R){for(var D=0,O=0;O<2;O++)D+=w[O+R]<<8*(1-O);return D},y=function(w,R){return w[R]},b=function(w,R,D){var O=new Uint8Array(D);return O.set(w.subarray(R,R+D)),O},S=function(w,R,D){var O=Array.prototype.slice.call(w.subarray(R,R+D));return String.fromCharCode.apply(String,O)},N=function(w){return[w>>>24&255,w>>>16&255,w>>>8&255,255&w]},P=function(w,R){var D=w.length+R.length,O=new Uint8Array(new ArrayBuffer(D+8));O.set(N(R.length),0),O.set(function(j){for(var V=[],ie=0;ie{"use strict";a();l();So();KT=tn(()=>qT().APNG)});var Ay=Nv(Ny=>{a();l();var XT=Object.defineProperty,Kk=e=>XT(e,"__esModule",{value:!0}),Yk=(e,t)=>{for(var o in t)XT(e,o,{get:t[o],enumerable:!0})};Kk(Ny);Yk(Ny,{GIFEncoder:()=>iw,applyPalette:()=>nD,default:()=>mD,nearestColor:()=>aD,nearestColorIndex:()=>nw,nearestColorIndexWithDistance:()=>rw,prequantize:()=>oD,quantize:()=>eD,snapColorsToPalette:()=>sD});var Zk={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 VT(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 Py=12,ZT=5003,Qk=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function Jk(e,t,o,r,i=VT(512),s=new Uint8Array(256),c=new Int32Array(ZT),u=new Int32Array(ZT)){let p=c.length,m=Math.max(2,r);s.fill(0),u.fill(0),c.fill(-1);let y=0,b=0,S=m+1,N=S,P=!1,w=N,R=(1<=0;)if(xe-=gt,xe<0&&(xe+=p),c[xe]===ge){V=u[xe];break e}Y(V),V=ce,$<1<0?y|=Z<=8;)s[j++]=y&255,j>=254&&(i.writeByte(j),i.writeBytesView(s,0,j),j=0),y>>=8,b-=8;if(($>R||P)&&(P?(w=N,R=(1<0;)s[j++]=y&255,j>=254&&(i.writeByte(j),i.writeBytesView(s,0,j),j=0),y>>=8,b-=8;j>0&&(i.writeByte(j),i.writeBytesView(s,0,j),j=0)}}}var Xk=Jk;function ew(e,t,o){return e<<8&63488|t<<2&992|o>>3}function tw(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function ow(e,t,o){return e>>4<<8|t&240|o>>4}function Vp(e,t,o){return eo?o:e}function zl(e){return e*e}function QT(e,t,o){var r=0,i=1e100;let s=e[t],c=s.cnt,u=s.ac,p=s.rc,m=s.gc,y=s.bc;for(var b=s.fw;b!=0;b=e[b].fw){let N=e[b],P=N.cnt,w=c*P/(c+P);if(!(w>=i)){var S=0;o&&(S+=w*zl(N.ac-u),S>=i)||(S+=w*zl(N.rc-p),!(S>=i)&&(S+=w*zl(N.gc-m),!(S>=i)&&(S+=w*zl(N.bc-y),!(S>=i)&&(i=S,r=b))))}}s.err=i,s.nn=r}function Iy(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function Vk(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,y=c&255,b=tw(y,m,p,u),S=b in r?r[b]:r[b]=Iy();S.rc+=y,S.gc+=m,S.bc+=p,S.ac+=u,S.cnt++}else if(t==="rgb444")for(let s=0;s>16&255,p=c>>8&255,m=c&255,y=ow(m,p,u),b=y in r?r[y]:r[y]=Iy();b.rc+=m,b.gc+=p,b.bc+=u,b.cnt++}else for(let s=0;s>16&255,p=c>>8&255,m=c&255,y=ew(m,p,u),b=y in r?r[y]:r[y]=Iy();b.rc+=m,b.gc+=p,b.bc+=u,b.cnt++}return r}function eD(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,y=r==="rgba4444",b=Vk(p,r),S=b.length,N=S-1,P=new Uint32Array(S+1);for(var w=0,D=0;D1&&(j=$>>1,!(b[O=P[j]].err<=V));$=j)P[$]=O;P[$]=D}var ie=w-t;for(D=0;D=ne.mtm&&b[ne.nn].mtm<=ne.tm)break;ne.mtm==N?Y=P[1]=P[P[0]--]:(QT(b,Y,!1),ne.tm=D);var V=b[Y].err;for($=1;(j=$+$)<=P[0]&&(jb[P[j+1]].err&&j++,!(V<=b[O=P[j]].err));$=j)P[$]=O;P[$]=Y}var Z=b[ne.nn],ce=ne.cnt,ge=Z.cnt,R=1/(ce+ge);y&&(ne.ac=R*(ce*ne.ac+ge*Z.ac)),ne.rc=R*(ce*ne.rc+ge*Z.rc),ne.gc=R*(ce*ne.gc+ge*Z.gc),ne.bc=R*(ce*ne.bc+ge*Z.bc),ne.cnt+=Z.cnt,ne.mtm=++D,b[Z.bk].fw=Z.fw,b[Z.fw].bk=Z.bk,Z.mtm=N}let xe=[];var gt=0;for(D=0;;++gt){let je=Vp(Math.round(b[D].rc),0,255),$e=Vp(Math.round(b[D].gc),0,255),et=Vp(Math.round(b[D].bc),0,255),Ge=255;y&&(Ge=Vp(Math.round(b[D].ac),0,255),u&&(Ge=Ge<=(typeof u=="number"?u:127)?0:255),i&&Ge<=c&&(je=$e=et=s,Ge=0));let Oe=y?[je,$e,et,Ge]:[je,$e,et];if(tD(xe,Oe)||xe.push(Oe),(D=b[D].fw)==0)break}return xe}function tD(e,t){for(let o=0;o=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function td(e,t){var o=0,r;for(r=0;r1?Math.round(e/t)*t:e}function oD(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,y=c&255;u=ed(u,o),r&&(u=u<=(typeof r=="number"?r:127)?0:255),y=ed(y,t),m=ed(m,t),p=ed(p,t),i[s]=u<<24|p<<16|m<<8|y<<0}}function nD(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,S=y>>16&255,N=y>>8&255,P=y&255,w=tw(P,N,S,b),R=w in u?u[w]:u[w]=rD(P,N,S,b,t);c[m]=R}else{let m=o==="rgb444"?ow:ew;for(let y=0;y>16&255,N=b>>8&255,P=b&255,w=m(P,N,S),R=w in u?u[w]:u[w]=iD(P,N,S,t);c[y]=R}}return c}function rD(e,t,o,r,i){let s=0,c=1e100;for(let u=0;uc)continue;let b=p[0];if(y+=qi(b-e),y>c)continue;let S=p[1];if(y+=qi(S-t),y>c)continue;let N=p[2];y+=qi(N-o),!(y>c)&&(c=y,s=u)}return s}function iD(e,t,o,r){let i=0,s=1e100;for(let c=0;cs)continue;let y=u[1];if(m+=qi(y-t),m>s)continue;let b=u[2];m+=qi(b-o),!(m>s)&&(s=m,i=c)}return i}function sD(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=rw(r,u.slice(0,3),td),m=p[0],y=p[1];y>0&&y<=i&&(e[m]=u)}}function qi(e){return e*e}function nw(e,t,o=td){let r=1/0,i=-1;for(let s=0;s=0&&uD(r,O)}let ie=Math.round(R/10);lD(r,j,ie,P,w);let ne=!!D&&!V;pD(r,b,S,ne?D:null),ne&&JT(r,D),dD(r,y,b,S,$,s,c,u)}};function m(){sw(r,"GIF89a")}}function lD(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,e.writeByte(0|c|0|s),Xr(e,o),e.writeByte(i||0),e.writeByte(0)}function cD(e,t,o,r,i=8){let u=Cy(r.length)-1,p=128|i-1<<4|0|u,m=0,y=0;Xr(e,t),Xr(e,o),e.writeBytes([p,m,y])}function uD(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),sw(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),Xr(e,t),e.writeByte(0)}function JT(e,t){let o=1<>8&255)}function sw(e,t){for(var o=0;oi.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function id(e,t){let o=ae.getChannel(e);return!o||o.isPrivate()?!0:Be.can(t,o)}function vD(){return{find:"canUseCustomStickersEverywhere:",replacement:[{func:"canUseCustomStickersEverywhere",predicate:()=>Xe.store.enableStickerBypass},{func:"canUseHighVideoUploadQuality",predicate:()=>Xe.store.enableStreamQualityBypass},{func:"canStreamQuality",predicate:()=>Xe.store.enableStreamQualityBypass},{func:"canUseClientThemes"},{func:"canUseCustomNotificationSounds"},{func:"canUsePremiumAppIcons"}].map(({func:t,predicate:o})=>({match:new RegExp(String.raw`(?<=${t}:)\i`),replace:"() => true",predicate:o}))}}var zs,Ki,od,aw,rd,Yi,Ry,fD,Hl,ky,Dy,nd,lw,Xe,gD,hD,cw,yD,sd,pw=g(()=>{"use strict";a();l();Pl();U();I();YT();Me();Ne();M();G();T();zs=Rv(Ay()),Ki=be("StickersStore"),od=be("UserSettingsProtoStore"),aw=L("readerFactory");rd=Ro(()=>La.PreloadedUserSettingsActionCreators),Yi=Ro(()=>uw("appearance",rd.ProtoClass)),Ry=Ro(()=>uw("clientThemeSettings",Yi)),fD=ve(".getUserIsAdmin("),Hl="[3,4].includes(fakeNitroIntention)",ky=/\/emojis\/(\d+?)\.(png|webp|gif)/,Dy=/\/stickers\/(\d+?)\./,nd=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,lw=/\[.+?\]\((https?:\/\/.+?)\)/,Xe=C({enableEmojiBypass:{description:"Allows sending fake emojis (also bypasses missing permission to use custom 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:"Allows sending fake stickers (also bypasses missing permission to use 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}}"},disableEmbedPermissionCheck:{description:"Whether to disable the embed permission check when sending fake emojis and stickers",type:3,default:!1}});gD=e=>id(e,Ie.USE_EXTERNAL_EMOJIS),hD=e=>id(e,Ie.USE_EXTERNAL_STICKERS),cw=e=>id(e,Ie.EMBED_LINKS),yD=e=>id(e,Ie.ATTACH_FILES);sd=v({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, use client themes and custom Discord notifications.",dependencies:["MessageEventsAPI"],settings:Xe,patches:[vD(),{find:"emojiItemDisabled]",predicate:()=>Xe.store.enableEmojiBypass,replacement:{match:/CHAT/,replace:"STATUS"}},{find:".GUILD_SUBSCRIPTION_UNAVAILABLE;",group:!0,predicate:()=>Xe.store.enableEmojiBypass,replacement:[{match:/(?<=\.USE_EXTERNAL_EMOJIS.+?;)(?<=intention:(\i).+?)/,replace:(e,t)=>`const fakeNitroIntention=${t};`},{match:/&&!\i&&!\i(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:e=>`${e}&&!${Hl}`},{match:/!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,replace:e=>`${e}&&!${Hl}`},{match:/(!)?(\i\.\i\.canUseEmojisEverywhere\(\i\))/,replace:(e,t)=>t?`(${e}&&!${Hl})`:`(${e}||${Hl})`},{match:/(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/,replace:e=>`(${e}||${Hl})`}]},{find:".getUserIsAdmin(",replacement:{match:/(function \i\(\i,\i)\){(.{0,250}.getUserIsAdmin\(.+?return!1})/,replace:(e,t,o)=>`${t},fakeNitroOriginal){if(!fakeNitroOriginal)return false;${o}`}},{find:'"SENDABLE"',predicate:()=>Xe.store.enableStickerBypass,replacement:{match:/\i\.available\?/,replace:"true?"}},{find:"#{intl::STREAM_FPS_OPTION}",predicate:()=>Xe.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:'"UserSettingsProtoStore"',replacement:[{match:/function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/,replace:(e,t,o)=>`${e}$self.handleProtoChange(${o}.userSettingsProto,${o}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Xe.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Xe.store.transformEmojis||Xe.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"}renderEmbeds(",replacement:[{predicate:()=>Xe.store.transformEmojis||Xe.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\(\((\i),\i\)?=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Xe.store.transformStickers,match:/renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;/,replace:(e,t,o)=>`${e}${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Xe.store.transformStickers,match:/renderAttachments\(\i\){.+?{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:"#{intl::STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION}",predicate:()=>Xe.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,270}sticker:\i,channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(0,${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Xe.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:"#{intl::EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION}",predicate:()=>Xe.store.transformEmojis,replacement:{match:/(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,replace:(e,t,o)=>`$self.addFakeNotice(1,${t},!!${o}?.fakeNitroNode?.fake)`}},{find:"?24:30,",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 or()?.id},get canUseEmotes(){return(E.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(E.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){try{if(e==null||typeof e=="string")return;if((t?.premium_type??E?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=Yi.create(),od.settings.appearance?.theme!=null){let r=Yi.create({theme:od.settings.appearance.theme});e.appearance.theme=r.theme}if(od.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=Ry.create({backgroundGradientPresetId:{value:od.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}}catch(o){new ee("FakeNitro").error(o)}},handleGradientThemeSelect(e,t,o){if((E?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!rd||!Yi||!Ry||!aw)return;let i=rd.getCurrentValue().appearance,s=i!=null?Yi.fromBinary(Yi.toBinary(i),aw):Yi.create();s.theme=t;let c=Ry.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=c,s.clientThemeSettings.backgroundGradientPresetId=c.backgroundGradientPresetId;let u=rd.ProtoClass.create();u.appearance=s,z.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")&&!Xe.store.transformCompoundSentence)return e;let o=e.length,r=u=>{if(Xe.store.transformEmojis){let p=u.props.href.match(ky);if(p){let m=null;try{m=new URL(u.props.href)}catch{}let y=an.getCustomEmojiById(p[1])?.name??m?.searchParams.get("name")??"FakeNitroEmoji";return Fe.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:p[2]==="gif",emojiId:p[1],name:y,fake:!0},void 0,{key:String(o++)})}}if(Xe.store.transformStickers){if(Dy.test(u.props.href))return null;let p=u.props.href.match(nd);if(p&&Ki.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[y,b]of p.props.children.entries()){if(b==null){delete p.props.children[y];continue}this.ensureChildrenIsArray(b),b.props.children.length>0?m=!0:delete p.props.children[y]}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(Si.cloneDeep(e));return this.trimContent(u),u}catch(u){return new ee("FakeNitro").error(u),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);Xe.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Xe.store.transformCompoundSentence&&!i.startsWith("http")&&!lw.test(i))continue;let s=i.match(Dy);if(s){let u=null;try{u=new URL(i)}catch{}let p=Ki.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(nd);if(c){if(!Ki.getStickerById(c[1]))continue;let u=Ki.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&&!Xe.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Xe.store.transformCompoundSentence&&!o.some(r=>r===e.url||r.match(lw)?.[1]===e.url))return!1;if(Xe.store.transformEmojis&&ky.test(e.url))return!0;if(Xe.store.transformStickers){if(Dy.test(e.url))return!0;let r=e.url.match(nd);if(r&&Ki.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(nd);return!(o&&Ki.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&ky.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${Xe.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=KT(),{frames:i,width:s,height:c}=await r(e),u=(0,zs.GIFEncoder)(),p=Xe.store.stickerSize,m=document.createElement("canvas");m.width=p,m.height=p;let y=m.getContext("2d",{willReadFrequently:!0}),b=p/Math.max(s,c);y.scale(b,b);let S;for(let P of i){let{left:w,top:R,width:D,height:O,img:$,delay:j,blendOp:V,disposeOp:ie}=P;S=y.getImageData(w,R,D,O),V===0&&y.clearRect(w,R,D,O),y.drawImage($,w,R,D,O);let{data:ne}=y.getImageData(0,0,p,p),Y=(0,zs.quantize)(ne,256),Z=(0,zs.applyPalette)(ne,Y);u.writeFrame(Z,p,p,{transparent:!0,palette:Y,delay:j}),ie===1?y.clearRect(w,R,D,O):ie===2&&y.putImageData(S,w,R)}u.finish();let N=new File([u.bytesView()],`${t}.gif`,{type:"image/gif"});Ea.promptToUpload([N],ae.getChannel(o),no.ChannelMessage)},canUseEmote(e,t){if(e.type===0)return!0;if(e.available===!1||fD(e,this.guildId,!0))return!1;let o=!1;if(e.managed&&e.guildId){let r=ke.getSelfMember(e.guildId)?.roles??[];o=e.roles.some(i=>r.includes(i))}return this.canUseEmotes||o?e.guildId===this.guildId||gD(t):!e.animated&&e.guildId===this.guildId},start(){let e=Xe.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(r,i){return!r[i]||/\s/.test(r[i])?"":" "}function o(){return new Promise(r=>{ft.show({title:"Hold on!",body:n("div",null,n(x.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(x.FormText,{type:x.FormText.Types.DESCRIPTION},"You can disable this notice in the plugin settings.")),confirmText:"Send Anyway",cancelText:"Cancel",secondaryConfirmText:"Do not show again",onConfirm:()=>r(!0),onCloseCallback:()=>setImmediate(()=>r(!1)),onConfirmSecondary(){Xe.store.disableEmbedPermissionCheck=!0,r(!0)}})})}this.preSend=Fi(async(r,i,s)=>{let{guildId:c}=this,u=!1;e:{if(!e.enableStickerBypass)break e;let p=Ki.getStickerById(s.stickers?.[0]);if(!p||"pack_id"in p)break e;let m=this.canUseStickers&&hD(r);if(p.available!==!1&&(m||p.guild_id===c))break e;let y=this.getStickerLink(p.id);if(p.format_type===4&&y.includes(".png")&&(y=y.replace(".png",".gif")),p.format_type===2)return yD(r)?this.sendAnimatedSticker(y,p.id,r):ft.show({title:"Hold on!",body:n("div",null,n(x.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 b=new URL(y);b.searchParams.set("name",p.name);let S=e.hyperLinkText.replaceAll("{{NAME}}",p.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${S}](${b})`:b}`,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}>`,y=new URL(zc(p.id,p.animated,e.emojiSize));y.searchParams.set("size",e.emojiSize.toString()),y.searchParams.set("name",p.name);let b=e.hyperLinkText.replaceAll("{{NAME}}",p.name);i.content=i.content.replace(m,(S,N,P)=>`${t(P,N-1)}${e.useHyperLinks?`[${b}](${y})`:y}${t(P,N+S.length)}`)}return u&&!e.disableEmbedPermissionCheck&&!cw(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=wl(async(r,i,s)=>{if(!e.enableEmojiBypass)return;let c=!1;return s.content=s.content.replace(/(?/ig,(u,p,m,y)=>{let b=an.getCustomEmojiById(p);if(b==null||this.canUseEmote(b,r))return u;c=!0;let S=new URL(zc(b.id,b.animated,e.emojiSize));S.searchParams.set("size",e.emojiSize.toString()),S.searchParams.set("name",b.name);let N=e.hyperLinkText.replaceAll("{{NAME}}",b.name);return`${t(y,m-1)}${e.useHyperLinks?`[${N}](${S})`:S}${t(y,m+u.length)}`}),c&&!e.disableEmbedPermissionCheck&&!cw(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){Ui(this.preSend),Ml(this.preEdit)}})});var dw=g(()=>{});function bD(...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 mw,fw=g(()=>{a();l();mw=bD});function gw(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 hw(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}]{1,6})\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]{1,6})\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 yw,vw,SD,xD,ad,bw=g(()=>{"use strict";a();l();dw();U();se();I();He();fe();wt();M();G();T();fw();yw=C({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),vw=le("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),SD=le("isTryItOutFlow:","pendingThemeColors:","pendingAvatarDecoration:","EDIT_PROFILE_BANNER"),xD=Zn(["#{intl::USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON}"],/createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/),ad=v({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 )(.+?)(?=})/,replace:"$self.colorDecodeHook($1)"}},{find:"#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",replacement:{match:/#{intl::USER_SETTINGS_RESET_PROFILE_THEME}\)}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>{let e=hw(Qt.getUserProfile(E.getCurrentUser().id).bio)??[0,0],[t,o]=q(e[0]),[r,i]=q(e[1]),[,,s]=kt(xD);return n(x.FormSection,null,n(x.FormTitle,{tag:"h3"},"Usage"),n(x.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 use the color pickers below to choose your colors"),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(x.FormDivider,{className:W(H.top8,H.bottom8)}),n(x.FormTitle,{tag:"h3"},"Color pickers"),!s&&n(ps,{direction:ps.Direction.HORIZONTAL,style:{gap:"1rem"}},n(vw,{color:t,label:n(X,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Primary"),onChange:c=>{o(c)}}),n(vw,{color:r,label:n(X,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Accent"),onChange:c=>{i(c)}}),n(A,{onClick:()=>{let c=gw(t,r);Yt(c)},color:A.Colors.PRIMARY,size:A.Sizes.XLARGE},"Copy 3y3")),n(x.FormDivider,{className:W(H.top8,H.bottom8)}),n(x.FormTitle,{tag:"h3"},"Preview"),n("div",{className:"vc-fpt-preview"},n(SD,{user:E.getCurrentUser(),pendingThemeColors:[t,r],onAvatarChange:()=>{},onBannerChange:()=>{},canUsePremiumCustomization:!0,hideExampleButton:!0,hideFakeActivity:!0,isTryItOutFlow:!0}))))},settings:yw,colorDecodeHook(e){if(e){if(yw.store.nitroFirst&&e.themeColors)return e;let t=hw(e.bio);if(t)return mw(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:k.wrap(function({primary:e,accent:t}){return n(A,{onClick:()=>{let o=gw(e,t);Yt(o)},color:A.Colors.PRIMARY,size:A.Sizes.XLARGE,className:H.left16},"Copy 3y3")},{noop:!0})})});var ld,Sw=g(()=>{"use strict";a();l();I();M();T();ld=v({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:"numLockedEmojiResults:",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(Math\.max\(\i,\i(?:-\i\.length){2}\))\)/,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=an.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 wD({instance:e,SearchBarComponent:t}){let[o,r]=q(""),i=vt(null),s=$c(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:MD(c.toLowerCase(),Tw(m.url??m.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:m})).filter(m=>m.score!=null);p.sort((m,y)=>y.score-m.score),u.favorites=p.map(m=>m.gif),e.forceUpdate()},[e.state]);return ue(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:TD.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 Tw(e){let t;try{t=new URL(e)}catch{return e}switch(xw.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 MD(e,t){let o=0,r=0;for(let i=0;i{"use strict";a();l();U();se();I();M();G();T();TD=L("searchBar","searchBarFullRow"),xw=C({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}]}}),cd=v({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:xw,getTargetString:Tw,instance:null,renderSearchBar(e,t){return this.instance=e,n(k,{noop:!0},n(wD,{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 ud,Mw=g(()=>{"use strict";a();l();I();M();ud=v({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[d.Grzesiek11],patches:[{find:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]})});var pd,Pw=g(()=>{"use strict";a();l();I();M();pd=v({name:"FixImagesQuality",description:"Prevents images from being loaded as webp, which can cause quality loss",authors:[d.Nuckyz],patches:[{find:".handleImageLoad)",replacement:{match:/(?<=null;return )\i\.\i&&\(\i\|\|!\i\.isAnimated.+?:(?=\i&&\(\i="png"\))/,replace:""}}]})});var dd,Iw=g(()=>{"use strict";a();l();I();M();T();dd=v({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[d.D3SOX,d.Nickyux],patches:[{find:"#{intl::GUILD_OWNER}),children:",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 Ly,md,Cw=g(()=>{"use strict";a();l();Qo();I();M();G();Ly=L("createFriendInvite"),md=v({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],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:0,execute:async(e,t)=>{let o=await Ly.createFriendInvite();at(t.channel.id,{content:` discord.gg/${o.code} \xB7 Expires: \xB7 Max uses: \`${o.max_uses}\` `.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:0,execute:async(e,t)=>{let r=(await Ly.getAllFriendInvites()).map(i=>` _discord.gg/${i.code}_ \xB7 Expires: \xB7 Times used: \`${i.uses}/${i.max_uses}\` `.trim().replace(/\s+/g," "));at(t.channel.id,{content:r.join(` `)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:0,execute:async(e,t)=>{await Ly.revokeFriendInvites(),at(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var PD,ID,Nw,Aw,CD,fd,Rw=g(()=>{"use strict";a();l();se();I();Me();M();G();T();PD=L("memberSinceWrapper"),ID=L("memberSince"),Nw=ve('month:"short",day:"numeric"'),Aw=L("getLocale"),CD=le('"auto":"smooth"',".section"),fd=v({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[d.Elvyra,d.Antti],patches:[{find:".PANEL}),nicknameIcons",replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"}},{find:'action:"PRESS_APP_CONNECTION"',replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),"}}],FriendsSinceComponent:k.wrap(({userId:e,isSidebar:t})=>{if(!_e.isFriend(e))return null;let o=_e.getSince(e);return o?n(CD,{heading:"Friends Since"},t?n(X,{variant:"text-sm/normal"},Nw(o,Aw.getLocale())):n("div",{className:PD.memberSinceWrapper},n("div",{className:ID.memberSince},!!Uo()?.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(X,{variant:"text-sm/normal"},Nw(o,Aw.getLocale()))))):null},{noop:!0})})});function AD({message:e,channel:t,onHeightUpdate:o}){let r=e.author&&!(e.author.id===E.getCurrentUser().id||e.author.system);return ND({navId:"message-actions",ariaLabel:we("MESSAGE_UTILITIES_A11Y_LABEL"),message:e,channel:t,canReport:r,onHeightUpdate:o,onClose:()=>Dt.closeContextMenu(),textSelection:"",favoriteableType:null,favoriteableId:null,favoriteableName:null,itemHref:void 0,itemSrc:void 0,itemSafeSrc:void 0,itemTextContent:void 0,isFullSearchContextMenu:!0})}var ND,kw,RD,gd,Dw=g(()=>{"use strict";a();l();Io();U();I();Me();wt();M();G();T();ND=ve(".MESSAGE,commandTargetId:"),kw=Gg;Ke(F.componentByCode('"devmode-copy-id-".concat'),e=>kw=e);RD=(e,t)=>{if(t?.isFullSearchContextMenu==null)return;st("devmode-copy-id",e,!0)?.push(kw({id:t.message.author.id,label:we("COPY_ID_AUTHOR")}))};dr("FullSearchContext","SearchReply");gd=v({name:"FullSearchContext",description:"Makes the message context menu in message search results have all options you'd expect",authors:[d.Ven,d.Aria],patches:[{find:"onClick:this.handleMessageClick,",replacement:{match:/this(?=\.handleContextMenu\(\i,\i\))/,replace:"$self"}}],handleContextMenu(e,t){let o=ae.getChannel(t.channel_id);o&&(e.stopPropagation(),Dt.openContextMenu(e,r=>n(AD,{message:t,channel:o,onHeightUpdate:r.onHeightUpdate})))},contextMenus:{"message-actions":RD}})});var kD,hd,Lw=g(()=>{"use strict";a();l();se();I();M();G();T();kD=le(".USER_MENTION)"),hd=v({name:"FullUserInChatbox",description:"Makes the user mention in the chatbox have more functionalities, like left/right clicking",authors:[d.sadan],patches:[{find:':"text":',replacement:{match:/(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/,replace:"$1return $self.UserMentionComponent({...arguments[0],originalComponent:()=>{$2}});"}}],UserMentionComponent:k.wrap(e=>Se([E],()=>E.getUser(e.id))==null?e.originalComponent():n(kD,{className:"mention",userId:e.id,channelId:e.channelId}),{fallback:({wrappedProps:{originalComponent:e}})=>e()})})});var Ew,Ow=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class^="panels"] [class^="avatarWrapper"] { min-width: 88px; } `,classNames:{},dom:null});Ew="src/plugins/gameActivityToggle/style.css"});function LD(e){let{oldIcon:t}=_w.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 ED(){let e=Bw.useSetting();return n(DD,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:LD(e),role:"switch","aria-checked":!e,redGlow:!e,onClick:()=>Bw.updateSetting(t=>!t)})}var DD,Bw,_w,yd,Fw=g(()=>{"use strict";a();l();U();yr();se();I();M();G();Ow();DD=le(".NONE,disabled:",".PANEL_BUTTON"),Bw=Co("status","showCurrentGame");_w=C({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),yd=v({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[d.Nuckyz,d.RuukuLada],dependencies:["UserSettingsAPI"],settings:_w,managedStyle:Ew,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:{match:/className:\i\.buttons,.{0,50}children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:k.wrap(ED,{noop:!0})})});var vd,Uw=g(()=>{"use strict";a();l();I();Me();M();T();vd=v({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&&(Pi(e.url+" "),Oa.closeExpressionPicker())}})});function Gw(e,t,o){let r=_o.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(bd.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};_o._sendMessage(e.id,i,r)}else _o.sendGreetMessage(e.id,o[0],r)}function OD({channel:e,message:t}){let o=bd.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(B.Menu,{navId:"greet-sticker-picker",onClose:()=>z.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(B.MenuGroup,{label:"Greet Mode"},Object.values(zw).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"},$w.map(s=>n(B.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>Gw(e,t,[s.id])}))),bd.store.unholyMultiGreetEnabled?n(f,null,n(B.MenuSeparator,null),n(B.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},$w.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:()=>Gw(e,t,i),disabled:i.length===0}))):null)}var zw,bd,$w,Sd,Hw=g(()=>{"use strict";a();l();U();I();M();G();T();zw=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(zw||{}),bd=C({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(),$w=Tt(e=>Array.isArray(e)&&e[0]?.name==="Wave");Sd=v({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:bd,patches:[{find:"#{intl::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||Dt.openContextMenu(e,()=>n(OD,{...t}))}})});var Ww=g(()=>{});var Ey={};it(Ey,{updateMessage:()=>Zi});function Zi(e,t,o){let r=Gc.getOrCreate(e);if(!r.has(t))return;let i=r.update(t,s=>o?s.merge(o):new s.constructor(s));Gc.commit(i),Zt.emitChange()}var Wl=g(()=>{"use strict";a();l();T()});async function jw(){return jl=await zt(qw)??new Set,jl}var qw,jl,BD,xd,Kw=g(()=>{"use strict";a();l();Ww();Vo();Wl();U();It();I();fe();M();T();qw="HideAttachments_HiddenIds",jl=new Set;BD=e=>Ao(qw,e);dr("HideMedia","HideAttachments");xd=v({name:"HideMedia",description:"Hide attachments and embeds for individual messages via hover button",authors:[d.Ven],dependencies:["MessageUpdaterAPI"],patches:[{find:"this.renderAttachments(",replacement:{match:/(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories)\((\i)\)/g,replace:"$self.shouldHide($1?.id)?null:$&"}}],renderMessagePopoverButton(e){let t=e.messageSnapshots.some(r=>r?.message.attachments.length);if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length&&!t)return null;let o=jl.has(e.id);return{label:o?"Show Media":"Hide Media",icon:o?Ya:Za,message:e,channel:ae.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.channel_id,e.id)}},renderMessageAccessory({message:e}){return this.shouldHide(e.id)?n("span",{className:W("vc-hideAttachments-accessory",!e.content&&"vc-hideAttachments-no-content")},"Media Hidden"):null},async start(){await jw()},stop(){jl.clear()},shouldHide(e){return jl.has(e)},async toggleHide(e,t){let o=await jw();o.delete(t)||o.add(t),await BD(o),Zi(e,t)}})});var Td,Yw=g(()=>{"use strict";a();l();I();M();Td=v({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[d.botato,d.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:0x40000000|(?:1<<30|1073741824))\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function Jw(e,t,o,r){return n(re,{text:t},i=>n("button",{...i,onClick:s=>$D(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 Qw(e,t=!1){let o=Gt.use(["ignoredActivities"]),{ignoredActivities:r}=o;return r.some(i=>i.id===e.id)?UD(e,"var(--status-danger)"):FD(e,t?"var(--green-300)":"var(--primary-400)")}function $D(e,t){e.stopPropagation();let o=Gt.store.ignoredActivities.findIndex(r=>r.id===t.id);o===-1?Gt.store.ignoredActivities.push(t):Gt.store.ignoredActivities.splice(o,1)}function Vr(){_D.updateSetting(e=>e)}function GD(){return n(he,{flexDirection:"column"},n(x.FormText,{type:x.FormText.Types.DESCRIPTION},"Import the application id of the CustomRPC plugin to the filter list"),n("div",null,n(A,{onClick:()=>{let e=Q.plugins.CustomRPC?.appID;if(!e)return ut("CustomRPC application ID is not set.",oe.Type.FAILURE);Oy?.(e)&&ut("CustomRPC application ID is already added.",oe.Type.FAILURE)}},"Import CustomRPC ID")))}function zD(e){let[t,o]=q(Gt.store.idsList??"");Oy=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},ue(()=>()=>{Oy=null},[]);function r(i){o(i),e.setValue(i)}return n(x.FormSection,null,n(x.FormTitle,{tag:"h3"},"Filter List"),n(x.FormText,{className:H.bottom8,type:x.FormText.Types.DESCRIPTION},"Comma separated list of activity IDs to filter (Useful for filtering specific RPC activities and CustomRPC"),n(Bt,{type:"text",value:t,onChange:r,placeholder:"235834946571337729, 343383572805058560"}))}function HD(e,t){if(t&&Gt.store.idsList.includes(t))return Gt.store.listMode===1;switch(e){case 0:return Gt.store.ignorePlaying;case 1:return Gt.store.ignoreStreaming;case 2:return Gt.store.ignoreListening;case 3:return Gt.store.ignoreWatching;case 5:return Gt.store.ignoreCompeting}return!1}var Zw,_D,FD,UD,Oy,Gt,wd,Xw=g(()=>{"use strict";a();l();U();yr();se();Wt();I();He();M();G();T();Zw=be("RunningGameStore"),_D=Co("status","showCurrentGame");FD=(e,t)=>Jw(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),UD=(e,t)=>Jw(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);Oy=null;Gt=C({importCustomRPC:{type:6,component:GD},listMode:{type:4,description:"Change the mode of the filter list",options:[{label:"Whitelist",value:0,default:!0},{label:"Blacklist",value:1}],onChange:Vr},idsList:{type:6,default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));Gt.store.idsList=Array.from(t).join(", "),Vr()},component:e=>n(zD,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1,onChange:Vr},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1,onChange:Vr},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1,onChange:Vr},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1,onChange:Vr},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1,onChange:Vr},ignoredActivities:{type:7,default:[],onChange:Vr}});wd=v({name:"IgnoreActivities",authors:[d.Nuckyz,d.Kylie],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",dependencies:["UserSettingsAPI"],settings:Gt,patches:[{find:'"LocalActivityStore"',replacement:[{match:/\.LISTENING.+?(?=!?\i\(\)\(\i,\i\))(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:'"ActivityTrackingStore"',replacement:{match:/getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`}},{find:"#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",replacement:{match:/#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".promotedLabelWrapperNonBanner,children",replacement:{match:/\.appDetailsHeaderContainer.+?children:\i.*?}\),(?<=application:(\i).+?)/,replace:(e,t)=>`${e}$self.renderToggleActivityButton(${t}),`}}],async start(){if(Gt.store.ignoredActivities.length!==0){let e=Zw.getGamesSeen();for(let[t,o]of Gt.store.ignoredActivities.entries())o.type===0&&(e.some(r=>r.id===o.id||r.exePath===o.id)||Gt.store.ignoredActivities.splice(t,1))}},isActivityNotIgnored(e){if(HD(e.type,e.application_id))return!1;if(e.application_id!=null)return!Gt.store.ignoredActivities.some(t=>t.id===e.application_id)||Gt.store.listMode===0&&Gt.store.idsList.includes(e.application_id);{let t=Zw.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!Gt.store.ignoredActivities.some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return n(k,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},Qw({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(k,{noop:!0},Qw({id:e.id,name:e.name,type:1}))}})});var Md,Vw=g(()=>{"use strict";a();l();I();M();Md=v({name:"ImageLink",description:"Never hide image links in messages, even if it's the only content",authors:[d.Kyuuhachi,d.Sqaaakoi],patches:[{find:"unknownUserMentionPlaceholder:",replacement:{match:/\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/,replace:"false"}}]})});var ql,By=g(()=>{"use strict";a();l();ql="vc-imgzoom-magnify-modal"});function _y(e,t){e()?t():requestAnimationFrame(()=>_y(e,t))}var eM=g(()=>{"use strict";a();l()});var tM,Fy,oM=g(()=>{"use strict";a();l();Ze();se();T();By();Uy();eM();tM=me("vc-imgzoom-"),Fy=k.wrap(({instance:e,size:t,zoom:o})=>{let[r,i]=q(!1),[s,c]=q({x:0,y:0}),[u,p]=q({x:0,y:0}),[m,y]=q(0),b=vt(!1),S=vt(o),N=vt(t),P=vt(null),w=vt(null),R=vt(null),D=vt(null);if(yi(()=>{let $=ce=>{ce.key==="Shift"&&(b.current=!0)},j=ce=>{ce.key==="Shift"&&(b.current=!1)},V=()=>{w.current&&R.current&&(w.current.currentTime=R.current.currentTime)},ie=ce=>{if(P.current)if(e.state.mouseOver&&e.state.mouseDown){let ge=N.current/2,xe={x:ce.pageX,y:ce.pageY},gt=-((xe.x-P.current.getBoundingClientRect().left)*S.current-ge),je=-((xe.y-P.current.getBoundingClientRect().top)*S.current-ge);c({x:ce.x-ge,y:ce.y-ge}),p({x:gt,y:je}),y(1)}else y(0)},ne=ce=>{e.state.mouseOver&&ce.button===0&&(S.current=dt.store.zoom,N.current=dt.store.size,document.getElementById("image-context")&&z.dispatch({type:"CONTEXT_MENU_CLOSE"}),ie(ce),y(1))},Y=()=>{y(0),dt.store.saveZoomValues&&(dt.store.zoom=S.current,dt.store.size=N.current)},Z=async ce=>{if(e.state.mouseOver&&e.state.mouseDown&&!b.current){let ge=S.current+ce.deltaY/100*(dt.store.invertScroll?-1:1)*dt.store.zoomSpeed;S.current=ge<=1?1:ge,ie(ce)}if(e.state.mouseOver&&e.state.mouseDown&&b.current){let ge=N.current+ce.deltaY*(dt.store.invertScroll?-1:1)*dt.store.zoomSpeed;N.current=ge<=50?50:ge,ie(ce)}};return _y(()=>e.state.readyState==="READY",()=>{let ce=document.getElementById(ql);P.current=ce,ce.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(R.current=ce.querySelector("video"),R.current.addEventListener("timeupdate",V)),i(!0)}),document.addEventListener("keydown",$),document.addEventListener("keyup",j),document.addEventListener("mousemove",ie),document.addEventListener("mousedown",ne),document.addEventListener("mouseup",Y),document.addEventListener("wheel",Z),()=>{document.removeEventListener("keydown",$),document.removeEventListener("keyup",j),document.removeEventListener("mousemove",ie),document.removeEventListener("mousedown",ne),document.removeEventListener("mouseup",Y),document.removeEventListener("wheel",Z)}},[]),yi(()=>()=>{dt.store.saveZoomValues&&(dt.store.zoom=S.current,dt.store.size=N.current)}),!r)return null;let O=P.current?.getBoundingClientRect();return O?n("div",{className:tM("lens",{"nearest-neighbor":dt.store.nearestNeighbour,square:dt.store.square}),style:{opacity:m,width:N.current+"px",height:N.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:w,style:{position:"absolute",left:`${u.x}px`,top:`${u.y}px`},width:`${O.width*S.current}px`,height:`${O.height*S.current}px`,poster:e.props.src,src:R.current?.src??e.props.src,autoPlay:!0,loop:!0,muted:!0}):n("img",{className:tM("image"),ref:D,style:{position:"absolute",transform:`translate(${u.x}px, ${u.y}px)`},width:`${O.width*S.current}px`,height:`${O.height*S.current}px`,src:e.props.src,alt:""})):null},{noop:!0})});var nM,rM=g(()=>{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 > .vc-imgzoom-image { image-rendering: pixelated; /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */ } `,classNames:{},dom:null});nM="src/plugins/imageZoom/styles.css"});var dt,WD,Pd,Uy=g(()=>{"use strict";a();l();U();Gr();ci();I();M();T();oM();By();rM();dt=C({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:co(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:co(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:co(.1,5,.2),default:.5,stickToMarkers:!1}}),WD=(e,t)=>{if("href"in t||t.target?.classList?.contains("emoji"))return;let{square:o,nearestNeighbour:r}=dt.use(["square","nearestNeighbour"]);e.push(n(B.MenuGroup,{id:"image-zoom"},n(B.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:o,action:()=>{dt.store.square=!o}}),n(B.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:r,action:()=>{dt.store.nearestNeighbour=!r}}),n(B.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(i,s)=>n(B.MenuSliderControl,{ref:s,...i,minValue:1,maxValue:50,value:dt.store.zoom,onChange:fo(c=>dt.store.zoom=c,100)})}),n(B.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(i,s)=>n(B.MenuSliderControl,{ref:s,...i,minValue:50,maxValue:1e3,value:dt.store.size,onChange:fo(c=>dt.store.size=c,100)})}),n(B.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(i,s)=>n(B.MenuSliderControl,{ref:s,...i,minValue:.1,maxValue:5,value:dt.store.zoomSpeed,onChange:fo(c=>dt.store.zoomSpeed=c,100),renderValue:c=>`${c.toFixed(3)}x`})})))},Pd=v({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"],managedStyle:nM,patches:[{find:".dimensionlessImage,",replacement:[{match:/className:\i\.media,/,replace:`id:"${ql}",$&`},{match:/\.zoomed]:.+?,(?=children:)/,replace:"$&onClick:()=>{},"},{match:/className:\i\(\)\(\i\.wrapper,.+?}\),/,replace:""}]},{find:'="FOCUS_SENSITIVE",',replacement:{match:/(?<=\.hidden]:)\i/,replace:"false"}},{find:".handleImageLoad)",replacement:[{match:/placeholderVersion:\i,(?=.{0,50}children:)/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"},{match:/componentDidUpdate\(\i\){/,replace:"$&$self.updateMagnifier(this);"}]}],settings:dt,contextMenus:{"image-context":WD},currentMagnifierElement:null,element:null,Magnifier:Fy,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===ql&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(Fy,{size:dt.store.size,zoom:dt.store.zoom,instance:e}),this.root=vi.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},updateMagnifier(e){this.unMountMagnifier(),this.renderMagnifier(e)},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(){this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){this.root&&this.root.unmount(),this.element?.remove()}})});var iM,Id,sM=g(()=>{"use strict";a();l();U();I();M();G();T();$y();iM=be("UserAffinitiesStore"),Id=v({name:"ImplicitRelationships",description:"Shows your implicit relationships in the Friends tab.",authors:[d.Dolfies],patches:[{find:"#{intl::FRIENDS_ALL_HEADER}",replacement:{match:/toString\(\)\}\);case (\i\.\i)\.PENDING/,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:"#{intl::FRIENDS_SECTION_ONLINE}",replacement:{match:/,{id:(\i\.\i)\.PENDING,show:.+?className:(\i\.item)/,replace:(e,t,o)=>`,{id:${t}.IMPLICIT,show:true,className:${o},content:"Implicit"}${e}`}},{find:'"FriendsStore"',replacement:{match:/(?<=case (\i\.\i)\.SUGGESTIONS:return \d+===(\i)\.type)/,replace:";case $1.IMPLICIT:return $2.type===5"}},{find:'"FriendsStore',replacement:{match:/(\i\.\i)\.fetchRelationships\(\)/,replace:"$1.fetchRelationships(),$self.fetchImplicitRelationships()"}},{find:"getRelationshipCounts(){",replacement:{predicate:()=>Q.plugins.ImplicitRelationships.sortByAffinity,match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{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:C({sortByAffinity:{type:3,default:!0,description:"Whether to sort implicit relationships by their affinity to you.",restartNeeded:!0}}),wrapSort(e,t){return t.type===5?-(iM.getUserAffinity(t.user.id)?.affinity??0):e(t)},async refreshUserAffinities(){try{await Mt.get({url:"/users/@me/affinities/users",retries:3}).then(({body:e})=>{z.dispatch({type:"LOAD_USER_AFFINITIES_SUCCESS",affinities:e})})}catch{}},async fetchImplicitRelationships(){await this.refreshUserAffinities();let e=iM.getUserAffinitiesUserIds(),t=_e.getRelationships(),o=Array.from(e).filter(p=>!_e.getRelationshipType(p));o.forEach(p=>{t[p]=5}),_e.emitChange();let r=o.filter(p=>!E.getUser(p)),i=Object.keys(pe.getGuilds()),s=wo.fromTimestamp(Date.now()),c=i.length*Math.ceil(r.length/100),u=({chunks:p})=>{let m=p.filter(y=>y.nonce===s).length;m!==0&&(c-=m,_e.emitChange(),c<=0&&z.unsubscribe("GUILD_MEMBERS_CHUNK_BATCH",u))};z.subscribe("GUILD_MEMBERS_CHUNK_BATCH",u);for(let p=0;pe?Pc(e):null,[e]);return o&&`hsl(${o%360n}, 100%, ${t}%)`}var Qi,Cd,lM=g(()=>{"use strict";a();l();U();Lg();I();M();T();Qi=C({lightness:{description:"Lightness, in %. Change if the colors are too light or too dark",type:1,default:70},memberListColors:{description:"Replace role colors in the member list",restartNeeded:!0,type:3,default:!0},applyColorOnlyToUsersWithoutColor:{description:"Apply colors only to users who don't have a predefined color",restartNeeded:!1,type:3,default:!1},applyColorOnlyInDms:{description:"Apply colors only in direct messages; do not apply colors in servers.",restartNeeded:!1,type:3,default:!1}}),Cd=v({name:"IrcColors",description:"Makes username colors in chat unique, like in IRC clients",authors:[d.Grzesiek11,d.jamesbt365],settings:Qi,patches:[{find:'="SYSTEM_TAG"',replacement:{match:/\i.gradientClassName]\),style:/,replace:"$&{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(typingIndicatorRef:.+?},)(\i=.+?)color:null!=.{0,50}?(?=,)/,replace:(e,t,o)=>`${t}ircColor=$self.calculateNameColorForListContext(arguments[0]),${o}color:ircColor`},predicate:()=>Qi.store.memberListColors}],calculateNameColorForMessageContext(e){let t=e?.message?.author?.id,o=e?.author?.colorString,r=aM(t);return e?.message?.channel_id==="1337"&&t==="313337"||Qi.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!Qi.store.applyColorOnlyToUsersWithoutColor||!o?r:o},calculateNameColorForListContext(e){let t=e?.user?.id,o=e?.colorString,r=aM(t);return Qi.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!Qi.store.applyColorOnlyToUsersWithoutColor||!o?r:o}})});var Nd,wn,Ad,cM=g(()=>{"use strict";a();l();Vo();I();M();T();Nd=!1,Ad=v({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[d.Nuckyz],patches:[{find:'"Switching accounts"',replacement:{match:/goHomeAfterSwitching:\i/,replace:"goHomeAfterSwitching:!1"}}],flux:{LOGOUT(e){({isSwitchingAccount:Nd}=e)},CONNECTION_OPEN(){Nd&&(Nd=!1,wn?.channelId&&(ae.hasChannel(wn.channelId)?ms.transitionToChannel(wn.channelId):un.transitionToGuild("@me")))},async CHANNEL_SELECT({guildId:e,channelId:t}){Nd||(wn={guildId:e,channelId:t},await Ao("KeepCurrentChannel_previousData",wn))}},async start(){wn=await zt("KeepCurrentChannel_previousData"),wn?wn.channelId&&ms.transitionToChannel(wn.channelId):(wn={guildId:To.getGuildId(),channelId:Ee.getChannelId()??null},await Ao("KeepCurrentChannel_previousData",wn))}})});async function Gy(e){return(await Ti.fetchAssetIds(Rd,[e]))[0]}function qD(e){z.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var Rd,jD,uM,pM,yo,kd,dM=g(()=>{"use strict";a();l();U();Po();I();Ne();M();G();T();Rd="1108588077900898414",jD="2a96cbd8b46e442fc41c2b86b821562f",uM=new ee("LastFMRichPresence"),pM=L("getLocalPresence");yo=C({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},shareSong:{description:"show link to song on last.fm",type:3,default:!0},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},hideWithActivity:{description:"Hide Last.fm presence if you have any other presence",type:3,default:!1},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"},{label:"Use album name (falls back to custom status text if song has no album)",value:"album"}]},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}}),kd=v({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[d.dzshn,d.RuiNtD,d.blahajZip,d.archeruwu],settingsAboutComponent:()=>n(f,null,n(x.FormTitle,{tag:"h3"},"How to get an API key"),n(x.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(ot,{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:yo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!yo.store.username||!yo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:yo.store.apiKey,user:yo.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 uM.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 uM.error("Failed to query Last.fm API",e),null}},async updatePresence(){qD(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(jD))return e.imageUrl;if(yo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(yo.store.hideWithActivity&&pM.getActivities().some(s=>s.application_id!==Rd)||yo.store.hideWithSpotify&&pM.getActivities().some(s=>s.type===2&&s.application_id!==Rd))return null;let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await Gy(t),large_text:e.album||void 0,...yo.store.showLastFmLogo&&{small_image:await Gy("lastfm-small"),small_text:"Last.fm"}}:{large_image:await Gy("lastfm-large"),large_text:e.album||void 0},r=[];yo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${yo.store.username}`}),yo.store.shareSong&&r.push({label:"View Song",url:e.url});let i=(()=>{switch(yo.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;case"album":return e.album||yo.store.statusName;default:return yo.store.statusName}})();return{application_id:Rd,name:i,details:e.name,state:e.artist,assets:o,buttons:r.length?r.map(s=>s.label):void 0,metadata:{button_urls:r.map(s=>s.url)},type:yo.store.useListeningStatus?2:0,flags:1}}})});var mM,fM=g(()=>{a();l();mM=`# Blank lines and lines starting with "#" are ignored Explode Read if cute Have a nice day! Starting Lightcord... Loading 0BDFDB.plugin.js... Installing BetterDiscord... h shhhhh did you know that you're my favourite user? But don't tell the others!! Today's video is sponsored by Raid Shadow Legends, one of the biggest mobile role-playing games of 2019 and it's totally free! Never gonna give you up, Never gonna let you down ( \u0361\xB0 \u035C\u0296 \u0361\xB0) (\uFF89\u25D5\u30EE\u25D5)\uFF89*:\uFF65\uFF9F\u2727 You look so pretty today! Thinking of a funny quote... 3.141592653589793 meow Welcome, friend If you, or someone you love, has Ligma, please see the Ligma health line at https://bit.ly/ligma_hotline Trans Rights I\u2019d just like to interject for a moment. What you\u2019re refering to as Linux, is in fact, GNU/Linux, or as I\u2019ve recently taken to calling it, GNU plus Linux. You're doing good today! Don't worry, it's nothing 9 cups of coffee couldn't solve! \uFFFD(repeat like 30 times) a light amount of tomfoolery is okay do you love? horror so eepy So without further ado, let's just jump right into it! Dying is absolutely safe hey you! you're cute :)) heya ~ <:trolley:997086295010594867> Time is gone, space is insane. Here it comes, here again. sometimes it's okay to just guhhhhhhhhhhhhhh Welcome to nginx!`});var KD,YD,zy,Dd,gM=g(()=>{"use strict";a();l();U();I();Ne();M();fM();KD=mM.split(` `).map(e=>/^\s*[^#\s]/.test(e)&&e.trim()).filter(Boolean),YD="Did you really disable all loading quotes? What a buffoon you are...",zy=C({replaceEvents:{description:"Should this plugin also apply during events with special event themed quotes? (e.g. Halloween)",type:3,default:!0},enablePluginPresetQuotes:{description:"Enable the quotes preset by this plugin",type:3,default:!0},enableDiscordPresetQuotes:{description:"Enable Discord's preset quotes (including event quotes, during events)",type:3,default:!1},additionalQuotes:{description:"Additional custom quotes to possibly appear, separated by the below delimiter",type:0,default:""},additionalQuotesDelimiter:{description:"Delimiter for additional quotes",type:0,default:"|"}}),Dd=v({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[d.Ven,d.KraXen72,d.UlyssesZhan],settings:zy,patches:[{find:"#{intl::LOADING_DID_YOU_KNOW}",replacement:[{match:/"_loadingText".+?(?=(\i)\[.{0,10}\.random)/,replace:"$&$self.mutateQuotes($1),"},{match:/"_eventLoadingText".+?(?=(\i)\[.{0,10}\.random)/,replace:"$&$self.mutateQuotes($1),",predicate:()=>zy.store.replaceEvents}]}],mutateQuotes(e){try{let{enableDiscordPresetQuotes:t,additionalQuotes:o,additionalQuotesDelimiter:r,enablePluginPresetQuotes:i}=zy.store;t||(e.length=0),i&&e.push(...KD),e.push(...o.split(r).filter(Boolean)),e.length||e.push(YD)}catch(t){new ee("LoadingQuotes").error("Failed to mutate quotes",t)}}})});var hM=g(()=>{});var Ld,yM=g(()=>{"use strict";a();l();So();fe();Fr();T();Ld=At(()=>{let e=new Mo,t=new Map;class o extends gi.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await Ra.preload(i,er.getDefaultChannel(i).id)}ensureCount(i){!i||t.has(i)||e.push(()=>this._ensureCount(i).then(()=>on(200),()=>on(200)))}}return new o(z,{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 qy({isTooltip:e,tooltipGuildId:t}){let o=Se([Ee],()=>Uo()),r=e?t:o?.guild_id,i=Se([Hy],()=>Hy.getMemberCount(r)),s=Se([Ld],()=>Ld.getCount(r)),{groups:c}=Se([Wy],()=>Wy.getProps(r,o?.id)),u=Se([jy],()=>jy.getMemberListSections(o?.id));if(!e&&(c.length>=1||c[0].id!=="unknown")&&(s=c.reduce((m,y)=>m+(y.id==="offline"?0:y.count),0)),!e&&u&&!Qn(u)&&(s=Object.values(u).reduce((m,y)=>m+(y.sectionId==="offline"?0:y.userIds.length),0)),ue(()=>{Ld.ensureCount(r)},[r]),i==null)return null;let p=s!=null?Ed(s):"?";return n("div",{className:Hs("widget",{tooltip:e,"member-list":!e})},n(re,{text:`${p} online in this channel`,position:"bottom"},m=>n("div",{...m},n("span",{className:Hs("online-dot")}),n("span",{className:Hs("online")},p))),n(re,{text:`${Ed(i)} total server members`,position:"bottom"},m=>n("div",{...m},n("span",{className:Hs("total-dot")}),n("span",{className:Hs("total")},Ed(i)))))}var vM=g(()=>{"use strict";a();l();Me();fe();T();Ky();yM()});var Hy,Wy,jy,Yy,ZD,Ed,Hs,Od,Ky=g(()=>{"use strict";a();l();hM();U();Ze();se();I();M();G();vM();Hy=be("GuildMemberCountStore"),Wy=be("ChannelMemberStore"),jy=be("ThreadMemberListStore"),Yy=C({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}}),ZD=new Intl.NumberFormat,Ed=e=>ZD.format(e),Hs=me("vc-membercount-"),Od=v({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[d.Ven,d.Commandtechno],settings:Yy,patches:[{find:"{isSidebarVisible:",replacement:[{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2",noWarn:!0},{match:/(?<=var\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}],predicate:()=>Yy.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/#{intl::VIEW_AS_ROLES_MENTIONS_WARNING}.{0,100}(?=])/,replace:"$&,$self.renderTooltip(arguments[0].guild)"},predicate:()=>Yy.store.toolTip}],render:k.wrap(qy,{noop:!0}),renderTooltip:k.wrap(e=>n(qy,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var bM=g(()=>{});function QD(){return n("svg",{className:"vc-mentionAvatars-icon vc-mentionAvatars-role-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M14 8.00598C14 10.211 12.206 12.006 10 12.006C7.795 12.006 6 10.211 6 8.00598C6 5.80098 7.794 4.00598 10 4.00598C12.206 4.00598 14 5.80098 14 8.00598ZM2 19.006C2 15.473 5.29 13.006 10 13.006C14.711 13.006 18 15.473 18 19.006V20.006H2V19.006Z"}),n("path",{d:"M20.0001 20.006H22.0001V19.006C22.0001 16.4433 20.2697 14.4415 17.5213 13.5352C19.0621 14.9127 20.0001 16.8059 20.0001 19.006V20.006Z"}),n("path",{d:"M14.8834 11.9077C16.6657 11.5044 18.0001 9.9077 18.0001 8.00598C18.0001 5.96916 16.4693 4.28218 14.4971 4.0367C15.4322 5.09511 16.0001 6.48524 16.0001 8.00598C16.0001 9.44888 15.4889 10.7742 14.6378 11.8102C14.7203 11.8418 14.8022 11.8743 14.8834 11.9077Z"}))}function SM(e){return xM.store.showAtSymbol?`@${e}`:e}var xM,Bd,TM=g(()=>{"use strict";a();l();bM();U();se();I();M();T();xM=C({showAtSymbol:{type:3,description:"Whether the the @ symbol should be displayed on user mentions",default:!0}});Bd=v({name:"MentionAvatars",description:"Shows user avatars and role icons inside mentions",authors:[d.Ven,d.SerStars],patches:[{find:".USER_MENTION)",replacement:{match:/children:"@"\.concat\((null!=\i\?\i:\i)\)(?<=\.useName\((\i)\).+?)/,replace:"children:$self.renderUsername({username:$1,user:$2})"}},{find:".ROLE_MENTION)",replacement:{match:/children:\[\i&&.{0,100}className:\i.roleDot,.{0,200},\i(?=\])/,replace:"$&,$self.renderRoleIcon(arguments[0])"}}],settings:xM,renderUsername:k.wrap(e=>{let{user:t,username:o}=e,[r,i]=q(!1);return t?n("span",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},n("img",{src:t.getAvatarURL(To.getGuildId(),16,r),className:"vc-mentionAvatars-icon",style:{borderRadius:"50%"}}),SM(o)):n(f,null,SM(o))},{noop:!0}),renderRoleIcon:k.wrap(({roleId:e,guildId:t})=>{if(!e)return null;let o=pe.getRole(t,e);return o?.icon?n("img",{className:"vc-mentionAvatars-icon vc-mentionAvatars-role-icon",src:`${location.protocol}//${unsafeWindow.GLOBAL_ENV.CDN_HOST}/role-icons/${e}/${o.icon}.webp?size=24&quality=lossless`}):n(QD,null)})})});var wM,JD,Zy,MM,PM,Ws,_d,IM=g(()=>{"use strict";a();l();U();I();M();G();T();wM=L("deleteMessage","startEditMessage"),JD=L("isEditing","isEditingAny"),Zy=!1,MM=e=>e.key==="Backspace"&&(Zy=!0),PM=e=>e.key==="Backspace"&&(Zy=!1),Ws=C({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}}),_d=v({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[d.Ven],settings:Ws,start(){document.addEventListener("keydown",MM),document.addEventListener("keyup",PM)},stop(){document.removeEventListener("keydown",MM),document.removeEventListener("keyup",PM)},onMessageClick(e,t,o){let r=e.author.id===E.getCurrentUser().id;if(Zy)Ws.store.enableDeleteOnClick&&(r||Be.can(Ie.MANAGE_MESSAGES,t))&&(e.deleted?z.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:e.id,mlDeleted:!0}):wM.deleteMessage(t.id,e.id),o.preventDefault());else{if(o.detail<2||Ws.store.requireModifier&&!o.ctrlKey&&!o.shiftKey||t.guild_id&&!Be.can(Ie.SEND_MESSAGES,t)||e.deleted===!0)return;if(r){if(!Ws.store.enableDoubleClickToEdit||JD.isEditing(t.id,e.id)||e.state!=="SENT")return;wM.startEditMessage(t.id,e.id,e.content),o.preventDefault()}else{if(!Ws.store.enableDoubleClickToReply||e.hasFlag(64))return;let s=o.shiftKey&&!Ws.store.requireModifier,c=Vencord.Plugins.plugins.NoReplyMention,u=Vencord.Plugins.isPluginEnabled("NoReplyMention")?c.shouldMention(e,s):!s;z.dispatch({type:"CREATE_PENDING_REPLY",channel:t,message:e,shouldMention:u,showMentionToggle:t.guild_id!==null})}}}})});var CM,XD,Fd,NM=g(()=>{"use strict";a();l();U();se();I();vs();M();G();T();CM=1471228928,XD=le(".hiddenVisually]:"),Fd=v({name:"MessageLatency",description:"Displays an indicator for messages that took \u2265n seconds to send",authors:[d.arHSM],settings:C({latency:{type:1,description:"Threshold in seconds for latency indicator",default:2},detectDiscordKotlin:{type:3,description:"Detect old Discord Android clients",default:!0},showMillis:{type:3,description:"Show milliseconds",default:!1}}),patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(message:(\i),avatar:\i,username:\(0,\i.jsxs\)\(\i.Fragment,\{children:\[)(\i&&)/,replace:"$1$self.Tooltip()({ message: $2 }),$3"}}],stringDelta(e,t){let o={days:Math.floor(e/864e5),hours:Math.floor(e/36e5%24),minutes:Math.floor(e/6e4%60),seconds:Math.floor(e/1e3%60),milliseconds:Math.floor(e%1e3)},r=c=>o[c]>0?`${o[c]} ${o[c]>1?c:c.substring(0,c.length-1)}`:null;return Object.keys(o).reduce((c,u)=>{let p=r(u);return c+(rr(p)?(c!==""?(t?u==="milliseconds":u==="seconds")?" and ":" ":"")+p:"")},"")||"0 seconds"},latencyTooltipData(e){let{latency:t,detectDiscordKotlin:o,showMillis:r}=this.settings.store,{id:i,nonce:s}=e;if(!rr(s)||e.bot)return null;let c=!1,u=wo.extractTimestamp(i)-wo.extractTimestamp(s);r||(u=Math.round(u/1e3)*1e3),-u>=CM-864e5&&(c=o,u+=CM);let p=Math.abs(u),m=p!==u,y=t*1e3,b=p>=y?this.stringDelta(p,r):null,S=2*60*1e3,N=c?["status-positive","status-positive","text-muted"]:u>=S||m?["text-muted","text-muted","text-muted"]:u>=y*2?["status-danger","text-muted","text-muted"]:["status-warning","status-warning","text-muted"];return p>=y||c?{delta:b,ahead:m,fill:N,isDiscordKotlin:c}:null},Tooltip(){return k.wrap(({message:e})=>{let t=this.latencyTooltipData(e);if(!rr(t))return null;let o;return t.delta?o=(t.ahead?`This user's clock is ${t.delta} ahead.`:`This message was sent with a delay of ${t.delta}.`)+(t.isDiscordKotlin?" User is suspected to be on an old Discord Android client.":""):o="User is suspected to be on an old Discord Android client",n(re,{text:o,position:"top"},r=>n(f,null,n(this.Icon,{delta:t.delta,fill:t.fill,props:r}),n(XD,null,"Delayed Message")))},{noop:!0})},Icon({delta:e,fill:t,props:o}){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"12",height:"12",role:"img",fill:"none",style:{marginRight:"8px",verticalAlign:-1},"aria-label":e??"Old Discord Android client","aria-hidden":"false",...o},n("path",{fill:`var(--${t[0]})`,d:"M4.8001 12C4.8001 11.5576 4.51344 11.2 4.16023 11.2H2.23997C1.88676 11.2 1.6001 11.5576 1.6001 12V13.6C1.6001 14.0424 1.88676 14.4 2.23997 14.4H4.15959C4.5128 14.4 4.79946 14.0424 4.79946 13.6L4.8001 12Z"}),n("path",{fill:`var(--${t[1]})`,d:"M9.6001 7.12724C9.6001 6.72504 9.31337 6.39998 8.9601 6.39998H7.0401C6.68684 6.39998 6.40011 6.72504 6.40011 7.12724V13.6727C6.40011 14.0749 6.68684 14.4 7.0401 14.4H8.9601C9.31337 14.4 9.6001 14.0749 9.6001 13.6727V7.12724Z"}),n("path",{fill:`var(--${t[2]})`,d:"M14.4001 2.31109C14.4001 1.91784 14.1134 1.59998 13.7601 1.59998H11.8401C11.4868 1.59998 11.2001 1.91784 11.2001 2.31109V13.6888C11.2001 14.0821 11.4868 14.4 11.8401 14.4H13.7601C14.1134 14.4 14.4001 14.0821 14.4001 13.6888V2.31109Z"}))}})});async function n8(e,t){let o=js.get(t);if(o)return o.message;js.set(t,{fetched:!1});let i=(await Mt.get({url:Lt.Endpoints.MESSAGES(e),query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Zt.getMessages(i.channel_id).receiveMessage(i).get(i.id);if(s)return js.set(s.id,{message:s,fetched:!0}),s}function r8(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"&&!kM.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function i8(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 s8(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||kM.test(t.url))))}function a8(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 l8(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function c8({message:e}){let t=e.vencordEmbeddedBy??[],o=[];for(let[r,i,s]of e.content.matchAll(Jy)){if(t.includes(s)||t.length>2)continue;let c=ae.getChannel(i);if(!c||!c.isPrivate()&&!Be.can(Ie.VIEW_CHANNEL,c))continue;let{listMode:u,idList:p}=Ud.store,m=[c.guild_id,i,e.author.id].some(N=>N&&p.includes(N));if(u==="blacklist"&&m||u==="whitelist"&&!m)continue;let y=js.get(s)?.message;if(!y)if(y??=Zt.getMessage(i,s),y)js.set(s,{message:y,fetched:!0});else{o8.unshift(()=>n8(i,s).then(N=>N&&Zi(e.channel_id,e.id)));continue}let b={message:l8(y,[...t,e.id]),channel:c},S=Ud.store.automodEmbeds;o.push(S==="always"||S==="prefer"&&!s8(y)?n(p8,{...b}):n(u8,{...b}))}return o.length?n(f,null,o):null}function DM(e){return e.isDM()?["Direct Message",_t.getUserAvatarURL(E.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",_t.getChannelIconURL(e)]:["Server",_t.getGuildIconURL(pe.getGuild(e.guild_id))]}function u8({message:e,channel:t}){let o=RM.useSetting(),r=E.getUser(ae.getChannel(t.id).recipients?.[0]),[i,s]=DM(t);return n(VD,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(X,{variant:"text-xs/medium",tag:"span"},n("span",null,i," - "),Fe.parse(t.isDM()?`<@${r.id}>`:`<#${t.id}>`)),iconProxyURL:s}},renderDescription:()=>n("div",{key:e.id,className:W(AM.message,Ud.store.messageBackgroundColor&&AM.searchResult)},n(t8,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1,compact:o}))})}function p8(e){let{message:t,channel:o}=e,r=RM.useSetting(),i=r8(t),{parse:s}=Fe,[c,u]=DM(o);return n(e8,{channel:o,childrenAccessories:n(X,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${Qy.embedAuthor} ${Qy.embedMargin}`},u&&n("img",{src:u,className:Qy.embedAuthorIcon,alt:""}),n("span",null,n("span",null,c," - "),o.isDM()?Fe.parse(`<@${ae.getChannel(o.id).recipients[0]}>`):Fe.parse(`<#${o.id}>`))),compact:r,content:n(f,null,t.content||t.attachments.length<=i.length?s(t.content):[i8(t.attachments.length,t.embeds.length)],i.map((p,m)=>{let{width:y,height:b}=a8(p.width,p.height);return n("div",{key:m},n("img",{src:p.url,width:y,height:b}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var js,VD,e8,t8,AM,Qy,RM,Jy,kM,o8,Ud,$d,LM=g(()=>{"use strict";a();l();wu();Wl();U();yr();se();I();fe();Fr();M();G();T();js=new Map,VD=le(".inlineMediaEmbed"),e8=le(".withFooter]:","childrenMessageContent:"),t8=le("childrenExecutedCommand:",".hideAccessories"),AM=L("message","searchResult"),Qy=L("embedAuthorIcon","embedAuthor","embedAuthor"),RM=Co("textAndImages","messageDisplayCompact"),Jy=/(?n(A,{onClick:()=>js.clear()},"Clear the linked message cache")}});$d=v({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[d.TheSun,d.Ven,d.RyanCaoDev],dependencies:["MessageAccessoriesAPI","MessageUpdaterAPI","UserSettingsAPI"],settings:Ud,start(){Sl("messageLinkEmbed",e=>Jy.test(e.message.content)?(Jy.lastIndex=0,n(k,null,n(c8,{message:e.message}))):null,4)},stop(){xl("messageLinkEmbed")}})});var EM=g(()=>{});var Xy,OM=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted { background-color: hsla(var(--red-430-hsl, 0 85% 61%) / 15%) !important; } `,classNames:{},dom:null});Xy="src/plugins/messageLogger/deleteStyleOverlay.css"});var Vy,BM=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`.messagelogger-deleted { --text-normal: var(--status-danger, #f04747); --interactive-normal: var(--status-danger, #f04747); --text-muted: var(--status-danger, #f04747); --embed-title: var(--red-460, #be3535); --text-link: var(--red-460, #be3535); --header-primary: var(--red-460, #be3535); } `,classNames:{},dom:null});Vy="src/plugins/messageLogger/deleteStyleText.css"});function _M(e){Ce(t=>n(k,null,n(f8,{modalProps:t,message:e})))}function f8({modalProps:e,message:t}){let[o,r]=q(t.editHistory.length),i=[t.firstEditTimestamp,...t.editHistory.map(c=>c.timestamp)],s=[...t.editHistory.map(c=>c.content),t.content];return n(Ae,{...e,size:"large"},n(Ue,{className:Kl("head")},n(X,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Message Edit History"),n(pt,{onClick:e.onClose})),n(De,{className:Kl("contents")},n(xo,{type:"top",look:"brand",className:W("vc-settings-tab-bar",Kl("tab-bar")),selectedItem:o,onItemSelect:r},t.firstEditTimestamp.getTime()!==t.timestamp.getTime()&&n(Xn,{text:"This edit state was not logged so it can't be displayed."},n(xo.Item,{className:"vc-settings-tab-bar-item",id:-1,disabled:!0},n(lo,{className:Kl("timestamp"),timestamp:t.timestamp,isEdited:!0,isInline:!1}))),i.map((c,u)=>n(xo.Item,{key:u,className:"vc-settings-tab-bar-item",id:u},n(lo,{className:Kl("timestamp"),timestamp:c,isEdited:!0,isInline:!1})))),n("div",{className:W(d8.markup,m8.messageContent,H.top20)},e0(s[o],t))))}var d8,m8,Kl,FM=g(()=>{"use strict";a();l();Ze();se();He();fe();Ye();G();T();t0();d8=L("markup","codeContainer"),m8=L("messageContent","markupRtl"),Kl=me("vc-ml-modal-")});function UM(){Q.plugins.MessageLogger.deleteStyle==="text"?(dn(Vy),mn(Xy)):(mn(Vy),dn(Xy))}function e0(e,t){return Fe.parse(e,!0,{channelId:t.channel_id,messageId:t.id,allowLinks:!0,allowHeading:!0,allowList:!0,allowEmojiLinks:!0,viewingChannelId:Ee.getChannelId()})}var g8,$M,GM,h8,Gd,zd,t0=g(()=>{"use strict";a();l();EM();Io();Wl();U();Ze();se();I();Me();Ne();fe();M();G();T();OM();BM();FM();g8=L("edited","communicationDisabled","isSystemMessage");$M="ml-remove-history",GM="ml-toggle-style",h8=(e,t)=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:c}=o;if(!(!r&&!i?.length)){e:{if(!r)break e;let u=document.getElementById(`chat-messages-${c}-${s}`);if(!u)break e;e.push(n(B.MenuItem,{id:GM,key:GM,label:"Toggle Deleted Highlight",action:()=>u.classList.toggle("messagelogger-deleted")}))}e.push(n(B.MenuItem,{id:$M,key:$M,label:"Remove Message History",color:"danger",action:()=>{r?z.dispatch({type:"MESSAGE_DELETE",channelId:c,id:s,mlDeleted:!0}):o.editHistory=[]}}))}},Gd=(e,{channel:t})=>{let o=Zt.getMessages(t?.id);if(!o?.some(i=>i.deleted||i.editHistory?.length))return;(st("mark-channel-read",e)??e).push(n(B.MenuItem,{id:"vc-ml-clear-channel",label:"Clear Message Log",color:"danger",action:()=>{o.forEach(i=>{i.deleted?z.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:i.id,mlDeleted:!0}):Zi(t.id,i.id,{editHistory:[]})})}}))};zd=v({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[d.rushii,d.Ven,d.AutumnVN,d.Nickyux,d.Kyuuhachi],dependencies:["MessageUpdaterAPI"],contextMenus:{message:h8,"channel-context":Gd,"thread-context":Gd,"user-context":Gd,"gdm-context":Gd},start(){UM()},renderEdits:k.wrap(({message:{id:e,channel_id:t}})=>{let o=Se([Zt],()=>Zt.getMessage(t,e),null,(r,i)=>r?.editHistory===i?.editHistory);return Q.plugins.MessageLogger.inlineEdits&&n(f,null,o.editHistory?.map((r,i)=>n("div",{key:i,className:"messagelogger-edited"},e0(r.content,o),n(lo,{timestamp:r.timestamp,isEdited:!0,isInline:!1},n("span",{className:g8.edited}," ","(",we("MESSAGE_EDITED"),")")))))},{noop:!0}),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:()=>UM()},logDeletes:{type:3,description:"Whether to log deleted messages",default:!0},collapseDeleted:{type:3,description:"Whether to collapse deleted messages, similar to blocked messages",default:!1,restartNeeded:!0},logEdits:{type:3,description:"Whether to log edited messages",default:!0},inlineEdits:{type:3,description:"Whether to display edit history as part of message content",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 ee("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}=Q.plugins.MessageLogger,m=E.getCurrentUser().id;return o&&e.author?.bot||r&&e.author?.id===m||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(ae.getChannel(e.channel_id)?.parent_id)||(t?!u:!p)||c.includes(ae.getChannel(e.channel_id)?.guild_id)||e.channel_id==="1026515880080842772"&&e.author?.id==="1017176847865352332"},EditMarker({message:e,className:t,children:o,...r}){return n("span",{...r,className:W("messagelogger-edit-marker",t),onClick:()=>_M(e),role:"button"},o)},DELETED_MESSAGE_COUNT:()=>({ast:[[6,"count",{"=0":["No deleted messages"],one:[[1,"count"]," deleted message"],other:[[1,"count"]," deleted messages"]},0,"cardinal"]]}),patches:[{find:'"MessageStore"',replacement:[{match:/function (?=.+?MESSAGE_DELETE:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,replace:"function $1($2){ var cache = $3getOrCreate($2.channelId); cache = $self.handleDelete(cache, $2, false); $3commit(cache);}"},{match:/function (?=.+?MESSAGE_DELETE_BULK:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,replace:"function $1($2){ var cache = $3getOrCreate($2.channelId); cache = $self.handleDelete(cache, $2, true); $3commit(cache);}"},{match:/(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/,replace:"$1.update($4,m => (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m : $3.message.edited_timestamp && $3.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) : m).update($4"},{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 || [],this.firstEditTimestamp = $1.firstEditTimestamp || this.editedTimestamp || this.timestamp,"}]},{find:"THREAD_STARTER_MESSAGE?null==",replacement:[{match:/(?<=null!=\i\.edited_timestamp\)return )\i\(\i,\{reactions:(\i)\.reactions.{0,50}\}\)/,replace:"Object.assign($&,{ deleted:$1.deleted, editHistory:$1.editHistory, firstEditTimestamp:$1.firstEditTimestamp })"},{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,firstEditTimestamp: new Date(arguments[1]?.firstEditTimestamp ?? $2.editedTimestamp ?? $2.timestamp)"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeMosaicItemHoverButton",replacement:[{match:/\[\i\.obscured\]:.+?,(?<=item:(\i).+?)/,replace:'$&"messagelogger-deleted-attachment":$1.originalItem?.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:"#{intl::MESSAGE_EDITED}",replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (!!arguments[0].message.editHistory?.length && $self.renderEdits(arguments[0])),"},{match:/"span",\{(?=className:\i\.edited,)/,replace:"$self.EditMarker,{message:arguments[0].message,"}]},{find:'"ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:\i,/,replace:"MESSAGE_DELETE:()=>{},"},{match:/MESSAGE_DELETE_BULK:\i,/,replace:"MESSAGE_DELETE_BULK:()=>{},"}]},{find:".MESSAGE,commandTargetId:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]},{find:"NON_COLLAPSIBLE.has(",replacement:{match:/if\((\i)\.blocked\)return \i\.\i\.MESSAGE_GROUP_BLOCKED;/,replace:'$&else if($1.deleted) return"MESSAGE_GROUP_DELETED";'},predicate:()=>Q.plugins.MessageLogger.collapseDeleted},{find:"#{intl::NEW_MESSAGES_ESTIMATED_WITH_DATE}",replacement:[{match:/(\i).type===\i\.\i\.MESSAGE_GROUP_BLOCKED\|\|/,replace:'$&$1.type==="MESSAGE_GROUP_DELETED"||'},{match:/(\i).type===\i\.\i\.MESSAGE_GROUP_BLOCKED\?.*?:/,replace:'$&$1.type==="MESSAGE_GROUP_DELETED"?$self.DELETED_MESSAGE_COUNT:'}],predicate:()=>Q.plugins.MessageLogger.collapseDeleted}]})});function HM(){return Ji.store.tagsList}function Hd(e){return Ji.store.tagsList[e]??null}function v8(e){Ji.store.tagsList[e.name]=e}function b8(e){delete Ji.store.tagsList[e]}function WM(e){Is({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>Hd(e.name)?(Ji.store.clyde&&at(o.channel.id,{content:`${ei} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` `)}):(at(o.channel.id,{content:`${ei} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[y8]:!0},"CustomTags")}var ei,zM,y8,Ji,Wd,jM=g(()=>{"use strict";a();l();Qo();Vo();U();I();M();ei="<:luna:1035316192220553236>",zM="MessageTags_TAGS",y8=Symbol("MessageTags");Ji=C({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},tagsList:{type:7,default:{}}}),Wd=v({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[d.Luna],settings:Ji,async start(){let e=await zt(zM);e!=null&&(Ji.store.tagsList=Object.fromEntries(e.map(o=>(delete o.enabled,[o.name,o]))),await Nn(zM));let t=HM();for(let o in t)WM(t[o])},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=qt(e[0].options,"tag-name",""),r=qt(e[0].options,"message","");if(Hd(o))return at(t.channel.id,{content:`${ei} A Tag with the name **${o}** already exists!`});let i={name:o,message:r};WM(i),v8(i),at(t.channel.id,{content:`${ei} Successfully created the tag **${o}**!`});break}case"delete":{let o=qt(e[0].options,"tag-name","");if(!Hd(o))return at(t.channel.id,{content:`${ei} A Tag with the name **${o}** does not exist!`});dl(o),b8(o),at(t.channel.id,{content:`${ei} Successfully deleted the tag **${o}**!`});break}case"list":{at(t.channel.id,{embeds:[{title:"All Tags:",description:Object.values(HM()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(` `)||`${ei} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=qt(e[0].options,"tag-name",""),r=Hd(o);if(!r)return at(t.channel.id,{content:`${ei} A Tag with the name **${o}** does not exist!`});at(t.channel.id,{content:r.message.replaceAll("\\n",` `)});break}default:{at(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function S8(e){let t="";for(let o=0;o{"use strict";a();l();Qo();I();M();jd=v({name:"MoreCommands",description:"echo, lenny, mock",authors:[d.Arjix,d.echo,d.Samu],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[_n],inputType:3,execute:(e,t)=>{let o=qt(e,"message","");at(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[_n],execute:e=>({content:qt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[pl],execute:e=>({content:S8(qt(e,"message",""))})}]})});var qd,KM=g(()=>{"use strict";a();l();Qo();I();M();qd=v({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[d.JacobTm],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:[_n],execute:t=>({content:qt(t,"message","")+" "+e.description})}))})});function w8(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function M8(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function I8(e){let t=w8(e,n0)+M8(e,P8);return Math.min(t,10)}function o0(){if(!ti.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=ti.store.quality==="HD"?T8:x8,e.volume=ti.store.volume,e.play()}var n0,x8,T8,ti,Kd,P8,YM=g(()=>{"use strict";a();l();U();e1();I();fe();M();T();n0="\u{1F5FF}",x8="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",T8="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",ti=C({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:co(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}}),Kd=v({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:ti,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||ti.store.ignoreBots&&o.author?.bot||ti.store.ignoreBlocked&&_e.isBlocked(o.author?.id)||!o.content||r!==Ee.getChannelId())return;let i=I8(o.content);for(let s=0;s/gi});function k8(e){return e.name||e.recipients.map(E.getUser).filter(rr).map(t=>_e.getNickname(t.id)||N8.getName(t)).join(", ")}function L8(e){let t=Yd(e.id).length;return`${t===0?"No":t} Mutual Group${t!==1?"s":""}`}function ZM(e,t){return e.map(o=>n(Vn,{key:o.id,className:oi.listRow,onClick:()=>{t(),C8.selectPrivateChannel(o.id)}},n(Ia,{src:_t.getChannelIconURL({id:o.id,icon:o.icon,size:32}),size:"SIZE_40",className:oi.listAvatar}),n("div",{className:oi.listRowContent},n("div",{className:oi.listName},k8(o)),n("div",{className:R8.guildNick},o.recipients.length+1," Members"))))}var C8,N8,oi,A8,R8,Yd,D8,QM,Zd,JM=g(()=>{"use strict";a();l();se();I();vs();Ne();M();G();T();C8=L("selectPrivateChannel"),N8=L("getGlobalName"),oi=L("emptyIconFriends","emptyIconGuilds"),A8=le('"PRESS_SECTION"'),R8=L("guildNick","guildAvatarWithoutIcon");Yd=e=>ae.getSortedPrivateChannels().filter(t=>t.isGroupDM()&&t.recipients.includes(e)),D8=e=>e.bot||e.id===E.getCurrentUser().id;QM=Symbol("MutualGroupDMs.Patched"),Zd=v({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[d.amia],patches:[{find:".MUTUAL_FRIENDS?(",replacement:[{match:/\i\.useEffect.{0,100}(\i)\[0\]\.section/,replace:"$self.pushSection($1,arguments[0].user);$&"},{match:/\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,replace:"$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&"}]},{find:'section:"MUTUAL_FRIENDS"',replacement:[{match:/\i\|\|\i(?=\?\(0,\i\.jsxs?\)\(\i\.\i\.Overlay,)/,replace:"$&||$self.getMutualGroupDms(arguments[0].user.id).length>0"},{match:/\.openUserProfileModal.+?\)}\)}\)(?<=,(\i)&&(\i)&&(\(0,\i\.jsxs?\)\(\i\.\i,{className:(\i)\.divider}\)).+?)/,replace:(e,t,o,r,i)=>`${e},$self.renderDMPageList({user:arguments[0].user,hasDivider:${t}||${o},Divider:${r},listStyle:${i}.list})`}]}],getMutualGroupDms(e){try{return Yd(e)}catch(t){new ee("MutualGroupDMs").error("Failed to get mutual group dms:",t)}return[]},pushSection(e,t){try{if(D8(t)||e[QM])return;e[QM]=!0,e.push({section:"MUTUAL_GDMS",text:L8(t)})}catch(o){new ee("MutualGroupDMs").error("Failed to push mutual group dms section:",o)}},renderMutualGDMs:k.wrap(({user:e,onClose:t})=>{let o=Re(()=>Yd(e.id),[e.id]),r=ZM(o,t);return n(Er,{className:oi.listScroller,fade:!0,onClose:t},r.length>0?r:n("div",{className:oi.empty},n("div",{className:oi.emptyIconFriends}),n("div",{className:oi.emptyText},"No group dms in common")))}),renderDMPageList:k.wrap(({user:e,hasDivider:t,Divider:o,listStyle:r})=>{let i=Yd(e.id);return i.length===0?null:n(f,null,t&&o,n(A8,{listClassName:r,header:"Mutual Groups",isLoading:!1,items:ZM(i,()=>{})}))})})});function eP(e){e==="@me"||e==="null"||e==null||(XM(e,{muted:Tr.store.guild,suppress_everyone:Tr.store.everyone,suppress_roles:Tr.store.role,mute_scheduled_events:Tr.store.events,notify_highlights:Tr.store.highlights?1:0}),Tr.store.messages!==3&&XM(e,{message_notifications:Tr.store.messages}),Tr.store.showAllChannels&&O8(e)&&E8(e))}var XM,E8,O8,Tr,VM,Qd,tP=g(()=>{"use strict";a();l();Io();U();It();I();M();G();T();({updateGuildNotificationSettings:XM}=L("updateGuildNotificationSettings")),{toggleShowAllChannels:E8}=ze(".onboardExistingMember(",{toggleShowAllChannels:e=>{let t=String(e);return t.length<100&&!t.includes("onboardExistingMember")&&!t.includes("getOptedInChannels")}}),O8=ve(".COMMUNITY)||",".isOptInEnabled("),Tr=C({guild:{description:"Mute Guild automatically",type:3,default:!0},messages:{description:"Server Notification Settings",type:4,options:[{label:"All messages",value:0},{label:"Only @mentions",value:1},{label:"Nothing",value:2},{label:"Server default",value:3,default:!0}]},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0},highlights:{description:"Suppress Highlights automatically",type:3,default:!0},events:{description:"Mute New Events automatically",type:3,default:!0},showAllChannels:{description:"Show all channels automatically",type:3,default:!0}}),VM=e=>(t,{guild:o})=>{if(!o)return;st("privacy",t)?.push(n(B.MenuItem,{label:"Apply NewGuildSettings",id:"vc-newguildsettings-apply",icon:e?Qa:void 0,action:()=>eP(o.id)}))};Qd=v({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,d.GabiRP],contextMenus:{"guild-context":VM(!1),"guild-header-popout":VM(!0)},patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!=.+?;/,replace:(e,t)=>`${e}$self.applyDefaultSettings(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,o)=>`${e}if(!${o})$self.applyDefaultSettings(${t});`}}],settings:Tr,applyDefaultSettings:eP})});var oP,Jd,Xd,nP=g(()=>{"use strict";a();l();U();I();rs();Ne();M();G();T();oP=L("getRelationships","isBlocked");$h("NoBlockedMessages","ignoreBlockedMessages","ignoreMessages");Jd=C({ignoreMessages:{description:"Completely ignores incoming messages from blocked and ignored (if enabled) users",type:3,default:!1,restartNeeded:!0},applyToIgnoredUsers:{description:"Additionally apply to 'ignored' users",type:3,default:!0,restartNeeded:!1}}),Xd=v({name:"NoBlockedMessages",description:"Hides all blocked/ignored messages from chat completely",authors:[d.rushii,d.Samu,d.jamesbt365],settings:Jd,patches:[{find:".__invalid_blocked,",replacement:[{match:/let{expanded:\i,[^}]*?collapsedReason[^}]*}/,replace:"if($self.shouldHide(arguments[0]))return null;$&"}]},...['"MessageStore"','"ReadStateStore"'].map(e=>({find:e,predicate:()=>Jd.store.ignoreMessages,replacement:[{match:/(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,replace:(t,o,r)=>`if($self.shouldIgnoreMessage(${r}.message))return;`}]}))],shouldIgnoreMessage(e){try{return oP.isBlocked(e.author.id)?!0:Jd.store.applyToIgnoredUsers&&oP.isIgnored(e.author.id)}catch(t){return new ee("NoBlockedMessages").error("Failed to check if user is blocked or ignored:",t),!1}},shouldHide(e){try{let t=e.collapsedReason(),o=cn.t[Rn("BLOCKED_MESSAGE_COUNT")](),r=Jd.store.applyToIgnoredUsers?cn.t[Rn("IGNORED_MESSAGE_COUNT")]():null;return t===o||t===r}catch(t){return console.error(t),!1}}})});var Vd,rP=g(()=>{"use strict";a();l();I();M();Vd=v({name:"DisableDeepLinks",description:"Disables Discord's stupid deep linking feature which tries to force you to use their Desktop App",authors:[d.Ven],required:!0,noop:()=>{},patches:[{find:/\.openNativeAppModal\(.{0,50}?\.DEEP_LINK/,replacement:{match:/\i\.\i\.openNativeAppModal/,replace:"$self.noop"}}]})});var em,iP=g(()=>{"use strict";a();l();I();M();em=v({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 tm,sP=g(()=>{"use strict";a();l();I();M();tm=v({name:"NoF1",description:"Disables F1 help bind.",authors:[d.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var om,aP=g(()=>{"use strict";a();l();I();M();om=v({name:"NoMaskedUrlPaste",authors:[d.CatNoir],description:"Pasting a link while having text selected will not paste as masked URL",patches:[{find:".selection,preventEmojiSurrogates:",replacement:{match:/if\(null!=\i.selection&&\i.\i.isExpanded\(\i.selection\)\)/,replace:"if(false)"}}]})});var lP,nm,cP=g(()=>{"use strict";a();l();U();I();M();lP=C({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),nm=v({name:"NoMosaic",authors:[d.AutumnVN],description:"Removes Discord image mosaic",tags:["image","mosaic","media"],settings:lP,patches:[{find:'=>"IMAGE"===',replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/,replace:(e,t)=>t!=null?`=>${t};`:"=>false;"}},{find:"renderAttachments(",predicate:()=>lP.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]})});var rm,uP=g(()=>{"use strict";a();l();I();M();rm=v({name:"NoOnboardingDelay",description:"Skips the slow and annoying onboarding delay",authors:[d.nekohaxx],patches:[{find:"#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}",replacement:{match:"3e3",replace:"0"}}]})});var B8,Yl,im,pP=g(()=>{"use strict";a();l();U();I();M();G();B8=L("getMessageRequestsCount"),Yl=C({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}}),im=v({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[d.amia],settings:Yl,patches:[{find:"getPendingCount(){",predicate:()=>Yl.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Yl.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount();return",predicate:()=>Yl.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Yl.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,300}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return B8.getMessageRequestChannelIds().size}})});var sm,dP=g(()=>{"use strict";a();l();I();M();T();sm=v({name:"NoProfileThemes",description:"Completely removes Nitro profile themes from everyone but yourself",authors:[d.TheKodeToad],patches:[{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&$self.isCurrentUser(this.userId)&&"}}],isCurrentUser:e=>e===E.getCurrentUser()?.id})});var am,lm,mP=g(()=>{"use strict";a();l();U();I();M();am=C({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}}),lm=v({name:"NoReplyMention",description:"Disables reply pings by default",authors:[d.DustyAngel47,d.axyie,d.pylix,d.outfoxxed],settings:am,shouldMention(e,t){let o=am.store.userList.includes(e.author.id),r=am.store.shouldPingListed?o:!o;return am.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 r0,cm,fP=g(()=>{"use strict";a();l();U();I();M();r0=C({shownEmojis:{description:"The types of emojis to show in the autocomplete menu.",type:4,default:"onlyUnicode",options:[{label:"Only unicode emojis",value:"onlyUnicode"},{label:"Unicode emojis and server emojis from current server",value:"currentServer"},{label:"Unicode emojis and all server emojis (Discord default)",value:"all"}]}}),cm=v({name:"NoServerEmojis",authors:[d.UlyssesZhan],description:"Do not show server emojis in the autocomplete menu.",settings:r0,patches:[{find:"}searchWithoutFetchingLatest(",replacement:{match:/searchWithoutFetchingLatest.{20,300}get\((\i).{10,40}?reduce\(\((\i),(\i)\)=>\{/,replace:"$& if ($self.shouldSkip($1, $3)) return $2;"}}],shouldSkip(e,t){return t.type!==1?!1:r0.store.shownEmojis==="onlyUnicode"?!0:r0.store.shownEmojis==="currentServer"?t.guildId!==e:!1}})});var um,gP=g(()=>{"use strict";a();l();I();M();um=v({name:"NoTypingAnimation",authors:[d.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var pm,hP=g(()=>{"use strict";a();l();I();M();pm=v({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}#{intl::UNBLOCK_TO_JUMP_TITLE})/,replace:"if(false)$1"},{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,replace:"if(false)$1"}]},{find:"renderJumpButton()",replacement:[{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,replace:"if(false)$1"},{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,replace:"if(false)$1"}]},{find:'("interactionUsernameProfile',replacement:[{match:/.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,replace:"false?$1"},{match:/.\?(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,replace:"false?$1"}]}]})});var dm,yP=g(()=>{"use strict";a();l();I();M();dm=v({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[d.bb010g],patches:[{find:"#{intl::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 _8,mm,vP=g(()=>{"use strict";a();l();U();I();M();_8=C({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),mm=v({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[d.philipbry],settings:_8,patches:[{find:"ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,replace:"$self.settings.store.notificationVolume/100*"}}]})});var fm,bP=g(()=>{"use strict";a();l();I();M();fm=v({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:"true"},{match:/(?<=\.ageVerificationStatus=)null!=.+?(?=[,;])/,replace:"3"}]}]})});var Zl,gm,SP=g(()=>{"use strict";a();l();U();I();M();T();Zl=C({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}}),gm=v({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:Zl,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=ae.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&Zl.store.channelToAffect==="group_dm"||t===3&&Zl.store.channelToAffect==="user_dm"||Zl.store.allowMentions&&e.mentions.some(o=>o.id===E.getCurrentUser().id)||Zl.store.allowEveryone&&e.mention_everyone?!0:bi.getOldestUnreadMessageId(e.channel_id)===e.id}})});var hm,xP=g(()=>{"use strict";a();l();I();M();hm=v({name:"oneko",description:"cat follow mouse (real)",authors:[d.Ven,d.adryd],start(){h("https://raw.githubusercontent.com/adryd325/oneko.js/c4ee66353b11a44e4a5b7e914a81f8d33111555e/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 i0,ym,F8,vm,TP=g(()=>{"use strict";a();l();U();I();M();T();i0={spotify:{match:/^https:\/\/open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|artist|playlist|user|episode|prerelease)\/(.+)(?:\?.+?)?$/,replace:(e,t,o)=>`spotify://${t}/${o}`,description:"Open Spotify links in the Spotify app",shortlinkMatch:/^https:\/\/spotify\.link\/.+$/,accountViewReplace:e=>`spotify:user:${e}`},steam:{match:/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,replace:e=>`steam://openurl/${e}`,description:"Open Steam links in the Steam app",shortlinkMatch:/^https:\/\/s.team\/.+$/,accountViewReplace:e=>`steam://openurl/https://steamcommunity.com/profiles/${e}`},epic:{match:/^https:\/\/store\.epicgames\.com\/(.+)$/,replace:(e,t)=>`com.epicgames.launcher://store/${t}`,description:"Open Epic Games links in the Epic Games Launcher"},tidal:{match:/^https:\/\/tidal\.com\/browse\/(track|album|artist|playlist|user|video|mix)\/(.+)(?:\?.+?)?$/,replace:(e,t,o)=>`tidal://${t}/${o}`,description:"Open Tidal links in the Tidal app"},itunes:{match:/^https:\/\/(?:geo\.)?music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/,replace:(e,t,o,r,i)=>i?`itunes://music.apple.com/us/${o}/${r}/${i}`:`itunes://music.apple.com/us/${o}/${r}`,description:"Open Apple Music links in the iTunes app"}},ym=C(Object.entries(i0).reduce((e,[t,o])=>(e[t]={type:3,description:o.description,default:!0},e),{})),F8=VencordNative.pluginHelpers.OpenInApp,vm=v({name:"OpenInApp",description:"Open links in their respective apps instead of your browser",authors:[d.Ven,d.surgedevs],settings:ym,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/function (\i\(\i,\i\)\{)(?=.{0,150}trusted:)/,replace:"async function $1 if(await $self.handleLink(...arguments)) return;"}},{find:"no artist ids in metadata",predicate:()=>ym.store.spotify,replacement:[{match:/\i\.\i\.isProtocolRegistered\(\)/g,replace:"true"},{match:/(!)?\(0,\i\.isDesktop\)\(\)/,replace:(e,t)=>t?"false":"true"}]},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:(\i)=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"if($self.handleAccountView($1,$2.type,$2.id)) return;"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;if(!o)return!1;for(let[r,i]of Object.entries(i0))if(ym.store[r]&&(i.shortlinkMatch?.test(o)&&(t?.preventDefault(),o=await F8.resolveRedirect(o)),i.match.test(o))){ut("Opened link in native app",oe.Type.SUCCESS);let s=o.replace(i.match,i.replace);return VencordNative.native.openExternal(s),t?.preventDefault(),!0}return t?.defaultPrevented?(unsafeWindow.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){let r=i0[t];if(r?.accountViewReplace&&ym.store[t])return VencordNative.native.openExternal(r.accountViewReplace(o)),e.preventDefault(),!0}})});var s0,bm,wP=g(()=>{"use strict";a();l();U();I();M();s0=C({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"}}),bm=v({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:()=>s0.store.defaultLayout,getSortOrder:()=>s0.store.defaultSortOrder,settings:s0})});function PP(e){z.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function IP(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}}z.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var MP,Sm,CP=g(()=>{"use strict";a();l();U();I();M();T();MP=C({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:IP}}),Sm=v({name:"PartyMode",description:"Allows you to use party mode cause the party never ends \u2728",authors:[d.UwUDev],reporterTestable:2,settings:MP,start(){PP(!0),IP(MP.store.superIntensePartyMode)},stop(){PP(!1)}})});function U8(e){let t=pe.getGuild(e);return t?!t.hasFeature("INVITES_DISABLED")&&Be.getGuildPermissionProps(t).canManageRoles:!1}function $8(e){let o=[...pe.getGuild(e).features,"INVITES_DISABLED"];Mt.patch({url:Lt.Endpoints.GUILD(e),body:{features:o}})}var xm,NP=g(()=>{"use strict";a();l();se();I();Me();M();T();xm=v({name:"PauseInvitesForever",tags:["DisableInvitesForever"],description:"Brings back the option to pause invites indefinitely that stupit Discord removed.",authors:[d.Dolfies,d.amia],patches:[{find:"#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}",group:!0,replacement:[{match:/children:\i\.\i\.string\(\i\.\i#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}\)/,replace:"children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})"},{match:/\.INVITES_DISABLED\)(?=.+?#{intl::INVITES_PERMANENTLY_DISABLED_TIP}.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,replace:"$&,setChecked=$2"}]}],renderInvitesLabel:k.wrap(({guildId:e,setChecked:t})=>n("div",null,we("GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION"),U8(e)&&n("a",{role:"button",onClick:()=>{t(!0),$8(e)}}," Pause Indefinitely.")))})});var a0,Tm,AP=g(()=>{"use strict";a();l();U();I();Bo();M();a0=C({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}}),Tm=v({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[d.lewisakura],patches:[{find:"#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>a0.store.lockout},{find:"#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}",replacement:[{match:/{(?:\i:(?:function\(\){return |\(\)=>)\i}?,?){2}}/,replace:e=>e.replaceAll(Rt(/(function\(\){return |\(\)=>)\i/g),"$1()=>Promise.resolve(true)")}],predicate:()=>a0.store.onboarding}],settings:a0})});var RP=g(()=>{});function Mm({id:e},t){let o=pe.getRoles(e);return[...t.roles,e].map(r=>o[r]).sort((r,i)=>i.position-r.position)}function kP(e){switch(ni.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 Pm(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 wm,lt,Ql=g(()=>{"use strict";a();l();Ze();G();T();Xl();Jl();({getGuildPermissionSpecMap:wm}=L("getGuildPermissionSpecMap")),lt=me("vc-permviewer-")});function l0(){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 c0(){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 LP(){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 EP=g(()=>{"use strict";a();l()});function H8(e){let t=z8(e,20);if(!t)return;let{customIconSrc:o,unicodeEmoji:r}=t;return o??r?.url}function W8({permissions:e,guild:t,modalProps:o,header:r}){let i=Re(()=>wm(t),[t.id]);Se([ke],()=>ke.getMemberIds(t.id),null,(m,y)=>m.length===y.length),ue(()=>{e.sort((m,y)=>m.type-y.type)},[e]),ue(()=>{let m=e.filter(y=>y.type===1&&!ke.isMember(t.id,y.id)).map(({id:y})=>y);z.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:m})},[]);let[s,c]=q(0),u=e[s],p=pe.getRoles(t.id);return n(Ae,{...o,size:"large"},n(Ue,null,n(X,{className:lt("modal-title"),variant:"heading-lg/semibold"},r," permissions:"),n(pt,{onClick:o.onClose})),n(De,{className:lt("modal-content")},!u&&n("div",{className:lt("modal-no-perms")},n(X,{variant:"heading-lg/normal"},"No permissions to display!")),u&&n("div",{className:lt("modal-container")},n(Er,{className:lt("modal-list"),orientation:"auto"},e.map((m,y)=>{let b=E.getUser(m.id??""),S=p[m.id??""],N=S!=null?H8(S):void 0;return n("div",{key:y,className:lt("modal-list-item-btn"),onClick:()=>c(y),role:"button",tabIndex:0},n("div",{className:lt("modal-list-item",{"modal-list-item-active":s===y}),onContextMenu:P=>{m.type===0?Dt.openContextMenu(P,()=>n(j8,{guild:t,roleId:m.id,onClose:o.onClose})):m.type===1&&Dt.openContextMenu(P,()=>n(q8,{userId:m.id}))}},(m.type===0||m.type===2)&&n("span",{className:lt("modal-role-circle"),style:{backgroundColor:S?.colorString??"var(--primary-300)"}}),m.type===0&&N!=null&&n("img",{className:lt("modal-role-image"),src:N}),m.type===1&&b!=null&&n("img",{className:lt("modal-user-img"),src:b.getAvatarURL(void 0,void 0,!1)}),n(X,{variant:"text-md/normal",className:lt("modal-list-item-text")},m.type===0?S?.name??"Unknown Role":m.type===1?(b!=null&&nr(b))??"Unknown User":n(he,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(uh,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:lt("modal-divider")}),n(Er,{className:lt("modal-perms"),orientation:"auto"},Object.values(Ie).map(m=>n("div",{key:m,className:lt("modal-perms-item")},n("div",{className:lt("modal-perms-item-icon")},(()=>{let{permissions:y,overwriteAllow:b,overwriteDeny:S}=u;return y?(y&m)===m?c0():l0():b&&(b&m)===m?c0():S&&(S&m)===m?l0():LP()})()),n(X,{variant:"text-md/normal"},i[String(m)].title),n(re,{text:(()=>{let{description:y}=i[String(m)];return typeof y=="function"?cn.intl.format(y,{}):y})()},y=>n(Ka,{...y}))))))))}function j8({guild:e,roleId:t,onClose:o}){return n(B.Menu,{navId:lt("role-context-menu"),onClose:Dt.closeContextMenu,"aria-label":"Role Options"},n(B.MenuItem,{id:lt("copy-role-id"),label:we("COPY_ID_ROLE"),action:()=>{eo.copy(t)}}),ni.store.unsafeViewAsRole&&n(B.MenuItem,{id:lt("view-as-role"),label:we("VIEW_AS_ROLE"),action:()=>{let r=pe.getRole(e.id,t);r&&(o(),z.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}function q8({userId:e}){return n(B.Menu,{navId:lt("user-context-menu"),onClose:Dt.closeContextMenu,"aria-label":"User Options"},n(B.MenuItem,{id:lt("copy-user-id"),label:we("COPY_ID_USER"),action:()=>{eo.copy(e)}}))}function Xi(e,t,o){return Ce(r=>n(K8,{modalProps:r,permissions:e,guild:t,header:o}))}var z8,K8,Jl=g(()=>{"use strict";a();l();se();Wt();It();Me();Ye();G();T();Xl();Ql();EP();z8=ve("convertSurrogateToName","customIconSrc","unicodeEmoji");K8=k.wrap(W8)});function OP({text:e,color:t,...o}){return n("div",{...o,className:W(Vl.role)},n("div",{className:Vl.roleRemoveButton},n("span",{className:W(Z8.roleCircle,Vl.roleCircle),style:{backgroundColor:t}})),n("div",{className:Vl.roleName},n(X,{className:Vl.roleNameOverflow,variant:"text-xs/medium"},e)))}function Q8({roleName:e,roleColor:t}){return n(f,null,n(X,{variant:"text-sm/medium"},"Granted By"),n(OP,{text:e,color:t}))}function J8({guild:e,guildMember:t,closePopout:o}){let{permissionsSortOrder:r}=ni.use(["permissionsSortOrder"]),i=Re(()=>wm(e),[e.id]),[s,c]=Re(()=>{let u=[],p=Mm(e,t),m=p.map(y=>({type:0,...y}));if(e.ownerId===t.userId){m.push({type:2,permissions:Object.values(Ie).reduce((b,S)=>b|S,0n)});let y=we("GUILD_OWNER")??"Server Owner";u.push({permission:y,roleName:"Owner",roleColor:"var(--primary-300)",rolePosition:1/0})}kP(p);for(let y of Object.values(Ie))for(let{permissions:b,colorString:S,position:N,name:P}of p)if((b&y)===y){u.push({permission:i[String(y)].title,roleName:P,roleColor:S||"var(--primary-300)",rolePosition:N});break}return u.sort((y,b)=>b.rolePosition-y.rolePosition),[m,u]},[r]);return n("div",null,n("div",{className:lt("user-header-container")},n(X,{variant:"eyebrow"},"Permissions"),n("div",{className:lt("user-header-btns")},n(re,{text:`Sorting by ${r===0?"Highest Role":"Lowest Role"}`},u=>n("div",{...u,className:lt("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{ni.store.permissionsSortOrder=r===0?1:0}},n("svg",{width:"24",height:"24",viewBox:"0 96 960 960",transform:r===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"})))),n(re,{text:"Role Details"},u=>n("div",{...u,className:lt("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{o(),Xi(s,e,t.nick||E.getUser(t.userId).username)}},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"})))))),c.length>0&&n("div",{className:W(Y8.root)},c.map(({permission:u,roleColor:p,roleName:m})=>n(re,{key:u,text:n(Q8,{roleName:m,roleColor:p}),tooltipClassName:lt("granted-by-container"),tooltipContentClassName:lt("granted-by-content")},y=>n(OP,{...y,text:u,color:p})))))}var Y8,Vl,Z8,BP,_P=g(()=>{"use strict";a();l();se();Me();fe();G();T();Xl();Ql();Jl();({RoleRootClasses:Y8,RoleClasses:Vl,RoleBorderClasses:Z8}=Ro(()=>{let[e,t,o]=Dr(F.byProps("root","expandButton","collapseButton"),F.byProps("role","roleCircle","roleName"),F.byProps("roleCircle","dot","dotBorderColor"));return{RoleRootClasses:e,RoleClasses:t,RoleBorderClasses:o}}));BP=k.wrap(J8,{noop:!0})});function u0(e,t,o){return o===0&&!ke.isMember(e,t)?null:n(B.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=pe.getGuild(e),{permissions:i,header:s}=ds(o).returnType().with(0,()=>{let c=ke.getMember(e,t),u=Mm(r,c).map(p=>({type:0,...p}));return r.ownerId===t&&u.push({type:2,permissions:Object.values(Ie).reduce((p,m)=>p|m,0n)}),{permissions:u,header:c.nick??E.getUser(c.userId).username}}).with(1,()=>{let c=ae.getChannel(t);return{permissions:Pm(Object.values(c.permissionOverwrites).map(({id:p,allow:m,deny:y,type:b})=>({type:b,id:p,overwriteAllow:m,overwriteDeny:y})),e),header:c.name}}).otherwise(()=>({permissions:Object.values(pe.getRoles(r.id)).map(u=>({type:0,...u})),header:r.name}));Xi(i,r,s)}})}function Cm(e,t){return(o,r)=>{if(!r||t===0&&!r.user||t===2&&!r.guild||t===1&&(!r.channel||!r.guild))return;let i=st(e,o),s=ds(t).with(0,()=>u0(r.guildId,r.user.id,t)).with(1,()=>u0(r.guild.id,r.channel.id,t)).with(2,()=>u0(r.guild.id)).otherwise(()=>null);if(s!=null){if(i)return i.push(s);e==="roles"&&r.guildId&&o.splice(-1,0,n(B.MenuGroup,null,s))}}}var X8,Im,ni,Nm,Xl=g(()=>{"use strict";a();l();RP();Io();U();se();It();I();fe();M();G();T();Jl();_P();Ql();X8=L("container","scroller","list"),Im=L("button","buttonInner","icon","banner"),ni=C({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}]}});Nm=v({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[d.Nuckyz,d.Ven],settings:ni,patches:[{find:"#{intl::VIEW_ALL_ROLES}",replacement:{match:/\.expandButton,.+?null,/,replace:"$&$self.ViewPermissionsButton(arguments[0]),"}}],ViewPermissionsButton:k.wrap(({guild:e,guildMember:t})=>n(us,{position:"bottom",align:"center",renderPopout:({closePopout:o})=>n(Wg,{className:X8.container,style:{width:"500px"}},n(BP,{guild:e,guildMember:t,closePopout:o}))},o=>n(Xn,{text:"View Permissions"},n(A,{...o,color:A.Colors.CUSTOM,look:A.Looks.FILLED,size:A.Sizes.NONE,innerClassName:W(Im.buttonInner,Im.icon),className:W(Im.button,Im.icon,"vc-permviewer-role-button")},n(mh,{height:"16",width:"16"})))),{noop:!0}),contextMenus:{"user-context":Cm("roles",0),"channel-context":Cm(["mute-channel","unmute-channel"],1),"guild-context":Cm("privacy",2),"guild-header-popout":Cm("privacy",2)}})});function FP(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,y)=>i(y||c),s.crossOrigin="Anonymous",s.src=o})}async function nL(e,t,o){for(let r of e)switch(r.name){case"image":let i=oL.getUpload(t.channel.id,r.name,no.SlashCommand);if(i){if(!i.isImage)throw xi.clearAll(t.channel.id,no.SlashCommand),"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await go.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),xi.clearAll(t.channel.id,no.SlashCommand),"Failed to fetch user. Check the console for more info."}}return xi.clearAll(t.channel.id,no.SlashCommand),null}var qs,V8,eL,Am,tL,oL,Rm,UP=g(()=>{"use strict";a();l();Qo();I();So();M();G();T();qs=Rv(Ay()),V8=20,eL=128,Am=10,tL=tn(()=>Promise.all(Array.from({length:Am},(e,t)=>FP(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),oL=L("getUploads");Rm=v({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[d.Ven],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 tL(),r=qt(e,"no-server-pfp",!1);try{var i=await nL(e,t,r);if(!i)throw"No Image specified!"}catch(S){xi.clearAll(t.channel.id,no.SlashCommand),at(t.channel.id,{content:String(S)});return}let s=await FP(i),c=qt(e,"delay",V8),u=qt(e,"resolution",eL),p=(0,qs.GIFEncoder)(),m=document.createElement("canvas");m.width=m.height=u;let y=m.getContext("2d");xi.clearAll(t.channel.id,no.SlashCommand);for(let S=0;SEa.promptToUpload([b],t.channel,no.ChannelMessage),10)}}]})});var $P=g(()=>{});var GP,km,zP=g(()=>{"use strict";a();l();$P();U();se();I();M();T();GP=C({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),km=v({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[d.Lumap],settings:GP,patches:[{find:".removeMosaicItemHoverButton),",replacement:{match:/(\.nonMediaMosaicItem\]:.{0,40}children:)(\i.slice\(\i\))(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/,replace:(e,t,o,r,i)=>`${t}[${r}&&${i}&&$self.PictureInPictureButton(),...${o}]`}}],PictureInPictureButton:k.wrap(()=>n(re,{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=GP.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 HP=g(()=>{});async function p0(){await aL();let e=E.getCurrentUser()?.id;e!=null&&(Ut=ro.store.userBasedCategoryList[e]??=[],jP?.())}function qP(){jP=Jn(),ro.use(["pinOrder","canCollapseDmSection","dmSectionCollapsed","userBasedCategoryList"])}function KP(e){return Ut.find(t=>t.id===e)}function tc(e){return Ut[e]}function YP(e){Ut.push(e)}function ZP(e,t){let o=Ut.find(r=>r.id===t);o!=null&&(o.channels.includes(e)||o.channels.push(e))}function QP(e){let t=Ut.find(o=>o.channels.includes(e));t!=null&&(t.channels=t.channels.filter(o=>o!==e))}function JP(e){let t=Ut.findIndex(o=>o.id===e);t!==-1&&Ut.splice(t,1)}function XP(e,t=!0){let o=Ut.find(r=>r.id===e);o!=null&&(o.collapsed=t)}function oc(e){return Ut.some(t=>t.channels.includes(e))}function Dm(){return Ut.length}function VP(){if(ro.store.pinOrder===0){let e=g0.getPrivateChannelIds();return Ut.filter(t=>!t.collapsed).flatMap(t=>e.filter(o=>t.channels.includes(o)))}return Ut.filter(e=>!e.collapsed).flatMap(e=>e.channels)}function eI(){return Ut.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}function nI(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}function m0(e,t){let o=Ut.findIndex(i=>i.id===e),r=o+t;nI(Ut,o,r)}function f0(e,t){let o=Ut.find(s=>s.channels.includes(e));if(o==null)return;let r=o.channels.indexOf(e),i=r+t;nI(o.channels,r,i)}async function aL(){Q.plugins.PinDMs.dmSectioncollapsed!=null&&(ro.store.dmSectionCollapsed=Q.plugins.PinDMs.dmSectioncollapsed,delete Q.plugins.PinDMs.dmSectioncollapsed);let t=(await Ig()).map(o=>String(o)).filter(o=>o.startsWith(WP));if(t.length!==0){for(let o of t){let r=await zt(o);if(r==null)continue;let i=o.replace(WP,"");ro.store.userBasedCategoryList[i]=r,await Nn(o)}await Promise.all([Nn(rL),Nn(iL),Nn(sL)])}}var WP,rL,iL,sL,jP,Ut,tI,ec,oI,d0,Lm=g(()=>{"use strict";a();l();Vo();U();wt();T();Em();WP="PinDMsCategories-",rL="PinDMsMigratedPinDMs",iL="PinDMsMigratedOldCategories",sL="BetterPinDMsCategories-",Ut=[];tI=(e,t,o)=>{let r=e[t],i=e[t+o];return r&&i},ec=(e,t)=>{let o=Ut.findIndex(r=>r.id===e);return tI(Ut,o,t)},oI=e=>ec(e,-1)||ec(e,1),d0=(e,t)=>{let o=Ut.find(i=>i.channels.includes(e));if(o==null)return!1;let r=o.channels.indexOf(e);return tI(o.channels,r,t)}});var rI,h0=g(()=>{"use strict";a();l();rI=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306]});function dL(e,t){return Re(()=>{if(e)return KP(e);if(t)return{id:oe.genId(),name:`Pin Category ${Dm()+1}`,color:10070709,collapsed:!1,channels:[t]}},[e,t])}function mL({categoryId:e,modalProps:t,initialChannelId:o}){let r=dL(e,o);if(!r)return null;let[i,s]=q(r.name),[c,u]=q(r.color),p=m=>{m.preventDefault(),r.name=i,r.color=c,e||YP(r),t.onClose()};return n(Ae,{...t},n(Ue,null,n(X,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),n("form",{onSubmit:p},n(De,{className:pL("content")},n(x.FormSection,null,n(x.FormTitle,null,"Name"),n(Bt,{value:i,onChange:m=>s(m)})),n(x.FormDivider,null),n(x.FormSection,null,n(x.FormTitle,null,"Color"),n(uL,{key:r.id,defaultColor:10070709,colors:rI,onChange:m=>u(m),value:c,renderDefaultButton:()=>null,renderCustomButton:()=>n(cL,{color:c,onChange:m=>u(m),key:r.id,showEyeDropper:!1})}))),n(bt,null,n(A,{type:"submit",onClick:p,disabled:!i},e?"Save":"Create"))))}var cL,uL,y0,pL,Om,v0=g(()=>{"use strict";a();l();Ze();Ye();G();T();h0();Lm();cL=le("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),uL=le('id:"color-picker"'),y0=Zn(['name:"UserSettings"'],/createPromise:.{0,20}(\i\.\i\("?.+?"?\).*?).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/),pL=me("vc-pindms-modal-");Om=(e,t)=>_a(async()=>(await y0(),o=>n(mL,{categoryId:e,modalProps:o,initialChannelId:t})))});function sI(e){let t=oc(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:()=>Om(null,e)}),n(B.MenuSeparator,null),Ut.map(o=>n(B.MenuItem,{key:o.id,id:`pin-category-${o.id}`,label:o.name,action:()=>ZP(e,o.id)}))),t&&n(f,null,n(B.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>QP(e)}),ro.store.pinOrder===1&&d0(e,-1)&&n(B.MenuItem,{id:"move-up",label:"Move Up",action:()=>f0(e,-1)}),ro.store.pinOrder===1&&d0(e,1)&&n(B.MenuItem,{id:"move-down",label:"Move Down",action:()=>f0(e,1)})))}var fL,gL,aI,lI=g(()=>{"use strict";a();l();Io();T();Lm();Em();v0();fL=(e,t)=>{st("leave-channel",e)?.unshift(sI(t.channel.id))},gL=(e,t)=>{let o=st("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,sI(t.channel.id))}},aI={"gdm-context":fL,"user-context":gL}});var cI,g0,yL,ro,Bm,Em=g(()=>{"use strict";a();l();HP();U();se();I();fe();M();G();T();lI();v0();h0();Lm();cI=L("privateChannelsHeaderContainer"),g0=be("PrivateChannelSortStore"),ro=C({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}]},canCollapseDmSection:{type:3,description:"Allow uncategorised DMs section to be collapsable",default:!1},dmSectionCollapsed:{type:3,description:"Collapse DM section",default:!1,hidden:!0},userBasedCategoryList:{type:7,default:{}}}),Bm=v({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or re-order pins, right click DMs",authors:[d.Ven,d.Aria],settings:ro,contextMenus:aI,patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=channels:\i,)privateChannelIds:(\i)(?=,listRef:)/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c))"},{match:/(?<=renderRow:this\.renderRow,)sections:\[.+?1\)]/,replace:"...$self.makeProps(this,{$&})"},{match:/"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.\i),\{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:/(\.startsWith\("section-divider"\).+?return 1===)(\i)/,replace:"$1($2-$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:"$1[...$2,...$self.getAllUncollapsedChannels()]"}]},{find:'.FRIENDS},"friends"',replacement:{match:/let{showLibrary:\i,/,replace:"$self.usePinnedDms();$&"}},{find:".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,yL=e},startAt:"WebpackReady",start:p0,flux:{CONNECTION_OPEN:p0},usePinnedDms:qP,isPinned:oc,categoryLen:Dm,getSections:eI,getAllUncollapsedChannels:VP,requireSettingsMenu:y0,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 ro.store.canCollapseDmSection?{onClick:()=>this.collapseDMList(),role:"button",style:{cursor:"pointer"}}:void 0},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=tc(e-1);return t?n(Vn,{onClick:()=>XP(t.id,!t.collapsed),onContextMenu:o=>{Dt.openContextMenu(o,()=>n(B.Menu,{navId:"vc-pindms-header-menu",onClose:()=>z.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:()=>Om(t.id,null)}),oI(t.id)&&n(f,null,ec(t.id,-1)&&n(B.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>m0(t.id,-1)}),ec(t.id,1)&&n(B.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>m0(t.id,1)})),n(B.MenuSeparator,null),n(B.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>JP(t.id)})))}},n("h2",{className:W(cI.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`}},n("span",{className:cI.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},{noop:!0}),renderChannel(e,t,o){return k.wrap(()=>{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)},{noop:!0})},getChannel(e,t,o){let r=tc(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?[]:ro.store.pinOrder===0?g0.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}})});var _m,uI=g(()=>{"use strict";a();l();I();M();_m=v({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[d.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\i\|\|\i\)&&(\(.{0,40}\(\i\.animated)/,replace:"$1"},{match:/\(\i\|\|!\i\)&&(\(.{0,40}\(\i\.animated)/,replace:"false&&$1"}]}]})});var pI=g(()=>{});function Fm(e,t){return({color:o,tooltip:r,small:i})=>n(re,{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})))}function hI(e){if(e.id===E.getCurrentUser().id){let t=vL.getSessions();if(typeof t!="object")return null;let o=Object.values(t).sort(({status:s},{status:c})=>s===c?0:s==="online"?1:c==="online"?-1:s==="idle"?1:c==="idle"?-1:0),r=Object.values(o).reduce((s,c)=>(c.clientInfo.client!=="unknown"&&(s[c.clientInfo.client]=c.status),s),{}),{clientStatuses:i}=sn.getState();i[E.getCurrentUser().id]=r}}function SL({userId:e}){let t=E.getUser(e);if(!t||t.bot)return[];hI(t);let o=sn.getState()?.clientStatuses?.[t.id];return o?Object.entries(o).map(([r,i])=>({component:()=>n("span",{className:"vc-platform-indicator"},n(gI,{key:r,platform:r,status:i,small:!1})),key:`vc-platform-indicator-${r}`})):[]}var vL,dI,bL,gI,mI,fI,b0,Um,yI=g(()=>{"use strict";a();l();pI();kl();bl();Tl();U();se();I();M();G();T();vL=be("SessionsStore");dI={desktop:Fm("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:Fm("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:Fm("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}),embedded:Fm("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"})},{useStatusFillColor:bL}=ze(".concat(.5625*",{useStatusFillColor:F.byCode(".hex")}),gI=({platform:e,status:t,small:o})=>{let r=e==="embedded"?"Console":e[0].toUpperCase()+e.slice(1),i=dI[e]??dI.desktop;return n(i,{color:bL(t),tooltip:r,small:o})};mI=({user:e,small:t=!1})=>{if(!e||e.bot)return null;hI(e);let o=sn.getState()?.clientStatuses?.[e.id];if(!o)return null;let r=Object.entries(o).map(([i,s])=>n(gI,{key:i,platform:i,status:s,small:t}));return r.length?n("span",{className:"vc-platform-indicator",style:{gap:"2px"}},r):null},fI={getBadges:SL,position:0},b0={list:{description:"In the member list",onEnable:()=>Ei("platform-indicator",e=>n(k,{noop:!0},n(mI,{user:e.user,small:!0}))),onDisable:()=>Oi("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Al(fI),onDisable:()=>Rl(fI)},messages:{description:"Inside messages",onEnable:()=>Bi("platform-indicator",e=>n(k,{noop:!0},n(mI,{user:e.message?.author}))),onDisable:()=>_i("platform-indicator")}},Um=v({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=Q.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(b0).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(b0).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>Q.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:()=>Q.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:()=>Q.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(b0).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 bI,vI,xL,TL,wL,$m,SI=g(()=>{"use strict";a();l();Wr();Qo();I();M();G();T();bI=L("getUploads"),vI=e=>Da.getDraft(e,no.ChannelMessage),xL=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),TL=async e=>await Promise.all(bI.getUploads(e,no.ChannelMessage).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,c=URL.createObjectURL(s),u={id:ul(),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 xL(c);if(!p)return u;u.width=p.width,u.height=p.height}return u})),wL=({isMainChat:e,isEmpty:t,type:{attachments:o}})=>{let r=Ee.getChannelId(),i=Se([Da],()=>vI(r));if(!e)return null;let s=o&&bI.getUploads(r,no.ChannelMessage).length>0;return!(!t&&i?.length>0)&&!s?null:n(yn,{tooltip:"Preview Message",onClick:async()=>at(r,{content:vI(r),author:E.getCurrentUser(),attachments:s?await TL(r):void 0}),buttonProps:{style:{translate:"0 2px"}}},n("svg",{fill:"currentColor",fillRule:"evenodd",width:"20",height:"20",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"})))},$m=v({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[d.Aria],startAt:"Init",renderChatBarButton:wL})});var Gm,xI=g(()=>{"use strict";a();l();I();Me();M();T();Gm=v({name:"QuickMention",authors:[d.kemo],description:"Adds a quick mention button to the message actions bar",renderMessagePopoverButton(e){let t=ae.getChannel(e.channel_id);return t.guild_id&&!Be.can(Ie.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>Pi(`<@${e.author.id}> `)}},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 PI(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function IL({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=E.getCurrentUser().id,i=Zt.getMessages(e)._array.filter(s=>s.author.id===r);Hm=PI(i,t)}function CL({message:e,_isQuickReply:t}){t||(zm=PI(Zt.getMessages(e.channel_id)._array,e.id))}function TI(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!NL(e)||AL(e)||(e.preventDefault(),e.shiftKey?DL(t):kL(t))}function II(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)&&ML.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function CI(e,t){let o=Zt.getMessages(Ee.getChannelId())._array;if(!t){let c=E.getCurrentUser().id;o=o.filter(u=>u.author.id===c)}Vencord.Plugins.isPluginEnabled("NoBlockedMessages")&&(o=o.filter(c=>!PL.isBlocked(c.author.id)));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?zm=s=i(zm):Hm=s=i(Hm),s===-1?void 0:o[o.length-s-1]}function RL(e){let{enabled:t,userList:o,shouldPingListed:r}=Q.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(MI.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function kL(e){let t=ae.getChannel(Ee.getChannelId());if(t.guild_id&&!Be.can(Ie.SEND_MESSAGES,t))return;let o=CI(e,!0);if(!o)return void z.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ee.getChannelId()});let r=ae.getChannel(o.channel_id),i=E.getCurrentUser().id;z.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:RL(o),showMentionToggle:!r.isPrivate()&&o.author.id!==i,_isQuickReply:!0}),ko.dispatchToLastSubscribed("TEXTAREA_FOCUS"),II(r.id,o.id)}function DL(e){let t=ae.getChannel(Ee.getChannelId());if(t.guild_id&&!Be.can(Ie.SEND_MESSAGES,t))return;let o=CI(e,!1);if(!o)return z.dispatch({type:"MESSAGE_END_EDIT",channelId:Ee.getChannelId()});z.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),II(o.channel_id,o.id)}var ML,PL,wI,zm,Hm,MI,Wm,NL,AL,NI=g(()=>{"use strict";a();l();U();I();M();G();T();ML=L("jumpToMessage"),PL=L("getRelationships","isBlocked"),wI=navigator.platform.includes("Mac"),zm=-1,Hm=-1,MI=C({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Wm=v({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:MI,start(){document.addEventListener("keydown",TI)},stop(){document.removeEventListener("keydown",TI)},flux:{DELETE_PENDING_REPLY(){zm=-1},MESSAGE_END_EDIT(){Hm=-1},MESSAGE_START_EDIT:IL,CREATE_PENDING_REPLY:CL}});NL=e=>wI?e.metaKey:e.ctrlKey,AL=e=>e.altKey||!wI&&e.metaKey});var S0,jm,AI=g(()=>{"use strict";a();l();I();M();T();jm=v({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${te.version}/scripts/error-codes/codes.json`;S0=await h(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes `,t))},stop(){S0=void 0},decodeError(e,...t){let o=0;return S0?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var RI=g(()=>{});var T0={};it(T0,{ServerListRenderPosition:()=>qm,addServerListElement:()=>nc,removeServerListElement:()=>rc,renderAll:()=>OL});function x0(e){return e===0?LL:EL}function nc(e,t){x0(e).add(t)}function rc(e,t){x0(e).delete(t)}var qm,LL,EL,OL,Km=g(()=>{"use strict";a();l();se();qm=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(qm||{}),LL=new Set,EL=new Set;OL=e=>Array.from(x0(e),(t,o)=>n(k,{noop:!0,key:o},n(t,null)))});function _L(){let e=[];Object.values(pe.getGuilds()).forEach(t=>{er.getChannels(t.id).SELECTABLE.concat(er.getChannels(t.id).VOCAL).concat(Object.values(BL.getActiveJoinedThreadsForGuild(t.id)).flatMap(o=>Object.values(o))).forEach(o=>{bi.hasUnread(o.channel.id)&&e.push({channelId:o.channel.id,messageId:bi.lastMessageId(o.channel.id),readStateType:0})})}),z.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var BL,FL,Ym,kI=g(()=>{"use strict";a();l();RI();Km();se();I();M();G();T();BL=be("ActiveJoinedThreadsStore");FL=()=>n(A,{onClick:_L,size:A.Sizes.MIN,look:A.Looks.BLANK,color:A.Colors.CUSTOM,className:"vc-ranb-button"},"Read All"),Ym=v({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[d.kemo],dependencies:["ServerListAPI"],renderReadAllButton:k.wrap(FL,{noop:!0}),start(){nc(0,this.renderReadAllButton)},stop(){rc(0,this.renderReadAllButton)}})});var Lo,Zm=g(()=>{"use strict";a();l();U();M();Lo=C({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 w0=g(()=>{"use strict";a();l()});async function GL(){St.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function P0(){if(await GL(),E.getCurrentUser()==null)return;let[e,t,o]=await St.getMany([DI(),LI(),EI()]);if(await Promise.all([Qm(),Jm(),ic()]),Lo.store.offlineRemovals){if(Lo.store.groups&&t?.size)for(let[r,i]of t)Ys.has(r)||wr(`You are no longer in the group ${i.name}.`,i.iconURL);if(Lo.store.servers&&e?.size)for(let[r,i]of e)!Ks.has(r)&&!M0.isUnavailable(r)&&wr(`You are no longer in the server ${i.name}.`,i.iconURL);if(Lo.store.friends&&o?.friends.length)for(let r of o.friends){if(Vi.friends.includes(r))continue;let i=await go.getUser(r).catch(()=>{});i&&wr(`You are no longer friends with ${nr(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Go(i.id))}if(Lo.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(Vi.requests.includes(r)||[1,2,4].includes(_e.getRelationshipType(r)))continue;let i=await go.getUser(r).catch(()=>{});i&&wr(`Friend request from ${nr(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Go(i.id))}}}function wr(e,t,o){Lo.store.notices&&br.showNotice(e,"OK",()=>br.popNotice()),Qe({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function OI(e){return Ks.get(e)}function I0(e){Ks.delete(e),Qm()}async function Qm(){Ks.clear();let e=E.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(pe.getGuilds()))ke.isMember(t,e)&&Ks.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await St.set(DI(),Ks)}function BI(e){return Ys.get(e)}function C0(e){Ys.delete(e),Jm()}async function Jm(){Ys.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of ae.getSortedPrivateChannels())e===3&&Ys.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await St.set(LI(),Ys)}async function ic(){Vi.friends=[],Vi.requests=[];let e=_e.getRelationships();for(let t in e)switch(e[t]){case 1:Vi.friends.push(t);break;case 3:Vi.requests.push(t);break}await St.set(EI(),Vi)}var M0,Ks,Ys,Vi,DI,LI,EI,N0=g(()=>{"use strict";a();l();vr();ar();Me();G();T();Zm();w0();M0=be("GuildAvailabilityStore"),Ks=new Map,Ys=new Map,Vi={friends:[],requests:[]},DI=()=>`relationship-notifier-guilds-${E.getCurrentUser().id}`,LI=()=>`relationship-notifier-groups-${E.getCurrentUser().id}`,EI=()=>`relationship-notifier-friends-${E.getCurrentUser().id}`});async function $I({relationship:{type:e,id:t}}){if(A0===t){A0=void 0;return}let o=await go.getUser(t).catch(()=>null);if(o)switch(e){case 1:Lo.store.friends&&wr(`${nr(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Go(o.id));break;case 3:Lo.store.friendRequestCancels&&wr(`A friend request from ${nr(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Go(o.id));break}}function GI({guild:{id:e,unavailable:t}}){if(!Lo.store.servers||t||M0.isUnavailable(e))return;if(R0===e){I0(e),R0=void 0;return}let o=OI(e);o&&(I0(e),wr(`You were removed from the server ${o.name}.`,o.iconURL))}function zI({channel:{id:e,type:t}}){if(!Lo.store.groups||t!==3)return;if(k0===e){C0(e),k0=void 0;return}let o=BI(e);o&&(C0(e),wr(`You were removed from the group ${o.name}.`,o.iconURL))}var A0,R0,k0,_I,FI,UI,HI=g(()=>{"use strict";a();l();Me();T();Zm();w0();N0();_I=e=>A0=e,FI=e=>R0=e,UI=e=>k0=e});var Xm,WI=g(()=>{"use strict";a();l();I();M();HI();Zm();N0();Xm=v({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[d.nick],settings:Lo,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:Qm,GUILD_DELETE:GI,CHANNEL_CREATE:Jm,CHANNEL_DELETE:zI,RELATIONSHIP_ADD:ic,RELATIONSHIP_UPDATE:ic,RELATIONSHIP_REMOVE(e){$I(e),ic()},CONNECTION_OPEN:P0},async start(){setTimeout(()=>{P0()},5e3)},removeFriend:_I,removeGroup:UI,removeGuild:FI})});function HL(e,t){open(t+encodeURIComponent(e.trim()),"_blank")}function WL(e){let t={};return sc.store.customEngineName&&sc.store.customEngineURL&&(t[sc.store.customEngineName]=sc.store.customEngineURL),t={...t,...zL},n(B.MenuItem,{label:"Search Text",key:"search-text",id:"vc-search-text"},Object.keys(t).map(o=>{let r="vc-search-content-"+o;return n(B.MenuItem,{key:r,id:r,label:n(ps,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:"50%"},"aria-hidden":"true",height:16,width:16,src:`https://www.google.com/s2/favicons?domain=${t[o]}&sz=64`}),o),action:()=>HL(e,t[o])})}))}var zL,sc,jL,Vm,jI=g(()=>{"use strict";a();l();Io();U();I();M();T();zL={Google:"https://www.google.com/search?q=",DuckDuckGo:"https://duckduckgo.com/?q=",Brave:"https://search.brave.com/search?q=",Bing:"https://www.bing.com/search?q=",Yahoo:"https://search.yahoo.com/search?p=",Yandex:"https://yandex.com/search/?text=",GitHub:"https://github.com/search?q=",Reddit:"https://www.reddit.com/search?q=",Wikipedia:"https://wikipedia.org/w/index.php?search="},sc=C({customEngineName:{description:"Name of the custom search engine",type:0,placeholder:"Google"},customEngineURL:{description:"The URL of your Engine",type:0,placeholder:"https://google.com/search?q="}});jL=(e,t)=>{let o=document.getSelection()?.toString();if(!o)return;let r=st("search-google",e);if(r){let i=r.findIndex(s=>s?.props?.id==="search-google");i!==-1&&(r[i]=WL(o))}},Vm=v({name:"ReplaceGoogleSearch",description:"Replaces the Google search with different Engines",authors:[d.Moxxie,d.Ethan],settings:sc,contextMenus:{message:jL}})});var qI=g(()=>{});function KI(e){return n("i",{className:qL.separator,"aria-hidden":!0,...e})}function KL({referencedMessage:e,baseMessage:t}){if(e.state!==0)return null;let o=e.message.timestamp,r=t.timestamp;return n(lo,{className:"vc-reply-timestamp",compact:Br.isSameDay(o,r),timestamp:o,isInline:!1},n(KI,null,"["),Br.isSameDay(o,r)?Br.dateFormat(o,"LT"):Br.calendarFormat(o),n(KI,null,"]"))}var qL,ef,YI=g(()=>{"use strict";a();l();qI();se();I();M();G();T();qL=L("separator","latin24CompactTimeStamp");ef=v({name:"ReplyTimestamp",description:"Shows a timestamp on replied-message previews",authors:[d.Kyuuhachi],patches:[{find:"#{intl::REPLY_QUOTE_MESSAGE_BLOCKED}",replacement:{match:/\.onClickReply,.+?}\),(?=\i,\i,\i\])/,replace:"$&$self.ReplyTimestamp(arguments[0]),"}}],ReplyTimestamp:k.wrap(KL,{noop:!0})})});var YL,ZL,tf,ZI=g(()=>{"use strict";a();l();I();M();G();YL=L("spoilerContent"),ZL=L("messagesWrapper","navigationDescription"),tf=v({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}=YL,{messagesWrapper:c}=ZL,u=o?document.querySelector(`div.${c}`):r.parentElement;for(let p of u.querySelectorAll(`span.${i}.${s}`))p.click()}})});function QI(e,t){open(t+encodeURIComponent(e),"_blank")}function JI(e){return n(B.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(of).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",of[t]).toString().replace("lens.","")}),t),action:()=>QI(e,of[t])})}),n(B.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(he,{style:{alignItems:"center",gap:"0.5em"}},n(ir,{height:16,width:16}),"All"),action:()=>Object.values(of).forEach(t=>QI(e,t))}))}var of,QL,JL,nf,XI=g(()=>{"use strict";a();l();Io();Wt();It();I();M();T();of={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="};QL=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;st("copy-link",e)?.push(JI(o))},JL=(e,t)=>{if(!t?.src)return;(st("copy-native-link",e)??e).push(JI(t.src))},nf=v({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[d.Ven,d.Nuckyz],tags:["ImageUtilities"],patches:[{find:"#{intl::MESSAGE_ACTIONS_MENU_LABEL}),shouldHideMediaOptions:",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],contextMenus:{message:QL,"image-context":JL}})});var VI=g(()=>{});async function D0(){Et=await t4()??{}}async function t4(){return(await St.get(e4))?.[E.getCurrentUser()?.id]}async function Mr(){return(await t4())?.token}async function ac(e){return St.update(e4,t=>(t??={},Et=t[E.getCurrentUser().id]??={},e.token&&(Et.token=e.token),e.user&&(Et.user=e.user),t))}function Zs(e){Ce(t=>n(hi,{...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();ut(c||"An error occured while authorizing",oe.Type.FAILURE);return}let{token:s}=await i.json();ac({token:s}),ut("Successfully logged in!",oe.Type.SUCCESS),e?.()}catch(r){new ee("ReviewDB").error("Failed to authorize",r)}}}))}var e4,Et,Pr=g(()=>{"use strict";a();l();vr();Ne();Ye();T();e4="rdb-auth",Et={}});var Qs=g(()=>{"use strict";a();l()});function o4(e,t){let o=E.getCurrentUser().id;return o===e||t.sender.discordID===o||Et.user?.type===1}function n4(e,t){let o=E.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function r4(e){return e.sender.discordID!==E.getCurrentUser().id}function vo(e,t=oe.Type.MESSAGE){oe.show({id:oe.genId(),message:e,type:t,options:{position:oe.Position.BOTTOM}})}var Ct,Ir=g(()=>{"use strict";a();l();Ze();T();Pr();Qs();Ct=me("vc-rdb-")});function XL(e){return n(re,{text:"Unblock user"},t=>n("div",{...t,role:"button",onClick:e.onClick,className:Ct("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 VL({user:e,isBusy:t,setIsBusy:o}){let[r,i]=q(!1);return r?null:n("div",{className:Ct("block-modal-row")},n("img",{className:Ct("block-modal-avatar"),src:e.profilePhoto,alt:""}),n(x.FormText,{className:Ct("block-modal-username")},e.username),n(XL,{onClick:t?void 0:async()=>{o(!0);try{await sf(e.discordID),i(!0)}finally{o(!1)}}}))}function e6(){let[e,t]=q(!1),[o,r,i]=kt(i4,{onError:s=>new ee("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:r?n(x.FormText,null,"Failed to fetch blocks: $",String(r)):o.length?n(f,null,o.map(s=>n(VL,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):n(x.FormText,null,"No blocked users.")}function rf(){Ce(e=>n(Ae,{...e},n(Ue,{className:Ct("block-modal-header")},n(x.FormTitle,{style:{margin:0}},"Blocked Users"),n(pt,{onClick:e.onClose})),n(De,{className:Ct("block-modal")},Et.token?n(e6,null):n(x.FormText,null,"You are not logged into ReviewDB!"))))}var L0=g(()=>{"use strict";a();l();Ne();Ye();wt();T();Pr();Js();Ir()});var Cr,lc=g(()=>{"use strict";a();l();U();M();T();Pr();L0();Ir();Cr=C({authorize:{type:6,component:()=>n(A,{onClick:()=>Zs()},"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,component:()=>n("div",{className:Ct("button-grid")},n(A,{onClick:rf},"Manage Blocked Users"),n(A,{color:A.Colors.GREEN,onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),n(A,{onClick:async()=>{let e="https://reviewdb.mantikafasi.dev",t=await Mr();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),n(A,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server"))}}).withPrivateSettings()});async function es(e,t={}){return h(s4+e,{...t,headers:{...t.headers,Authorization:await Mr()||""}})}async function a4(e,t=0){let o=0;Cr.store.showWarning||(o|=t6);let r=new URLSearchParams({flags:String(o),offset:String(t)}),i=await h(`${s4}/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:(vo(s.message,oe.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 l4(e){return await Mr()?await es(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let r=await o.json();return vo(r.message),o.ok?r:null}):(vo("Please authorize to add a review."),Zs(),null)}async function c4(e){return await es(`/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 vo(o.message),t.ok?o:null})}async function u4(e){let t=await es("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());vo(t.message)}async function p4(e,t){if(!(await es("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)vo(`Failed to ${e} user`,oe.Type.FAILURE);else if(vo(`Successfully ${e}ed user`,oe.Type.SUCCESS),Et?.user?.blockedUsers){let r=e==="block"?[...Et.user.blockedUsers,t]:Et.user.blockedUsers.filter(i=>i!==t);ac({user:{...Et.user,blockedUsers:r}})}}async function i4(){let e=await es("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function m4(e){return es("/users",{method:"POST"}).then(t=>t.json())}async function f4(e){return es(`/notifications?id=${e}`,{method:"PATCH"})}var s4,af,t6,d4,sf,Js=g(()=>{"use strict";a();l();T();Pr();Qs();lc();Ir();s4="https://manti.vendicated.dev/api/reviewdb",af=50,t6=2;d4=e=>p4("block",e),sf=e=>p4("unblock",e)});function g4({onClick:e}){return n(re,{text:"Delete Review"},t=>n("div",{...t,className:W(lf.button,lf.dangerous),onClick:e,role:"button"},n(sr,{width:"20",height:"20"})))}function h4({onClick:e}){return n(re,{text:"Report Review"},t=>n("div",{...t,className:lf.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 y4({onClick:e,isBlocked:t}){return n(re,{text:`${t?"Unblock":"Block"} user`},o=>n("div",{...o,className:lf.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 lf,v4=g(()=>{"use strict";a();l();It();fe();G();T();lf=L("button","wrapper","disabled","separator")});function cf(e){let t=e.redirectURL?Aa:o=>n("span",{...o,role:"button"},o.children);return n(re,{text:e.name},({onMouseEnter:o,onMouseLeave:r})=>n(t,{className:Ct("blocked-badge"),href:e.redirectURL,onClick:e.onClick},n("img",{className:Ct("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:r,src:e.icon,alt:e.description})))}var b4=g(()=>{"use strict";a();l();T();Ir()});var uf,O0=g(()=>{"use strict";a();l();Me();fe();wt();G();T();Pr();Qs();Js();lc();Ir();L0();v4();b4();uf=ct(()=>{let e=F.byProps,[{cozyMessage:t,buttons:o,message:r,buttonsInner:i,groupStart:s},{container:c,isHeader:u},{avatar:p,clickable:m,username:y,wrapper:b,cozy:S},N,P]=Dr(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTagRegular")),w=new Intl.DateTimeFormat;return function({review:D,refetch:O,profileId:$}){let[j,V]=q(!1);function ie(){Go(D.sender.discordID)}function ne(){ft.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await Mr())c4(D.id).then(ge=>{ge&&O()});else return vo("You must be logged in to delete reviews.")}})}function Y(){ft.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await Mr())u4(D.id);else return vo("You must be logged in to report reviews.")}})}let Z=Et?.user?.blockedUsers?.includes(D.sender.discordID)??!1;function ce(){if(Z)return sf(D.sender.discordID);ft.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 Mr())d4(D.sender.discordID);else return vo("You must be logged in to block users.")}})}return n("div",{className:W(Ct("review"),t,b,r,s,S),style:{marginLeft:"0px",paddingLeft:"52px"}},n("img",{className:W(p,m),onClick:ie,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:W(m,y),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>ie()},D.sender.username),D.type===3&&n("span",{className:W(P.botTagVerified,P.botTagRegular,P.px,P.rem),style:{marginLeft:"4px"}},n("span",{className:P.botText},"System"))),Z&&n(cf,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>rf()}),D.sender.badges.map((ge,xe)=>n(cf,{key:xe,...ge})),!Cr.store.hideTimestamps&&D.type!==3&&n(lo,{timestamp:new Date(D.timestamp*1e3)},w.format(D.timestamp*1e3)),n("div",{className:Ct("review-comment")},D.comment.length>200&&!j?n(f,null,Fe.parseGuildEventDescription(D.comment.substring(0,200)),"...",n("br",null),n("a",{onClick:()=>V(!0)},"Read more"),"]"):Fe.parseGuildEventDescription(D.comment)),D.id!==0&&n("div",{className:W(c,u,o),style:{padding:"0px"}},n("div",{className:W(N.wrapper,i)},r4(D)&&n(h4,{onClick:Y}),n4($,D)&&n(y4,{isBlocked:Z,onClick:ce}),o4($,D)&&n(g4,{onClick:ne}))))}})});function B0({discordId:e,name:t,onFetchReviews:o,refetchSignal:r,scrollToTop:i,page:s=1,showInput:c=!1,hideOwnReview:u=!1,type:p}){let[m,y]=Jn(!0),[b]=kt(()=>a4(e,(s-1)*af),{fallbackValue:null,deps:[r,m,s],onSuccess:S=>{Cr.store.hideBlockedUsers&&(S.reviews=S.reviews?.filter(N=>!_e.isBlocked(N.sender.discordID))),i?.(),o(S)}});return b?n(f,null,n(s6,{refetch:y,reviews:b.reviews,hideOwnReview:u,profileId:e,type:p}),c&&n(_0,{name:t,discordId:e,refetch:y,isAuthor:b.reviews?.some(S=>S.sender.discordID===E.getCurrentUser().id)})):null}function s6({refetch:e,reviews:t,hideOwnReview:o,profileId:r,type:i}){let s=E.getCurrentUser().id;return n("div",{className:Ct("view")},t?.map(c=>(c.sender.discordID!==s||!o)&&n(uf,{key:c.id,review:c,refetch:e,profileId:r})),t?.length===0&&n(x.FormText,{className:Ct("placeholder")},"Looks like nobody reviewed this ",i===0?"user":"server"," yet. You could be the first!"))}function _0({discordId:e,isAuthor:t,refetch:o,name:r,modalKey:i}){let{token:s}=Et,c=vt(null),u=n6.FORM;u.disableAutoFocus=!0;let p=i6({id:"0",type:1});return n(f,null,n("div",{onClick:()=>{s||(vo("Opening authorization window..."),Zs())}},n(r6,{className:Ct("input"),channel:p,placeholder:s?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",type:u,disableThemedBackground:!0,setEditorRef:m=>c.current=m,parentModalKey:i,textValue:"",onSubmit:async m=>{if(await l4({userid:e,comment:m.value})){o();let b=c.current.ref.current.getSlateEditor();o6.delete(b,{at:{anchor:S4.start(b,[]),focus:S4.end(b,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}var o6,S4,n6,r6,i6,x4=g(()=>{"use strict";a();l();wt();G();T();Pr();Qs();Js();lc();Ir();O0();o6=L("insertNodes","textToText"),S4=L("start","end","toSlateRange"),n6=L("FORM"),r6=le("disableThemedBackground","CHANNEL_TEXT_AREA"),i6=ve(".GUILD_TEXT])","fromServer)")});function a6({modalProps:e,modalKey:t,discordId:o,name:r,type:i}){let[s,c]=q(),[u,p]=Jn(!0),[m,y]=q(1),b=vt(null),S=s?.reviewCount,N=s?.reviews.find(P=>P.sender.discordID===Et.user?.discordID);return n(k,null,n(Ae,{...e,size:"medium"},n(Ue,null,n(X,{variant:"heading-lg/semibold",className:Ct("modal-header")},r,"'s Reviews",!!S&&n("span",null," (",S," Reviews)")),n(pt,{onClick:e.onClose})),n(De,{scrollerRef:b},n("div",{className:Ct("modal-reviews")},n(B0,{discordId:o,name:r,page:m,refetchSignal:u,onFetchReviews:c,scrollToTop:()=>b.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0,type:i}))),n(bt,{className:Ct("modal-footer")},n("div",{className:Ct("modal-footer-wrapper")},N&&n(uf,{refetch:p,review:N,profileId:o}),n(_0,{isAuthor:N!=null,discordId:o,name:r,refetch:p,modalKey:t}),!!S&&n(jg,{currentPage:m,maxVisiblePages:5,pageSize:af,totalCount:S,onPageChange:y})))))}function pf(e,t,o){let r="vc-rdb-modal-"+Date.now();Ce(i=>n(a6,{modalKey:r,modalProps:i,discordId:e,name:t,type:o}),{modalKey:r})}var T4=g(()=>{"use strict";a();l();se();Ye();wt();T();Pr();Js();Ir();O0();x4()});var ts,w4,F0,df,M4=g(()=>{"use strict";a();l();VI();se();It();I();fe();M();G();T();Pr();T4();Qs();Js();lc();Ir();ts=L("button","buttonInner","icon","banner"),w4=(e,{guild:t})=>{t&&e.push(n(B.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:ir,action:()=>pf(t.id,t.name,1)}))},F0=(e,{user:t})=>{t&&e.push(n(B.MenuItem,{label:"View Reviews",id:"vc-rdb-user-reviews",icon:ir,action:()=>pf(t.id,t.username,0)}))},df=v({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[d.mantikafasi,d.Ven],settings:Cr,contextMenus:{"guild-header-popout":w4,"guild-context":w4,"user-context":F0,"user-profile-actions":F0,"user-profile-overflow-menu":F0},patches:[{find:".BITE_SIZE,user:",replacement:{match:/{profileType:\i\.\i\.BITE_SIZE,children:\[/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}},{find:".FULL_SIZE,user:",replacement:{match:/{profileType:\i\.\i\.FULL_SIZE,children:\[/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}},{find:'location:"UserProfilePanel"',replacement:{match:/{profileType:\i\.\i\.PANEL,children:\[/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}}],flux:{CONNECTION_OPEN:D0},async start(){let e=Cr.store,{lastReviewId:t,notifyReviews:o}=e;await D0(),setTimeout(async()=>{if(!Et.token)return;let r=await m4(Et.token);if(ac({user:r}),o&&t&&tVencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:Et.token,page:"dashboard/appeal"}))}:{};ft.show({title:r.notification.title,body:Fe.parse(r.notification.content,!1),...i}),f4(r.notification.id)}},4e3)},BiteSizeReviewsButton:k.wrap(({user:e})=>n(Xn,{text:"View Reviews"},n(A,{onClick:()=>pf(e.id,e.username,0),look:A.Looks.FILLED,size:A.Sizes.NONE,color:ts.bannerColor,className:W(ts.button,ts.icon,ts.banner),innerClassName:W(ts.buttonInner,ts.icon,ts.banner)},n(fh,{height:16,width:16}))),{noop:!0})})});var l6,zn,mf,P4=g(()=>{"use strict";a();l();U();se();Gr();I();Ne();M();G();T();l6=ve('"Result cannot be null because the message is not null"'),zn=C({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},reactorsList:{type:3,default:!0,description:"Show role colors in the reactors list",restartNeeded:!0},pollResults:{type:3,default:!0,description:"Show role colors in the poll results",restartNeeded:!0},colorChatMessages:{type:3,default:!1,description:"Color chat messages based on the author's role color",restartNeeded:!0},messageSaturation:{type:5,description:"Intensity of message coloring.",markers:co(0,100,10),default:30}}),mf=v({name:"RoleColorEverywhere",authors:[d.KingFish,d.lewisakura,d.AutumnVN,d.Kyuuhachi,d.jamesbt365],description:"Adds the top role color anywhere possible",settings:zn,patches:[{find:".USER_MENTION)",replacement:[{match:/(?<=onContextMenu:\i,color:)\i(?=,onClick)(?<=user:(\i),channel:(\i).+?)/,replace:"$self.getColorInt($1?.id,$2?.id)"}],predicate:()=>zn.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:\i,channelId:(\i)[^}]*\}.*?\.\i,{(?=children)/,replace:"$&color:$self.getColorInt($1,$2),"}],predicate:()=>zn.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/null,\i," — ",\i\]/,replace:"null,$self.RoleGroupColor(arguments[0])]"}],predicate:()=>zn.store.memberList},{find:"#{intl::THREAD_BROWSER_PRIVATE}",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.RoleGroupColor(arguments[0])]"}],predicate:()=>zn.store.memberList},{find:".usernameSpeaking]:",replacement:[{match:/\.usernameSpeaking\]:.+?,(?=children)(?<=guildId:(\i),.+?user:(\i).+?)/,replace:"$&style:$self.getColorStyle($2.id,$1),"}],predicate:()=>zn.store.voiceUsers},{find:".reactorDefault",replacement:{match:/,onContextMenu:\i=>.{0,15}\((\i),(\i),(\i)\).{0,250}tag:"strong"/,replace:"$&,style:$self.getColorStyle($2?.id,$1?.channel?.id)"},predicate:()=>zn.store.reactorsList},{find:",reactionVoteCounts",replacement:{match:/\.nickname,(?=children:)/,replace:"$&style:$self.getColorStyle(arguments[0]?.user?.id,arguments[0]?.channel?.id),"},predicate:()=>zn.store.pollResults},{find:"#{intl::MESSAGE_EDITED}",replacement:{match:/(?<=isUnsupported\]:(\i)\.isUnsupported\}\),)(?=children:\[)/,replace:"style:$self.useMessageColorsStyle($1),"},predicate:()=>zn.store.colorChatMessages}],getColorString(e,t){try{let o=ae.getChannel(t)?.guild_id??pe.getGuild(t)?.id;return o==null?null:ke.getMember(o,e)?.colorString??null}catch(o){new ee("RoleColorEverywhere").error("Failed to get color string",o)}return null},getColorInt(e,t){let o=this.getColorString(e,t);return o&&parseInt(o.slice(1),16)},getColorStyle(e,t){let o=this.getColorString(e,t);return o&&{color:o}},useMessageColorsStyle(e){try{let{messageSaturation:t}=zn.use(["messageSaturation"]),o=l6(e);if(o.colorString!=null&&t!==0){let r=`color-mix(in oklab, ${o.colorString} ${t}%, var({DEFAULT}))`;return{color:r.replace("{DEFAULT}","--text-normal"),"--header-primary":r.replace("{DEFAULT}","--header-primary"),"--text-muted":r.replace("{DEFAULT}","--text-muted")}}}catch(t){new ee("RoleColorEverywhere").error("Failed to get message color",t)}return null},RoleGroupColor:k.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})})});var I4,ff,C4=g(()=>{"use strict";a();l();U();I();M();I4=C({onlySnow:{type:3,description:"Only play the Snow Halation Theme",default:!1,restartNeeded:!0}}),ff=v({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[d.AndrewDLO,d.FieryFlames,d.RamziAH],settings:I4,patches:[{find:'"call_ringing_beat"',replacement:[{match:/500!==\i\(\)\.random\(1,1e3\)/,replace:"false"},{predicate:()=>I4.store.onlySnow,match:/"call_ringing_beat",/,replace:""}]}]})});var c6,u6,N4,gf,A4=g(()=>{"use strict";a();l();vr();U();I();M();G();T();c6=L("allSummaries","findSummary"),u6=ve(".people)),startId:",".type}"),N4=C({summaryExpiryThresholdDays:{type:5,description:"The time in days before a summary is removed. Note that only up to 50 summaries are kept per channel",markers:[1,3,5,7,10,15,20,25,30],stickToMarkers:!1,default:3}}),gf=v({name:"Summaries",description:"Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",authors:[d.mantikafasi],settings:N4,patches:[{find:"SUMMARIZEABLE.has",replacement:{match:/\i\.hasFeature\(\i\.\i\.SUMMARIES_ENABLED\w+?\)/g,replace:"true"}},{find:"RECEIVE_CHANNEL_SUMMARY(",replacement:{match:/shouldFetch\((\i),\i\){/,replace:"$& if(!$self.shouldFetch($1)) return false;"}}],flux:{CONVERSATION_SUMMARY_UPDATE(e){let t=e.summaries.map(o=>({...u6(o),time:Date.now()}));St.update("summaries-data",o=>(o??={},o[e.channel_id]?o[e.channel_id].unshift(...t):o[e.channel_id]=t,o[e.channel_id].length>50&&(o[e.channel_id]=o[e.channel_id].slice(0,50)),o))}},async start(){await St.update("summaries-data",e=>{e??={};for(let t of Object.keys(e)){for(let o=e[t].length-1;o>=0;o--)e[t][o].time{});function D4(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 d6({rootProps:e,close:t}){let[o,r]=q(),[i,s]=q(""),c=Math.round((new Date(o).getTime()||Date.now())/1e3),u=(y,b)=>``,[p,m]=Re(()=>{let y=u(c,i);return[y,Fe.parse(y)]},[c,i]);return n(Ae,{...e},n(Ue,{className:ri("modal-header")},n(x.FormTitle,{tag:"h2",className:ri("modal-title")},"Timestamp Picker"),n(pt,{onClick:t,className:ri("modal-close-button")})),n(De,{className:ri("modal-content")},n("input",{className:ri("date-picker"),type:"datetime-local",value:o,onChange:y=>r(y.currentTarget.value),style:{colorScheme:_r()===2?"light":"dark"}}),n(x.FormTitle,null,"Timestamp Format"),n("div",{className:ri("format-select")},n(Yo,{options:p6.map(y=>({label:y,value:y})),isSelected:y=>y===i,select:y=>s(y),serialize:y=>y,renderOptionLabel:y=>n("div",{className:ri("format-label")},Fe.parse(u(c,y.value))),renderOptionValue:()=>m})),n(x.FormTitle,{className:H.bottom8},"Preview"),n(x.FormText,{className:ri("preview-text")},m," (",p,")")),n(bt,null,n(A,{onClick:()=>{Pi(p+" "),t()}},"Insert")))}var k4,p6,ri,m6,hf,L4=g(()=>{"use strict";a();l();R4();Wr();U();Ze();I();Me();He();Ye();M();T();k4=C({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});p6=["","t","T","d","D","f","F","R"],ri=me("vc-st-");m6=({isMainChat:e})=>e?n(yn,{tooltip:"Insert Timestamp",onClick:()=>{let t=Ce(o=>n(d6,{rootProps:o,close:()=>tr(t)}))},buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":"true",role:"img",width:"20",height:"20",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("g",{fill:"none",fillRule:"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,hf=v({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[d.Ven,d.Tyler,d.Grzesiek11],settings:k4,renderChatBarButton:m6,onBeforeMessageSend(e,t){k4.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,D4))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(f,null,n(x.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(x.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(x.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",Fe.parse(D4(t)))))))}})});var E4=g(()=>{});function _4(e){Ce(t=>n(Ae,{...t,size:"medium"},n(g6,{guild:e})))}function B4(e){return n(lo,{timestamp:new Date(e)})}function g6({guild:e}){let[t,o]=q(),[r,i]=q(),[s,c]=q();ue(()=>{cc.friends=!1,cc.blocked=!1,cc.ignored=!1},[]);let[u,p]=q(0),m=e.banner&&_t.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),y=e.icon&&_t.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:po("root")},m&&u===0&&n("img",{className:po("banner"),src:m,alt:"",onClick:()=>$o({url:m,width:1024})}),n("div",{className:po("header")},y?n("img",{className:po("icon"),src:y,alt:"",onClick:()=>$o({url:y,height:512,width:512})}):n("div",{"aria-hidden":!0,className:W(O4.childWrapper,O4.acronym)},e.acronym),n("div",{className:po("name-and-description")},n(x.FormTitle,{tag:"h5",className:po("name")},e.name),e.description&&n(x.FormText,null,e.description))),n(xo,{type:"top",look:"brand",className:po("tab-bar"),selectedItem:u,onItemSelect:p},n(xo.Item,{className:po("tab",{selected:u===0}),id:0},"Server Info"),n(xo.Item,{className:po("tab",{selected:u===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n(xo.Item,{className:po("tab",{selected:u===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:""),n(xo.Item,{className:po("tab",{selected:u===3}),id:3},"Ignored Users",s!==void 0?` (${s})`:"")),n("div",{className:po("tab-content")},u===0&&n(y6,{guild:e}),u===1&&n(v6,{guild:e,setCount:o}),u===2&&n(b6,{guild:e,setCount:i}),u===3&&n(S6,{guild:e,setCount:c})))}function h6(e,t){let o=ke.getMember(e,t.id)?.avatar,r=o?_t.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):_t.getUserAvatarURL(t,!0);return n("div",{className:po("owner")},n("img",{className:po("owner-avatar"),src:r,alt:"",onClick:()=>$o({url:r,height:512,width:512})}),Fe.parse(`<@${t.id}>`))}function y6({guild:e}){let[t]=kt(()=>go.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?h6(e.id,t):"Loading...","Created At":B4(wo.extractTimestamp(e.id)),"Joined At":e.joinedAt?B4(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:er.getChannels(e.id)?.count-1||"?",Roles:Object.keys(pe.getRoles(e.id)).length-1};return n("div",{className:po("info")},Object.entries(o).map(([r,i])=>n("div",{className:po("server-info-pair"),key:r},n(x.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function v6({guild:e,setCount:t}){return U0("friends",e,_e.getFriendIDs(),t)}function b6({guild:e,setCount:t}){let o=Object.keys(_e.getRelationships()).filter(r=>_e.isBlocked(r));return U0("blocked",e,o,t)}function S6({guild:e,setCount:t}){let o=Object.keys(_e.getRelationships()).filter(r=>_e.isIgnored(r));return U0("ignored",e,o,t)}function U0(e,t,o,r){let i=[],s=[];for(let c of o)ke.isMember(t.id,c)?s.push(c):i.push(c);return Se([ke],()=>ke.getMemberIds(t.id),null,(c,u)=>c.length===u.length),ue(()=>{!cc[e]&&i.length&&(cc[e]=!0,z.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),ue(()=>r(s.length),[s.length]),n(Er,{fade:!0,className:po("scroller")},s.map(c=>n(f6,{key:c,user:E.getUser(c),status:sn.getStatus(c)||"offline",onSelect:()=>Go(c),onContextMenu:()=>{}})))}var O4,f6,po,cc,F4=g(()=>{"use strict";a();l();E4();Ze();Me();fe();Ye();wt();G();T();O4=L("icon","acronym","childWrapper"),f6=le(".listName,discriminatorClass"),po=me("vc-gp-");cc={friends:!1,blocked:!1,ignored:!1}});var U4,yf,$4=g(()=>{"use strict";a();l();Io();I();M();T();F4();U4=(e,{guild:t})=>{st("privacy",e)?.push(n(B.MenuItem,{id:"vc-server-info",label:"Server Info",action:()=>_4(t)}))},yf=v({name:"ServerInfo",description:"Allows you to view info about a server",authors:[d.Ven,d.Nuckyz],dependencies:["DynamicImageModalAPI"],tags:["guild","info","ServerProfile"],contextMenus:{"guild-context":U4,"guild-header-popout":U4}})});function x6(){let e=Se([_e,sn],()=>{let t=0,o=_e.getFriendIDs();for(let r of o)(sn.getStatus(r)??"offline")!=="offline"&&t++;return t});return n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},e," online")}function T6(){let e=Se([pe,G4],()=>{let t=G4.computeGuildIds(),o=pe.getGuilds();return pe.getGuildCount()+t.filter(r=>o[r]==null).length});return n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},e," servers")}var G4,vf,z4=g(()=>{"use strict";a();l();Km();U();se();I();M();G();T();G4=be("UserGuildJoinRequestStore");vf=v({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}=Q.plugins.ServerListIndicators;return n(k,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(x6,null),!!(e&1)&&n(T6,null)))},start(){nc(0,this.renderIndicator)},stop(){rc(0,this.renderIndicator)}})});var bf,H4=g(()=>{"use strict";a();l();I();M();bf=v({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[d.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var W4=g(()=>{});function q4(){let e=Na(j4.colors.INTERACTIVE_MUTED).hex(),t=Na(j4.colors.INTERACTIVE_ACTIVE).hex();return n(w6,{color:e,forcedIconColor:t,size:16,tooltipText:we("CONNECTION_VERIFIED"),className:"vc-sc-tooltip-icon"})}var j4,w6,K4=g(()=>{"use strict";a();l();Me();G();T();j4=Tt(e=>e.colors?.INTERACTIVE_MUTED?.css),w6=le("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}")});function A6({id:e,theme:t}){let o=Qt.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(he,{style:{gap:C6(Sf.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(R6,{connection:i,theme:t,key:i.id}))):null}function R6({connection:e,theme:t}){let o=P6.get(M6(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:Sf.store.iconSize,height:Sf.store.iconSize}}),s=r?Ri:ki;return n(re,{text:n("span",{className:"vc-sc-tooltip"},n("span",{className:"vc-sc-connection-name"},e.name),e.verified&&n(q4,null),n(s,{height:16,width:16,className:"vc-sc-tooltip-icon"})),key:e.id},c=>r?n("a",{...c,className:"vc-user-connection",href:r,target:"_blank",rel:"noreferrer",onClick:u=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(u.currentTarget,u)}},i):n("button",{...c,className:"vc-user-connection",onClick:()=>Yt(e.name)},i))}var M6,P6,I6,C6,Sf,N6,xf,Y4=g(()=>{"use strict";a();l();W4();U();se();Wt();It();I();fe();M();G();T();K4();M6=ve(".TWITTER_LEGACY:"),P6=L("isSupported","getByUrl"),I6=ve(".getPreviewThemeColors","primaryColor:"),C6=e=>(e??0)*2+4,Sf=C({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}]}}),N6=k.wrap(e=>n(A6,{...e,id:e.user.id,theme:I6(e).theme}),{noop:!0});xf=v({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[d.TheKodeToad],settings:Sf,patches:[{find:".hasAvatarForGuild(null==",replacement:{match:/currentUser:\i,guild:\i}\)(?<=user:(\i),bio:null==(\i)\?.+?)/,replace:"$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2 })"}}],profilePopoutComponent:N6})});var Z4=g(()=>{});function $6({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Nr.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,r]=q([]),{type:i,topic:s,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:p,defaultAutoArchiveDuration:m,availableTags:y,id:b,rateLimitPerUser:S,defaultThreadRateLimitPerUser:N,defaultSortOrder:P,defaultReactionEmoji:w,bitrate:R,rtcRegion:D,videoQualityMode:O,permissionOverwrites:$,guild_id:j}=e;return ue(()=>{let V=[],ie=pe.getGuild(j).ownerId;ke.getMember(j,ie)||V.push(ie),Object.values($).forEach(({type:ne,id:Y})=>{ne===1&&!ke.getMember(j,Y)&&V.push(Y)}),V.length>0&&z.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[j],userIds:V}),Q.plugins.PermissionsViewer.enabled&&r(Pm(Object.values($).map(ne=>({type:ne.type,id:ne.id,overwriteAllow:ne.allow,overwriteDeny:ne.deny})),j))},[b]),n("div",{className:W($0.auto,$0.customTheme,$0.managedReactiveScroller)},n("div",{className:Eo("container")},n("img",{className:Eo("logo"),src:U6}),n("div",{className:Eo("heading-container")},n(X,{variant:"heading-xxl/bold"},"This is a ",Be.can(Ie.VIEW_CHANNEL,e)?"locked":"hidden"," ",O6[i]," channel"),e.isNSFW()&&n(re,{text:"NSFW"},({onMouseLeave:V,onMouseEnter:ie})=>n("svg",{onMouseLeave:V,onMouseEnter:ie,className:Eo("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(X,{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:Eo("topic-container")},Fe.parseTopic(s,!1,{channelId:b})),c&&n(X,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(lo,{timestamp:new Date(wo.extractTimestamp(c))})),p&&n(X,{variant:"text-md/normal"},"Last message pin: ",n(lo,{timestamp:new Date(p)})),(S??0)>0&&n(X,{variant:"text-md/normal"},"Slowmode: ",Ga(S,"seconds")),(N??0)>0&&n(X,{variant:"text-md/normal"},"Default thread slowmode: ",Ga(N,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&R!=null&&n(X,{variant:"text-md/normal"},"Bitrate: ",R," bits"),D!==void 0&&n(X,{variant:"text-md/normal"},"Region: ",D??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(X,{variant:"text-md/normal"},"Video quality mode: ",F6[O??1]),(m??0)>0&&n(X,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ga(m,"minutes")),u!=null&&n(X,{variant:"text-md/normal"},"Default layout: ",_6[u]),P!=null&&n(X,{variant:"text-md/normal"},"Default sort order: ",B6[P]),w!=null&&n("div",{className:Eo("default-emoji-container")},n(X,{variant:"text-md/normal"},"Default reaction emoji:"),Fe.defaultRules[w.emojiName?"emoji":"customEmoji"].react({name:w.emojiName?L6.convertSurrogateToName(w.emojiName):an.getCustomEmojiById(w.emojiId)?.name??"",emojiId:w.emojiId??void 0,surrogate:w.emojiName??void 0,src:w.emojiName?E6.getURL(w.emojiName):void 0},void 0,{key:0})),e.hasFlag(16)&&n(X,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),y&&y.length>0&&n("div",{className:Eo("tags-container")},n(X,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:Eo("tags")},y.map(V=>n(D6,{tag:V,key:V.id})))),n("div",{className:Eo("allowed-users-and-roles-container")},n("div",{className:Eo("allowed-users-and-roles-container-title")},Vencord.Plugins.isPluginEnabled("PermissionsViewer")&&n(re,{text:"Permission Details"},({onMouseLeave:V,onMouseEnter:ie})=>n("button",{onMouseLeave:V,onMouseEnter:ie,className:Eo("allowed-users-and-roles-container-permdetails-btn"),onClick:()=>Xi(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(X,{variant:"text-lg/bold"},"Allowed users and roles:"),n(re,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:V,onMouseEnter:ie})=>n("button",{onMouseLeave:V,onMouseEnter:ie,className:Eo("allowed-users-and-roles-container-toggle-btn"),onClick:()=>Nr.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(k6,{channel:e}))))}var $0,tMe,k6,D6,L6,E6,O6,B6,_6,F6,U6,Q4,J4=g(()=>{"use strict";a();l();U();se();fe();Zo();G();T();Jl();Ql();G0();$0=L("auto","managedReactiveScroller"),tMe=L("chat","content","noChat","chatContent"),k6=le("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"),D6=le("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"),L6=L("convertSurrogateToName"),E6=L("getURL","getEmojiColors"),O6={0:"text",5:"announcement",15:"forum",2:"voice",13:"stage"},B6={0:"Latest activity",1:"Creation date"},_6={0:"Not set",1:"List view",2:"Gallery view"},F6={1:"Automatic",2:"720p"},U6="/assets/433e3ec4319a9d11b0cbe39342614982.svg";Q4=k.wrap($6)});function G6(e){return e.channel.id==="null"&&e.channel.name==="Uncategorized"&&e.comparator===-1}var X4,Eo,V4,Nr,Tf,G0=g(()=>{"use strict";a();l();Z4();U();Ze();se();I();fe();Bo();M();G();T();J4();X4=L("modeMuted","modeSelected","unread","icon"),Eo=me("vc-shc-"),V4=1n<<20n,Nr=C({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}});Tf=v({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:Nr,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\[\]}}/,replace:""},{match:/(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(this\.record\)\?{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:(e,t)=>`${t} `}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\);return\()/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=(\|\||&&)\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t,o)=>t==="||"?`||$self.isHiddenChannel(${o})`:`&&!$self.isHiddenChannel(${o})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".AUDIENCE),{isSubscriptionGated",replacement:{match:/(!)?(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t,o)=>t?`${e}&&!$self.isHiddenChannel(${o})`:`${e}||$self.isHiddenChannel(${o})`}},{find:'tutorialId:"instant-invite"',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:"#{intl::CHANNEL_TOOLTIP_DIRECTORY}",predicate:()=>Nr.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:()=>Nr.store.showMode===1,replacement:[{match:/\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.name,{.{0,140}\.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,i)=>o?`${r}?${i}:"",${t}if(${r})return ""`:`${r}?${i}:"",${t}${r}?""`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Nr.store.hideUnreads===!1&&Nr.store.showMode===1,match:/(?<=\.LOCKED(?:;if\(|:))(?<={channel:(\i).+?)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{predicate:()=>Nr.store.hideUnreads===!0,match:/\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'="ChannelListUnreadsStore",',replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?<=!0\))(?=&&\(0,\i\.\i\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"ignoreRecents:!0",replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\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)=>`${e}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)=>`${e}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,200}?>0\)&&\(0,\i\.\i\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/getState\(\)\.channelId.+?(?=\.map\(\i=>\i\.id)/,replace:"$&.filter(e=>!$self.isHiddenChannel(e))"}},{find:"#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${V4}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${V4}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/forceRoles:.+?.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(Rt(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(Rt(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:'})},"overflow"))',replacement:[{match:/users:\i,maxUsers:\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:"#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",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:"#{intl::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:"#{intl::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\){.+?\)\((\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:'className:"channelMention",children',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:"#{intl::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){try{return!e||(e.channelId&&(e=ae.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!Be.can(Ie.VIEW_CHANNEL,e)||t&&!Be.can(Ie.CONNECT,e)}catch(o){return console.error("[ViewHiddenChannels#isHiddenChannel]: ",o),!1}},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)(G6(s)||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(Q4,{channel:e}),LockIcon:k.wrap(()=>n("svg",{className:X4.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{fill:"currentcolor",fillRule:"evenodd",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:k.wrap(()=>n(re,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:W(X4.icon,Eo("hidden-channel-icon")),width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{fill:"currentcolor",fillRule:"evenodd",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 z0,Xs,wf,eC=g(()=>{"use strict";a();l();U();I();M();z0=e=>({type:3,description:e,default:!0,restartNeeded:!0}),Xs=C({showTimeouts:z0("Show member timeout icons in chat."),showInvitesPaused:z0("Show the invites paused tooltip in the server list."),showModView:z0("Show the member mod view context menu item in all servers.")}),wf=v({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused","ShowModView","DisableDiscoveryFilters"],description:"Displays various hidden & moderator-only things regardless of permissions.",authors:[d.Dolfies],settings:Xs,patches:[{find:"showCommunicationDisabledStyles",predicate:()=>Xs.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"INVITES_DISABLED))||",predicate:()=>Xs.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,replace:"true"}},{find:/,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/,predicate:()=>Xs.store.showModView,replacement:{match:/return \i\.\i\(\i\.\i\(\{user:\i,context:\i,checkElevated:!1\}\),\i\.\i\)/,replace:"return true"}},{find:"#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}),allowOverflow:",predicate:()=>Xs.store.showModView,replacement:{match:/(role:)\i(?=,guildId.{0,100}role:(\i\[))/,replace:"$1$2arguments[0].member.highestRoleId]"}},{find:'action:"PRESS_MOD_VIEW",icon:',predicate:()=>Xs.store.showModView,replacement:{match:/\i(?=\?null)/,replace:"false"}}]})});var tC=g(()=>{});var uc,Mf,oC=g(()=>{"use strict";a();l();tC();U();se();I();M();uc=C({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"}}),Mf=v({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[d.Rini,d.TheKodeToad],patches:[{find:'?"@":""',replacement:{match:/(?<=onContextMenu:\i,children:)\i\+\i/,replace:"$self.renderUsername(arguments[0])"}}],settings:uc,renderUsername:k.wrap(({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:c}=s;uc.store.displayNames&&(c=s.globalName||c);let{nick:u}=e,p=r?"@":"";return o&&!uc.store.inReplies||c.toLowerCase()===u.toLowerCase()?n(f,null,p,u):uc.store.mode==="user-nick"?n(f,null,p,c," ",n("span",{className:"vc-smyn-suffix"},u)):uc.store.mode==="nick-user"?n(f,null,p,u," ",n("span",{className:"vc-smyn-suffix"},c)):n(f,null,p,c)}catch{return n(f,null,e?.nick)}},{noop:!0})})});var nC=g(()=>{});function iC(e,t){let o=ae.getChannel(e.channel_id)?.guild_id;if(!o)return null;let r=ke.getMember(o,e.author.id);if(!r?.communicationDisabledUntil)return null;let i=()=>n(H6,{deadline:new Date(r.communicationDisabledUntil),showUnits:!0,stopAtOneSec:!0});return we("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i}),t?i():we("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i})}var z6,H6,rC,Pf,sC=g(()=>{"use strict";a();l();nC();U();se();I();Me();Bo();M();G();T();z6=Rt("#{intl::MAX_AGE_NEVER}"),H6=Dc(e=>e.prototype?.render?.toString().includes(z6)),rC=C({displayStyle:{description:"How to display the timeout duration",type:4,options:[{label:"In the Tooltip",value:"tooltip"},{label:"Next to the timeout icon",value:"ssalggnikool",default:!0}]}});Pf=v({name:"ShowTimeoutDuration",description:"Shows how much longer a user's timeout will last, either in the timeout icon tooltip or next to it",authors:[d.Ven,d.Sqaaakoi],settings:rC,patches:[{find:"#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}",replacement:[{match:/\i\.\i,{(text:.{0,30}#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}\))/,replace:"$self.TooltipWrapper,{message:arguments[0].message,$1"}]}],TooltipWrapper:k.wrap(({message:e,children:t,text:o})=>rC.store.displayStyle==="tooltip"?n(re,{text:iC(e,!1)},t):n("div",{className:"vc-std-wrapper"},n(re,{text:o},t),n(X,{variant:"text-md/normal",color:"status-danger"},iC(e,!0)," timeout remaining")),{noop:!0})})});var H0,W0,W6,If,aC=g(()=>{"use strict";a();l();Wr();Pl();U();I();M();T();H0=!1,W0=C({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(H0=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}}),W6=({isMainChat:e})=>{let[t,o]=q(H0);function r(i){W0.store.persistState&&(H0=i),o(i)}return ue(()=>{let i=(s,c)=>{t&&(W0.store.autoDisable&&r(!1),c.content.startsWith("@silent ")||(c.content="@silent "+c.content))};return Fi(i),()=>void Ui(i)},[t]),e?n(yn,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>r(!t)},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#vc-silent-msg-mask)",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:"vc-silent-msg-mask"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000",strokeWidth:"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},If=v({name:"SilentMessageToggle",authors:[d.Nuckyz,d.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",settings:W0,renderChatBarButton:W6})});var Mn,j6,q6,Cf,lC=g(()=>{"use strict";a();l();Wr();Qo();Io();U();I();M();T();Mn=C({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},contextMenu:{type:3,description:"Add option to toggle the functionality in the chat input context menu",default:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}}),j6=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=Mn.use(["isEnabled","showIcon"]),r=()=>Mn.store.isEnabled=!Mn.store.isEnabled;return!e||!o?null:n(yn,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:r},n("svg",{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#silent-typing-msg-mask)",d:"M18.333 15.556H1.667a1.667 1.667 0 0 1 -1.667 -1.667v-10a1.667 1.667 0 0 1 1.667 -1.667h16.667a1.667 1.667 0 0 1 1.667 1.667v10a1.667 1.667 0 0 1 -1.667 1.667M4.444 6.25V4.861a0.417 0.417 0 0 0 -0.417 -0.417H2.639a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417H5.973a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m-11.667 3.333V8.194a0.417 0.417 0 0 0 -0.417 -0.417H4.306a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417H7.639a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m-11.667 3.333v-1.389a0.417 0.417 0 0 0 -0.417 -0.417H2.639a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m10 0v-1.389a0.417 0.417 0 0 0 -0.417 -0.417H5.973a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h8.056a0.417 0.417 0 0 0 0.417 -0.417m3.333 0v-1.389a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417",transform:"translate(2, 3)"}),t&&n(f,null,n("mask",{id:"silent-typing-msg-mask"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000",strokeWidth:"5.99068",d:"M0 24 24 0",transform:"translate(-2, -3)"})),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"}))))},q6=e=>{let{isEnabled:t,contextMenu:o}=Mn.use(["isEnabled","contextMenu"]);if(!o)return;let r=st("submit-button",e);if(!r)return;let i=r.findIndex(s=>s?.props?.id==="submit-button");r.splice(i+1,0,n(B.MenuCheckboxItem,{id:"vc-silent-typing",label:"Enable Silent Typing",checked:t,action:()=>Mn.store.isEnabled=!Mn.store.isEnabled}))},Cf=v({name:"SilentTyping",authors:[d.Ven,d.Rini,d.ImBanana],description:"Hide that you are typing",settings:Mn,contextMenus:{"textarea-context":q6},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)=>{Mn.store.isEnabled=!!qt(e,"value",!Mn.store.isEnabled),at(t.channel.id,{content:Mn.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){Mn.store.isEnabled||z.dispatch({type:"TYPING_START_LOCAL",channelId:e})},renderChatBarButton:j6})});var cC=g(()=>{});function uC(e){return new Date(_e.getSince(e.id))}var K6,j0,pC,Nf,dC=g(()=>{"use strict";a();l();cC();U();Ze();se();I();M();T();K6=new Intl.DateTimeFormat(void 0,{month:"numeric",day:"numeric",year:"numeric"}),j0=me("vc-sortFriendRequests-");pC=C({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),Nf=v({name:"SortFriendRequests",authors:[d.Megu],description:"Sorts friend requests by date of receipt",settings:pC,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:"#{intl::FRIEND_REQUEST_CANCEL}",replacement:{predicate:()=>pC.store.showDates,match:/(?<=\.listItemContents,children:\[)\(0,.+?(?=,\(0)(?<=user:(\i).+?)/,replace:(e,t)=>`$self.WrapperDateComponent({user:${t},children:${e}})`}}],wrapSort(e,t){return t.type===3||t.type===4?-uC(t.user):e(t)},WrapperDateComponent:k.wrap(({user:e,children:t})=>{let o=uC(e);return n("div",{className:j0("wrapper")},t,!isNaN(o.getTime())&&n(Xn,{text:Br.dateFormat(o,"LLLL"),tooltipClassName:j0("tooltip")},n(X,{variant:"text-xs/normal",className:j0("date")},K6.format(o))))})})});var mC,fC=g(()=>{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});mC="src/plugins/spotifyControls/hoverOnly.css"});var gC=g(()=>{});var hC=g(()=>{});var Ve,yC=g(()=>{"use strict";a();l();U();G();T();Ve=Ro(()=>{let{Store:e}=gi,t=xa("getActiveSocketAndDevice"),o=L("vcSpotifyMarker"),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=Q.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+u.replaceAll("/",(m,y)=>y===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:y}=t.getActiveSocketAndDevice();return o[u](y.accountId,y.accessToken,{url:r+p,...m})}}let s=new i(z,{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.shuffle=c.shuffle??!1,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 q0(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 Vs(e,t){return()=>n("svg",{className:nt("button-icon",t),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function pc(e){return n("button",{className:nt("button"),...e},e.children)}function e7({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(B.Menu,{navId:`spotify-${e}-menu`,onClose:()=>z.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(B.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>Yt("https://open.spotify.com"+t),icon:Ri}),n(B.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>Ve.openExternal(t),icon:ir}))}function t7(e,t){return o=>Dt.openContextMenu(o,()=>n(e7,{name:e,path:t}))}function o7(){let[e,t,o]=Se([Ve],()=>[Ve.isPlaying,Ve.shuffle,Ve.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:nt("button-row"),style:{gap:0}},n(pc,{className:W(nt("button"),nt("shuffle"),nt(t?"shuffle-on":"shuffle-off")),onClick:()=>Ve.setShuffle(!t)},n(V6,null)),n(pc,{onClick:()=>{Q.plugins.SpotifyControls.previousButtonRestartsTrack&&Ve.position>3e3?Ve.seek(0):Ve.prev()}},n(Q6,null)),n(pc,{onClick:()=>Ve.setPlaying(!e)},e?n(Z6,null):n(Y6,null)),n(pc,{onClick:()=>Ve.next()},n(J6,null)),n(pc,{className:W(nt("button"),nt("repeat"),nt(i)),onClick:()=>Ve.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:nt("repeat-1")},"1"),n(X6,null)))}function r7(){let{duration:e}=Ve.track,[t,o,r]=Se([Ve],()=>[Ve.mPosition,Ve.isSettingPosition,Ve.isPlaying]),[i,s]=q(t);return ue(()=>{if(r&&!o){s(Ve.position);let c=setInterval(()=>{s(u=>u+1e3)},1e3);return()=>clearInterval(c)}},[t,o,r]),n("div",{id:nt("progress-bar")},n(x.FormText,{variant:"text-xs/medium",className:nt("progress-time")+" "+nt("time-left"),"aria-label":"Progress"},q0(i)),n(B.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:c=>{o||(s(c),n7(c))},renderValue:q0}),n(x.FormText,{variant:"text-xs/medium",className:nt("progress-time")+" "+nt("time-right"),"aria-label":"Total Duration"},q0(e)))}function i7({track:e}){let t=Se([Ve],()=>Ve.volume);return n(B.Menu,{navId:"spotify-album-menu",onClose:()=>z.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(B.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Ve.openExternal(`/album/${e.album.id}`),icon:ir}),n(B.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>$o(e.album.image),icon:fn}),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:fo(i=>Ve.setVolume(i))})}))}function K0(e,t,o){return t?{role:"link",onClick:()=>Ve.openExternal(o),onContextMenu:t7(e,o)}:{}}function s7({track:e}){let t=e?.album?.image,[o,r]=q(!1),i=n(f,null,t&&n("img",{id:nt("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Dt.openContextMenu(s,()=>n(i7,{track:e}))}}));return o&&t?n("div",{id:nt("album-expanded-wrapper")},i):n("div",{id:nt("info-wrapper")},i,n("div",{id:nt("titles")},n(x.FormText,{variant:"text-sm/semibold",id:nt("song-title"),className:nt("ellipoverflow"),title:e.name,...K0("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(x.FormText,{variant:"text-sm/normal",className:nt(["ellipoverflow","secondary-song-info"])},n("span",{className:nt("song-info-prefix")},"by\xA0"),e.artists.map((s,c)=>n(te.Fragment,{key:s.name},n("span",{className:nt("artist"),style:{fontSize:"inherit"},title:s.name,...K0("Artist",s.id,`/artist/${s.id}`)},s.name),c!==e.artists.length-1&&n("span",{className:nt("comma")},", ")))),e.album.name&&n(x.FormText,{variant:"text-sm/normal",className:nt(["ellipoverflow","secondary-song-info"])},n("span",{className:nt("song-info-prefix")},"on\xA0"),n("span",{id:nt("album-title"),className:nt("album"),style:{fontSize:"inherit"},title:e.album.name,...K0("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function vC(){let e=Se([Ve],()=>Ve.track,null,(c,u)=>c?.id?c.id===u?.id:c?.name===u?.name),t=Se([Ve],()=>Ve.device,null,(c,u)=>c?.id===u?.id),o=Se([Ve],()=>Ve.isPlaying),[r,i]=q(!1);if(te.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:nt("player"),style:s},n(s7,{track:e}),n(r7,null),n(o7,null))}var nt,Y6,Z6,Q6,J6,X6,V6,n7,bC=g(()=>{"use strict";a();l();gC();hC();U();Ze();Wt();It();ci();Me();fe();T();yC();nt=me("vc-spotify-");Y6=Vs("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"),Z6=Vs("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"),Q6=Vs("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"),J6=Vs("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"),X6=Vs("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"),V6=Vs("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");n7=fo(e=>{Ve.seek(e)})});function SC(e){(e?dn:mn)(mC)}var Af,xC=g(()=>{"use strict";a();l();U();Ze();se();I();M();fC();bC();Af=v({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[d.Ven,d.afn,d.KraXen72,d.Av32000,d.nin0dev],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>SC(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},previousButtonRestartsTrack:{type:3,description:"Restart currently playing track when pressing the previous button if playtime is >3s",default:!0}},patches:[{find:"this.isCopiedStreakGodlike",replacement:{match:/(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,hidePrivateData:)/,replace:"$self.PanelWrapper,{VencordOriginal:$1,"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),vcSpotifyMarker:1,$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:[{match:/repeat:"off"!==(\i),/,replace:"shuffle:arguments[2]?.shuffle_state??false,actual_repeat:$1,$&"},{match:/(?<=artists.filter\(\i=>).{0,10}\i\.id\)&&/,replace:""}]}],start:()=>SC(Q.plugins.SpotifyControls.hoverControls),PanelWrapper({VencordOriginal:e,...t}){return n(f,null,n(k,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n(vC,null)),n(e,{...t}))}})});var Y0,Rf,TC=g(()=>{"use strict";a();l();U();I();M();Y0=C({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}}),Rf=v({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:Y0,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:()=>Y0.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>Y0.store.keepSpotifyActivityOnIdle,match:/(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:"$1"}]}]})});function Z0(e,t){return{name:e,description:`Share your current Spotify ${e} in chat`,inputType:0,options:[_n],execute(o,{channel:r}){let i=a7.getTrack();if(!i)return at(r.id,{content:"You're not listening to any music."});let s=t(i),c=qt(o,"message");ys(r.id,{content:c?`${c} ${s}`:s},!1,_o.getSendMessageOptionsForReply(l7.getPendingReply(r.id))).then(()=>{z.dispatch({type:"DELETE_PENDING_REPLY",channelId:r.id})})}}}var a7,l7,kf,wC=g(()=>{"use strict";a();l();Qo();I();Me();M();G();T();a7=L("getPlayerState"),l7=L("getPendingReply");kf=v({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[d.katlyn],commands:[Z0("track",e=>`https://open.spotify.com/track/${e.id}`),Z0("album",e=>`https://open.spotify.com/album/${e.album.id}`),Z0("artist",e=>e.artists[0].external_urls.spotify)]})});function c7({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(te.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 u7({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(x.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"),dc.logs.map((c,u)=>n(c7,{key:u,...c,instance:s[u]})))))}function p7({trace:e}){let t=e.split(` `);return n(x.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,r)=>n("span",{key:r},o)))))}function d7(){if(!dc?.logs)return n("div",null,"Loading...");let e=dc.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(te.Fragment,null,n(u7,{title:"Startup Timings",logs:dc.logs,traceEnd:dc.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(p7,{trace:e}))}var dc,MC,PC=g(()=>{"use strict";a();l();se();Wt();G();T();dc=L("markWithDelta","markAndLog","markAt");MC=k.wrap(d7)});var Df,IC=g(()=>{"use strict";a();l();I();M();PC();Df=v({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[d.Megu],patches:[{find:"#{intl::ACTIVITY_SETTINGS}",replacement:[{match:/(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/,replace:(e,t,o,r)=>`${t}${o}?.[0]==="CHANGELOG"&&${r}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`,noWarn:!0},{match:/(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+\)\)\}\))(?=\)\})/,replace:(e,t,o,r)=>`${t}${o}?.[0]==="CHANGELOG"&&${r}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`}]}],StartupTimingPage:MC})});var Lf,CC=g(()=>{"use strict";a();l();I();M();Lf=v({name:"StickerPaste",description:"Makes picking a sticker in the sticker picker insert it into the chatbox instead of instantly sending",authors:[d.ImBanana],patches:[{find:".stickers,previewSticker:",replacement:{match:/if\(\i\.\i\.getUploadCount/,replace:"return true;$&"}}]})});function NC({streamKey:e},t){e.endsWith(E.getCurrentUser().id)&&z.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var Ef,AC=g(()=>{"use strict";a();l();I();M();T();Ef=v({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[d.Kodarru],flux:{STREAM_CREATE:e=>NC(e,!0),STREAM_DELETE:e=>NC(e,!1)}})});var mc,Of,RC=g(()=>{"use strict";a();l();U();I();M();T();mc=C({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. 0 to disable playing Super Reactions",type:5,default:20,markers:[0,5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Of=v({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:"$1!$self.shouldPlayBurstReaction($2)"}},{find:".EMOJI_PICKER_CONSTANTS_EMOJI_CONTAINER_PADDING_HORIZONTAL)",replacement:{match:/(openPopoutType:void 0(?=.+?isBurstReaction:(\i).+?(\i===\i\.\i.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.shouldSuperReactByDefault&&${r})`}}],settings:mc,shouldPlayBurstReaction(e){return mc.store.unlimitedSuperReactionPlaying?!0:mc.store.superReactionPlayingLimit===0?!1:e<=mc.store.superReactionPlayingLimit},get shouldSuperReactByDefault(){return mc.store.superReactByDefault&&E.getCurrentUser().premiumType!=null}})});function BC(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuyv]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function m7(e){try{return BC(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function Q0({initialValue:e,onChange:t,placeholder:o}){let[r,i]=q(e);return n(Bt,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function EC({title:e,rulesArray:t}){let o=e==="Using Regex";async function r(s){s!==t.length-1&&t.splice(s,1)}async function i(s,c,u){c===t.length-1&&t.push(OC()),t[c][u]=s,t[c].find===""&&t[c].replace===""&&t[c].onlyIfIncludes===""&&c!==t.length-1&&t.splice(c,1)}return n(f,null,n(x.FormTitle,{tag:"h4"},e),n(he,{flexDirection:"column",style:{gap:"0.5em"}},t.map((s,c)=>n(te.Fragment,{key:`${s.find}-${c}`},n(he,{flexDirection:"row",style:{gap:0}},n(he,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(Q0,{placeholder:"Find",initialValue:s.find,onChange:u=>i(u,c,"find")}),n(Q0,{placeholder:"Replace",initialValue:s.replace,onChange:u=>i(u,c,"replace")}),n(Q0,{placeholder:"Only if includes",initialValue:s.onlyIfIncludes,onChange:u=>i(u,c,"onlyIfIncludes")})),n(A,{size:A.Sizes.MIN,onClick:()=>r(c),style:{background:"none",color:"var(--status-danger)",...c===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(sr,null))),o&&m7(s.find)))))}function f7(){let[e,t]=q("");return n(f,null,n(x.FormTitle,{tag:"h4"},"Test Rules"),n(Bt,{placeholder:"Type a message",onChange:t}),n(Bt,{placeholder:"Message with rules applied",editable:!1,value:_C(e)}))}function _C(e){if(e.length===0)return e;for(let t of ea.store.stringRules)t.find&&(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",` `)).replace(/^\s|\s$/g,"")));for(let t of ea.store.regexRules)if(t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=BC(t.find);e=e.replace(o,t.replace.replaceAll("\\n",` `))}catch{new ee("TextReplace").error(`Invalid regex: ${t.find}`)}return e=e.trim(),e}var kC,DC,OC,LC,ea,g7,Bf,FC=g(()=>{"use strict";a();l();vr();U();Wt();It();I();Ne();M();T();kC="TextReplace_rulesString",DC="TextReplace_rulesRegex",OC=()=>({find:"",replace:"",onlyIfIncludes:""}),LC=()=>[OC()],ea=C({replace:{type:6,component:()=>{let{stringRules:e,regexRules:t}=ea.use(["stringRules","regexRules"]);return n(f,null,n(EC,{title:"Using String",rulesArray:e}),n(EC,{title:"Using Regex",rulesArray:t}),n(f7,null))}},stringRules:{type:7,default:LC()},regexRules:{type:7,default:LC()}});g7="1102784112584040479",Bf=v({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],settings:ea,onBeforeMessageSend(e,t){e!==g7&&(t.content=_C(t.content))},async start(){let e=await St.get(kC);e!=null&&(ea.store.stringRules=e,await St.del(kC));let t=await St.get(DC);t!=null&&(ea.store.regexRules=t,await St.del(DC))}})});var _f,UC=g(()=>{"use strict";a();l();I();M();T();_f=v({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[d.Ven,d.Board],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])"}},{find:"#{intl::LABEL_WITH_ONLINE_STATUS}",replacement:{match:/src:null!=\i\?(\i).{1,50}"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}},{find:"showCommunicationDisabledStyles",replacement:{match:/src:(\i),"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}}],getAvatarStyles(e){return!e||e.startsWith("data:")?{}:Object.fromEntries([128,256,512,1024,2048,4096].map(t=>[`--avatar-url-${t}`,`url(${e.replace(/\d+$/,String(t))})`]))},getMessageProps(e){let t=e.message?.author,o=t?.id;return{"data-author-id":o,"data-author-username":t?.username,"data-is-self":o&&o===E.getCurrentUser()?.id}}})});var $C=g(()=>{});function GC(){Nt.store.receivedInput="auto",Nt.store.receivedOutput="en",Nt.store.sentInput="auto",Nt.store.sentOutput="en"}var Nt,fc=g(()=>{"use strict";a();l();U();M();Nt=C({receivedInput:{type:0,description:"Language that received messages should be translated from",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Language that received messages should be translated to",default:"en",hidden:!0},sentInput:{type:0,description:"Language that your own messages should be translated from",default:"auto",hidden:!0},sentOutput:{type:0,description:"Language that your own messages should be translated to",default:"en",hidden:!0},showChatBarButton:{type:3,description:"Show translate button in chat bar",default:!0},service:{type:4,description:"Translation service (Not supported on Web!)",disabled:()=>!0,options:[{label:"Google Translate",value:"google",default:!0},{label:"DeepL Free",value:"deepl"},{label:"DeepL Pro",value:"deepl-pro"}],onChange:GC},deeplApiKey:{type:0,description:"DeepL API key",default:"",placeholder:"Get your API key from https://deepl.com/your-account",disabled:()=>!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},showAutoTranslateTooltip:{type:3,description:"Show a tooltip on the ChatBar button whenever a message is automatically translated",default:!0}}).withPrivateSettings()});var J0,zC=g(()=>{"use strict";a();l();J0={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 gc(e,t){let o=h7;try{return await o(t,Nt.store[`${e}Input`],Nt.store[`${e}Output`])}catch(r){let i=typeof r=="string"?r:"Something went wrong. If this issue persists, please check the console or ask for help in the support server.";throw ut(i,oe.Type.FAILURE),r instanceof Error?r:new Error(i)}}async function h7(e,t,o){let r="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:t,tl:o,dt:"t",dj:"1",source:"input",q:e}),i=await h(r);if(!i.ok)throw new Error(`Failed to translate "${e}" (${t} -> ${o}) ${i.status} ${i.statusText}`);let{src:s,sentences:c}=await i.json();return{sourceLanguage:J0[s]??s,text:c.map(u=>u?.trans).filter(Boolean).join("")}}var Pn,W4e,HC,j4e,hc=g(()=>{"use strict";a();l();Ze();Ua();T();zC();fc();Pn=me("vc-trans-"),W4e=VencordNative.pluginHelpers.Translate,HC=()=>J0;j4e=Ci(()=>ut("Deepl API quota exceeded. Falling back to Google Translate",oe.Type.FAILURE))});function v7({settingsKey:e,includeAuto:t}){let o=Nt.use([e])[e],r=Re(()=>{let i=Object.entries(HC()).map(([s,c])=>({value:s,label:c}));return t||i.shift(),i},[]);return n("section",{className:H.bottom16},n(x.FormTitle,{tag:"h3"},Nt.def[e].description),n(ls,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Nt.store[e]=i}))}function b7(){let e=Nt.use(["autoTranslate"]).autoTranslate;return n(Ko,{value:e,onChange:t=>Nt.store.autoTranslate=t,note:Nt.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function WC({rootProps:e}){return n(Ae,{...e},n(Ue,{className:Pn("modal-header")},n(x.FormTitle,{tag:"h2",className:Pn("modal-title")},"Translate"),n(pt,{onClick:e.onClose})),n(De,{className:Pn("modal-content")},y7.map(t=>n(v7,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(x.FormDivider,{className:H.bottom16}),n(b7,null)))}var y7,jC=g(()=>{"use strict";a();l();He();Ye();T();fc();hc();y7=["receivedInput","receivedOutput","sentInput","sentOutput"]});function ta({height:e=20,width:t=20,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:W(Pn("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 yc,qC,X0=g(()=>{"use strict";a();l();Wr();fe();Ye();T();fc();jC();hc();qC=({isMainChat:e})=>{let{autoTranslate:t,showChatBarButton:o}=Nt.use(["autoTranslate","showChatBarButton"]),[r,i]=q(!1);if(ue(()=>(yc=i,()=>yc=void 0),[]),!e||!o)return null;let s=()=>{let u=!t;Nt.store.autoTranslate=u,u&&Nt.store.showAutoTranslateAlert!==!1&&ft.show({title:"Vencord Auto-Translate Enabled",body:n(f,null,n(x.FormText,null,"You just enabled Auto Translate! Any message ",n("b",null,"will automatically be translated")," before being sent.")),confirmText:"Disable Auto-Translate",cancelText:"Got it",secondaryConfirmText:"Don't show again",onConfirmSecondary:()=>Nt.store.showAutoTranslateAlert=!1,onConfirm:()=>Nt.store.autoTranslate=!1,confirmColor:"vc-notification-log-danger-btn"})},c=n(yn,{tooltip:"Open Translate Modal",onClick:u=>{if(u.shiftKey)return s();Ce(p=>n(WC,{rootProps:p}))},onContextMenu:s,buttonProps:{"aria-haspopup":"dialog"}},n(ta,{className:Pn({"auto-translate":t,"chat-button":!0})}));return r&&Nt.store.showAutoTranslateTooltip?n(re,{text:"Auto Translate Enabled",forceOpen:!0},()=>c):c}});function ev(e,t){V0.get(e)(t)}function S7({onDismiss:e}){return n("button",{onClick:e,className:Pn("dismiss")},"Dismiss")}function KC({message:e}){let[t,o]=q();return ue(()=>{if(!e.vencordEmbeddedBy)return V0.set(e.id,o),()=>void V0.delete(e.id)},[]),t?n("span",{className:Pn("accessory")},n(ta,{width:16,height:16,className:Pn("accessory-icon")}),Fe.parse(t.text)," ","(translated from ",t.sourceLanguage," - ",n(S7,{onDismiss:()=>o(void 0)}),")"):null}var V0,YC=g(()=>{"use strict";a();l();T();X0();hc();V0=new Map});var x7,ZC,Ff,QC=g(()=>{"use strict";a();l();$C();Io();I();M();T();fc();X0();YC();hc();x7=(e,{message:t})=>{if(!t.content)return;let o=st("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:ta,action:async()=>{let r=await gc("received",t.content);ev(t.id,r)}}))},Ff=v({name:"Translate",description:"Translate messages with Google Translate or DeepL",authors:[d.Ven,d.AshtonMemer],settings:Nt,contextMenus:{message:x7},translate:gc,renderMessageAccessory:e=>n(KC,{message:e.message}),renderChatBarButton:qC,renderMessagePopoverButton(e){return e.content?{label:"Translate",icon:ta,message:e,channel:ae.getChannel(e.channel_id),onClick:async()=>{let t=await gc("received",e.content);ev(e.id,t)}}:null},async onBeforeMessageSend(e,t){if(!Nt.store.autoTranslate||!t.content)return;yc?.(!0),clearTimeout(ZC),ZC=setTimeout(()=>yc?.(!1),2e3);let o=await gc("sent",t.content);t.content=o.text}})});var JC=g(()=>{});var XC,VC=g(()=>{a();l();(unsafeWindow.VencordStyles??=new Map).set("src/plugins/typingTweaks/style.css",{name:"src/plugins/typingTweaks/style.css",source:`.vc-typing-user [class^="wrapper"] { display: inline-block; margin-right: 0.25em; vertical-align: -4px; } `,classNames:{},dom:null});XC="src/plugins/typingTweaks/style.css"});function tv({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var Uf,T7,$f,ov=g(()=>{"use strict";a();l();U();se();I();Me();M();T();VC();Uf=C({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"}});T7=k.wrap(function({user:e,guildId:t}){return n("strong",{className:"vc-typing-user",role:"button",onClick:()=>{Go(e.id)},style:{color:Uf.store.showRoleColors?ke.getMember(t,e.id)?.colorString:void 0}},Uf.store.showAvatars&&n(Ia,{size:"SIZE_16",src:e.getAvatarURL(t,128)}),ke.getNick(t,e.id)||!t&&_e.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),$f=v({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[d.zt],settings:Uf,managedStyle:XC,patches:[{find:"#{intl::THREE_USERS_TYPING}",replacement:[{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i(?<=guildId:(\i).+?)/,replace:"$self.renderTypingUsers({ users: $1, guildId: $2, children: $& })"},{match:/\.map\((\i)=>\i\.\i\.getName\(\i,\i\.id,\1\)\)/,replace:""},{match:/(,{a:(\i),b:(\i),c:\i}\):\i\.length>3&&\(\i=)\i\.\i\.string\(\i\.\i#{intl::SEVERAL_USERS_TYPING}\)(?<=(\i)\.length.+?)/,replace:(e,t,o,r,i)=>`${t}$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${i}.length - 2 })`,predicate:()=>Uf.store.alternativeFormatting}]}],buildSeveralUsers:tv,renderTypingUsers:k.wrap(({guildId:e,users:t,children:o})=>{try{if(!Array.isArray(o))return o;let r=0;return o.map(i=>{if(i.type!=="strong"&&!(typeof i!="string"&&!te.isValidElement(i)))return i;let s=t[r++];return n(T7,{key:s.id,guildId:e,user:s})})}catch(r){console.error(r)}return o},{noop:!0})})});function ii(e,t){let o=E.getUser(t);return ke.getNick(e,t)??o.globalName??o.username}function I7({channelId:e,guildId:t}){let o=Se([eN],()=>({...eN.getTypingUsers(e)}),null,(u,p)=>{let m=Object.keys(u),y=Object.keys(p);return m.length===y.length&&y.every(b=>u[b]!=null)}),r=Se([Ee],()=>Ee.getChannelId());if(!oa.store.includeMutedChannels&&P7.isChannelMuted(t,e)||!oa.store.includeCurrentChannel&&r===e)return null;let i=E.getCurrentUser()?.id,s=Object.keys(o).filter(u=>u!==i&&!(_e.isBlocked(u)&&!oa.store.includeBlockedUsers)),c;switch(s.length){case 0:break;case 1:{c=we("ONE_USER_TYPING",{a:ii(t,s[0])});break}case 2:{c=we("TWO_USERS_TYPING",{a:ii(t,s[0]),b:ii(t,s[1])});break}case 3:{c=we("THREE_USERS_TYPING",{a:ii(t,s[0]),b:ii(t,s[1]),c:ii(t,s[2])});break}default:{c=Q.plugins.TypingTweaks.enabled?tv({a:ii(t,s[0]),b:ii(t,s[1]),count:s.length-2}):we("SEVERAL_USERS_TYPING");break}}return s.length>0?n(re,{text:c},u=>n("div",{className:"vc-typing-indicator",...u},(oa.store.indicatorMode&2)===2&&n("div",{onClick:p=>{p.stopPropagation(),p.preventDefault()},onKeyPress:p=>p.stopPropagation()},n(M7,{users:s.map(p=>E.getUser(p)),guildId:t,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"})),(oa.store.indicatorMode&1)===1&&n("div",{className:"vc-typing-indicator-dots"},n(w7,{dotRadius:3,themed:!0})))):null}var w7,M7,eN,P7,oa,Gf,tN=g(()=>{"use strict";a();l();JC();U();se();I();Me();M();G();T();ov();w7=le(".dots,","dotRadius:"),M7=le("defaultRenderUser","showDefaultAvatarsForNullUsers"),eN=be("TypingStore"),P7=be("UserGuildSettingsStore");oa=C({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}]}}),Gf=v({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[d.Nuckyz,d.fawn,d.Sqaaakoi],settings:oa,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/\.name,{.{0,140}\.children.+?:null(?<=,channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id,$1.getGuildId())"}},{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,$1.getGuildId())"}}],TypingIndicator:(e,t)=>n(k,{noop:!0},n(I7,{channelId:e,guildId:t}))})});var zf,oN=g(()=>{"use strict";a();l();I();M();zf=v({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[d.Ven],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}`})},onBeforeMessageSend(e,t){return this.unindentMsg(t)},onBeforeMessageEdit(e,t,o){return this.unindentMsg(o)}})});var C7,Hf,nN=g(()=>{"use strict";a();l();U();Gr();I();M();C7=C({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:co(2,16),default:4}}),Hf=v({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[d.nakoyasha],settings:C7,patches:[{find:"#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]})});var nv,N7,Wf,rN=g(()=>{"use strict";a();l();Io();It();I();M();T();nv=4,N7=(e,{channel:t,message:{author:o,messageSnapshots:r,embeds:i,flags:s,id:c}})=>{let u=(s&nv)!==0,p=r.some(S=>S?.message.embeds.length);if(!u&&!i.length&&!p)return;let m=t.isPrivate()||!!(Be.getChannelPermissions({id:t.id})&Ie.EMBED_LINKS);if(o.id===E.getCurrentUser().id&&!m)return;let y=st("delete",e),b=y?.findIndex(S=>S?.props?.id==="delete");!b||!y||y.splice(b-1,0,n(B.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:u?"Unsuppress Embeds":"Suppress Embeds",color:u?void 0:"danger",icon:u?Ya:Za,action:()=>Mt.patch({url:Lt.Endpoints.MESSAGE(t.id,c),body:{flags:u?s&~nv:s|nv}})}))},Wf=v({name:"UnsuppressEmbeds",authors:[d.rad,d.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:N7}})});var na,jf=g(()=>{"use strict";a();l();U();M();na=C({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},showSelf:{type:3,description:"Enable or disable showing pronouns for yourself",default:!0}})});function A7(e,t=!1){let o=Se([Qt],()=>Qt.getUserProfile(e)?.pronouns),r=Se([Qt],()=>Qt.getGuildMemberProfile(e,Uo()?.getGuildId())?.pronouns);return t?o:r||o}function iN(e,t=!1){let o=A7(e,t)?.trim().replace(/\n+/g,"");return na.store.pronounsFormat==="LOWERCASE"?o?.toLowerCase():o}var sN=g(()=>{"use strict";a();l();Me();T();jf()});function lN(e){return!(e.author.bot||e.author.system||e.type===k7||!na.store.showSelf&&e.author.id===E.getCurrentUser().id)}function cN({message:e}){let t=iN(e.author.id);return t&&n(re,{text:we("USER_PROFILE_PRONOUNS")},o=>n("span",{...o,className:W(aN.timestampInline,aN.timestamp)},"\u2022 ",t))}var aN,R7,k7,uN,pN,dN=g(()=>{"use strict";a();l();yr();se();Me();fe();G();T();jf();sN();aN=L("timestampInline"),R7=Co("textAndImages","messageDisplayCompact"),k7=24;uN=k.wrap(({message:e})=>lN(e)?n(cN,{message:e}):null,{noop:!0}),pN=k.wrap(({message:e})=>!R7.useSetting()||!lN(e)?null:n(cN,{message:e}),{noop:!0})});var qf,mN=g(()=>{"use strict";a();l();U();I();M();dN();jf();dr("UserMessagesPronouns","PronounDB");qf=v({name:"UserMessagesPronouns",authors:[d.Tyman,d.TheKodeToad,d.Ven,d.Elvyra],description:"Adds pronouns to chat user messages",settings:na,patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:'="SYSTEM_TAG"',replacement:[{match:/className:\i\(\)\(\i\.className(?:,\i\.clickable)?,\i\)}\),(?=\i)/g,replace:"$&$self.CompactPronounsChatComponentWrapper(arguments[0]),",noWarn:!0},{match:/className:\i\(\)\(\i\.className(?:,\i\.clickable)?,\i\)}\)\),(?=\i)/g,replace:"$&$self.CompactPronounsChatComponentWrapper(arguments[0]),"}]}],PronounsChatComponentWrapper:uN,CompactPronounsChatComponentWrapper:pN})});var fN=g(()=>{});function hN(e){return e.size??=16,n("div",{...e,role:e.onClick!=null?"button":void 0,className:W(Hn("speaker"),e.onClick!=null?Hn("clickable"):void 0,e.className)},n("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 3a1 1 0 0 0-1-1h-.06a1 1 0 0 0-.74.32L5.92 7H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.92l4.28 4.68a1 1 0 0 0 .74.32H11a1 1 0 0 0 1-1V3ZM15.1 20.75c-.58.14-1.1-.33-1.1-.92v-.03c0-.5.37-.92.85-1.05a7 7 0 0 0 0-13.5A1.11 1.11 0 0 1 14 4.2v-.03c0-.6.52-1.06 1.1-.92a9 9 0 0 1 0 17.5Z"}),n("path",{d:"M15.16 16.51c-.57.28-1.16-.2-1.16-.83v-.14c0-.43.28-.8.63-1.02a3 3 0 0 0 0-5.04c-.35-.23-.63-.6-.63-1.02v-.14c0-.63.59-1.1 1.16-.83a5 5 0 0 1 0 9.02Z"})))}function yN(e){return e.size??=16,n("div",{...e,role:e.onClick!=null?"button":void 0,className:W(Hn("speaker"),e.onClick!=null?Hn("clickable"):void 0,e.className)},n("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"currentColor"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4h.5v-.5a2.5 2.5 0 0 1 5 0V4h.5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm4-.5V4h-2v-.5a1 1 0 1 1 2 0Z"}),n("path",{d:"M11 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1h-.06a1 1 0 0 1-.74-.32L5.92 17H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.92l4.28-4.68a1 1 0 0 1 .74-.32H11ZM20.5 12c-.28 0-.5.22-.52.5a7 7 0 0 1-5.13 6.25c-.48.13-.85.55-.85 1.05v.03c0 .6.52 1.06 1.1.92a9 9 0 0 0 6.89-8.25.48.48 0 0 0-.49-.5h-1ZM16.5 12c-.28 0-.5.23-.54.5a3 3 0 0 1-1.33 2.02c-.35.23-.63.6-.63 1.02v.14c0 .63.59 1.1 1.16.83a5 5 0 0 0 2.82-4.01c.02-.28-.2-.5-.48-.5h-1Z"})))}function F7({channel:e,isLocked:t}){let o=Se([Yf],()=>Yf.getVoiceStatesForChannel(e.id)),r=Re(()=>Object.values(o).map(p=>E.getUser(p.userId)).filter(p=>p!=null),[o]),i=e.getGuildId()==null?void 0:pe.getGuild(e.getGuildId()),s=i?.icon==null?void 0:_t.getGuildIconURL({id:i.id,icon:i.icon,size:30}),c=ds(e.type).with(Yg.union(1,3),()=>e.recipients.length>=2&&e.icon==null?n(_7,{recipients:e.recipients,size:"SIZE_32"}):n(B7,{src:E7(e),size:"SIZE_32"})).otherwise(()=>null),u=L7(e);return n(f,null,i!=null&&n("div",{className:Hn("name")},s!=null&&n("img",{className:Hn("guild-icon"),src:s,alt:""}),n(X,{variant:"text-sm/bold"},i.name)),n("div",{className:Hn("name")},c,n(X,{variant:"text-sm/semibold"},u)),n("div",{className:Hn("vc-members")},t?n(yN,{size:18}):n(hN,{size:18}),n(O7,{users:r,renderIcon:!1,max:13,size:18})))}var Hn,D7,L7,E7,Yf,O7,B7,_7,gN,Kf,Zf,vN=g(()=>{"use strict";a();l();Ze();se();fe();G();T();Hn=me("vc-uvs-"),{selectVoiceChannel:D7}=L("selectVoiceChannel","selectChannel"),{useChannelName:L7}=ze("#{intl::GROUP_DM_ALONE}",{useChannelName:F.byCode("()=>null==")}),E7=ve(".getChannelIconURL({"),Yf=be("VoiceStateStore"),O7=le("defaultRenderUser","showDefaultAvatarsForNullUsers"),B7=le(".status)/2):0"),_7=le("frontSrc:","getAvatarURL"),gN=L("actionButton","highlight");Kf={},Zf=k.wrap(({userId:e,isActionButton:t,shouldHighlight:o})=>{let r=Se([Yf],()=>Yf.getVoiceStateForUser(e)?.channelId),i=r==null?void 0:ae.getChannel(r);if(i==null)return null;let s=i.isDM()||i.isMultiUserDM();if(!s&&!Be.can(Ie.VIEW_CHANNEL,i)&&!Vencord.Plugins.isPluginEnabled("ShowHiddenChannels"))return null;let c=!s&&(!Be.can(Ie.VIEW_CHANNEL,i)||!Be.can(Ie.CONNECT,i));function u(p){if(p.preventDefault(),p.stopPropagation(),!(i==null||r==null))if(clearTimeout(Kf[r]),delete Kf[r],p.detail>1){if(!s&&!Be.can(Ie.CONNECT,i)){ut("You cannot join the user's Voice Channel",oe.Type.FAILURE);return}D7(r)}else Kf[r]=setTimeout(()=>{ms.transitionToChannel(r),delete Kf[r]},250)}return n(re,{text:n(F7,{channel:i,isLocked:c}),tooltipClassName:Hn("tooltip-container"),tooltipContentClassName:Hn("tooltip-content")},p=>{let m={...p,className:W(t&&gN.actionButton,o&&gN.highlight),size:t?20:void 0,onClick:u};return c?n(yN,{...m}):n(hN,{...m})})},{noop:!0})});var vc,Qf,bN=g(()=>{"use strict";a();l();fN();bl();Tl();U();I();M();vN();vc=C({showInUserProfileModal:{type:3,description:"Show a user's Voice Channel indicator in their profile next to the name",default:!0,restartNeeded:!0},showInMemberList:{type:3,description:"Show a user's Voice Channel indicator in the member and DMs list",default:!0,restartNeeded:!0},showInMessages:{type:3,description:"Show a user's Voice Channel indicator in messages",default:!0,restartNeeded:!0}}),Qf=v({name:"UserVoiceShow",description:"Shows an indicator when a user is in a Voice Channel",authors:[d.Nuckyz,d.LordElias],dependencies:["MemberListDecoratorsAPI","MessageDecorationsAPI"],settings:vc,patches:[{find:"#{intl::USER_PROFILE_LOAD_ERROR}",replacement:{match:/(\.fetchError.+?\?)null/,replace:(e,t)=>`${t}$self.VoiceChannelIndicator({userId:arguments[0]?.userId})`},predicate:()=>vc.store.showInUserProfileModal},{find:"null!=this.peopleListItemRef.current",replacement:{match:/\.actions,children:\[(?<=isFocused:(\i).+?)/,replace:"$&$self.VoiceChannelIndicator({userId:this?.props?.user?.id,isActionButton:true,shouldHighlight:$1}),"},predicate:()=>vc.store.showInMemberList}],start(){vc.store.showInMemberList&&Ei("UserVoiceShow",({user:e})=>e==null?null:n(Zf,{userId:e.id})),vc.store.showInMessages&&Bi("UserVoiceShow",({message:e})=>e?.author==null?null:n(Zf,{userId:e.author.id}))},stop(){Oi("UserVoiceShow"),_i("UserVoiceShow")},VoiceChannelIndicator:Zf})});var U7,rv,Jf,SN=g(()=>{"use strict";a();l();U();Po();I();M();U7="https://usrbg.is-hardly.online/users",rv=C({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}}),Jf=v({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[d.AutumnVN,d.katlyn,d.pylix,d.TheKodeToad],settings:rv,patches:[{find:'.banner)==null?"COMPLETE"',replacement:{match:/(?<=void 0:)\i.getPreviewBanner\(\i,\i,\i\)/,replace:"$self.patchBannerUrl(arguments[0])||$&"}},{find:'"data-selenium-video-tile":',predicate:()=>rv.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.getVoiceBackgroundStyles($1);"}]}],data:null,settingsAboutComponent:()=>n(ot,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),getVoiceBackgroundStyles({className:e,participantUserId:t}){if(e.includes("tile_")&&this.userHasBackground(t))return{backgroundImage:`url(${this.getImageUrl(t)})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},patchBannerUrl({displayProfile:e}){if(!(e?.banner&&rv.store.nitroFirst)&&this.userHasBackground(e?.userId))return this.getImageUrl(e?.userId)},userHasBackground(e){return!!this.data?.users[e]},getImageUrl(e){if(!this.userHasBackground(e))return null;let{endpoint:t,bucket:o,prefix:r,users:{[e]:i}}=this.data;return`${t}/${o}/${r}${e}?${i}`},async start(){let e=await h(U7);e.ok&&(this.data=await e.json())}})});var iv,sv,$7,Xf,xN=g(()=>{"use strict";a();l();I();M();G();T();iv=new Map,$7=ve(".createFromServer(",".isBlockedForMessage","messageReference:"),Xf=v({name:"ValidReply",description:'Fixes "Message could not be loaded" upon hovering over the reply',authors:[d.newwares],patches:[{find:"#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}",replacement:{match:/#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}\)/,replace:"$&,onMouseEnter:()=>$self.fetchReply(arguments[0])"}},{find:"ReferencedMessageStore",replacement:{match:/constructor\(\)\{\i\(this,"_channelCaches",new Map\)/,replace:"$&;$self.setReplyStore(this);"}}],setReplyStore(e){sv=e},async fetchReply(e){let{channel_id:t,message_id:o}=e.baseMessage.messageReference;iv.has(o)||(iv.set(o,t),Mt.get({url:`/channels/${t}/messages`,query:{limit:1,around:o},retries:2}).then(r=>{let i=r?.body?.[0];i&&(i.id!==o?(sv.set(t,o,{state:2}),z.dispatch({type:"MESSAGE_DELETE",channelId:t,message:o})):(sv.set(i.channel_id,i.id,{state:0,message:$7(i)}),z.dispatch({type:"MESSAGE_UPDATE",message:i})))}).catch(()=>{}).finally(()=>{iv.delete(o)}))}})});async function z7(e){let t=E.getUser(e);if(t)return t;let o=await Mt.get({url:Lt.Endpoints.USER(e)}).then(s=>(z.dispatch({type:"USER_UPDATE",user:s.body}),s.body));await z.dispatch({type:"USER_PROFILE_FETCH_FAILURE",userId:e}),t=E.getUser(e);let r=Object.entries(G7).filter(([s,c])=>!isNaN(c)&&t.hasFlag(c)).map(([s])=>TN[s.toLowerCase()]).filter(rr);(o.premium_type||!o.bot&&(o.banner||o.avatar?.startsWith?.("a_")))&&r.push(TN.premium);let i=Qt.getUserProfile(e);return i.accentColor=o.accent_color,i.badges=r,i.banner=o.banner,i.premiumType=o.premium_type,t}function H7({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,c]=q(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||Vf.has(m))return;if(E.getUser(m))return c(m);let y=()=>{Vf.add(m),wN.unshift(()=>z7(m).then(()=>{c(m),Vf.delete(m)}).catch(b=>{b?.status===429&&(wN.unshift(()=>on(b?.body?.retry_after??1e3).then(y)),Vf.delete(m))}).finally(()=>on(300)))};y()}},u))}var G7,TN,Vf,wN,eg,MN=g(()=>{"use strict";a();l();se();I();vs();fe();Fr();M();T();G7=Lt.UserFlags,TN={active_developer:{id:"active_developer",description:"Active Developer",icon:"6bdc42827a38498929a4920da12695d9",link:"https://support-dev.discord.com/hc/en-us/articles/10113997751447"},bug_hunter_level_1:{id:"bug_hunter_level_1",description:"Discord Bug Hunter",icon:"2717692c7dca7289b35297368a940dd0",link:"https://support.discord.com/hc/en-us/articles/360046057772-Discord-Bugs"},bug_hunter_level_2:{id:"bug_hunter_level_2",description:"Discord Bug Hunter",icon:"848f79194d4be5ff5f81505cbd0ce1e6",link:"https://support.discord.com/hc/en-us/articles/360046057772-Discord-Bugs"},certified_moderator:{id:"certified_moderator",description:"Moderator Programs Alumni",icon:"fee1624003e2fee35cb398e125dc479b",link:"https://discord.com/safety"},discord_employee:{id:"staff",description:"Discord Staff",icon:"5e74e9b61934fc1f67c65515d1f7e60d",link:"https://discord.com/company"},get staff(){return this.discord_employee},hypesquad:{id:"hypesquad",description:"HypeSquad Events",icon:"bf01d1073931f921909045f3a39fd264",link:"https://discord.com/hypesquad"},hypesquad_online_house_1:{id:"hypesquad_house_1",description:"HypeSquad Bravery",icon:"8a88d63823d8a71cd5e390baa45efa02",link:"https://discord.com/settings/hypesquad-online"},hypesquad_online_house_2:{id:"hypesquad_house_2",description:"HypeSquad Brilliance",icon:"011940fd013da3f7fb926e4a1cd2e618",link:"https://discord.com/settings/hypesquad-online"},hypesquad_online_house_3:{id:"hypesquad_house_3",description:"HypeSquad Balance",icon:"3aa41de486fa12454c3761e8e223442e",link:"https://discord.com/settings/hypesquad-online"},partner:{id:"partner",description:"Partnered Server Owner",icon:"3f9748e53446a137a052f3454e2de41e",link:"https://discord.com/partners"},premium:{id:"premium",description:"Subscriber",icon:"2ba85e8026a8614b640c2837bcdfe21b",link:"https://discord.com/settings/premium"},premium_early_supporter:{id:"early_supporter",description:"Early Supporter",icon:"7060786766c9c840eb3019e725d2b358",link:"https://discord.com/settings/premium"},verified_developer:{id:"verified_developer",description:"Early Verified Bot Developer",icon:"6df5892e0f35b051f8b61eace34f4967"}},Vf=new Set,wN=new Mo(5);eg=v({name:"ValidUser",description:"Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",authors:[d.Ven,d.Dolfies],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(k,{noop:!0},n(H7,{key:"mention"+o.userId,RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var av,tg,PN=g(()=>{"use strict";a();l();I();M();T();av={},tg=v({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:'className:"channelMention",children',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=ae.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Ee.getVoiceChannelId()===o){e();return}let r=av[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete av[o]):r.timeout=setTimeout(()=>{delete av[o]},500)}})});function W7(e,t){return e.reduce((o,r)=>{let i=t(r);return o[i]??=[],o[i].push(r),o},{})}function lv({voice:e,voices:t}){let o=t.map(r=>({label:r.name,value:r.voiceURI,default:r.default}));return n(ls,{placeholder:"Select a voice",maxVisibleItems:5,options:o,value:o.find(r=>r.value===e),onChange:r=>mo.store.voice=r,closeOnSelect:!0})}function q7({voice:e,voices:t}){let o=Re(()=>W7(t,p=>p.lang),[t]),r=Re(()=>{let p=[];for(let m in o)try{let y=j7.of(m);y&&p.push({name:m,friendlyName:y})}catch{}return p},[o]),[i,s]=q(()=>og()?.lang??r[0].name);if(r.length===1)return n(lv,{voice:e,voices:o[r[0].name]});let c=o[i],u=r.map(p=>({label:p.friendlyName,value:p.name}));return n(f,null,n(x.FormTitle,null,"Language"),n(ls,{placeholder:"Select a language",options:u,value:u.find(p=>p.value===i),onChange:p=>s(p),maxVisibleItems:5,closeOnSelect:!0}),n(x.FormTitle,null,"Voice"),n(lv,{voice:e,voices:c}))}function K7(){let e=Re(()=>unsafeWindow.speechSynthesis?.getVoices()??[],[]),{voice:t}=mo.use(["voice"]);if(!e.length)return n(x.FormText,null,"No voices found.");let o=e.length>20?q7:lv;return n(o,{voice:t,voices:e})}function IN(){return n(x.FormSection,null,n(x.FormTitle,null,"Voice"),n(K7,null))}var j7,CN=g(()=>{"use strict";a();l();T();cv();j7=new Intl.DisplayNames(["en"],{type:"language"})});function og(e=unsafeWindow.speechSynthesis?.getVoices()){if(!e)return;if(mo.store.voice){let o=e.find(r=>r.voiceURI===mo.store.voice);if(o)return o;new ee("VcNarrator").error(`Voice "${mo.store.voice}" not found. Resetting to default.`)}let t=e.find(o=>o.default);return mo.store.voice=t?.voiceURI,t}var Y7,mo,cv=g(()=>{"use strict";a();l();U();Ne();M();CN();Y7=()=>unsafeWindow.speechSynthesis?.getVoices().find(e=>e.default);mo=C({voice:{type:6,component:IN,get default(){return Y7()?.voiceURI}},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"}})});function rg(e,{volume:t,rate:o}=mo.store){if(!e)return;let r=new SpeechSynthesisUtterance(e),i=og();r.voice=i,r.volume=t,r.rate=o,speechSynthesis.speak(r)}function ng(e){let t=mo.store.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 ig(e,t,o,r,i){return e.replaceAll("{{USER}}",ng(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",ng(o)||"channel").replaceAll("{{DISPLAY_NAME}}",ng(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",ng(i)||(i?"Someone":""))}function Z7({channelId:e,oldChannelId:t},o){if(o&&e!==uv&&(t=uv,uv=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function Q7(e,t){let o=Object.assign({},mo.plain,e),r=E.getCurrentUser(),i=To.getGuildId();rg(ig(o[t+"Message"],r.username,"general",r.globalName??r.username,ke.getNick(i,r.id)??r.username),o)}var NN,uv,sg,AN=g(()=>{"use strict";a();l();Ai();I();Ne();He();Zo();M();G();T();cv();NN=L("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");sg=v({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[d.Ven],reporterTestable:2,settings:mo,flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=To.getGuildId(),o=Ee.getVoiceChannelId(),r=E.getCurrentUser().id;if(ae.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,y]=Z7(i,p);if(!m)continue;let b=mo.store[m+"Message"],S=p&&!mo.store.sayOwnName?"":E.getUser(s).username,N=S&&(E.getUser(s).globalName??S),P=S&&(ke.getNick(t,s)??S),w=ae.getChannel(y).name;rg(ig(b,S,w,N,P))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ee.getVoiceChannelId(),t=NN.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";rg(ig(mo.store[o+"Message"],"",ae.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ee.getVoiceChannelId(),t=NN.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";rg(ig(mo.store[o+"Message"],"",ae.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new ee("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},settingsAboutComponent({tempSettings:e}){let[t,o]=Re(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(c=>c.lang.startsWith("en"))]},[]),r=Re(()=>Object.keys(mo.def).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(Ho,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(Ho,null,s)}return n(x.FormSection,null,n(x.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(x.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(x.FormTitle,{className:H.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(A,{key:s,onClick:()=>Q7(e,s)},zo([s]))))),i)}})});var RN=g(()=>{});function X7(e){let{useQuickCss:t}=Ft(["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:ol}),n(B.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:t,label:"Enable QuickCSS",action:()=>{Q.useQuickCss=!t}}),n(B.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...o)}function V7(e){return n("svg",{viewBox:"0 0 27 27",width:24,height:24,className:"vc-toolbox-icon"},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 eE(){let[e,t]=q(!1);return n(us,{position:"bottom",align:"right",animation:us.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>X7(()=>t(!1))},(o,{isShown:r})=>n(J7,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>V7(r),selected:r}))}function tE({children:e}){return e.splice(e.length-1,0,n(k,{noop:!0},n(eE,null))),n(f,null,e)}var J7,ag,kN=g(()=>{"use strict";a();l();RN();nu();U();se();I();M();G();T();J7=le(".HEADER_BAR_BADGE_TOP:",'.iconBadge,"top"');ag=v({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:k.wrap(tE,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function LN(e,t,o){let r=e.startsWith("/")?"png":pv.store.format,i=new URL(e,unsafeWindow.location.href);i.searchParams.set("size",pv.store.imgSize),i.pathname=i.pathname.replace(/\.(png|jpe?g|webp)$/,`.${r}`),e=i.toString(),i.searchParams.set("size","4096");let s=i.toString();$o({url:e,original:s,width:t,height:o})}var pv,bc,DN,oE,nE,rE,lg,EN=g(()=>{"use strict";a();l();U();It();I();Me();M();T();pv=C({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"}))}}),bc=e=>LN(e,512,512),DN=e=>LN(e,1024);oE=(e,{user:t,guildId:o})=>{if(!t)return;let r=ke.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(B.MenuGroup,null,n(B.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>bc(_t.getUserAvatarURL(t,!0)),icon:fn}),r&&n(B.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>bc(_t.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0})),icon:fn})))},nE=(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:()=>bc(_t.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:fn}):null,i?n(B.MenuItem,{id:"view-banner",label:"View Banner",action:()=>DN(_t.getGuildBannerURL(t,!0)),icon:fn}):null))},rE=(e,{channel:t})=>{t&&e.splice(-1,0,n(B.MenuGroup,null,n(B.MenuItem,{id:"view-group-channel-icon",label:"View Icon",action:()=>bc(_t.getChannelIconURL(t)),icon:fn})))},lg=v({name:"ViewIcons",authors:[d.Ven,d.TheKodeToad,d.Nuckyz,d.nyx],description:"Makes avatars and banners in user profiles clickable, adds View Icon/Banner entries in the user, server and group channel context menu.",tags:["ImageUtilities"],dependencies:["DynamicImageModalAPI"],settings:pv,openAvatar:bc,openBanner:DN,contextMenus:{"user-context":oE,"guild-context":nE,"gdm-context":rE},patches:[{find:".overlay:void 0,status:",replacement:[{match:/avatarSrc:(\i),eventHandlers:(\i).+?"div",{...\2,/,replace:'$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},',noWarn:!0},{match:/avatarSrc:(\i),eventHandlers:(\i).+?"div",.{0,100}className:\i,/,replace:'$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},'}],all:!0},{find:'backgroundColor:"COMPLETE"',replacement:{match:/(\.banner,.+?),style:{(?=.+?backgroundImage:null!=(\i)\?"url\("\.concat\(\2,)/,replace:(e,t,o)=>`${t},onClick:()=>${o}!=null&&$self.openBanner(${o}),style:{cursor:${o}!=null?"pointer":void 0,`}},{find:'["aria-hidden"],"aria-label":',replacement:{match:/null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,replace:(e,t)=>`${e},onClick:()=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${t})`}},{find:".cursorPointer:null,children",replacement:{match:/(?=,src:(\i.getAvatarURL\(.+?[)]))/,replace:(e,t)=>`,onClick:()=>$self.openAvatar(${t})`}},{find:'experimentLocation:"empty_messages"',replacement:{match:/(?<=SIZE_80,)(?=src:(.+?\))[,}])/,replace:(e,t)=>`onClick:()=>$self.openAvatar(${t}),`}}]})});function iE(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function sE(e){let t=iE(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,delete o.firstEditTimestamp,o.attachments?.forEach(r=>delete r.deleted),t}function mv(e,t,o){let r=Ce(i=>n(k,null,n(Ae,{...i,size:"large"},n(Ue,null,n(X,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(pt,{onClick:()=>tr(r)})),n(De,null,n("div",{style:{padding:"16px 0"}},!!o&&n(f,null,n(x.FormTitle,{tag:"h5"},"Content"),n(qa,{content:o,lang:""}),n(x.FormDivider,{className:H.bottom20})),n(x.FormTitle,{tag:"h5"},t," Data"),n(qa,{content:e,lang:"json"}))),n(bt,null,n(he,{cellSpacing:10},n(A,{onClick:()=>Yt(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(A,{onClick:()=>Yt(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function ON(e){e=sE(e);let t=JSON.stringify(e,null,4);return mv(t,"Message",e.content)}function ra(e){return(t,o)=>{let r=o[e.toLowerCase()];if(!r||o.label===we("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:()=>mv(JSON.stringify(r,null,4),e),icon:dv}))}}var dv,cg,aE,ug,BN=g(()=>{"use strict";a();l();U();Vc();se();Wt();I();Me();He();fe();Ye();M();T();dv=()=>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"}));cg=C({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"}]}});aE=(e,{id:t})=>{let o=or();if(!o)return;let r=pe.getRole(o.id,t);r&&e.push(n(B.MenuItem,{id:"vc-view-role-raw",label:"View Raw",action:()=>mv(JSON.stringify(r,null,4),"Role"),icon:dv}))},ug=v({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],settings:cg,contextMenus:{"guild-context":ra("Guild"),"guild-settings-role-context":ra("Role"),"channel-context":ra("Channel"),"thread-context":ra("Channel"),"gdm-context":ra("Channel"),"user-context":ra("User"),"dev-context":aE},renderMessagePopoverButton(e){let t=()=>{cg.store.clickMethod==="Right"?Yt(e.content):ON(e)},o=i=>{cg.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Yt(e.content)):(i.preventDefault(),i.stopPropagation(),ON(e))};return{label:cg.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:dv,message:e,channel:ae.getChannel(e.channel_id),onClick:t,onContextMenu:o}}})});var _N=g(()=>{});var pg,FN=g(()=>{"use strict";a();l();_N();I();M();pg=v({name:"VoiceDownload",description:"Adds a download to voice messages. (Opens a new browser tab)",authors:[d.puv],patches:[{find:"rippleContainer,children",replacement:{match:/\(0,\i\.jsx\).{0,150},children:.{0,50}\("source",{src:(\i)}\)}\)/,replace:"[$&, $self.renderDownload($1)]"}}],renderDownload(e){return n("a",{className:"vc-voice-download",href:e,onClick:t=>t.stopPropagation(),"aria-label":"Download voice message",download:"voice-message.ogg"},n(this.Icon,null))},Icon:()=>n("svg",{height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z"}))})});var UN=g(()=>{});var ia,dg=g(()=>{"use strict";a();l();U();M();ia=C({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var fv,si,Sc=g(()=>{"use strict";a();l();Ze();G();fv=be("MediaEngineStore"),si=me("vc-vmsg-")});var D3e,$N=g(()=>{"use strict";a();l();T();dg();Sc();D3e=VencordNative.pluginHelpers.VoiceMessages});var lE,GN,zN=g(()=>{"use strict";a();l();wt();G();Sc();lE=le("waveform:","onVolumeChange"),GN=({src:e,waveform:t,recording:o})=>{let r=Pa({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(lE,{key:e,src:e,waveform:t}):n("div",{className:si("preview",o?"preview-recording":[])},n("div",{className:si("preview-indicator")}),n("div",{className:si("preview-time")},s),n("div",{className:si("preview-label")},o?"RECORDING":"----"))}});var HN,WN=g(()=>{"use strict";a();l();T();dg();Sc();HN=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=q(!1),[i,s]=q(!1),[c,u]=q(),[p,m]=q([]),y=S=>{r(S),t?.(S)};function b(){!o?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:ia.store.echoCancellation,noiseSuppression:ia.store.noiseSuppression,deviceId:fv.getInputDeviceId()}}).then(N=>{let P=[];m(P);let w=new MediaRecorder(N);u(w),w.addEventListener("dataavailable",R=>{P.push(R.data)}),w.start(),y(!0)}):c&&(c.addEventListener("stop",()=>{e(new Blob(p,{type:"audio/ogg; codecs=opus"})),y(!1)}),c.stop())}return n(f,null,n(A,{onClick:b},o?"Stop":"Start"," recording"),n(A,{disabled:!o,onClick:()=>{s(!i),i?c?.resume():c?.pause()}},i?"Resume":"Pause"," recording"))}});function mE(e,t){let o=Ee.getChannelId(),r=uE.getPendingReply(o);r&&z.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new cE({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{Mt.post({url:Lt.Endpoints.MESSAGES(o),body:{flags:8192,channel_id:o,content:"",nonce:wo.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?_o.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>ut("Failed to upload voice message",oe.Type.FAILURE)),i.upload()}function fE(){let[e,t]=q();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function gE({modalProps:e}){let[t,o]=q(!1),[r,i]=q(),[s,c]=fE();ue(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[u]=kt(async()=>{if(!r)return jN;let y=await new AudioContext().decodeAudioData(await r.arrayBuffer()),b=y.getChannelData(0),S=new Uint8Array(Si.clamp(Math.floor(y.duration*10),Math.min(32,b.length),256)),N=Math.floor(b.length/S.length);for(let R=0;R{i(m),c(m)},onRecordingChange:o}),n(A,{onClick:async()=>{let m=await cu("audio/*");m&&(i(m),c(m))}},"Upload File")),n(x.FormTitle,null,"Preview"),n(GN,{src:s,waveform:u.waveform,recording:t}),p&&n(oo,{className:`vc-plugins-restart-card ${H.top16}`},n(x.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(x.FormText,{className:H.top8},"To fix it, first convert it to OggOpus, for example using the ",n(ot,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),n(bt,null,n(A,{disabled:!r,onClick:()=>{mE(r,u),e.onClose(),ut("Now sending voice message... Please be patient",oe.Type.MESSAGE)}},"Send")))}var cE,uE,gv,pE,dE,mg,jN,qN=g(()=>{"use strict";a();l();UN();It();Po();I();He();Ye();wt();M();uu();G();T();$N();dg();Sc();zN();WN();cE=Tt(e=>e.prototype?.trackUploadFinished),uE=be("PendingReplyStore"),gv=L("optionName","optionIcon","optionLabel"),pE=HN,dE=(e,t)=>{t.channel.guild_id&&!(Be.can(Ie.SEND_VOICE_MESSAGES,t.channel)&&Be.can(Ie.SEND_MESSAGES,t.channel))||e.push(n(B.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:gv.optionLabel},n(dh,{className:gv.optionIcon,height:24,width:24}),n("div",{className:gv.optionName},"Send voice message")),action:()=>Ce(o=>n(gE,{modalProps:o}))}))},mg=v({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:ia,contextMenus:{"channel-attach":dE}}),jN={waveform:"AAAAAAAAAAAA",duration:1}});var hE,fg,KN=g(()=>{"use strict";a();l();U();Gr();I();M();hE=C({multiplier:{description:"Volume Multiplier",type:5,markers:co(1,5,1),default:2,stickToMarkers:!0}}),fg=v({name:"VolumeBooster",authors:[d.Nuckyz,d.sadan],description:"Allows you to set the user and stream volume above the default maximum",settings:hE,patches:[...["#{intl::USER_VOLUME}","currentVolume:"].map(e=>({find:e,replacement:{match:/(?<=maxValue:)\i\.\i\?(\d+?):(\d+?)(?=,)/,replace:(t,o,r)=>`${o}*$self.settings.store.multiplier`}})),{find:"streamSourceNode",predicate:()=>!0,group:!0,replacement:[{match:/Math\.max.{0,30}\)\)/,replace:"arguments[0]"},{match:/\}return"video"/,replace:"this.updateAudioElement();$&"},{match:/\.volume=this\._volume\/100;/,replace:".volume=0.00;$self.patchVolume(this);"}]},{find:"AudioContextSettingsMigrated",replacement:[{match:/(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localMutes\).+?volume:).+?(?=,)/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localVolumes\).+?volume:).+?(?=})/,replace:"$&>200?200:$&"}]},{find:'="MediaEngineStore",',replacement:[{match:/(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,replace:(e,t,o,r,i)=>t+`(${o}>200?void 0:${o}=${r})`+i+`${o}??${r})`}]}],patchVolume(e){if(e.stream.getAudioTracks().length!==0){if(e.streamSourceNode??=e.audioContext.createMediaStreamSource(e.stream),!e.gainNode){let t=e.gainNode=e.audioContext.createGain();e.streamSourceNode.connect(t),t.connect(e.audioContext.destination)}e.sinkId!=null&&e.sinkId!==e.audioContext.sinkId&&"setSinkId"in AudioContext.prototype&&e.audioContext.setSinkId(e.sinkId==="default"?"":e.sinkId),e.gainNode.gain.value=e._mute?0:e._volume/100}}})});async function yE(e){let t=await h(e);if(t.status===200)return await t.blob()}function ZN(e){let t=new URL(e);return t.host===YN?e:(t.searchParams.delete("width"),t.searchParams.delete("height"),t.origin===vE?(t.host=YN,t.searchParams.delete("size"),t.searchParams.delete("quality"),t.searchParams.delete("format")):t.searchParams.set("quality","lossless"),t.toString())}var gg,QN,sa,vE,YN,hg,JN=g(()=>{"use strict";a();l();U();I();M();uu();G();T();gg=ze('.tagName)==="TEXTAREA"||',{contextMenuCallbackWeb:F.byCode('.tagName)==="INPUT"||'),contextMenuCallbackNative:F.byCode('.tagName)==="TEXTAREA"||')});QN=C({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0,hidden:!1}}),sa=()=>QN.store.addBack,vE="https://media.discordapp.net",YN="cdn.discordapp.com";hg=v({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:QN,start(){sa()&&(unsafeWindow.removeEventListener("contextmenu",gg.contextMenuCallbackWeb),unsafeWindow.addEventListener("contextmenu",gg.contextMenuCallbackNative),this.changedListeners=!0)},stop(){this.changedListeners&&(unsafeWindow.removeEventListener("contextmenu",gg.contextMenuCallbackNative),unsafeWindow.addEventListener("contextmenu",gg.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:/(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=#{intl::SAVE_IMAGE_MENU_ITEM}\),)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',all:!0,predicate:sa,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:sa,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:sa,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/,replace:"||true)"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:sa,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:sa,replacement:{match:/let\{text:\i=""/,replace:"return [null,null];$&"}},{find:'"MediaEngineWebRTC");',replacement:{match:/supports\(\i\)\{switch\(\i\)\{(case (\i).\i)/,replace:"$&.DISABLE_VIDEO:return true;$1"}},{find:"#{intl::SEARCH_WITH_GOOGLE}",replacement:{match:/\i\.isPlatformEmbedded/,replace:"true"}},{find:"#{intl::COPY}),hint:",replacement:[{match:/\i\.isPlatformEmbedded/,replace:"true"},{match:/\i\.\i\.copy(?=\(\i)/,replace:"Vencord.Webpack.Common.Clipboard.copy"}],all:!0,noWarn:!0},{find:'("interactionUsernameProfile',replacement:{match:/\i\.isPlatformEmbedded(?=.{0,50}\.tagName)/,replace:"true"}}],async copyImage(e){e=ZN(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=ZN(e);let t=await yE(e);if(!t)return;let o=new URL(e).pathname.split("/").pop(),r=new File([t],o,{type:t.type});lu(r)},copy(){let e=document.getSelection();e&&eo.copy(e.toString())},cut(){this.copy(),ko.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 hv,yg,XN=g(()=>{"use strict";a();l();I();M();G();T();hv=L("JUMP_TO_GUILD","SERVER_NEXT"),yg=v({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/Legcord, 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":return;case"Tab":return;case",":e.preventDefault(),fs.open("My Account");break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),hv.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}})});var vg,VN=g(()=>{"use strict";a();l();I();M();vg=v({name:"WebScreenShareFixes",authors:[d.Kaitlyn],description:"Removes 2500kbps bitrate cap on chromium and vesktop clients.",enabledByDefault:!0,patches:[{find:"x-google-max-bitrate",replacement:[{match:/"x-google-max-bitrate=".concat\(\i\)/,replace:'"x-google-max-bitrate=".concat("80_000")'},{match:/;level-asymmetry-allowed=1/,replace:";b=AS:800000;level-asymmetry-allowed=1"}]}]})});function TE(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return Mt.get({url:Lt.Endpoints.REACTIONS(e.channel_id,e.id,r),query:{limit:100,type:o},oldFormErrors:!0}).then(i=>{for(let s of i.body)z.dispatch({type:"USER_UPDATE",user:s});z.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})}).catch(console.error).finally(()=>on(250))}function wE(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=t5[r]??={fetched:!1,users:{}};return i.fetched||(xE.unshift(()=>TE(e,t,o)),i.fetched=!0),i.users}function ME(e){return function(o,r){return n(re,{text:e.slice(4).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:SE.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-4))}}function e5(e){e.stopPropagation()}var bE,SE,yv,xE,t5,bg,o5=g(()=>{"use strict";a();l();se();I();fe();Fr();wt();M();G();T();bE=le("defaultRenderUser","showDefaultAvatarsForNullUsers"),SE=L("moreUsers","emptyUser","avatarContainer","clickableAvatar"),yv=null,xE=new Mo;bg=v({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:/function (\i)\(\){(\i)={}(?=.*CONNECTION_OPEN:\1)/,replace:"$&;$self.reactions=$2;"}},{find:"cleanAutomaticAnchor(){",replacement:{match:/constructor\(\i\)\{(?=.{0,100}automaticAnchor)/,replace:"$&$self.setScrollObj(this);"}}],setScrollObj(e){yv=e},renderUsers(e){return e.message.reactions.length>10?null:n(k,{noop:!0},n(this.UsersComponent,{...e}))},UsersComponent({message:e,emoji:t,type:o}){let r=Jn();yi(()=>{yv?.scrollCounter>0&&yv.setAutomaticAnchor(null)}),ue(()=>{let c=u=>{u.messageId===e.id&&r()};return z.subscribe("MESSAGE_REACTION_ADD_USERS",c),()=>z.unsubscribe("MESSAGE_REACTION_ADD_USERS",c)},[e.id,r]);let i=wE(e,t,o),s=Object.values(i).filter(Boolean);return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:e5,onKeyPress:e5},n(bE,{users:s,guildId:ae.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:ME(s)})))},set reactions(e){t5=e}})});async function vv(){return Ar&&Ar.close(),Ar=new WebSocket(`ws://127.0.0.1:${Jt.store.webSocketPort??42070}/?client=Vencord`),new Promise((e,t)=>{Ar.onopen=e,Ar.onerror=t,setTimeout(t,3e3)})}function IE(e){return e.type===Sg.DM&&Jt.store.dmNotifications||e.type===Sg.GROUP_DM&&Jt.store.groupDmNotifications?!1:!Jt.store.serverNotifications}function CE(e,t,o){h(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(r=>r.blob()).then(r=>new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result.split(",")[1]),s.readAsDataURL(r)})).then(r=>{let i={type:1,timeout:Jt.store.lengthBasedTimeout?s5(t):Jt.store.timeout,height:i5(t),opacity:Jt.store.opacity,volume:Jt.store.volume,audioPath:Jt.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};r5(i)})}function n5(e,t){let o={type:1,timeout:Jt.store.lengthBasedTimeout?s5(e):Jt.store.timeout,height:i5(e),opacity:Jt.store.opacity,volume:Jt.store.volume,audioPath:Jt.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:"default",sourceApp:"Vencord"};r5(o)}async function r5(e){let t={sender:"Vencord",target:"xsoverlay",command:"SendNotification",jsonData:JSON.stringify(e),rawData:null};Ar.readyState!==Ar.OPEN&&await vv(),Ar.send(JSON.stringify(t))}function NE(e,t){let o=E.getCurrentUser();return e.author.id===o.id||e.author.bot&&!Jt.store.botNotifications?!1:PE(e,t)}function i5(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function s5(e){return e.length<=100?3:e.length<=200?4:e.length<=300?5:6}var Sg,PE,cke,Jt,Ar,uke,xg,a5=g(()=>{"use strict";a();l();U();Gr();I();Ne();M();G();T();Sg=Tt(e=>e.ANNOUNCEMENT_THREAD===10),PE=ve(".SUPPRESS_NOTIFICATIONS))return!1"),cke=new ee("XSOverlay"),Jt=C({webSocketPort:{type:1,description:"Websocket port",default:42070,async onChange(){await vv()}},preferUDP:{type:3,description:"Enable if you use an older build of XSOverlay unable to connect through websockets. This setting is ignored on web.",default:!1,disabled:()=>!0},botNotifications:{type:3,description:"Allow bot notifications",default:!1},serverNotifications:{type:3,description:"Allow server notifications",default:!0},dmNotifications:{type:3,description:"Allow Direct Message notifications",default:!0},groupDmNotifications:{type:3,description:"Allow Group DM notifications",default:!0},callNotifications:{type:3,description:"Allow call notifications",default:!0},pingColor:{type:0,description:"User mention color",default:"#7289da"},channelPingColor:{type:0,description:"Channel mention color",default:"#8a2be2"},soundPath:{type:0,description:"Notification sound (default/warning/error)",default:"default"},timeout:{type:1,description:"Notification duration (secs)",default:3},lengthBasedTimeout:{type:3,description:"Extend duration with message length",default:!0},opacity:{type:5,description:"Notif opacity",default:1,markers:co(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:co(0,1,.1)}});uke=VencordNative.pluginHelpers.XSOverlay,xg=v({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[d.Nyako],tags:["vr","notify"],reporterTestable:2,settings:Jt,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(E.getCurrentUser().id)&&Jt.store.callNotifications){let t=ae.getChannel(e.channel_id);n5("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){if(t)return;let o=ae.getChannel(e.channel_id);if(!NE(e,e.channel_id))return;let r=Jt.store.pingColor.replaceAll("#","").trim(),i=Jt.store.channelPingColor.replaceAll("#","").trim(),s=e.content,c="";if(o.guild_id){let y=pe.getGuild(o.guild_id);c=`${e.author.username} (${y.name}, #${o.name})`}switch(o.type){case Sg.DM:c=e.author.username.trim();break;case Sg.GROUP_DM:let y=o.name.trim()??o.rawRecipients.map(b=>b.username).join(", ");c=`${e.author.username} (${y})`;break}if(e.referenced_message&&(c+=" (reply)"),e.embeds.length>0&&(s+=" [embed] ",e.content===""&&(s="sent message embed(s)")),e.sticker_items&&(s+=" [sticker] ",e.content===""&&(s="sent a sticker")),e.attachments.filter(y=>typeof y?.content_type=="string"&&y?.content_type.startsWith("image")).forEach(y=>{s+=` [image: ${y.filename}] `}),e.attachments.filter(y=>y&&!y.content_type?.startsWith("image")).forEach(y=>{s+=` [attachment: ${y.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(y,b)=>`@${E.getUser(b)?.username||"unknown-user"}`)),e.mention_roles.length>0)for(let y of e.mention_roles){let b=pe.getRole(o.guild_id,y);if(!b)continue;let S=b.colorString??`#${r}`;s=s.replace(`<@&${y}>`,`@${b.name}`)}let p=s.match(new RegExp("()","g")),m=s.match(new RegExp("<(#\\d+)>","g"));if(p)for(let y of p)s=s.replace(new RegExp(`${y}`,"g"),`:${y.split(":")[1]}:`);if(m)for(let y of m){let b=y.split("<#")[1];b=b.substring(0,b.length-1),s=s.replace(new RegExp(`${y}`,"g"),`#${ae.getChannel(b).name}`)}IE(o)||CE(c,s,e)}},start:vv,stop(){Ar.close()},settingsAboutComponent:()=>n(f,null,n(A,{onClick:()=>n5("This is a test notification! explode","Hello from Vendor!")},"Send test notification"))})});var We,As,$S,On=g(()=>{a();l();$1();zS();HS();WS();jS();YS();QS();JS();e2();t2();o2();n2();r2();i2();s2();l2();W1();k2();D2();L2();E2();O2();B2();U2();G2();Z1();K2();Y2();Z2();X2();V2();bx();xx();Tx();Cx();Ax();Rx();Ex();$x();Gx();zx();jx();Kx();Zx();Qx();Xx();Vx();sT();aT();cT();ET();OT();BT();$T();HT();WT();pw();bw();Sw();ww();Mw();Pw();Iw();Cw();Rw();Dw();Lw();Fw();Uw();Hw();Kw();Yw();Xw();Vw();Uy();sM();lM();cM();dM();gM();Ky();TM();IM();NM();LM();t0();jM();qM();KM();YM();JM();tP();nP();rP();iP();sP();aP();cP();uP();pP();dP();mP();fP();gP();hP();yP();vP();bP();SP();xP();TP();wP();CP();NP();AP();Xl();UP();zP();Em();uI();yI();SI();xI();NI();AI();kI();WI();jI();YI();ZI();XI();M4();P4();C4();A4();L4();$4();z4();H4();Y4();G0();eC();oC();sC();aC();lC();dC();xC();TC();wC();IC();CC();AC();RC();FC();UC();QC();tN();ov();oN();nN();rN();mN();bN();SN();xN();MN();PN();AN();kN();EN();BN();FN();qN();KN();JN();XN();VN();o5();a5();We={[ks.name]:ks,[Du.name]:Du,[Lu.name]:Lu,[Eu.name]:Eu,[Ou.name]:Ou,[Bu.name]:Bu,[_u.name]:_u,[Fu.name]:Fu,[Uu.name]:Uu,[$u.name]:$u,[Gu.name]:Gu,[zu.name]:zu,[Hu.name]:Hu,[Wu.name]:Wu,[ju.name]:ju,[qu.name]:qu,[Ds.name]:Ds,[Qu.name]:Qu,[Xu.name]:Xu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[op.name]:op,[np.name]:np,[rp.name]:rp,[ip.name]:ip,[sp.name]:sp,[ap.name]:ap,[lp.name]:lp,[cp.name]:cp,[up.name]:up,[pp.name]:pp,[mp.name]:mp,[fp.name]:fp,[gp.name]:gp,[hp.name]:hp,[yp.name]:yp,[vp.name]:vp,[Tp.name]:Tp,[wp.name]:wp,[Mp.name]:Mp,[Ip.name]:Ip,[Cp.name]:Cp,[Np.name]:Np,[Ap.name]:Ap,[Rp.name]:Rp,[kp.name]:kp,[Lp.name]:Lp,[Ep.name]:Ep,[Bp.name]:Bp,[jp.name]:jp,[qp.name]:qp,[Kp.name]:Kp,[Zp.name]:Zp,[Jp.name]:Jp,[Xp.name]:Xp,[sd.name]:sd,[ad.name]:ad,[ld.name]:ld,[cd.name]:cd,[ud.name]:ud,[pd.name]:pd,[dd.name]:dd,[md.name]:md,[fd.name]:fd,[gd.name]:gd,[hd.name]:hd,[yd.name]:yd,[vd.name]:vd,[Sd.name]:Sd,[xd.name]:xd,[Td.name]:Td,[wd.name]:wd,[Md.name]:Md,[Pd.name]:Pd,[Id.name]:Id,[Cd.name]:Cd,[Ad.name]:Ad,[kd.name]:kd,[Dd.name]:Dd,[Od.name]:Od,[Bd.name]:Bd,[_d.name]:_d,[Fd.name]:Fd,[$d.name]:$d,[zd.name]:zd,[Wd.name]:Wd,[jd.name]:jd,[qd.name]:qd,[Kd.name]:Kd,[Zd.name]:Zd,[Qd.name]:Qd,[Xd.name]:Xd,[Vd.name]:Vd,[em.name]:em,[tm.name]:tm,[om.name]:om,[nm.name]:nm,[rm.name]:rm,[im.name]:im,[sm.name]:sm,[lm.name]:lm,[cm.name]:cm,[um.name]:um,[pm.name]:pm,[dm.name]:dm,[mm.name]:mm,[fm.name]:fm,[gm.name]:gm,[hm.name]:hm,[vm.name]:vm,[bm.name]:bm,[Sm.name]:Sm,[xm.name]:xm,[Tm.name]:Tm,[Nm.name]:Nm,[Rm.name]:Rm,[km.name]:km,[Bm.name]:Bm,[_m.name]:_m,[Um.name]:Um,[$m.name]:$m,[Gm.name]:Gm,[Wm.name]:Wm,[jm.name]:jm,[Ym.name]:Ym,[Xm.name]:Xm,[Vm.name]:Vm,[ef.name]:ef,[tf.name]:tf,[nf.name]:nf,[df.name]:df,[mf.name]:mf,[ff.name]:ff,[gf.name]:gf,[hf.name]:hf,[yf.name]:yf,[vf.name]:vf,[bf.name]:bf,[xf.name]:xf,[Tf.name]:Tf,[wf.name]:wf,[Mf.name]:Mf,[Pf.name]:Pf,[If.name]:If,[Cf.name]:Cf,[Nf.name]:Nf,[Af.name]:Af,[Rf.name]:Rf,[kf.name]:kf,[Df.name]:Df,[Lf.name]:Lf,[Ef.name]:Ef,[Of.name]:Of,[Bf.name]:Bf,[_f.name]:_f,[Ff.name]:Ff,[Gf.name]:Gf,[$f.name]:$f,[zf.name]:zf,[Hf.name]:Hf,[Wf.name]:Wf,[qf.name]:qf,[Qf.name]:Qf,[Jf.name]:Jf,[Xf.name]:Xf,[eg.name]:eg,[tg.name]:tg,[sg.name]:sg,[ag.name]:ag,[lg.name]:lg,[ug.name]:ug,[pg.name]:pg,[mg.name]:mg,[fg.name]:fg,[hg.name]:hg,[yg.name]:yg,[vg.name]:vg,[bg.name]:bg,[xg.name]:xg},As={[ks.name]:{folderName:"_api/badges",userPlugin:!1},[Du.name]:{folderName:"_api/chatButtons.ts",userPlugin:!1},[Lu.name]:{folderName:"_api/commands.ts",userPlugin:!1},[Eu.name]:{folderName:"_api/contextMenu.ts",userPlugin:!1},[Ou.name]:{folderName:"_api/dynamicImageModalApi.ts",userPlugin:!1},[Bu.name]:{folderName:"_api/memberListDecorators",userPlugin:!1},[_u.name]:{folderName:"_api/menuItemDemangler.ts",userPlugin:!1},[Fu.name]:{folderName:"_api/messageAccessories.ts",userPlugin:!1},[Uu.name]:{folderName:"_api/messageDecorations",userPlugin:!1},[$u.name]:{folderName:"_api/messageEvents.ts",userPlugin:!1},[Gu.name]:{folderName:"_api/messagePopover.ts",userPlugin:!1},[zu.name]:{folderName:"_api/messageUpdater.ts",userPlugin:!1},[Hu.name]:{folderName:"_api/notices.ts",userPlugin:!1},[Wu.name]:{folderName:"_api/serverList.ts",userPlugin:!1},[ju.name]:{folderName:"_api/userSettings.ts",userPlugin:!1},[qu.name]:{folderName:"_core/noTrack.ts",userPlugin:!1},[Ds.name]:{folderName:"_core/settings.tsx",userPlugin:!1},[Qu.name]:{folderName:"_core/supportHelper.tsx",userPlugin:!1},[Xu.name]:{folderName:"accountPanelServerProfile",userPlugin:!1},[Vu.name]:{folderName:"alwaysAnimate",userPlugin:!1},[ep.name]:{folderName:"alwaysExpandRoles",userPlugin:!1},[tp.name]:{folderName:"alwaysTrust",userPlugin:!1},[op.name]:{folderName:"anonymiseFileNames",userPlugin:!1},[np.name]:{folderName:"arRPC.web",userPlugin:!1},[rp.name]:{folderName:"banger",userPlugin:!1},[ip.name]:{folderName:"betterFolders",userPlugin:!1},[sp.name]:{folderName:"betterGifAltText",userPlugin:!1},[ap.name]:{folderName:"betterGifPicker",userPlugin:!1},[lp.name]:{folderName:"betterNotes",userPlugin:!1},[cp.name]:{folderName:"betterRoleContext",userPlugin:!1},[up.name]:{folderName:"betterRoleDot",userPlugin:!1},[pp.name]:{folderName:"betterSessions",userPlugin:!1},[mp.name]:{folderName:"betterSettings",userPlugin:!1},[fp.name]:{folderName:"betterUploadButton",userPlugin:!1},[gp.name]:{folderName:"biggerStreamPreview",userPlugin:!1},[hp.name]:{folderName:"blurNsfw",userPlugin:!1},[yp.name]:{folderName:"callTimer",userPlugin:!1},[vp.name]:{folderName:"clearURLs",userPlugin:!1},[Tp.name]:{folderName:"clientTheme",userPlugin:!1},[wp.name]:{folderName:"colorSighted",userPlugin:!1},[Mp.name]:{folderName:"consoleJanitor",userPlugin:!1},[Ip.name]:{folderName:"consoleShortcuts",userPlugin:!1},[Cp.name]:{folderName:"copyEmojiMarkdown",userPlugin:!1},[Np.name]:{folderName:"copyFileContents",userPlugin:!1},[Ap.name]:{folderName:"copyUserURLs",userPlugin:!1},[Rp.name]:{folderName:"crashHandler",userPlugin:!1},[kp.name]:{folderName:"ctrlEnterSend",userPlugin:!1},[Lp.name]:{folderName:"customRPC",userPlugin:!1},[Ep.name]:{folderName:"customidle",userPlugin:!1},[Bp.name]:{folderName:"dearrow",userPlugin:!1},[jp.name]:{folderName:"decor",userPlugin:!1},[qp.name]:{folderName:"disableCallIdle",userPlugin:!1},[Kp.name]:{folderName:"dontRoundMyTimestamps",userPlugin:!1},[Zp.name]:{folderName:"emoteCloner",userPlugin:!1},[Jp.name]:{folderName:"experiments",userPlugin:!1},[Xp.name]:{folderName:"f8break",userPlugin:!1},[sd.name]:{folderName:"fakeNitro",userPlugin:!1},[ad.name]:{folderName:"fakeProfileThemes",userPlugin:!1},[ld.name]:{folderName:"favEmojiFirst",userPlugin:!1},[cd.name]:{folderName:"favGifSearch",userPlugin:!1},[ud.name]:{folderName:"fixCodeblockGap",userPlugin:!1},[pd.name]:{folderName:"fixImagesQuality",userPlugin:!1},[dd.name]:{folderName:"forceOwnerCrown",userPlugin:!1},[md.name]:{folderName:"friendInvites",userPlugin:!1},[fd.name]:{folderName:"friendsSince",userPlugin:!1},[gd.name]:{folderName:"fullSearchContext",userPlugin:!1},[hd.name]:{folderName:"fullUserInChatbox",userPlugin:!1},[yd.name]:{folderName:"gameActivityToggle",userPlugin:!1},[vd.name]:{folderName:"gifPaste",userPlugin:!1},[Sd.name]:{folderName:"greetStickerPicker",userPlugin:!1},[xd.name]:{folderName:"hideAttachments",userPlugin:!1},[Td.name]:{folderName:"iLoveSpam",userPlugin:!1},[wd.name]:{folderName:"ignoreActivities",userPlugin:!1},[Md.name]:{folderName:"imageLink",userPlugin:!1},[Pd.name]:{folderName:"imageZoom",userPlugin:!1},[Id.name]:{folderName:"implicitRelationships",userPlugin:!1},[Cd.name]:{folderName:"ircColors",userPlugin:!1},[Ad.name]:{folderName:"keepCurrentChannel",userPlugin:!1},[kd.name]:{folderName:"lastfm",userPlugin:!1},[Dd.name]:{folderName:"loadingQuotes",userPlugin:!1},[Od.name]:{folderName:"memberCount",userPlugin:!1},[Bd.name]:{folderName:"mentionAvatars",userPlugin:!1},[_d.name]:{folderName:"messageClickActions",userPlugin:!1},[Fd.name]:{folderName:"messageLatency",userPlugin:!1},[$d.name]:{folderName:"messageLinkEmbeds",userPlugin:!1},[zd.name]:{folderName:"messageLogger",userPlugin:!1},[Wd.name]:{folderName:"messageTags",userPlugin:!1},[jd.name]:{folderName:"moreCommands",userPlugin:!1},[qd.name]:{folderName:"moreKaomoji",userPlugin:!1},[Kd.name]:{folderName:"moyai",userPlugin:!1},[Zd.name]:{folderName:"mutualGroupDMs",userPlugin:!1},[Qd.name]:{folderName:"newGuildSettings",userPlugin:!1},[Xd.name]:{folderName:"noBlockedMessages",userPlugin:!1},[Vd.name]:{folderName:"noDeepLinks.web",userPlugin:!1},[em.name]:{folderName:"noDevtoolsWarning",userPlugin:!1},[tm.name]:{folderName:"noF1",userPlugin:!1},[om.name]:{folderName:"noMaskedUrlPaste",userPlugin:!1},[nm.name]:{folderName:"noMosaic",userPlugin:!1},[rm.name]:{folderName:"noOnboardingDelay",userPlugin:!1},[im.name]:{folderName:"noPendingCount",userPlugin:!1},[sm.name]:{folderName:"noProfileThemes",userPlugin:!1},[lm.name]:{folderName:"noReplyMention",userPlugin:!1},[cm.name]:{folderName:"noServerEmojis",userPlugin:!1},[um.name]:{folderName:"noTypingAnimation",userPlugin:!1},[pm.name]:{folderName:"noUnblockToJump",userPlugin:!1},[dm.name]:{folderName:"normalizeMessageLinks",userPlugin:!1},[mm.name]:{folderName:"notificationVolume",userPlugin:!1},[fm.name]:{folderName:"nsfwGateBypass",userPlugin:!1},[gm.name]:{folderName:"onePingPerDM",userPlugin:!1},[hm.name]:{folderName:"oneko",userPlugin:!1},[vm.name]:{folderName:"openInApp",userPlugin:!1},[bm.name]:{folderName:"overrideForumDefaults",userPlugin:!1},[Sm.name]:{folderName:"partyMode",userPlugin:!1},[xm.name]:{folderName:"pauseInvitesForever",userPlugin:!1},[Tm.name]:{folderName:"permissionFreeWill",userPlugin:!1},[Nm.name]:{folderName:"permissionsViewer",userPlugin:!1},[Rm.name]:{folderName:"petpet",userPlugin:!1},[km.name]:{folderName:"pictureInPicture",userPlugin:!1},[Bm.name]:{folderName:"pinDms",userPlugin:!1},[_m.name]:{folderName:"plainFolderIcon",userPlugin:!1},[Um.name]:{folderName:"platformIndicators",userPlugin:!1},[$m.name]:{folderName:"previewMessage",userPlugin:!1},[Gm.name]:{folderName:"quickMention",userPlugin:!1},[Wm.name]:{folderName:"quickReply",userPlugin:!1},[jm.name]:{folderName:"reactErrorDecoder",userPlugin:!1},[Ym.name]:{folderName:"readAllNotificationsButton",userPlugin:!1},[Xm.name]:{folderName:"relationshipNotifier",userPlugin:!1},[Vm.name]:{folderName:"replaceGoogleSearch",userPlugin:!1},[ef.name]:{folderName:"replyTimestamp",userPlugin:!1},[tf.name]:{folderName:"revealAllSpoilers",userPlugin:!1},[nf.name]:{folderName:"reverseImageSearch",userPlugin:!1},[df.name]:{folderName:"reviewDB",userPlugin:!1},[mf.name]:{folderName:"roleColorEverywhere",userPlugin:!1},[ff.name]:{folderName:"secretRingTone",userPlugin:!1},[gf.name]:{folderName:"seeSummaries",userPlugin:!1},[hf.name]:{folderName:"sendTimestamps",userPlugin:!1},[yf.name]:{folderName:"serverInfo",userPlugin:!1},[vf.name]:{folderName:"serverListIndicators",userPlugin:!1},[bf.name]:{folderName:"showAllMessageButtons",userPlugin:!1},[xf.name]:{folderName:"showConnections",userPlugin:!1},[Tf.name]:{folderName:"showHiddenChannels",userPlugin:!1},[wf.name]:{folderName:"showHiddenThings",userPlugin:!1},[Mf.name]:{folderName:"showMeYourName",userPlugin:!1},[Pf.name]:{folderName:"showTimeoutDuration",userPlugin:!1},[If.name]:{folderName:"silentMessageToggle",userPlugin:!1},[Cf.name]:{folderName:"silentTyping",userPlugin:!1},[Nf.name]:{folderName:"sortFriendRequests",userPlugin:!1},[Af.name]:{folderName:"spotifyControls",userPlugin:!1},[Rf.name]:{folderName:"spotifyCrack",userPlugin:!1},[kf.name]:{folderName:"spotifyShareCommands",userPlugin:!1},[Df.name]:{folderName:"startupTimings",userPlugin:!1},[Lf.name]:{folderName:"stickerPaste",userPlugin:!1},[Ef.name]:{folderName:"streamerModeOnStream",userPlugin:!1},[Of.name]:{folderName:"superReactionTweaks",userPlugin:!1},[Bf.name]:{folderName:"textReplace",userPlugin:!1},[_f.name]:{folderName:"themeAttributes",userPlugin:!1},[Ff.name]:{folderName:"translate",userPlugin:!1},[Gf.name]:{folderName:"typingIndicator",userPlugin:!1},[$f.name]:{folderName:"typingTweaks",userPlugin:!1},[zf.name]:{folderName:"unindent",userPlugin:!1},[Hf.name]:{folderName:"unlockedAvatarZoom",userPlugin:!1},[Wf.name]:{folderName:"unsuppressEmbeds",userPlugin:!1},[qf.name]:{folderName:"userMessagesPronouns",userPlugin:!1},[Qf.name]:{folderName:"userVoiceShow",userPlugin:!1},[Jf.name]:{folderName:"usrbg",userPlugin:!1},[Xf.name]:{folderName:"validReply",userPlugin:!1},[eg.name]:{folderName:"validUser",userPlugin:!1},[tg.name]:{folderName:"vcDoubleClick",userPlugin:!1},[sg.name]:{folderName:"vcNarrator",userPlugin:!1},[ag.name]:{folderName:"vencordToolbox",userPlugin:!1},[lg.name]:{folderName:"viewIcons",userPlugin:!1},[ug.name]:{folderName:"viewRaw",userPlugin:!1},[pg.name]:{folderName:"voiceDownload",userPlugin:!1},[mg.name]:{folderName:"voiceMessages",userPlugin:!1},[fg.name]:{folderName:"volumeBooster",userPlugin:!1},[hg.name]:{folderName:"webContextMenus.web",userPlugin:!1},[yg.name]:{folderName:"webKeybinds.web",userPlugin:!1},[vg.name]:{folderName:"webScreenShareFixes.web",userPlugin:!1},[bg.name]:{folderName:"whoReacted",userPlugin:!1},[xg.name]:{folderName:"xsOverlay",userPlugin:!1}},$S={AppleMusicRichPresence:"desktop",DevCompanion:"dev",FixSpotifyEmbeds:"desktop",FixYoutubeEmbeds:"desktop",InvisibleChat:"desktop",NoRPC:"discordDesktop",NoSystemBadge:"discordDesktop",ShikiCodeblocks:"desktop",YoutubeAdblock:"desktop"}});var Sv={};it(Sv,{BadgePosition:()=>ku,_getBadges:()=>G1,addProfileBadge:()=>Al,removeProfileBadge:()=>Rl});function Al(e){e.component&&=k.wrap(e.component,{noop:!0}),bv.add(e)}function Rl(e){return bv.delete(e)}function G1(e){let t=[];for(let r of bv)if(!r.shouldShow||r.shouldShow(e)){let i=r.getBadges?r.getBadges(e).map(s=>(s.component&&=k.wrap(s.component,{noop:!0}),s)):[{...r,...e}];r.position===0?t.unshift(...i):t.push(...i)}let o=We.BadgeAPI.getDonorBadges(e.userId);return o&&t.unshift(...o),t}var ku,bv,kl=g(()=>{"use strict";a();l();se();On();ku=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(ku||{}),bv=new Set});var xv={};it(xv,{Badges:()=>LE,ChatButtons:()=>GE,Commands:()=>RE,ContextMenu:()=>$E,DataStore:()=>St,MemberListDecorators:()=>BE,MessageAccessories:()=>kE,MessageDecorations:()=>OE,MessageEvents:()=>AE,MessagePopover:()=>DE,MessageUpdater:()=>zE,Notices:()=>br,Notifications:()=>UE,ServerList:()=>EE,Settings:()=>_E,Styles:()=>FE,UserSettings:()=>HE});var AE,br,RE,St,kE,DE,LE,EE,OE,BE,_E,FE,UE,$E,GE,zE,HE,vr=g(()=>{"use strict";a();l();kl();Wr();Qo();Io();Vo();bl();wu();Tl();Pl();A1();Wl();du();ar();Km();U();Ze();yr();AE=P1,br=jh,RE=Jh,St=An,kE=y1,DE=N1,LE=Sv,EE=T0,OE=v1,BE=h1,_E=Gh,FE=lh,UE=Ih,$E=g1,GE=p1,zE=Ey,HE=q1});var Mv={};it(Mv,{toggle:()=>Tv});function wv(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function WE(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");wv("vencord-os-theme-values").textContent=`:root{${t}}`}async function Tv(e){aa?aa.disabled=!e:e&&(aa=wv("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{aa.textContent=t,aa.disabled=!Q.useQuickCss}),aa.textContent=await VencordNative.quickCss.get())}async function Tg(){l5??=wv("vencord-themes");let{themeLinks:e,enabledThemes:t}=Q,o=ln.theme==="light"?"light":"dark",r=e.map(i=>{let s=/^@(light|dark) (.*)/.exec(i);if(!s)return i;let[,c,u]=s;return c===o?u:null}).filter(i=>i!==null);for(let i of t){let s=await VencordNative.themes.getThemeData(i);if(!s)continue;let c=new Blob([s],{type:"text/css"});r.push(URL.createObjectURL(c))}l5.textContent=r.map(i=>`@import url("${i.trim()}");`).join(` `)}var aa,l5,Pv=g(()=>{"use strict";a();l();U();T();document.addEventListener("DOMContentLoaded",()=>{WE(),Tg(),Tv(Q.useQuickCss),jt.addChangeListener("useQuickCss",Tv),jt.addChangeListener("themeLinks",Tg),jt.addChangeListener("enabledThemes",Tg);let e=ln.theme;ln.addChangeListener(()=>{e!==ln.theme&&(e=ln.theme,Tg())})})});var c5=g(()=>{"use strict";a();l()});var Iv={};it(Iv,{ChunkIdsRegex:()=>Ec,Common:()=>gs,DefaultExtractAndLoadChunksRegex:()=>Lc,LazyComponentWebpack:()=>Rc,_blacklistBadModules:()=>Ac,_initWebpack:()=>ba,_resolveReady:()=>ha,cache:()=>jo,extract:()=>wa,extractAndLoadChunks:()=>_g,extractAndLoadChunksLazy:()=>Zn,factoryListeners:()=>va,filters:()=>F,find:()=>qo,findAll:()=>kr,findBulk:()=>Dr,findByCode:()=>Ta,findByCodeLazy:()=>ve,findByProps:()=>xa,findByPropsLazy:()=>L,findComponentByCode:()=>kc,findComponentByCodeLazy:()=>le,findComponentLazy:()=>Dc,findExportedComponentLazy:()=>Wv,findLazy:()=>Tt,findModuleFactory:()=>Sa,findModuleId:()=>Lr,findStore:()=>Og,findStoreLazy:()=>be,fluxStores:()=>di,handleModuleNotFound:()=>kn,lazyWebpackSearchHistory:()=>Hv,mapMangledModule:()=>Bg,mapMangledModuleLazy:()=>ze,moduleListeners:()=>Nc,onceReady:()=>mi,proxyLazyWebpack:()=>Ro,search:()=>is,stringMatches:()=>ya,waitFor:()=>Ke,waitForSubscriptions:()=>fi,wreq:()=>yt});var Cv=g(()=>{"use strict";a();l();T();G();c5()});async function jE(){if(Q.cloud.authenticated&&!await zt("Vencord_cloudSecret")){Qe({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:()=>fs.open("VencordCloud")});return}Q.cloud.settingsSync&&Q.cloud.authenticated&&(Ii.Vencord_settingsDirty?(await Ms(),delete Ii.Vencord_settingsDirty):await pu(!1)&&Qe({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:ws}))}async function qE(){await mi,Nl("WebpackReady"),jE()}var $y=g(()=>{"use strict";a();l();vr();Ss();Au();th();Pv();Li();Cv();Cu();Pv();Cu();Yu();M();Vo();ar();U();Au();Wc();pr();al();Li();Cv();T();Nl("Init");qE();document.addEventListener("DOMContentLoaded",()=>{Nl("DOMContentLoaded")},{once:!0})});var KE={};it(KE,{Api:()=>xv,Components:()=>wh,PlainSettings:()=>En,Plugins:()=>Nu,QuickCss:()=>Mv,Settings:()=>Q,Updater:()=>s1,Util:()=>eh,Webpack:()=>Iv,WebpackPatcher:()=>L1});a();l();a();l();a();l();a();l();var Dv='Vencord QuickCSS Editor