Files
dotfilesv2/vesktop/sessionData/vencordFiles/vencordDesktopRenderer.js
2026-03-28 16:48:16 +00:00

279 lines
661 KiB
JavaScript

// Vencord cba0eb9
// Standalone: true
// Platform: Universal
// Updater Disabled: false
"use strict";var Vencord=(()=>{var Q3=Object.create;var Nu=Object.defineProperty;var J3=Object.getOwnPropertyDescriptor;var X3=Object.getOwnPropertyNames;var V3=Object.getPrototypeOf,eI=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var _s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rt=(e,t)=>{for(var o in t)Nu(e,o,{get:t[o],enumerable:!0})},Fb=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of X3(t))!eI.call(e,i)&&i!==o&&Nu(e,i,{get:()=>t[i],enumerable:!(n=J3(t,i))||n.enumerable});return e};var nh=(e,t,o)=>(o=e!=null?Q3(V3(e)):{},Fb(t||!e||!e.__esModule?Nu(o,"default",{value:e,enumerable:!0}):o,e)),Cu=e=>Fb(Nu({},"__esModule",{value:!0}),e);var p,r,a=Se(()=>{"use strict";p=Symbol.for("react.fragment"),r=(...e)=>(r=Vencord.Webpack.Common.React.createElement)(...e)});function ln(e,t=5){let o=0,n;return()=>(n===void 0&&t>o++&&(n=e(),n===void 0&&t===o&&console.error("Lazy factory failed:",e)),n)}function It(e,t=5,o=!1){let n=!0;o||setTimeout(()=>n=!1,0);let i=0,s=Object.assign(function(){},{[an]:void 0,[yr](){return!s[an]&&t>i++&&(s[an]=e(),!s[an]&&t===i&&console.error("Lazy factory failed:",e)),s[an]}});return new Proxy(s,{...ku,get(l,c,u){if(c===an||c===yr)return Reflect.get(l,c,u);if(!o&&n)return It(()=>Reflect.get(l[yr](),c,u),t,!0);let d=l[yr]();if(typeof d=="object"||typeof d=="function")return Reflect.get(d,c,u);throw new Error("proxyLazy called on a primitive value")}})}var $b,ku,yr,an,qo=Se(()=>{"use strict";a();$b=["arguments","caller","prototype"],ku={},yr=Symbol.for("vencord.lazy.get"),an=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])ku[e]=(t,...o)=>Reflect[e](t[yr](),...o);ku.ownKeys=e=>{let t=e[yr](),o=Reflect.ownKeys(t);for(let n of $b)o.includes(n)||o.push(n);return o};ku.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&$b.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[yr](),t);return o&&Object.defineProperty(e,t,o),o}});function ut(e,t=5){let o=ln(e,t),n=i=>{let s=o()??tI;return r(s,{...i})};return n.$$vencordGetWrappedComponent=o,n}var tI,Ri=Se(()=>{"use strict";a();qo();tI=()=>null});var B,le=Se(()=>{"use strict";a();B=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,n,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;`,...n)}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 _o(e,t){let o=document.createElement("style");return o.id=e,t.append(o),o}var ih,q,we=Se(()=>{"use strict";a();ih=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),q=(e="")=>(...t)=>{let o=new Set;for(let n of t)n&&typeof n=="string"?o.add(n):Array.isArray(n)?n.forEach(i=>o.add(i)):n&&typeof n=="object"&&Object.entries(n).forEach(([i,s])=>s&&o.add(i));return Array.from(o,n=>e+n).join(" ")}});var iI,Bs,al,ll,ah,lh,Au,qn,ch,uh,ph,wo,dh,sI,m,Di,S=Se(()=>{"use strict";a();iI="Vencord.Webpack.Common.React",Bs="1017176847865352332",al="1015060230222131221",ll="1042507929485586532",ah="1026534353167208489",lh="1026504932959977532",Au="1026515880080842772",qn="1108135649699180705",ch="1222936386626129920",uh=navigator.platform.toLowerCase(),ph=uh.startsWith("win"),wo=uh.startsWith("mac"),dh=uh.startsWith("linux"),sI=navigator.userAgent.includes("Mobi"),m=Object.freeze({Ven:{name:"V",id:343383572805058560n},Apexo:{name:"Apexo",id:228548952687902720n},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},amy:{name:"Amy",id:603229858612510720n},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},rae:{name:"rae",id:1398136199503282277n},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:1395533040914141235n},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},IcedMarina:{name:"icedmarina",id:594406131670188042n},nakoyasha:{name:"nakoyasha",id:222069018507345921n},Sqaaakoi:{name:"Sqaaakoi",id:259558259491340288n},iamme:{name:"i am me",id:984392761929256980n},Byeoon:{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:400482410279469056n},Cootshk:{name:"Cootshk",id:921605971577548820n},thororen:{name:"thororen",id:848339671629299742n},alfred:{name:"alfred",id:1038466644353232967n},vv:{name:"VV",id:254866377087778816n},u32:{name:"u32",id:1063237286818488351n},prism:{name:"prism",id:390884143749136386n}}),Di=Object.freeze(Object.fromEntries(Object.entries(m).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t])))});function R(...e){return e.filter(Boolean).join(" ")}function vr(e){return new Promise(t=>setTimeout(t,e))}function aI(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Li(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function mh(e){try{return new URL(e)}catch{return null}}function Us(e){return e}function hh(e,t,o=t+"s"){return e===1?`${e} ${t}`:`${e} ${o}`}function cl(e,...t){return t.some(o=>o==null)?"":String.raw({raw:e},...t)}function yh(e,t){try{let o=e();return o instanceof Promise?o.catch(()=>t):o}catch{return t}}var fh,Wr,gh,re=Se(()=>{"use strict";a();S();fh=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};Wr=e=>Object.hasOwn(Di,e),gh=e=>Wr(e)&&Di[e].badge!==!1});var Hb=Se(()=>{});function wh(){let e="";for(let[t,o]of Object.entries(uI))e+=`.${Th(t)}{font-size:${o};}`;for(let[t,o]of Object.entries(pI))e+=`.${Th(t)}{font-weight:${o};}`;return e}function ao(e){let{size:t="md",weight:o="normal",tag:n="div",defaultColor:i=!0,children:s,className:l,...c}=e;return r(n,{className:R(Th("base",t,o,i&&"defaultColor"),l),...c},s)}var Th,uI,pI,Ih,br=Se(()=>{"use strict";a();Hb();we();re();Th=q("vc-text-"),uI={xxs:"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.25rem",xl:"1.5rem",xxl:"2rem"},pI={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800"};Ih=function({color:t,variant:o,...n}){let i=n;if(o){let[s,l]=o.split("/");if(s&&l){let c=s.split("-").pop();i.size=c,i.weight=l}}return t&&(i.style??={},i.style.color=`var(--${t}, var(--text-default))`),r(ao,{...i})}});var zb=Se(()=>{});var Wb=Se(()=>{});function lo(e){return navigator.clipboard.writeText(e)}var cn=Se(()=>{"use strict";a()});function Kb(e,t,o,n){return BigInt(e)|BigInt(t)<<16n|BigInt(o)<<32n|BigInt(n)<<48n}function un(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 Dt(e,t){return e<<t&dI|e>>Yb-t}function ve(e){return BigInt.asUintN(64,e)}function Du(e,t=0){return new Ph(t).update(e).digest()}var Pt,Jt,jb,ml,qb,Yb,dI,mI,Ph,Mh=Se(()=>{a();Pt=11400714785074694791n,Jt=14029467366897019727n,jb=1609587929392839161n,ml=9650029242287828579n,qb=2870177450012600261n,Yb=64n,dI=2n**Yb-1n,mI=new TextEncoder;Ph=class{#t;#o;#r;#n;#i;#s;#a;#e;constructor(t=0){this.reset(t)}reset(t=this.#t){return this.#t=BigInt.asUintN(32,BigInt(t)),this.#o=ve(this.#t+Pt+Jt),this.#r=ve(this.#t+Jt),this.#n=this.#t,this.#i=ve(this.#t-Pt),this.#s=null,this.#a=0,this.#e=0,this}update(t){typeof t=="string"&&(t=mI.encode(t));let o=0,n=t.length,i=o+n;if(n===0)return this;if(this.#a+=n,this.#e===0&&(this.#s=new Uint8Array(32)),this.#e+n<32)return this.#s.set(t.subarray(0,n),this.#e),this.#e+=n,this;if(this.#e>0){this.#s.set(t.subarray(0,32-this.#e),this.#e);let s=0,l;l=un(this.#s,s),this.#o=ve(Dt(ve(this.#o+l*Jt),31n)*Pt),s+=8,l=un(this.memory,s),this.#r=ve(Dt(ve(this.#r+l*Jt),31n)*Pt),s+=8,l=un(this.memory,s),this.#n=ve(Dt(ve(this.#n+l*Jt),31n)*Pt),s+=8,l=un(this.memory,s),this.#i=ve(Dt(ve(this.#i+l*Jt),31n)*Pt),o+=32-this.#e,this.#e=0}if(o<=i-32){let s=i-32;do{let l;l=un(t,o),this.#o=ve(Dt(ve(this.#o+l*Jt),31n)*Pt),o+=8,l=un(t,o),this.#r=ve(Dt(ve(this.#r+l*Jt),31n)*Pt),o+=8,l=un(t,o),this.#n=ve(Dt(ve(this.#n+l*Jt),31n)*Pt),o+=8,l=un(t,o),this.#i=ve(Dt(ve(this.#i+l*Jt),31n)*Pt),o+=8}while(o<=s)}return o<i&&(this.#s.set(t.subarray(o,i),this.#e),this.#e=i-o),this}digest(){let t=this.#s,o=this.#e,n=0,i=0n,s=0n,l=0n;for(this.#a>=32?(i=Dt(this.#o,1n)+Dt(this.#r,7n)+Dt(this.#n,12n)+Dt(this.#i,18n),i=ve(i^Dt(ve(this.#o*Jt),31n)*Pt),i=ve(i*Pt+ml),i=ve(i^Dt(ve(this.#r*Jt),31n)*Pt),i=ve(i*Pt+ml),i=ve(i^Dt(ve(this.#n*Jt),31n)*Pt),i=ve(i*Pt+ml),i=ve(i^Dt(ve(this.#i*Jt),31n)*Pt),i=ve(i*Pt+ml)):i=ve(this.#t+qb),i+=BigInt(this.#a);n<=o-8;)l=un(t,n),l=ve(Dt(ve(l*Jt),31n)*Pt),i=ve(Dt(i^l,27n)*Pt+ml),n+=8;for(n+4<=o&&(l=Kb(t[n+1]<<8|t[n],t[n+3]<<8|t[n+2],0,0),i=ve(Dt(i^ve(l*Pt),23n)*Jt+jb),n+=4);n<o;)l=Kb(t[n++],0,0,0),i=ve(Dt(i^ve(l*qb),11n)*Pt);return s=ve(i>>33n),i=ve((i^s)*Jt),s=ve(i>>29n),i=ve((i^s)*jb),s=ve(i>>32n),i=ve(i^s),i}}});function gI(e){e=BigInt(e);let t=[],o=Math.ceil(Math.floor(Math.log2(Number(e))+1)/8);for(let i=0;i<o;i++)t.unshift(Number(e>>BigInt(8*i)&BigInt(255)));let n=new Uint8Array(t);return fI?n:n.reverse()}function pn(e){let t=Du(e,0),o=gI(t);return[Es[o[0]>>2],Es[(o[0]&3)<<4|o[1]>>4],Es[(o[1]&15)<<2|o[2]>>6],Es[o[2]&63],Es[o[3]>>2],Es[(o[3]&3)<<4|o[4]>>4]].join("")}var Es,fI,Fs=Se(()=>{"use strict";a();Mh();Es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),fI=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})()});function Lt(e){let t=typeof e=="string"?e:e.source;if(t=t.replaceAll(/#{intl::([\w$+/]*)(?:::(\w+))?}/g,(i,s,l)=>{let c=l==="raw"?s:pn(s),u=typeof e=="string";return!Number.isNaN(Number(c[0]))||c.includes("+")||c.includes("/")?u?`["${c}"]`:String.raw`(?:\["${c}"\])`.replaceAll("+","\\+"):u?`.${c}`:String.raw`(?:\.${c})`}),typeof e=="string")return t;let o=t.replaceAll(/(\\*)\\i/g,(i,s)=>s.length%2===0?`${s}${String.raw`(?:[A-Za-z_$][\w$]*)`}`:i.slice(1)),n=new RegExp(o,e.flags);return n.toString=e.toString.bind(e),n}function fl(e,t){return typeof e!="function"?e.replaceAll("$self",t):((...o)=>e(...o).replaceAll("$self",t))}function Lu(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 gl(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Lu(o.match,Lt),o.replace=Lu(o.replace,n=>fl(n,t)),Object.defineProperties(e,o)}function Nh(e){let t=Object.getOwnPropertyDescriptors(e);t.find=Lu(t.find,Lt),Object.defineProperties(e,t)}var Sr=Se(()=>{"use strict";a();Fs()});function Zb(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function vl(e,t,o=!1){let{moment:n}=(v(),Cu(Yn)),i=n.duration(e,t),s=wI.map(d=>({amount:i[d](),unit:d})),l=0;e:for(let d=0;d<s.length;d++)if(!(s[d].amount===0||!(d+1<s.length))){for(let f=d+1;f<s.length;f++)if(s[f].amount!==0)continue e;l=s.length-(d+1)}s=l===0?s:s.slice(0,-l);let c=s.findIndex(({unit:d})=>d==="days");if(c!==-1){let d=s[c],f=d.amount%7;f===0?s.splice(c,1):d.amount=f}let u="";for(;s.length;){let{amount:d,unit:f}=s.shift();u.length&&(u+=s.length?", ":" and "),(d>0||u.length)&&(u+=`${d} ${Zb(f,d===1,o)}`)}return u.length?u:`0 ${Zb(t,!1,o)}`}function II(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let n="";for(let i=0;i<o;i++)n+=t(e[i]),o-i>2?n+=", ":o-i>1&&(n+=" and ");return n}function Oi(e,t){return`\`\`\`${t||""}
${e.replaceAll("```","\\`\\`\\`")}
\`\`\``}function Qb(e,...t){let o=String.raw({raw:e},...t),n=o.match(/^[ \t]*(?=\S)/gm);if(!n)return o.trim();let i=n.reduce((s,l)=>Math.min(s,l.length),1/0);return o.replace(new RegExp(`^[ \\t]{${i}}`,"gm"),"").trim()}function PI(e){return"``"+hl+e.replaceAll("`",hl+"`"+hl)+hl+"``"}var yl,hI,yI,Ch,vI,bI,SI,xI,TI,dn,wI,hl,kh,ir=Se(()=>{"use strict";a();yl=e=>e.split(/(?=[A-Z][a-z])|(?<=[a-z])(?=[A-Z])/).map(t=>/^[A-Z]{2,}$/.test(t)?t:t.toLowerCase()),hI=e=>e.toLowerCase().split("_"),yI=e=>e.toLowerCase().split("-"),Ch=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),vI=e=>e.toLowerCase().split(" "),bI=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),SI=e=>e.join("_").toUpperCase(),xI=e=>e.join("-").toLowerCase(),TI=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),dn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),wI=["years","months","weeks","days","hours","minutes","seconds"];hl="\u200B";kh=RegExp.escape??function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}});function MI(e,t,o){return function(...n){return[t.apply(this,n),0]}}function NI(e,t,o){return t}var Jb,mn,Ou=Se(()=>{"use strict";a();le();Jb=MI,mn=NI});var Gu={};rt(Gu,{ChunkIdsRegex:()=>$u,DefaultExtractAndLoadChunksRegex:()=>Fu,LazyComponentWebpack:()=>o2,_blacklistBadModules:()=>Uu,_initWebpack:()=>Tl,_resolveReady:()=>bl,cache:()=>sr,extract:()=>Nl,extractAndLoadChunks:()=>Dh,extractAndLoadChunksLazy:()=>Bi,factoryListeners:()=>xl,filters:()=>O,find:()=>Io,findAll:()=>Zn,findBulk:()=>Eu,findByCode:()=>Gs,findByCodeLazy:()=>fe,findByProps:()=>Il,findByPropsLazy:()=>X,findComponentByCode:()=>r2,findComponentByCodeLazy:()=>he,findComponentLazy:()=>Hs,findCssClasses:()=>Ah,findCssClassesLazy:()=>Z,findExportedComponentLazy:()=>n2,findLazy:()=>Ot,findModuleFactory:()=>wl,findModuleId:()=>Qn,findStore:()=>Pl,findStoreLazy:()=>gt,fluxStores:()=>jr,handleModuleNotFound:()=>xr,lazyWebpackSearchHistory:()=>t2,makeClassNameRegex:()=>_u,mapMangledCssClasses:()=>Ml,mapMangledModule:()=>Rh,mapMangledModuleLazy:()=>Xe,moduleListeners:()=>Bu,onceReady:()=>$s,proxyLazyWebpack:()=>Bo,search:()=>zs,stringMatches:()=>Sl,waitFor:()=>Ve,waitForSubscriptions:()=>_i,wreq:()=>ft});function _u(e){return new RegExp(`(?:\\b|_)${kh(e)}(?:\\b|_)`)}function Tl(e){ft=e,sr=e.c,Reflect.defineProperty(e.c,Symbol.toStringTag,{value:"ModuleCache",configurable:!0,writable:!0,enumerable:!1})}function Vb(e){return e==null||e===window||e===document||e===document.documentElement||e[Symbol.toStringTag]==="DOMTokenList"||e[Symbol.toStringTag]==="IntlMessagesProxy"?!0:e[Xb]!==void 0?(Reflect.deleteProperty(e,Xb),!0):e instanceof CI}function e2(e,t){let o=Object.getOwnPropertyDescriptor(e,t);o!=null&&Reflect.defineProperty(e,t,{...o,enumerable:!1})}function Uu(e,t,o){try{if(Vb(t))return e2(e,o),!0}catch(s){fn.error(`Error while blacklisting module:
`,s,`
Module id:`,o,`
Module exports:`,t)}if(typeof t!="object")return!1;let n=!0;for(let s in t)try{try{var i=t[s]}catch{continue}Vb(i)?e2(t,s):n=!1}catch(l){fn.error(`Error while blacklistng module:
`,l,`
Module id:`,o,`
Export value:`,i)}return n}function xr(e,...t){let o=new Error(`webpack.${e} found no module`);fn.error(o,"Filter:",t)}function Zn(e,{topLevelOnly:t=!1}={}){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let o=[];for(let n in sr){let i=sr[n];if(!(!i?.loaded||i.exports==null)&&(e(i.exports)&&o.push(i.exports),!(typeof i.exports!="object"||t)))for(let s in i.exports){let l=i.exports[s];l&&e(l)&&o.push(l)}}return o}function wl(...e){let t=Qn(...e);return t?ft.m[t]:null}function Bo(e,t){return It(e,t)}function o2(e,t){return ut(e,t)}function Ot(e){return It(()=>Io(e))}function Il(...e){let t=Io(O.byProps(...e),{isIndirect:!0});return t||xr("findByProps",...e),t}function X(...e){return It(()=>Il(...e))}function Gs(...e){let t=Io(O.byCode(...e),{isIndirect:!0});return t||xr("findByCode",...e),t}function fe(...e){return It(()=>Gs(...e))}function kI(){let{Flux:e}=(v(),Cu(Yn));e.Store.getAll?.().forEach(t=>jr.set(t.getName(),t));try{let o=Gs("libdiscoreWasm is not initialized")();for(let n in o){if(!n.endsWith("Store"))continue;let i=n,s=o[i];jr.set(i,s)}}catch{}}function Pl(e){if(jr.has(e)||kI(),jr.has(e))return jr.get(e);let t=Io(O.byStoreName(e),{isIndirect:!0});return t?(jr.set(e,t),t):(xr("findStore",e),null)}function gt(e){return It(()=>Pl(e))}function r2(...e){let t=Io(O.componentByCode(...e),{isIndirect:!0});return t||xr("findComponentByCode",...e),t}function Hs(e){return ut(()=>{let t=Io(e,{isIndirect:!0});return t||xr("findComponent",e),t})}function he(...e){return ut(()=>{let t=Io(O.componentByCode(...e),{isIndirect:!0});return t||xr("findComponentByCode",...e),t})}function n2(...e){return ut(()=>{let t=Io(O.byProps(...e),{isIndirect:!0});return t||xr("findExportedComponent",...e),t[e[0]]})}function Ml(e,t){let o=Object.values(e),n={};for(let i of t){let s=_u(i);if(n[i]=o.find(l=>typeof l=="string"&&s.test(l)),!n[i])throw new Error(`mapMangledCssClasses: Invalid input. ${i} not found in module`)}return n}function Ah(...e){let t=Io(O.byClassNames(...e),{isIndirect:!0,topLevelOnly:!0});return t?Ml(t,e):(xr("findCssClasses",...e),{})}function Z(...e){return It(()=>Ah(...e))}function AI(e,t){let o=new Set,n=t?Object.getOwnPropertyNames:Object.keys;do n(e).forEach(i=>i!=="__esModule"&&o.add(i)),e=Object.getPrototypeOf(e);while(e!=null);return o}function Xe(e,t,o=!1){return It(()=>Rh(e,t,o))}async function Dh(e,t=Fu){let o=wl(...e);if(!o){let u=new Error("extractAndLoadChunks: Couldn't find module factory");return fn.warn(u,"Code:",e,"Matcher:",t),!1}let n=String(o).match(Lt(t));if(!n){let u=new Error("extractAndLoadChunks: Couldn't find chunk loading in module factory code");return fn.warn(u,"Code:",e,"Matcher:",t),!1}let[,i,s]=n;if(s==null){let u=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the chunk ids array or the entry point id");return fn.warn(u,"Code:",e,"Matcher:",t),!1}let l=Number(s),c=Number.isNaN(l)?s:l;if(i){let u=Array.from(i.matchAll($u)).map(d=>{let f=Number(d[1]);return Number.isNaN(f)?d[1]:f});await Promise.all(u.map(d=>ft.e(d)))}if(ft.m[c]==null){let u=new Error("extractAndLoadChunks: Entry point is not loaded in the module factories, perhaps one of the chunks failed to load");return fn.warn(u,"Code:",e,"Matcher:",t),!1}return ft(c),!0}function Bi(e,t=Fu){return ln(()=>Dh(e,t))}function Ve(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=O.byProps(e);else if(Array.isArray(e))e=O.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(sr!=null){let[n,i]=Io(e,{isIndirect:!0,isWaitFor:!0});if(n)return void t(n,i)}_i.set(e,t)}function zs(...e){e=e.map(Lt);let t={},o=ft.m;for(let n in o){let i=o[n];Sl(i.toString(),e)&&(t[n]=i)}return t}function Nl(e){let t=ft.m[e];if(!t)return null;let o=String(t),i="0,"+(o.startsWith("(")?"":"function")+o.slice(o.indexOf("(")),s=`
// [EXTRACTED] WebpackModule${String(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,${i}
//# sourceURL=file:///ExtractedWebpackModule${String(e)}
`;return(0,eval)(s)}var fn,bl,$s,ft,sr,jr,Sl,O,_i,Bu,xl,CI,Xb,Io,Eu,Qn,t2,Rh,Fu,$u,F=Se(()=>{"use strict";a();qo();Ri();le();Sr();ir();Ou();fn=new B("Webpack"),$s=new Promise(e=>bl=e),jr=new Map,Sl=(e,t)=>t.every(o=>typeof o=="string"?e.includes(o):(o.global&&(o.lastIndex=0),o.test(e)));O={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(Lt),o=n=>typeof n!="function"?!1:Sl(Function.prototype.toString.call(n),t);return o.$$vencordProps=[...e],o},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=O.byCode(...e),o=n=>{let i=n;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},byClassNames:(...e)=>{let t=e.map(_u);return o=>{if(typeof o!="object")return!1;let n=Object.values(o);return t.every(i=>n.some(s=>typeof s=="string"&&i.test(s)))}}},_i=new Map,Bu=new Set,xl=new Set;CI=Object.getPrototypeOf(Int8Array),Xb="is this a proxy that returns values for any key?";Io=mn("find",function(t,{isIndirect:o=!1,isWaitFor:n=!1,topLevelOnly:i=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let s in sr){let l=sr[s];if(!(!l?.loaded||l.exports==null)){if(t(l.exports))return n?[l.exports,s]:l.exports;if(!(typeof l.exports!="object"||i))for(let c in l.exports){let u=l.exports[c];if(u&&t(u))return n?[u,s]:u}}}return o||xr("find",t),n?[null,null]:null});Eu=mn("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 Io(t[0]);let n=t,i=0,s=Array(o);e:for(let l in sr){let c=sr[l];if(!(!c?.loaded||c.exports==null))for(let u=0;u<o;u++){let d=n[u];if(d!==void 0){if(d(c.exports)){if(s[u]=c.exports,n[u]=void 0,++i===o)break e;break}if(typeof c.exports=="object")for(let f in c.exports){let g=c.exports[f];if(g&&d(g)){if(s[u]=g,n[u]=void 0,++i===o)break e;continue e}}}}}if(i!==o){let l=new Error(`Got ${o} filters, but only found ${i} modules!`);fn.warn(l)}return s}),Qn=mn("findModuleId",function(...t){t=t.map(Lt);for(let n in ft.m)if(Sl(ft.m[n].toString(),t))return n;let o=new Error(`Didn't find module with code(s):
`+t.join(`
`));return fn.warn(o),null});t2=[];Rh=mn("mapMangledModule",function(t,o,n=!1){let i={},s=Qn(...Array.isArray(t)?t:[t]);if(s===null)return i;let l=ft(s),c=AI(l,n);e:for(let u of c){let d=l[u];for(let f in o)if(o[f](d)){i[f]=d;continue e}}return i});Fu=/(?:(?:Promise\.all\(\[)?((?:\i\.e\("?[^)]+?"?\),?)+?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/,$u=/\("([^"]+?)"\)/g});function Oh(e){let t=typeof e;return t==="string"||t==="number"||t==="bigint"||t==="boolean"||t==="undefined"}function pt(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[n,i]=A({value:o.fallbackValue,error:null,pending:!0});return te(()=>{let s=!0;return n.pending||i({...n,pending:!0}),e().then(l=>{s&&(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{s&&(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[n.value,n.error,n.pending]}function Ko(e){let t=Ws(o=>o+1,0);return e?t:t[1]}function Cl({interval:e=1e3,deps:t=[]}){let[o,n]=A(0),i=ce(()=>Date.now(),t);return te(()=>{let s=setInterval(()=>n(Date.now()-i),e);return()=>{n(0),clearInterval(s)}},t),o}function Bh(e,t){te(()=>e,t)}var Lh,_h,dt=Se(()=>{"use strict";a();v();re();Ri();Lh=()=>null;_h=(e=!1)=>{let t=ye.useRef(null),[o,n]=A(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(fh(s)&&(n(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(n(!0),t.current?.disconnect(),t.current=null):n(c.isIntersecting))}),t.current.observe(s)))},o]}});var co,js,ge,Ce,xe,ht,Ke,Uh,kl,Al,ue,gn,qr,$e=Se(()=>{"use strict";a();F();dt();co=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(co||{}),js=Xe(".MODAL_ROOT_LEGACY,",{ModalRoot:O.componentByCode('.MODAL,"aria-labelledby":'),ModalHeader:O.componentByCode(",id:"),ModalContent:O.componentByCode("scrollbarType:"),ModalFooter:O.componentByCode(".HORIZONTAL_REVERSE,"),ModalCloseButton:O.componentByCode(".withCircleBackground")}),ge=ut(()=>js.ModalRoot),Ce=ut(()=>js.ModalHeader),xe=ut(()=>js.ModalContent),ht=ut(()=>js.ModalFooter),Ke=ut(()=>js.ModalCloseButton),Uh=fe("hasMediaOptions","shouldHideMediaOptions"),kl=Xe(".modalKey?",{openModalLazy:O.byCode(".modalKey?"),openModal:O.byCode(",instant:"),closeModal:O.byCode(".onCloseCallback()"),closeAllModals:O.byCode(".getState();for")}),{openModalLazy:Al,openModal:ue,closeModal:gn,closeAllModals:qr}=kl});function Le(e,t){return i2(pn(e),t,e)}function i2(e,t,o){try{return t==null?Kr.intl.string(Kr.t[e]):Kr.intl.format(Kr.t[e],t)}catch(n){return RI.error(`Failed to get intl message for key: ${o??e}`,n),o??""}}async function hn(e){let{invite:t}=await Fh.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return L.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let n,i,s=!1;L.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),L.subscribe("INVITE_MODAL_CLOSE",n=()=>{L.unsubscribe("INVITE_MODAL_CLOSE",n),L.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function Yo(){return Q.getChannel(Ge.getChannelId())}function yn(){return Ne.getGuild(Yo()?.guild_id)}function DI(e){Ol.openPrivateChannel(e)}function qs(){try{return Ll.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}catch{return 1}}function Ui(e){Uo.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}async function it(e,t="Copied to clipboard!"){await lo(e),j.show({message:t,id:j.genId(),type:j.Type.SUCCESS})}function Jn(e,t,o=!0,n={}){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return Xt.sendMessage(e,i,o,n)}function Zo(e,t){return Uh({items:[{type:"IMAGE",original:e.original??e.url,...e}],...t})}async function Qo(e){if(!await po.getUser(e))throw new Error("No such user: "+e);let o=uo.getGuildId();Eh.openUserProfileModal({userId:e,guildId:o,channelId:Ge.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Rl(e,t){let o=_t.getUserProfile(e);if(o)return o;L.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:n}=await Mt.get({url:St.Endpoints.USER_PROFILE(e),query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return L.dispatch({type:"USER_UPDATE",user:n.user}),await L.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",userProfile:n}),t?.guild_id&&n.guild_member&&L.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:n.guild_member}),_t.getUserProfile(e)}function vn(e){return e.discriminator==="0"?e.username:e.tag}function Ks(e){return e.name.replaceAll("'s "," ").replace(/\w+/g,t=>t[0]).replace(/\s/g,"")}function Dl(e,t){return e.features?.has(t)??!1}var RI,Hu,se=Se(()=>{"use strict";a();v();cn();Fs();le();$e();RI=new B("IntlManager");Hu=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Hu||{})});function Re({height:e=24,width:t=24,className:o,children:n,viewBox:i,...s}){return r("svg",{className:R(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},n)}function Ei({height:e=24,width:t=24,className:o}){return r(Re,{height:e,width:t,className:R(o,"vc-link-icon"),viewBox:"0 0 24 24"},r("g",{fill:"none",fillRule:"evenodd"},r("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"}),r("rect",{width:t,height:e})))}function bn(e){return r(Re,{...e,className:R(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},r("g",{fill:"currentColor"},r("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"}),r("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"}),r("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 ar(e){return r(Re,{...e,className:R(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},r("path",{fill:"currentColor",d:"M15 2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V4.41l-4.3 4.3a1 1 0 1 1-1.4-1.42L19.58 3H16a1 1 0 0 1-1-1Z"}),r("path",{fill:"currentColor",d:"M5 2a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 1 0-2 0v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h6a1 1 0 1 0 0-2H5Z"}))}function Tr(e){return r(Re,{...e,className:R(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},r("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 Fi(e){return r(Re,{...e,className:R(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},r("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 $h(e){return r(Re,{"aria-label":Le("GUILD_OWNER"),...e,className:R(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},r("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 Gh(e){return r(Re,{...e,className:R(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},r("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 _l(e){return r(Re,{...e,className:R(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},r("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 Ys(e){return r(Re,{...e,className:R(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},r("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 zu(e){return r(Re,{...e,className:R(e.className,"vc-microphone"),viewBox:"0 0 24 24"},r("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"}),r("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 Bl(e){return r(Re,{...e,className:R(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},r("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 LI(e){return r(Re,{...e,className:R(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},r("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 Yr(e){return r(Re,{...e,className:R(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},r("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),r("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 Hh(e){return r(Re,{...e,className:R(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},r("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 Ul(e){return r(Re,{...e,className:R(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},r("path",{d:"M0 0h24v24H0z",fill:"none"}),r("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 zh(e){return r(Re,{...e,className:R(e.className,"vc-safety-icon"),viewBox:"0 0 24 24"},r("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 OI(e){return r(Re,{...e,className:R(e.className,"vc-notes-icon"),viewBox:"0 0 24 24"},r("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"}),r("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 El(e){return r(Re,{...e,className:R(e.className,"vc-folder-icon"),viewBox:"0 0 24 24"},r("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 Wh(e){return r(Re,{...e,className:R(e.className,"vc-log-icon"),viewBox:"0 0 24 24"},r("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 $i(e){return r(Re,{...e,className:R(e.className,"vc-restart-icon"),viewBox:"0 0 24 24"},r("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 Gi(e){return r(Re,{...e,className:R(e.className,"vc-paintbrush-icon"),viewBox:"0 0 24 24"},r("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 Fl(e){return r(Re,{...e,className:R(e.className,"vc-pencil-icon"),viewBox:"0 0 24 24"},r("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 $l(e){return r(Re,{...e,viewBox:"-3 -3 30 30"},r("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 jh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("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"}))}function Gl(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",fillRule:"evenodd",d:"M5 2a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3H5Zm6.81 7c-.54 0-1 .26-1.23.61A1 1 0 0 1 8.92 8.5 3.49 3.49 0 0 1 11.82 7c1.81 0 3.43 1.38 3.43 3.25 0 1.45-.98 2.61-2.27 3.06a1 1 0 0 1-1.96.37l-.19-1a1 1 0 0 1 .98-1.18c.87 0 1.44-.63 1.44-1.25S12.68 9 11.81 9ZM13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm7-10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM18.5 20a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM7 18.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM5.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",clipRule:"evenodd"}))}function qh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",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"}))}function Kh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M18.559 12.8227C17.7884 13.4957 16.6663 13.3616 15.9404 12.641C14.7975 11.5063 11.4931 8.21104 11.4931 8.21104C10.897 7.63087 10.897 6.44662 11.4931 5.85464C12.319 5.03435 13.6053 3.75146 13.6053 3.75146C13.9641 3.39195 14.456 3.18972 14.9653 3.18886L18.3363 3.18425L19.5255 2L22.5 4.96048L21.3108 6.14473L21.3021 9.50878C21.2992 10.0164 21.0967 10.5026 20.735 10.8613C20.735 10.8613 19.5718 11.9384 18.559 12.8227ZM15.2315 13.9548L13.4954 15.8273C14.0972 16.4265 14.0972 16.9113 13.64 17.6997L11.3976 20.2485C11.0359 20.6081 10.5469 20.8103 10.0347 20.8111L6.66378 20.8158L5.47455 22L2.5 19.0395L3.68927 17.8553L3.70082 14.4912C3.70082 13.9836 3.90338 13.4974 4.26507 13.1387L6.37153 11.0404C6.96759 10.4485 8.15685 10.4485 8.73844 11.0404L8.74424 11.0465L10.5295 9.26998L11.7188 10.4542L9.93347 12.2305L12.3119 14.599L14.0972 12.8227L15.2315 13.9548Z"}))}function Yh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M16.8333 19H5.16667C3.16667 19 1.5 17.3333 1.5 15.3333C1.5 13.4 2.96667 11.8667 4.83333 11.6667V11.3333C4.83333 7.86667 7.7 5 11.1667 5C14.0333 5 16.5667 6.93333 17.3 9.66667C19.7 9.86667 21.5 11.8667 21.5 14.3333C21.5 16.9333 19.4333 19 16.8333 19Z"}))}function Zh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M21 2.01232C21.2652 2.01232 21.5196 2.11757 21.7071 2.30492C21.8946 2.49226 22 2.74636 22 3.0113V9.00521C22 9.27015 21.8946 9.52425 21.7071 9.7116C21.5196 9.89894 21.2652 10.0042 21 10.0042H15C14.7348 10.0042 14.4804 9.89894 14.2929 9.7116C14.1054 9.52425 14 9.27015 14 9.00521C14 8.74026 14.1054 8.48617 14.2929 8.29882C14.4804 8.11147 14.7348 8.00622 15 8.00622H18.93C18.352 7.00597 17.5638 6.14275 16.6198 5.47602C15.6758 4.80929 14.5983 4.35488 13.4616 4.1441C12.3249 3.93332 11.1559 3.97117 10.0353 4.25505C8.91459 4.53892 7.86883 5.06208 6.97 5.78848C6.76313 5.9554 6.49836 6.03338 6.23393 6.00528C5.96951 5.97718 5.72709 5.84529 5.56 5.63863C5.39291 5.43197 5.31485 5.16747 5.34298 4.90331C5.37111 4.63916 5.50313 4.39698 5.71 4.23006C6.7542 3.38308 7.959 2.7557 9.25204 2.38561C10.5451 2.01552 11.8996 1.91037 13.2344 2.07646C14.5691 2.24255 15.8565 2.67646 17.0191 3.35212C18.1818 4.02778 19.1957 4.93125 20 6.00826V3.0113C20 2.74636 20.1054 2.49226 20.2929 2.30492C20.4804 2.11757 20.7348 2.01232 21 2.01232ZM3 21.992C2.73478 21.992 2.48043 21.8867 2.29289 21.6994C2.10536 21.5121 2 21.258 2 20.993V14.9991C2 14.7342 2.10536 14.4801 2.29289 14.2927C2.48043 14.1054 2.73478 14.0001 3 14.0001H9C9.26522 14.0001 9.51957 14.1054 9.70711 14.2927C9.89464 14.4801 10 14.7342 10 14.9991C10 15.2641 9.89464 15.5182 9.70711 15.7055C9.51957 15.8928 9.26522 15.9981 9 15.9981H5.07C5.64801 16.9983 6.43617 17.8616 7.3802 18.5283C8.32424 19.195 9.40171 19.6494 10.5384 19.8602C11.6751 20.071 12.8441 20.0331 13.9647 19.7493C15.0854 19.4654 16.1312 18.9422 17.03 18.2158C17.1324 18.1332 17.2502 18.0715 17.3764 18.0343C17.5027 17.9971 17.6351 17.9851 17.7661 17.999C17.897 18.013 18.0239 18.0525 18.1395 18.1154C18.2552 18.1783 18.3573 18.2634 18.44 18.3657C18.5227 18.468 18.5845 18.5856 18.6217 18.7118C18.659 18.8379 18.6709 18.9702 18.657 19.101C18.6431 19.2318 18.6035 19.3586 18.5405 19.4741C18.4776 19.5896 18.3924 19.6916 18.29 19.7743C17.2452 20.6199 16.0403 21.2461 14.7475 21.6154C13.4547 21.9847 12.1005 22.0895 10.7662 21.9235C9.43181 21.7574 8.14476 21.324 6.98212 20.6491C5.81947 19.9743 4.80518 19.0719 4 17.9961V20.993C4 21.258 3.89464 21.5121 3.70711 21.6994C3.51957 21.8867 3.26522 21.992 3 21.992Z"}))}function Qh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M12 2C12.2652 2 12.5196 2.10536 12.7071 2.29289C12.8946 2.48043 13 2.73478 13 3V13.59L16.3 10.29C16.3904 10.186 16.5013 10.1018 16.6258 10.0427C16.7503 9.98362 16.8856 9.95088 17.0234 9.94656C17.1611 9.94224 17.2982 9.96644 17.4261 10.0176C17.5541 10.0688 17.6701 10.1459 17.7668 10.244C17.8635 10.3421 17.939 10.4592 17.9883 10.5878C18.0377 10.7165 18.0599 10.8539 18.0537 10.9916C18.0474 11.1292 18.0127 11.2641 17.9519 11.3877C17.891 11.5114 17.8053 11.6211 17.7 11.71L12.7 16.71C12.5131 16.8932 12.2618 16.9959 12 16.9959C11.7382 16.9959 11.4869 16.8932 11.3 16.71L6.3 11.71C6.19474 11.6211 6.10898 11.5114 6.04812 11.3877C5.98726 11.2641 5.95261 11.1292 5.94634 10.9916C5.94007 10.8539 5.96231 10.7165 6.01167 10.5878C6.06104 10.4592 6.13646 10.3421 6.2332 10.244C6.32994 10.1459 6.44592 10.0688 6.57385 10.0176C6.70179 9.96644 6.83892 9.94224 6.97665 9.94656C7.11438 9.95088 7.24972 9.98362 7.3742 10.0427C7.49868 10.1018 7.6096 10.186 7.7 10.29L11 13.59V3C11 2.73478 11.1054 2.48043 11.2929 2.29289C11.4804 2.10536 11.7348 2 12 2ZM3 20C2.73478 20 2.48043 20.1054 2.29289 20.2929C2.10536 20.4804 2 20.7348 2 21C2 21.2652 2.10536 21.5196 2.29289 21.7071C2.48043 21.8946 2.73478 22 3 22H21C21.2652 22 21.5196 21.8946 21.7071 21.7071C21.8946 21.5196 22 21.2652 22 21C22 20.7348 21.8946 20.4804 21.7071 20.2929C21.5196 20.1054 21.2652 20 21 20H3Z"}))}function _I(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M7.79997 15.7699C8.49996 16.1999 8.99997 16.9099 8.99997 17.7299V20.9999C8.99997 21.2651 9.10533 21.5195 9.29286 21.707C9.48039 21.8945 9.73476 21.9999 9.99996 21.9999H14C14.2652 21.9999 14.5196 21.8945 14.7071 21.707C14.8946 21.5195 15 21.2651 15 20.9999V17.7299C15 16.9099 15.5 16.1999 16.2 15.7699C17.357 15.0536 18.3137 14.056 18.9812 12.8701C19.6486 11.6842 20.0048 10.3487 20.0168 8.98795C20.0288 7.62724 19.6961 6.28564 19.0497 5.08819C18.4032 3.89074 17.4642 2.87647 16.32 2.13989C15.72 1.74989 15 2.22989 15 2.93989V8.91988C15 9.18511 14.8946 9.43945 14.7071 9.62701C14.5196 9.81454 14.2652 9.9199 14 9.9199H9.99996C9.73476 9.9199 9.48039 9.81454 9.29286 9.62701C9.10533 9.43945 8.99997 9.18511 8.99997 8.91988V2.93989C8.99997 2.22989 8.27997 1.74989 7.67997 2.13989C6.53577 2.87647 5.59671 3.89074 4.9503 5.08819C4.30386 6.28564 3.97113 7.62724 3.9831 8.98795C3.9951 10.3487 4.35138 11.6842 5.01879 12.8701C5.6862 14.056 6.64299 15.0536 7.79997 15.7699Z"}))}function Jh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M18.157.056a1.224 1.224 0 0 0-.709.628c-.105.229-.114.305-.115 1.081v.836l-.351.176a5.545 5.545 0 0 0-.586.342l-.233.167-.543-.311c-.899-.515-.944-.535-1.293-.539-.562-.004-1.018.352-1.17.917-.07.262-.021.567.138.858.151.28.21.325 1.02.794l.606.35v1.38l-.606.35c-.81.469-.869.514-1.02.793-.16.291-.208.597-.137.859.151.564.607.92 1.17.916.347-.004.393-.023 1.289-.537l.54-.308.313.21c.172.116.438.262.588.325l.275.114v.85c.001.793.009.87.115 1.098a1.19 1.19 0 0 0 1.969.282c.269-.307.292-.412.292-1.37v-.869l.315-.148c.173-.081.435-.228.582-.325l.266-.177.706.4c.796.45 1.029.523 1.408.438.882-.198 1.235-1.287.635-1.96-.085-.097-.457-.348-.827-.56l-.67-.385V5.359l.67-.386c.37-.212.742-.463.827-.56.6-.672.247-1.762-.635-1.96-.38-.084-.612-.012-1.405.437l-.7.397-.235-.18a3.792 3.792 0 0 0-.586-.344l-.35-.163v-.848c0-.935-.023-1.044-.292-1.35a1.2 1.2 0 0 0-1.26-.346M4.007 1.25a4.15 4.15 0 0 0-1.21.44c-.354.207-1.102.955-1.309 1.309-.199.34-.374.837-.441 1.252-.07.434-.07 10.426 0 10.86.127.792.42 1.343 1.039 1.963.477.478.81.697 1.317.874.59.204.818.216 4.125.217h3.163v2.42l-1.975.014c-2.202.015-2.148.008-2.5.362-.255.253-.346.474-.346.84s.09.587.345.84c.376.376-.09.348 5.688.348 5.75 0 5.309.025 5.67-.327a1.1 1.1 0 0 0 .362-.86c.002-.367-.09-.586-.344-.84-.353-.355-.3-.348-2.5-.363l-1.976-.014v-2.42h3.164c3.306-.001 3.535-.013 4.124-.217.508-.177.84-.396 1.318-.874.882-.882 1.113-1.57 1.082-3.213-.018-.956-.047-1.068-.364-1.384-.253-.255-.474-.346-.84-.346s-.586.091-.84.346c-.317.316-.343.42-.372 1.47-.023.846-.036.966-.13 1.14a1.22 1.22 0 0 1-.597.553c-.217.098-.276.098-7.757.098-7.48 0-7.54 0-7.757-.098a1.153 1.153 0 0 1-.612-.602l-.114-.242V9.68c.001-5.041.003-5.119.1-5.333.122-.27.3-.462.553-.599.19-.103.242-.104 2.958-.128 3.08-.027 2.927-.01 3.288-.372.255-.254.345-.474.345-.84s-.09-.587-.345-.84c-.364-.365-.204-.347-3.288-.355-1.52-.004-2.881.012-3.024.036m15.047 3.693c.207.108.452.361.57.59.143.278.143.755 0 1.028-.285.54-1.08.81-1.636.556a1.357 1.357 0 0 1-.59-.625c-.107-.255-.092-.7.032-.956.121-.251.46-.568.69-.645.213-.073.755-.043.934.052"}))}function Xh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M6.5 20Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.83 7.13 7.39 5.75 8.95 4.38 11 4.08V12.15L9.4 10.6L8 12L12 16L16 12L14.6 10.6L13 12.15V4.08Q15.58 4.43 17.29 6.39 19 8.35 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20Z"}))}function Vh(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M11 20H6.5Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20H13V12.85L14.6 14.4L16 13L12 9L8 13L9.4 14.4L11 12.85Z"}))}function e1(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fillRule:"evenodd",clipRule:"evenodd",fill:e.fill||"currentColor",d:"M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm1-18a1 1 0 1 0-2 0v7c0 .27.1.52.3.7l3 3a1 1 0 0 0 1.4-1.4L13 11.58V5Z"}))}function t1(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.fill||"currentColor",d:"M5.3 9.3a1 1 0 0 1 1.4 0l5.3 5.29 5.3-5.3a1 1 0 1 1 1.4 1.42l-6 6a1 1 0 0 1-1.4 0l-6-6a1 1 0 0 1 0-1.42Z"}))}function o1(e){return r(Re,{...e,viewBox:"0 0 24 24"},r("path",{fill:e.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"}))}var He=Se(()=>{"use strict";a();Wb();se();re()});function Oe(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),e.rel??="noreferrer",r("a",{role:"link",target:"_blank",...e},e.children)}var qt=Se(()=>{"use strict";a()});function et({variant:e="primary",size:t="medium",children:o,className:n,...i}){return r("button",{"data-mana-component":"button",className:R(Wu("base",e,t),n),...i},o,e==="link"&&r(ar,{className:Wu("link-icon")}))}function Hl({variant:e="link",size:t="medium",className:o,children:n,...i}){return r(Oe,{"data-mana-component":"button",className:R(Wu("base",e,t),o),...i},n,r(ar,{className:Wu("link-icon")}))}function ju({variant:e="primary",className:t,...o}){return r("button",{className:R(BI("base",e),t),...o})}var Wu,BI,Zs,UI,EI,Po=Se(()=>{"use strict";a();zb();we();re();He();qt();Wu=q("vc-btn-"),BI=q("vc-text-btn-");Zs=function({look:t,color:o="BRAND",size:n="medium",...i}){return t==="LINK"?r(ju,{variant:EI[o],...i}):r(et,{variant:UI[o],size:n,...i})};Zs.Looks={FILLED:"",LINK:"LINK"};Zs.Colors={BRAND:"BRAND",PRIMARY:"PRIMARY",RED:"RED",TRANSPARENT:"TRANSPARENT",CUSTOM:"CUSTOM",GREEN:"GREEN",LINK:"LINK",WHITE:"WHITE"};UI={BRAND:"primary",PRIMARY:"secondary",RED:"dangerPrimary",TRANSPARENT:"secondary",CUSTOM:"none",GREEN:"positive",LINK:"link",WHITE:"overlayPrimary"},EI={BRAND:"primary",PRIMARY:"primary",RED:"danger",TRANSPARENT:"secondary",CUSTOM:"secondary",GREEN:"primary",LINK:"link",WHITE:"secondary"};Zs.Sizes={SMALL:"small",MEDIUM:"medium",LARGE:"medium",XLARGE:"medium",NONE:"min",MIN:"min"}});var s2=Se(()=>{});function Ue({className:e,...t}){return r("hr",{className:R("vc-divider",e),...t})}var Vt=Se(()=>{"use strict";a();s2();re()});var a2=Se(()=>{});function wr({children:e,...t}){return r(ao,{tag:"span",size:"sm",weight:"normal",...t},e)}var Qs=Se(()=>{"use strict";a();br()});var l2=Se(()=>{});function Sn({checked:e,onChange:t,disabled:o}){let[n,i]=A(!1),s=l=>{let c=l.currentTarget;i(c.matches(":focus-visible"))};return r("div",null,r("div",{className:R(r1("container",{checked:e,disabled:o,focusVisible:n}))},r("svg",{className:r1("slider"),viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},r("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),r("svg",{viewBox:"0 0 20 20",fill:"none"},e?r(p,null,r("path",{fill:c2,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),r("path",{fill:c2,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):r(p,null,r("path",{fill:u2,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),r("path",{fill:u2,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),r("input",{onFocus:s,onBlur:s,disabled:o,type:"checkbox",className:r1("input"),tabIndex:0,checked:e,onChange:l=>t(l.currentTarget.checked)})))}var r1,c2,u2,Hi=Se(()=>{"use strict";a();l2();we();re();v();r1=q("vc-switch-"),c2="var(--brand-500)",u2="var(--primary-400)"});function Jo({onChange:e,title:t,value:o,description:n,disabled:i,className:s,hideBorder:l}){return r("label",{className:"vc-form-switch-wrapper"},r("div",{className:R("vc-form-switch",s,i&&"vc-form-switch-disabled")},r("div",{className:"vc-form-switch-text"},r(wr,{size:"md",weight:"medium"},t),n&&r(wr,{size:"sm",weight:"normal"},n)),r(Sn,{checked:o,onChange:e,disabled:i})),!l&&r(Ue,{className:"vc-form-switch-border"}))}function n1({note:e,children:t,...o}){return r(Jo,{title:t??"",description:e,...o})}var Xn=Se(()=>{"use strict";a();a2();re();Vt();Qs();Hi()});var p2=Se(()=>{});function eo(e){let{tag:t="h5",children:o,className:n,...i}=e;return r(t,{className:R(`vc-${t}`,!n&&`vc-${t}-defaultMargin`,n),...i},o)}function FI({children:e,...t}){return r(eo,{tag:"h2",...t},e)}function Ir({children:e,...t}){return r(eo,{tag:"h3",...t},e)}function Zr({children:e,...t}){return r(eo,{tag:"h4",...t},e)}var Xo=Se(()=>{"use strict";a();p2();re()});function ee({children:e,...t}){return r(ao,{tag:"p",size:"sm",weight:"normal",...t},e)}var to=Se(()=>{"use strict";a();br()});function Vo({children:e,...t}){return r(V,{...t},o=>r("div",{...o},e))}var zi=Se(()=>{"use strict";a();v()});var Js,i1,d2=Se(()=>{"use strict";a();Js=()=>{},i1=({children:e})=>{if(typeof e!="function")return null;let t=e({onBlur:Js,onFocus:Js,onMouseEnter:Js,onMouseLeave:Js,onClick:Js,onContextMenu:Js});return r(p,null,t)};i1.Colors={}});function Bt(e,t,o=null){let n=null,i=ut(()=>{if(n)return n;let s=new Error(`Vencord could not find the ${e} Component`);return $I.error(s),o});return Ve(t,s=>{n=s,Object.assign(i,s)},{isIndirect:!0}),i}function de(e,t){Ve(O.byStoreName(e),t,{isIndirect:!0})}var $I,s1=Se(()=>{"use strict";a();le();dt();F();$I=new B("Webpack")});var T,G,U,GI,a1,V,HI,yt,Jr,mo,Xs,Vn,Vs,l1,Mo,c1,oo,Wl,ei,Pr,jl,qu,m2,Qr,zI,WI,zl,jI,ti,qI,u1,KI,Ku,ql,Kl,ro,Wi,Yu,f2=Se(()=>{"use strict";a();br();Po();Vt();Xn();Xo();to();zi();d2();Ri();F();s1();T={FormTitle:eo,FormText:ee,FormSection:"section",FormDivider:Ue},G=Ih,U=Zs,GI=n1,a1=Bt("Checkbox",O.componentByCode('"data-toggleable-component":"checkbox')),V=Bt("Tooltip",e=>e.prototype?.shouldShowTooltip&&e.prototype.render,i1),HI=Vo,yt=Bt("TextInput",O.componentByCode("#{intl::MAXIMUM_LENGTH_ERROR}",'"input"')),Jr=Bt("TextArea",O.componentByCode("this.getPaddingRight()},id:")),mo=Bt("Select",O.componentByCode('"Select"')),Xs=Bt("SearchableSelect",O.componentByCode('"SearchableSelect"')),Vn=Bt("Slider",O.componentByCode("markDash","this.renderMark(")),Vs=Bt("Popout",O.componentByCode("ref:this.ref,","renderPopout:this.renderPopout,")),l1=Bt("Dialog",O.componentByCode('role:"dialog",tabIndex:-1')),Mo=Bt("TabBar",O.componentByCode("ref:this.tabBarRef,className:")),c1=Bt("Paginator",O.componentByCode('rel:"prev",children:')),oo=Bt("Clickable",O.componentByCode("this.context?this.renderNonInteractive():")),Wl=Bt("Avatar",O.componentByCode(".size-1.375*")),ei=Bt("ColorPicker",O.componentByCode("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}","showEyeDropper")),Pr=Bt("UserSummaryItem",O.componentByCode("defaultRenderUser","showDefaultAvatarsForNullUsers")),m2=["thin","auto","fade"],Qr=Z("thin","auto","fade","customTheme","none"),zI=O.byClassNames(...m2),WI=O.byClassNames("customTheme"),zl=Bo(()=>{let e=Io(t=>zI(t)&&!WI(t),{topLevelOnly:!0});return e?Ml(e,m2):{}});Ve(O.byCode('="ltr",orientation:',"customTheme:","forwardRef"),e=>jl=e);Ve(O.byCode("getScrollerNode:","resizeObserver:","sectionHeight:"),e=>qu=e);jI=ut(()=>jl(Qr.none,Qr.fade,Qr.customTheme)),ti=ut(()=>jl(Qr.thin,Qr.fade,Qr.customTheme)),qI=ut(()=>jl(Qr.auto,Qr.fade,Qr.customTheme)),u1=ut(()=>qu(zl.thin,zl.fade,"",ResizeObserver)),KI=ut(()=>qu(zl.auto,zl.fade,"",ResizeObserver)),Ku=Bt("FocusLock",O.componentByCode(".containerRef,{keyboardModeEnabled:"));Ve(e=>{if(typeof e!="function")return!1;let t=String(e);return t.includes(".resolve({theme:")&&t.includes('"refresh-fast-follow-avatars"')&&!t.includes("useMemo")},e=>ql=e);Kl=Bt("MaskedLink",O.componentByCode("MASKED_LINK)")),ro=Bt("Timestamp",O.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}")),Wi=Bt("OAuth2AuthorizeModal",O.componentByCode("hasContentBackground","nextStep","onClose?.()")),Yu=Xe(".assign({colorNames:",{Transition:O.componentByCode('["items","children"]',",null,"),animated:O.byProps("div","text")})});var P,ct,g2=Se(()=>{"use strict";a();F();P={};Ve(e=>e.name==="MenuCheckboxItem",(e,t)=>{let o=ft(t);for(let i in o){try{var n=o[i]}catch{continue}typeof n=="function"&&n.name.startsWith("Menu")&&(P[n.name]=n)}});Ve(O.componentByCode('path:["empty"]'),e=>P.Menu=e);Ve(O.componentByCode("SLIDER)","handleSize:16"),e=>P.MenuSliderControl=e);Ve(O.componentByCode(".SEARCH)",".focus()","query:"),e=>P.MenuSearchControl=e);ct=Xe('type:"CONTEXT_MENU_OPEN',{closeContextMenu:O.byCode("CONTEXT_MENU_CLOSE"),openContextMenu:O.byCode("renderLazy:"),openContextMenuLazy:e=>typeof e=="function"&&e.toString().length<100})});var ye,A,te,oi,ce,st,Ws,Zu,YI,ji,h2=Se(()=>{"use strict";a();F();YI=X("createPortal"),ji=fe("(299));",".onRecoverableError");Ve("useState",e=>{ye=e,{useEffect:te,useState:A,useLayoutEffect:oi,useMemo:ce,useRef:st,useReducer:Ws,useCallback:Zu}=ye})});var y2={};rt(y2,{AccessibilityStore:()=>p1,ActiveJoinedThreadsStore:()=>Zl,ApplicationStore:()=>m1,AuthenticationStore:()=>Yt,CallStore:()=>v1,ChannelRTCStore:()=>sa,ChannelStore:()=>Q,DraftStore:()=>ra,DraftType:()=>Ht,EmojiStore:()=>lr,Flux:()=>ea,FriendsStore:()=>b1,GuildChannelStore:()=>Xr,GuildMemberCountStore:()=>ta,GuildMemberStore:()=>Te,GuildRoleStore:()=>xt,GuildScheduledEventStore:()=>d1,GuildStore:()=>Ne,InstantInviteStore:()=>S1,InviteStore:()=>x1,LocaleStore:()=>T1,MediaEngineStore:()=>na,MessageStore:()=>Kt,NotificationSettingsStore:()=>g1,OverridePremiumTypeStore:()=>y1,PendingReplyStore:()=>xn,PermissionStore:()=>Ie,PopoutWindowStore:()=>ii,PresenceStore:()=>fo,RTCConnectionStore:()=>w1,ReadStateStore:()=>ri,RelationshipStore:()=>Pe,RunningGameStore:()=>ia,SelectedChannelStore:()=>Ge,SelectedGuildStore:()=>uo,SoundboardStore:()=>I1,SpellCheckStore:()=>h1,SpotifyStore:()=>f1,StickersStore:()=>ho,StreamerModeStore:()=>Yl,ThemeStore:()=>oa,TypingStore:()=>Tn,UploadAttachmentStore:()=>ni,UserGuildSettingsStore:()=>Ql,UserProfileStore:()=>_t,UserSettingsProtoStore:()=>Jl,UserStore:()=>C,VoiceStateStore:()=>go,WindowStore:()=>Vr,useStateFromStores:()=>ie});var ea,Ht,Kt,Ie,Xr,ri,fo,p1,xn,Ne,xt,d1,ta,Te,C,Yt,m1,_t,Ge,uo,Q,Tn,Pe,go,lr,ho,oa,Vr,ra,Yl,f1,na,g1,h1,ni,y1,ia,Zl,Ql,Jl,v1,sa,b1,S1,x1,T1,w1,I1,ii,ie,P1=Se(()=>{"use strict";a();F();s1();ea=X("connectStores"),Ht=X("ChannelMessage","SlashCommand"),ie=fe("useStateFromStores");de("AccessibilityStore",e=>p1=e);de("ApplicationStore",e=>m1=e);de("AuthenticationStore",e=>Yt=e);de("DraftStore",e=>ra=e);de("UserStore",e=>C=e);de("UserProfileStore",e=>_t=e);de("ChannelStore",e=>Q=e);de("SelectedChannelStore",e=>Ge=e);de("SelectedGuildStore",e=>uo=e);de("GuildStore",e=>Ne=e);de("GuildMemberStore",e=>Te=e);de("RelationshipStore",e=>Pe=e);de("MediaEngineStore",e=>na=e);de("NotificationSettingsStore",e=>g1=e);de("SpellcheckStore",e=>h1=e);de("PermissionStore",e=>Ie=e);de("PresenceStore",e=>fo=e);de("ReadStateStore",e=>ri=e);de("GuildChannelStore",e=>Xr=e);de("GuildRoleStore",e=>xt=e);de("GuildScheduledEventStore",e=>d1=e);de("GuildMemberCountStore",e=>ta=e);de("MessageStore",e=>Kt=e);de("WindowStore",e=>Vr=e);de("EmojiStore",e=>lr=e);de("StickersStore",e=>ho=e);de("TypingStore",e=>Tn=e);de("VoiceStateStore",e=>go=e);de("StreamerModeStore",e=>Yl=e);de("SpotifyStore",e=>f1=e);de("OverridePremiumTypeStore",e=>y1=e);de("UploadAttachmentStore",e=>ni=e);de("RunningGameStore",e=>ia=e);de("ActiveJoinedThreadsStore",e=>Zl=e);de("UserGuildSettingsStore",e=>Ql=e);de("UserSettingsProtoStore",e=>Jl=e);de("CallStore",e=>v1=e);de("ChannelRTCStore",e=>sa=e);de("FriendsStore",e=>b1=e);de("InstantInviteStore",e=>S1=e);de("InviteStore",e=>x1=e);de("LocaleStore",e=>T1=e);de("RTCConnectionStore",e=>w1=e);de("SoundboardStore",e=>I1=e);de("PopoutWindowStore",e=>ii=e);de("PendingReplyStore",e=>xn=e);de("ThemeStore",e=>{oa=e,Vencord.Api.Themes.initQuickCssThemeStore(e)})});var Ll,v2=Se(()=>{"use strict";a();F();Ll={FrecencyUserSettingsActionCreators:Ot(e=>e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")),PreloadedUserSettingsActionCreators:Ot(e=>e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings"))}});function _e(e,t=b2.MESSAGE,o){j.show(j.create(e,t,o))}var L,Uo,St,Mt,aa,qi,Qu,ZI,Ki,Kr,No,Me,Ee,b2,QI,j,po,Yi,Xl,wn,Mr,la,si,me,Zi,M1,Xt,Ju,Eh,Fh,Ol,at,Vl,JI,XI,VI,ai,ec,S2=Se(()=>{"use strict";a();F();Ve(["dispatch","subscribe"],e=>{L=e,Vencord.Api.PluginManager.subscribeAllPluginsFluxEvents(e);let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),bl()};e.subscribe("CONNECTION_OPEN",t)});Ve(["dispatchToLastSubscribed"],e=>Uo=e);St=Xe('ME:"/users/@me"',{Endpoints:O.byProps("USER","ME"),UserFlags:O.byProps("STAFF","SPAMMER"),FriendsSections:e=>e.PENDING==="PENDING"&&e.ADD_FRIEND}),Mt=Ot(e=>typeof e=="object"&&e.del&&e.put),aa=X("parseTwoDigitYear"),qi=X("highlight","registerLanguage"),{match:Qu,P:ZI}=Xe("@ts-pattern/matcher",{match:O.byCode("return new"),P:O.byProps("when")}),Ki=X("debounce","cloneDeep"),Kr=Xe(['defaultLocale:"en-US"',/initialLocale:\i/],{t:e=>e?.[Symbol.toStringTag]==="IntlMessagesProxy",intl:e=>e!=null&&Object.getPrototypeOf(e)?.withFormatters!=null},!0);Ve(["fromTimestamp","extractTimestamp"],e=>No=e);Ve("parseTopic",e=>Me=e);Ve(["show","close"],e=>Ee=e);b2={MESSAGE:"message",SUCCESS:"success",FAILURE:"failure",CUSTOM:"custom",CLIP:"clip",LINK:"link",FORWARD:"forward",BOOKMARK:"bookmark",CLOCK:"clock"},QI={TOP:0,BOTTOM:1},j={Type:b2,Position:QI,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Ve("showToast",e=>{j.show=e.showToast,j.pop=e.popToast,j.create=e.createToast});po={getUser:fe(".USER(")},Yi=X("clearAll","addFile"),Xl={promptToUpload:fe("Unexpected mismatch between files and file metadata")},wn=Xe("getAssetImage: size must === [",{fetchAssetIds:O.byCode('.startsWith("http:")',".dispatch({"),getAssetFromImageURL:O.byCode("].serialize(",":null"),getAssetImage:O.byCode("getAssetImage: size must === ["),getAssets:O.byCode(".assets")}),Mr=Xe("transitionTo - Transitioning to",{transitionTo:O.byCode("transitionTo -"),transitionToGuild:O.byCode("transitionToGuild -"),back:O.byCode("goBack()"),forward:O.byCode("goForward()")}),la=Xe('"Thread must have a parent ID."',{transitionToChannel:O.byCode(".preload"),transitionToThread:O.byCode('"Thread must have a parent ID."')});Ve(["openUserSettings","USER_SETTINGS_MODAL_KEY"],e=>si=e);me=Ot(e=>typeof e.ADMINISTRATOR=="bigint"),{zustandCreate:Zi}=Xe(["useSyncExternalStoreWithSelector:","Object.assign"],{zustandCreate:O.byCode(/=>(\i)\?\i\(\1/)}),{zustandPersist:M1}=Xe(".onRehydrateStorage)?",{zustandPersist:O.byCode(/(\(\i,\i\))=>.+?\i\1/)}),Xt=X("editMessage","sendMessage"),Ju=X("clearCache","_channelMessages"),Eh=X("openUserProfileModal","closeUserProfileModal"),Fh=X("resolveInvite"),Ol=X("openPrivateChannel"),at=X("getGuildBannerURL","getUserAvatarURL"),Vl=Xe("expression-picker-last-active-view",{openExpressionPicker:O.byCode(/setState\({activeView:(?:(?!null)\i),activeViewType:/),closeExpressionPicker:O.byCode("setState({activeView:null"),toggleMultiExpressionPicker:O.byCode(".EMOJI,"),toggleExpressionPicker:O.byCode(/getState\(\)\.activeView===\i\?\i\(\):\i\(/),setExpressionPickerView:O.byCode(/setState\({activeView:\i,lastActiveView:/),setSearchQuery:O.byCode("searchQuery:"),useExpressionPickerStore:O.byCode(/\(\i,\i=\i\)=>/)}),JI=Xe('type:"POPOUT_WINDOW_OPEN"',{open:O.byCode('type:"POPOUT_WINDOW_OPEN"'),close:O.byCode('type:"POPOUT_WINDOW_CLOSE"'),setAlwaysOnTop:O.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"')}),XI=X("useName","getGlobalName"),VI=Xe(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/,{getDisplayProfile:O.byCode(".getGuildMemberProfile("),useDisplayProfile:O.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)}),ai=Xe("millisecondsInUnit:",{calendarFormat:O.byCode('<-1?"sameElse":'),dateFormat:O.byCode('<2?"nextDay":"sameElse";'),isSameDay:O.byCode(/Math\.abs\(\i-\i\)/),diffAsUnits:O.byCode("days:0","millisecondsInUnit")}),ec=X("REPLYABLE","FORWARDABLE")});var Yn={};rt(Yn,{AccessibilityStore:()=>p1,ActiveJoinedThreadsStore:()=>Zl,Alerts:()=>Ee,Animations:()=>Yu,ApplicationAssetUtils:()=>wn,ApplicationStore:()=>m1,AuthenticationStore:()=>Yt,Avatar:()=>Wl,Button:()=>U,CallStore:()=>v1,ChannelActionCreators:()=>Ol,ChannelRTCStore:()=>sa,ChannelRouter:()=>la,ChannelStore:()=>Q,Checkbox:()=>a1,Clickable:()=>oo,ColorPicker:()=>ei,ComponentDispatch:()=>Uo,Constants:()=>St,ContextMenuApi:()=>ct,DateUtils:()=>ai,Dialog:()=>l1,DisplayProfileUtils:()=>VI,DraftStore:()=>ra,DraftType:()=>Ht,EmojiStore:()=>lr,ExpressionPickerStore:()=>Vl,Flux:()=>ea,FluxDispatcher:()=>L,FocusLock:()=>Ku,Forms:()=>T,FriendsStore:()=>b1,GuildChannelStore:()=>Xr,GuildMemberCountStore:()=>ta,GuildMemberStore:()=>Te,GuildRoleStore:()=>xt,GuildScheduledEventStore:()=>d1,GuildStore:()=>Ne,IconUtils:()=>at,InstantInviteStore:()=>S1,InviteActions:()=>Fh,InviteStore:()=>x1,ListScrollerAuto:()=>KI,ListScrollerThin:()=>u1,LocaleStore:()=>T1,MaskedLink:()=>Kl,MediaEngineStore:()=>na,Menu:()=>P,MessageActions:()=>Xt,MessageCache:()=>Ju,MessageStore:()=>Kt,MessageTypeSets:()=>ec,NavigationRouter:()=>Mr,NotificationSettingsStore:()=>g1,OAuth2AuthorizeModal:()=>Wi,OverridePremiumTypeStore:()=>y1,P:()=>ZI,Paginator:()=>c1,Parser:()=>Me,PendingReplyStore:()=>xn,PermissionStore:()=>Ie,PermissionsBits:()=>me,Popout:()=>Vs,PopoutActions:()=>JI,PopoutWindowStore:()=>ii,PresenceStore:()=>fo,RTCConnectionStore:()=>w1,React:()=>ye,ReactDOM:()=>YI,ReadStateStore:()=>ri,RelationshipStore:()=>Pe,RestAPI:()=>Mt,RunningGameStore:()=>ia,ScrollerAuto:()=>qI,ScrollerNone:()=>jI,ScrollerThin:()=>ti,SearchableSelect:()=>Xs,Select:()=>mo,SelectedChannelStore:()=>Ge,SelectedGuildStore:()=>uo,SettingsRouter:()=>si,Slider:()=>Vn,SnowflakeUtils:()=>No,SoundboardStore:()=>I1,SpellCheckStore:()=>h1,SpotifyStore:()=>f1,StickersStore:()=>ho,StreamerModeStore:()=>Yl,Switch:()=>GI,TabBar:()=>Mo,Text:()=>G,TextArea:()=>Jr,TextInput:()=>yt,ThemeStore:()=>oa,Timestamp:()=>ro,Toasts:()=>j,Tooltip:()=>V,TooltipContainer:()=>HI,TypingStore:()=>Tn,UploadAttachmentStore:()=>ni,UploadHandler:()=>Xl,UploadManager:()=>Yi,UserGuildSettingsStore:()=>Ql,UserProfileActions:()=>Eh,UserProfileStore:()=>_t,UserSettingsActionCreators:()=>Ll,UserSettingsProtoStore:()=>Jl,UserStore:()=>C,UserSummaryItem:()=>Pr,UserUtils:()=>po,UsernameUtils:()=>XI,VoiceStateStore:()=>go,WindowStore:()=>Vr,createListScroller:()=>qu,createRoot:()=>ji,createScroller:()=>jl,hljs:()=>qi,i18n:()=>Kr,listScrollerClasses:()=>zl,lodash:()=>Ki,match:()=>Qu,moment:()=>aa,scrollerClasses:()=>Qr,showToast:()=>_e,useCallback:()=>Zu,useEffect:()=>te,useLayoutEffect:()=>oi,useMemo:()=>ce,useReducer:()=>Ws,useRef:()=>st,useState:()=>A,useStateFromStores:()=>ie,useToken:()=>ql,zustandCreate:()=>Zi,zustandPersist:()=>M1});var v=Se(()=>{"use strict";a();f2();g2();h2();P1();v2();S2()});var Wy=_s(zy=>{a();var RT=Object.defineProperty,G6=e=>RT(e,"__esModule",{value:!0}),H6=(e,t)=>{for(var o in t)RT(e,o,{get:t[o],enumerable:!0})};G6(zy);H6(zy,{GIFEncoder:()=>ET,applyPalette:()=>J6,default:()=>aN,nearestColor:()=>tN,nearestColorIndex:()=>BT,nearestColorIndexWithDistance:()=>UT,prequantize:()=>Q6,quantize:()=>Y6,snapColorsToPalette:()=>eN});var z6={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 DT(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){n(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){n(t+l);for(let c=0;c<l;c++)o[t++]=i[c+s]},writeBytesView(i,s=0,l=i.byteLength){n(t+l),o.set(i.subarray(s,s+l),t),t+=l}};function n(i){var s=o.length;if(s>=i)return;var l=1024*1024;i=Math.max(i,s*(s<l?2:1.125)>>>0),s!=0&&(i=Math.max(i,256));let c=o;o=new Uint8Array(i),t>0&&o.set(c.subarray(0,t),0)}}var $y=12,CT=5003,W6=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function j6(e,t,o,n,i=DT(512),s=new Uint8Array(256),l=new Int32Array(CT),c=new Int32Array(CT)){let u=l.length,d=Math.max(2,n);s.fill(0),c.fill(0),l.fill(-1);let f=0,g=0,y=d+1,b=y,I=!1,w=b,D=(1<<w)-1,N=1<<y-1,_=N+1,W=N+2,H=0,K=o[0],pe=0;for(let J=u;J<65536;J*=2)++pe;pe=8-pe,i.writeByte(d),ne(N);let z=o.length;for(let J=1;J<z;J++)e:{let Je=o[J],ae=(Je<<$y)+K,be=Je<<pe^K;if(l[be]===ae){K=c[be];break e}let To=be===0?1:u-be;for(;l[be]>=0;)if(be-=To,be<0&&(be+=u),l[be]===ae){K=c[be];break e}ne(K),K=Je,W<1<<$y?(c[be]=W++,l[be]=ae):(l.fill(-1),W=N+2,I=!0,ne(N))}return ne(K),ne(_),i.writeByte(0),i.bytesView();function ne(J){for(f&=W6[g],g>0?f|=J<<g:f=J,g+=w;g>=8;)s[H++]=f&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),f>>=8,g-=8;if((W>D||I)&&(I?(w=b,D=(1<<w)-1,I=!1):(++w,D=w===$y?1<<w:(1<<w)-1)),J==_){for(;g>0;)s[H++]=f&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),f>>=8,g-=8;H>0&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0)}}}var q6=j6;function LT(e,t,o){return e<<8&63488|t<<2&992|o>>3}function OT(e,t,o,n){return e>>4|t&240|(o&240)<<4|(n&240)<<8}function _T(e,t,o){return e>>4<<8|t&240|o>>4}function Hd(e,t,o){return e<t?t:e>o?o:e}function qc(e){return e*e}function kT(e,t,o){var n=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,d=s.gc,f=s.bc;for(var g=s.fw;g!=0;g=e[g].fw){let b=e[g],I=b.cnt,w=l*I/(l+I);if(!(w>=i)){var y=0;o&&(y+=w*qc(b.ac-c),y>=i)||(y+=w*qc(b.rc-u),!(y>=i)&&(y+=w*qc(b.gc-d),!(y>=i)&&(y+=w*qc(b.bc-f),!(y>=i)&&(i=y,n=g))))}}s.err=i,s.nn=n}function Gy(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function K6(e,t){let o=t==="rgb444"?4096:65536,n=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s<i;++s){let l=e[s],c=l>>24&255,u=l>>16&255,d=l>>8&255,f=l&255,g=OT(f,d,u,c),y=g in n?n[g]:n[g]=Gy();y.rc+=f,y.gc+=d,y.bc+=u,y.ac+=c,y.cnt++}else if(t==="rgb444")for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,d=l&255,f=_T(d,u,c),g=f in n?n[f]:n[f]=Gy();g.rc+=d,g.gc+=u,g.bc+=c,g.cnt++}else for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,d=l&255,f=LT(d,u,c),g=f in n?n[f]:n[f]=Gy();g.rc+=d,g.gc+=u,g.bc+=c,g.cnt++}return n}function Y6(e,t,o={}){let{format:n="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),d=o.useSqrt!==!1,f=n==="rgba4444",g=K6(u,n),y=g.length,b=y-1,I=new Uint32Array(y+1);for(var w=0,N=0;N<y;++N){let nt=g[N];if(nt!=null){var D=1/nt.cnt;f&&(nt.ac*=D),nt.rc*=D,nt.gc*=D,nt.bc*=D,g[w++]=nt}}qc(t)/w<.022&&(d=!1);for(var N=0;N<w-1;++N)g[N].fw=N+1,g[N+1].bk=N,d&&(g[N].cnt=Math.sqrt(g[N].cnt));d&&(g[N].cnt=Math.sqrt(g[N].cnt));var _,W,H;for(N=0;N<w;++N){kT(g,N,!1);var K=g[N].err;for(W=++I[0];W>1&&(H=W>>1,!(g[_=I[H]].err<=K));W=H)I[W]=_;I[W]=N}var pe=w-t;for(N=0;N<pe;){for(var z;;){var ne=I[1];if(z=g[ne],z.tm>=z.mtm&&g[z.nn].mtm<=z.tm)break;z.mtm==b?ne=I[1]=I[I[0]--]:(kT(g,ne,!1),z.tm=N);var K=g[ne].err;for(W=1;(H=W+W)<=I[0]&&(H<I[0]&&g[I[H]].err>g[I[H+1]].err&&H++,!(K<=g[_=I[H]].err));W=H)I[W]=_;I[W]=ne}var J=g[z.nn],Je=z.cnt,ae=J.cnt,D=1/(Je+ae);f&&(z.ac=D*(Je*z.ac+ae*J.ac)),z.rc=D*(Je*z.rc+ae*J.rc),z.gc=D*(Je*z.gc+ae*J.gc),z.bc=D*(Je*z.bc+ae*J.bc),z.cnt+=J.cnt,z.mtm=++N,g[J.bk].fw=J.fw,g[J.fw].bk=J.bk,J.mtm=b}let be=[];var To=0;for(N=0;;++To){let Gt=Hd(Math.round(g[N].rc),0,255),nt=Hd(Math.round(g[N].gc),0,255),kt=Hd(Math.round(g[N].bc),0,255),ot=255;f&&(ot=Hd(Math.round(g[N].ac),0,255),c&&(ot=ot<=(typeof c=="number"?c:127)?0:255),i&&ot<=l&&(Gt=nt=kt=s,ot=0));let Qt=f?[Gt,nt,kt,ot]:[Gt,nt,kt];if(Z6(be,Qt)||be.push(Qt),(N=g[N].fw)==0)break}return be}function Z6(e,t){for(let o=0;o<e.length;o++){let n=e[o],i=n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2],s=n.length>=4&&t.length>=4?n[3]===t[3]:!0;if(i&&s)return!0}return!1}function Wd(e,t){var o=0,n;for(n=0;n<e.length;n++){let i=e[n]-t[n];o+=i*i}return o}function zd(e,t){return t>1?Math.round(e/t)*t:e}function Q6(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:n=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s<i.length;s++){let l=i[s],c=l>>24&255,u=l>>16&255,d=l>>8&255,f=l&255;c=zd(c,o),n&&(c=c<=(typeof n=="number"?n:127)?0:255),f=zd(f,t),d=zd(d,t),u=zd(u,t),i[s]=c<<24|u<<16|d<<8|f<<0}}function J6(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 n=new Uint32Array(e.buffer),i=n.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let d=0;d<i;d++){let f=n[d],g=f>>24&255,y=f>>16&255,b=f>>8&255,I=f&255,w=OT(I,b,y,g),D=w in c?c[w]:c[w]=X6(I,b,y,g,t);l[d]=D}else{let d=o==="rgb444"?_T:LT;for(let f=0;f<i;f++){let g=n[f],y=g>>16&255,b=g>>8&255,I=g&255,w=d(I,b,y),D=w in c?c[w]:c[w]=V6(I,b,y,t);l[f]=D}}return l}function X6(e,t,o,n,i){let s=0,l=1e100;for(let c=0;c<i.length;c++){let u=i[c],d=u[3],f=xs(d-n);if(f>l)continue;let g=u[0];if(f+=xs(g-e),f>l)continue;let y=u[1];if(f+=xs(y-t),f>l)continue;let b=u[2];f+=xs(b-o),!(f>l)&&(l=f,s=c)}return s}function V6(e,t,o,n){let i=0,s=1e100;for(let l=0;l<n.length;l++){let c=n[l],u=c[0],d=xs(u-e);if(d>s)continue;let f=c[1];if(d+=xs(f-t),d>s)continue;let g=c[2];d+=xs(g-o),!(d>s)&&(s=d,i=l)}return i}function eN(e,t,o=5){if(!e.length||!t.length)return;let n=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;l<t.length;l++){let c=t[l];c.length<s?c=[c[0],c[1],c[2],255]:c.length>s?c=c.slice(0,3):c=c.slice();let u=UT(n,c.slice(0,3),Wd),d=u[0],f=u[1];f>0&&f<=i&&(e[d]=c)}}function xs(e){return e*e}function BT(e,t,o=Wd){let n=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<n&&(n=c,i=s)}return i}function UT(e,t,o=Wd){let n=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<n&&(n=c,i=s)}return[i,n]}function tN(e,t,o=Wd){return e[BT(e,t,o)]}function ET(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,n=DT(t),i=5003,s=new Uint8Array(256),l=new Int32Array(i),c=new Int32Array(i),u=!1;return{reset(){n.reset(),u=!1},finish(){n.writeByte(z6.trailer)},bytes(){return n.bytes()},bytesView(){return n.bytesView()},get buffer(){return n.buffer},get stream(){return n},writeHeader:d,writeFrame(f,g,y,b={}){let{transparent:I=!1,transparentIndex:w=0,delay:D=0,palette:N=null,repeat:_=0,colorDepth:W=8,dispose:H=-1}=b,K=!1;if(o?u||(K=!0,d(),u=!0):K=!!b.first,g=Math.max(0,Math.floor(g)),y=Math.max(0,Math.floor(y)),K){if(!N)throw new Error("First frame must include a { palette } option");rN(n,g,y,N,W),AT(n,N),_>=0&&nN(n,_)}let pe=Math.round(D/10);oN(n,H,pe,I,w);let z=!!N&&!K;iN(n,g,y,z?N:null),z&&AT(n,N),sN(n,f,g,y,W,s,l,c)}};function d(){FT(n,"GIF89a")}}function oN(e,t,o,n,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,n=!1);var s,l;n?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2,e.writeByte(0|l|0|s),Ii(e,o),e.writeByte(i||0),e.writeByte(0)}function rN(e,t,o,n,i=8){let c=Hy(n.length)-1,u=128|i-1<<4|0|c,d=0,f=0;Ii(e,t),Ii(e,o),e.writeBytes([u,d,f])}function nN(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),FT(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),Ii(e,t),e.writeByte(0)}function AT(e,t){let o=1<<Hy(t.length);for(let n=0;n<o;n++){let i=[0,0,0];n<t.length&&(i=t[n]),e.writeByte(i[0]),e.writeByte(i[1]),e.writeByte(i[2])}}function iN(e,t,o,n){if(e.writeByte(44),Ii(e,0),Ii(e,0),Ii(e,t),Ii(e,o),n){let l=Hy(n.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function sN(e,t,o,n,i=8,s,l,c){q6(o,n,t,i,e,s,l,c)}function Ii(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function FT(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function Hy(e){return Math.max(Math.ceil(Math.log2(e)),1)}var aN=ET});var T5=_s((axe,zv)=>{"use strict";a();var sA=Object.prototype.hasOwnProperty,Lo="~";function yu(){}Object.create&&(yu.prototype=Object.create(null),new yu().__proto__||(Lo=!1));function aA(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function x5(e,t,o,n,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new aA(o,n||e,i),l=Lo?Lo+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function Qf(e,t){--e._eventsCount===0?e._events=new yu:delete e._events[t]}function xo(){this._events=new yu,this._eventsCount=0}xo.prototype.eventNames=function(){var t=[],o,n;if(this._eventsCount===0)return t;for(n in o=this._events)sA.call(o,n)&&t.push(Lo?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};xo.prototype.listeners=function(t){var o=Lo?Lo+t:t,n=this._events[o];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,l=new Array(s);i<s;i++)l[i]=n[i].fn;return l};xo.prototype.listenerCount=function(t){var o=Lo?Lo+t:t,n=this._events[o];return n?n.fn?1:n.length:0};xo.prototype.emit=function(t,o,n,i,s,l){var c=Lo?Lo+t:t;if(!this._events[c])return!1;var u=this._events[c],d=arguments.length,f,g;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,n),!0;case 4:return u.fn.call(u.context,o,n,i),!0;case 5:return u.fn.call(u.context,o,n,i,s),!0;case 6:return u.fn.call(u.context,o,n,i,s,l),!0}for(g=1,f=new Array(d-1);g<d;g++)f[g-1]=arguments[g];u.fn.apply(u.context,f)}else{var y=u.length,b;for(g=0;g<y;g++)switch(u[g].once&&this.removeListener(t,u[g].fn,void 0,!0),d){case 1:u[g].fn.call(u[g].context);break;case 2:u[g].fn.call(u[g].context,o);break;case 3:u[g].fn.call(u[g].context,o,n);break;case 4:u[g].fn.call(u[g].context,o,n,i);break;default:if(!f)for(b=1,f=new Array(d-1);b<d;b++)f[b-1]=arguments[b];u[g].fn.apply(u[g].context,f)}}return!0};xo.prototype.on=function(t,o,n){return x5(this,t,o,n,!1)};xo.prototype.once=function(t,o,n){return x5(this,t,o,n,!0)};xo.prototype.removeListener=function(t,o,n,i){var s=Lo?Lo+t:t;if(!this._events[s])return this;if(!o)return Qf(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!n||l.context===n)&&Qf(this,s);else{for(var c=0,u=[],d=l.length;c<d;c++)(l[c].fn!==o||i&&!l[c].once||n&&l[c].context!==n)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:Qf(this,s)}return this};xo.prototype.removeAllListeners=function(t){var o;return t?(o=Lo?Lo+t:t,this._events[o]&&Qf(this,o)):(this._events=new yu,this._eventsCount=0),this};xo.prototype.off=xo.prototype.removeListener;xo.prototype.addListener=xo.prototype.on;xo.prefixed=Lo;xo.EventEmitter=xo;typeof zv<"u"&&(zv.exports=xo)});var Kv=_s(Ha=>{"use strict";a();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.Channel=Ha.ChannelPort=void 0;var lA=T5(),Jf="vapIpc",Wv=Symbol.for("vapIpc.edgeCreate"),jv=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,o,...n){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(o);l&&l(...n)}}createPipe(t){let o=this.getPipe(t);if(o)return o;let n=this._createListenerMap();this._listeners.set(t,n);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void n.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};Ha.ChannelPort=jv;var qv=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new lA.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${Jf}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${Jf}:message`,o=>{this._handleMessage(t,o)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,o){if(this.id===o.id)return;this._logger?.log(`\u{1F91D} "${o.id}" -> "${this.id}" (edges: [${o.channelIds.join(", ")}])`);let n=this._edges.get(o.id);if(n){let i=o.channelIds.filter(s=>!n?.channelIds.includes(s));if(i.includes(this.id)&&i.splice(i.indexOf(this.id),1),!i.length)return;this._edges.set(o.id,{...o,channelIds:[...n.channelIds,...i]})}else{let i=[...o.channelIds].filter(s=>s!==this.id);this._edges.set(o.id,{...o,channelIds:i}),this._edgePipes.set(o.id,t)}this._emitter.emit(Wv,o),this.handshakeAll()}_handleMessage(t,o){if(o.proxiedBy===this.id)return;if(o.destination!==this.id)return this._emitMessage({...o,proxiedBy:this.id});if(!o.nonce)return void this._emitter.emit(o.name,o.data);let n=this._callbacks.get(o.nonce);if(n)return void n(o.data);let i=this._callers.get(o.name);if(i){i(o.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:o.name,source:this.id,destination:o.source,data:s,nonce:o.nonce})});return}}_emitHandshake(t){let o=this.getEdge();t.emit(`${Jf}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${Jf}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(o=>o.channelIds).flat()].filter((o,n,i)=>i.indexOf(o)===n);return{id:this.id,channelIds:t}}findEdgeId(t){for(let o of this._edges.values())if(o.id===t||o.channelIds.includes(t))return o.id;return null}waitForEdge(t){let o=this.findEdgeId(t);return o?Promise.resolve(o):new Promise(n=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(Wv,i),n(s.id))};this._emitter.on(Wv,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,o={timeout:1e4}){let n=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(n),l(new Error("Call timed out"))},o.timeout);this._callbacks.set(n,u=>{this._callbacks.delete(n),clearTimeout(c),o.signal?.aborted?o.signal.reason instanceof Error&&l(o.signal.reason):u instanceof Error?l(u):s(u)})});return this._emitMessage({...t,source:this.id,nonce:n}),i}on(t,o){return this._emitter.on(t,o),this}off(t,o){return this._emitter.off(t,o),this}once(t,o){this._emitter.once(t,o)}onCall(t,o){this._callers.set(t,async(...n)=>await o(...n))}removeCaller(){}handshakeAll(){this._pipes.forEach(t=>this._emitHandshake(t))}destroy(){this._emitter.removeAllListeners(),this._callbacks.clear(),this._callers.clear(),this._edgePipes.clear(),this._pipes=[],this._destroyed=!0}};Ha.Channel=qv});var Qv=_s(za=>{"use strict";a();Object.defineProperty(za,"__esModule",{value:!0});za.RemoteClient=za.RemoteHost=void 0;var Yv=class{channel;constructor(t,o){this.channel=t;for(let[n,i]of Object.entries(o))t.onCall(n,async s=>await i(...s));t.handshakeAll()}};za.RemoteHost=Yv;var Zv=class{hostName;channel;constructor(t,o){this.hostName=t,this.channel=o}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...o){return this.channel.call({name:t,destination:this.hostName,data:o})}};za.RemoteClient=Zv});var P5=_s(Wa=>{"use strict";a();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.WorkerClient=Wa.createWorkerHost=void 0;var w5=Kv(),I5=Qv(),cA=(e,t)=>{let o=new w5.Channel(e);return o.addPipe({emit:(n,i)=>postMessage({event:n,data:i}),listen:(n,i)=>addEventListener("message",({data:s})=>{s.event===n&&i(s.data)})}),new I5.RemoteHost(o,t)};Wa.createWorkerHost=cA;var Jv=class extends I5.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,n,i={}){let s=new w5.Channel(t);if(super(o,s),this.workerOpts=i,n instanceof Blob){let l=new Blob([n],{type:"text/javascript"});this.url=URL.createObjectURL(l)}else this.url=n}async init(){let t=this.worker=new Worker(this.url,this.workerOpts);this.channel.addPipe({emit:(o,n)=>t.postMessage({event:o,data:n}),listen:(o,n)=>{let i=s=>{let{event:l,data:c}=s.data;l===o&&n(c)};this.workerListeners.push(i),t.addEventListener("message",i)}}),await this.connect()}destroy(){if(this.worker){for(let t of this.workerListeners)this.worker.removeEventListener("message",t);this.worker.terminate()}this.channel.destroy(),this.url.startsWith("blob:")&&URL.revokeObjectURL(this.url)}};Wa.WorkerClient=Jv});var M5=_s(Hn=>{"use strict";a();var uA=Hn&&Hn.__createBinding||(Object.create?(function(e,t,o,n){n===void 0&&(n=o);var i=Object.getOwnPropertyDescriptor(t,o);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,i)}):(function(e,t,o,n){n===void 0&&(n=o),e[n]=t[o]})),Xv=Hn&&Hn.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&uA(t,e,o)};Object.defineProperty(Hn,"__esModule",{value:!0});Xv(Kv(),Hn);Xv(Qv(),Hn);Xv(P5(),Hn)});var E7={};rt(E7,{Api:()=>_b,Components:()=>Bb,PlainSettings:()=>Cr,Plugins:()=>hc,Settings:()=>$,Updater:()=>C1,Util:()=>Ub,Webpack:()=>Eb,WebpackPatcher:()=>m0});a();a();a();var xh={};rt(xh,{BadgePosition:()=>Ru,_getBadges:()=>Sh,addProfileBadge:()=>ul,removeProfileBadge:()=>pl});a();a();Ri();le();a();a();we();var oI=q("vc-margin-"),rI=["top","bottom","left","right"],nI=[8,16,20],k={};function sh(){let e="";for(let t of rI)for(let o of nI){let n=oI(`${t}-${o}`);k[`${t}${o}`]=n,e+=`.${n}{margin-${t}:${o}px;}`}return e}a();re();function Rt(e){return r("div",{...e,className:R(e.className,"vc-error-card")},e.children)}var lI="#e78284",cI=new B("React ErrorBoundary",lI),Gb={},vh=ut(()=>class extends Vencord.Webpack.Common.React.PureComponent{state={error:Gb,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",n=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
`);i!==-1&&(n=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:n}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),cI.error(`${this.props.message||"A component threw an Error"}
`,t,o.componentStack)}get isNoop(){return this.props.noop}render(){if(this.state.error===Gb)return this.props.children;if(this.isNoop)return null;if(this.props.fallback)return r(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 r(Rt,{style:{overflow:"hidden"}},r("h1",null,"Oh no!"),r("p",null,t),r("code",null,this.state.message,!!this.state.stack&&r("pre",{className:k.top8},this.state.stack)))}});vh.wrap=(e,t)=>{let o=n=>r(vh,{...t,wrappedProps:n},r(e,{...n}));return t?.displayName&&(o.displayName=t.displayName),o};var M=vh;var Ru=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(Ru||{}),bh=new Set;function ul(e){e.component&&=M.wrap(e.component,{noop:!0}),bh.add(e)}function pl(e){return bh.delete(e)}function Sh(e){let t=[];for(let n of bh){if(n.shouldShow&&!n.shouldShow(e))continue;let i=n.getBadges?n.getBadges(e).map(s=>({...e,...s,component:s.component&&M.wrap(s.component,{noop:!0})})):[{...e,...n}];n.position===0?t.unshift(...i):t.push(...i)}let o=Kn.getDonorBadges(e.userId);return o&&t.unshift(...o.map(n=>({...e,...n}))),t}a();function Y({flexDirection:e,gap:t="1em",justifyContent:o,alignItems:n,flexWrap:i,children:s,style:l,...c}){return l={display:"flex",flexDirection:e,gap:t,justifyContent:o,alignItems:n,flexWrap:i,...l},r("div",{style:l,...c},s)}a();re();function dl(e){return r("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",height:"16",width:"16",...e,className:R("vc-heart-icon",e.className)},r("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"}))}a();v();function tc({look:e=U.Looks.LINK,color:t=U.Colors.TRANSPARENT,...o}){return r(U,{...o,look:e,color:t,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated"),className:"vc-donate-button"},r(dl,null),"Donate")}a();a();a();var C1={};rt(C1,{UpdateLogger:()=>li,changes:()=>Qi,checkForUpdates:()=>Pn,getRepo:()=>N1,isNewer:()=>Vu,isOutdated:()=>ca,maybePromptToUpdate:()=>oc,update:()=>ci,updateError:()=>ua});a();a();var In="cba0eb9";le();a();function Ut(){window.VesktopNative.app.relaunch()}var li=new B("Updater","white"),ca=!1,Vu=!1,ua,Qi;async function Xu(e){let t=await e;if(t.ok)return t.value;throw ua=t.error,t.error}async function Pn(){return Qi=await Xu(VencordNative.updater.getUpdates()),ca=Qi.length>0}async function ci(){if(!ca)return!0;let e=await Xu(VencordNative.updater.update());if(e&&(ca=!1,!await Xu(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}var N1=()=>Xu(VencordNative.updater.getRepo());async function oc(e,t=!1){try{if(await Pn()){let n=confirm(e);if(n&&Vu)return alert("Your local copy has more recent commits. Please stash or reset them.");n&&(await ci(),Ut())}}catch(o){li.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}function x2(){oc("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?")}$e();a();function Mn(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}function Eo({children:e}){return r("section",{className:"vc-settings-tab"},e)}var k1=Mn(x2);function Fo(e,t){return M.wrap(e,{displayName:`${t}SettingsTab`,message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:k1})}function Nn(e){try{ue(Fo(t=>r(ge,{...t,size:"medium"},r(xe,{className:"vc-settings-modal"},r(Ke,{onClick:t.onClose,className:"vc-settings-modal-close"}),r(e,null))),e.displayName||"Settings Tab"))}catch{k1()}}a();a();F();v();var T2=Z("markup","codeContainer");function rc(e){return r("div",{className:T2.markup},Me.defaultRules.codeBlock.react(e,null,{}))}function ui({children:e}){return r("span",{className:T2.markup},r("code",{className:"inline"},e))}Vt();Xo();a();function Zt(e,t=300){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>{e(...n)},t)}}se();ir();F();v();a();v();a();Sr();ir();v();a();Xn();v();var R_=Zt(function({find:e,setModule:t,setError:o}){let n=zs(e),i=Object.keys(n),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],n[i[0]]])});var w2=null;a();var ur={};rt(ur,{clear:()=>tP,createStore:()=>I2,del:()=>D1,delMany:()=>L1,entries:()=>nP,get:()=>zt,getMany:()=>R1,keys:()=>oP,promisifyRequest:()=>Co,set:()=>Wt,setMany:()=>eP,update:()=>cr,values:()=>rP});a();function Co(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function I2(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let n=Co(o);return(i,s)=>n.then(l=>s(l.transaction(t,i).objectStore(t)))}var A1;function Nr(){return A1||(A1=I2("VencordData","VencordStore")),A1}function zt(e,t=Nr()){return t("readonly",o=>Co(o.get(e)))}function Wt(e,t,o=Nr()){return o("readwrite",n=>(n.put(t,e),Co(n.transaction)))}function eP(e,t=Nr()){return t("readwrite",o=>(e.forEach(n=>o.put(n[1],n[0])),Co(o.transaction)))}function R1(e,t=Nr()){return t("readonly",o=>Promise.all(e.map(n=>Co(o.get(n)))))}function cr(e,t,o=Nr()){return o("readwrite",n=>new Promise((i,s)=>{n.get(e).onsuccess=function(){try{n.put(t(this.result),e),i(Co(n.transaction))}catch(l){s(l)}}}))}function D1(e,t=Nr()){return t("readwrite",o=>(o.delete(e),Co(o.transaction)))}function L1(e,t=Nr()){return t("readwrite",o=>(e.forEach(n=>o.delete(n)),Co(o.transaction)))}function tP(e=Nr()){return e("readwrite",t=>(t.clear(),Co(t.transaction)))}function O1(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Co(e.transaction)}function oP(e=Nr()){return e("readonly",t=>{if(t.getAllKeys)return Co(t.getAllKeys());let o=[];return O1(t,n=>o.push(n.key)).then(()=>o)})}function rP(e=Nr()){return e("readonly",t=>{if(t.getAll)return Co(t.getAll());let o=[];return O1(t,n=>o.push(n.value)).then(()=>o)})}function nP(e=Nr()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Co(t.getAllKeys()),Co(t.getAll())]).then(([n,i])=>n.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",n=>O1(n,i=>o.push([i.key,i.value])).then(()=>o))})}var hc={};rt(hc,{PMLogger:()=>BP,addPatch:()=>$2,initPluginManager:()=>y0,isPluginEnabled:()=>ke,pluginRequiresRestart:()=>cp,plugins:()=>je,startAllPlugins:()=>fc,startDependenciesRecursive:()=>up,startPlugin:()=>gc,stopPlugin:()=>h0,subscribeAllPluginsFluxEvents:()=>UP,subscribePluginFluxEvents:()=>g0,unsubscribePluginFluxEvents:()=>G2});a();var z1={};rt(z1,{ChatBarButton:()=>kr,ChatBarButtonMap:()=>Ji,_injectButtons:()=>dP,addChatBarButton:()=>op,removeChatBarButton:()=>H1});a();le();re();F();v();var U1={};rt(U1,{_usePatchContextMenu:()=>aP,addContextMenuPatch:()=>ic,addGlobalContextMenuPatch:()=>iP,findGroupChildrenByChildId:()=>ze,globalPatches:()=>ep,navPatches:()=>nc,removeContextMenuPatch:()=>B1,removeGlobalContextMenuPatch:()=>sP});a();le();v();var P2=new B("ContextMenu"),nc=new Map,ep=new Set;function ic(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let n=nc.get(o);n||(n=new Set,nc.set(o,n)),n.add(t)}}function iP(e){ep.add(e)}function B1(e,t){let n=(Array.isArray(e)?e:[e]).map(i=>nc.get(i)?.delete(t)??!1);return Array.isArray(e)?n:n[0]}function sP(e){return ep.delete(e)}function ze(e,t,o=!1){for(let n of t){if(n==null)continue;if(Array.isArray(n)){let s=ze(e,n,o);if(s!==null)return s}if(Array.isArray(e)&&e.some(s=>o?n.props?.id?.includes(s):n.props?.id===s)||(o?n.props?.id?.includes(e):n.props?.id===e))return t;let i=n.props?.children;if(i){Array.isArray(i)||(i=[i],n.props.children=i);let s=ze(e,i,o);if(s!==null)return s}}return null}function aP(e){e={...e,children:_1(e.children)},e.contextMenuAPIArguments??=[];let t=nc.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(n){P2.error(`Patch for ${e.navId} errored,`,n)}for(let o of ep)try{o(e.navId,e.children,...e.contextMenuAPIArguments)}catch(n){P2.error("Global patch errored,",n)}return e}function _1(e){return Array.isArray(e)?e.map(_1):(ye.isValidElement(e)&&(e=ye.cloneElement(e),e?.props?.children&&(e.type!==P.MenuControlItem||e.type===P.MenuControlItem&&e.props.control!=null)&&(e.props.children=_1(e.props.children))),e)}var G1={};rt(G1,{PlainSettings:()=>Cr,Settings:()=>$,SettingsStore:()=>bt,definePluginSettings:()=>x,migratePluginSetting:()=>$1,migratePluginSettings:()=>tr,useSettings:()=>Be});a();a();var E1=Symbol("SettingsStore.isProxy"),M2=Symbol("SettingsStore.getRawTarget"),tp=class{pathListeners=new Map;prefixListeners=new Map;globalListeners=new Set;proxyContexts=new WeakMap;proxyHandler=(()=>{let t=this;return{get(o,n,i){if(n===E1)return!0;if(n===M2)return o;let s=Reflect.get(o,n,i),l=t.proxyContexts.get(o);if(l==null)return s;let{root:c,path:u}=l;if(!(n in o)&&t.getDefaultValue!=null&&(s=t.getDefaultValue({target:o,key:n,root:c,path:u})),typeof s=="object"&&s!==null&&!s[E1]){let d=`${u}${u&&"."}${n}`;return t.makeProxy(s,c,d)}return s},set(o,n,i){if(i?.[E1]&&(i=i[M2]),o[n]===i)return!0;if(!Reflect.set(o,n,i))return!1;let s=t.proxyContexts.get(o);if(s==null)return!0;let{root:l,path:c}=s,u=`${c}${c&&"."}${n}`;return t.notifyListeners(u,i,l),!0},deleteProperty(o,n){if(!Reflect.deleteProperty(o,n))return!1;let i=t.proxyContexts.get(o);if(i==null)return!0;let{root:s,path:l}=i,c=`${l}${l&&"."}${n}`;return t.notifyListeners(c,void 0,s),!0}}})();constructor(t,o={}){this.plain=t,this.store=this.makeProxy(t),Object.assign(this,o)}makeProxy(t,o=t,n=""){return this.proxyContexts.set(t,{root:o,path:n}),new Proxy(t,this.proxyHandler)}notifyPrefixListeners(t,o,n){for(let i=1;i<=o.length;i++){let s=o.slice(0,i).join(".");this.prefixListeners.get(s)?.forEach(l=>l(n,t))}}notifyListeners(t,o,n){let i=t.split(".");if(i.length>3&&i[0]==="plugins"){let s=i.slice(0,3),l=s.join("."),c=s.reduce((u,d)=>u[d],n);this.globalListeners.forEach(u=>u(n,l)),this.pathListeners.get(l)?.forEach(u=>u(c))}else this.globalListeners.forEach(s=>s(n,t));this.pathListeners.get(t)?.forEach(s=>s(o)),this.notifyPrefixListeners(t,i,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 n=t,i=o.split(".");for(let s of i){if(!n){console.warn(`Settings#setData: Path ${o} does not exist in new data. Not dispatching update`);return}n=n[s]}this.pathListeners.get(o)?.forEach(s=>s(n)),this.notifyPrefixListeners(o,i,n)}this.markAsChanged()}addGlobalChangeListener(t){this.globalListeners.add(t)}addChangeListener(t,o){let n=this.pathListeners.get(t)??new Set;n.add(o),this.pathListeners.set(t,n)}addPrefixChangeListener(t,o){let n=this.prefixListeners.get(t)??new Set;n.add(o),this.prefixListeners.set(t,n)}removeGlobalChangeListener(t){this.globalListeners.delete(t)}removeChangeListener(t,o){let n=this.pathListeners.get(t);n&&(n.delete(o),n.size||this.pathListeners.delete(t))}removePrefixChangeListener(t,o){let n=this.prefixListeners.get(t);n&&(n.delete(o),n.size||this.prefixListeners.delete(t))}markAsChanged(){this.globalListeners.forEach(t=>t(this.plain,""))}};le();a();function pa(e,t){for(let o in t){let n=t[o];typeof n=="object"&&!Array.isArray(n)?(e[o]??={},pa(e[o],n)):e[o]??=n}return e}a();function h(e){return e}function er(e,t,o=1){let n=[];for(let i=e;i<=t;i+=o)n.push(Math.round(i*100)/100);return n}v();var lP=new B("Settings"),cP={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:{},uiElements:{chatBarButtons:{},messagePopoverButtons:{}},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}},F1=VencordNative.settings.get();pa(F1,cP);var bt=new tp(F1,{readOnly:!0,getDefaultValue({target:e,key:t,path:o}){let n=e[t];if(!je)return n;if(o==="plugins"&&t in je)return e[t]={enabled:je[t].required||je[t].enabledByDefault||!1};if(o.startsWith("plugins.")){let i=o.slice(8);if(i in je){let s=je[i].options?.[t];if(!s)return n;if("default"in s)return e[t]=s.default;if(s.type===4){let l=s.options.find(c=>c.default);return l&&(e[t]=l.value),l?.value}}}return n}});bt.addGlobalChangeListener((e,t)=>{bt.plain.cloud.settingsSyncVersion=Date.now(),VencordNative.settings.set(bt.plain,t)});var Cr=F1,$=bt.store;function Be(e){let[,t]=ye.useReducer(()=>({}),{});return te(()=>e?(e.forEach(o=>{o.endsWith(".*")?bt.addPrefixChangeListener(o.slice(0,-2),t):bt.addChangeListener(o,t)}),()=>e.forEach(o=>{o.endsWith(".*")?bt.removePrefixChangeListener(o.slice(0,-2),t):bt.removeChangeListener(o,t)})):(bt.addGlobalChangeListener(t),()=>bt.removeGlobalChangeListener(t)),[e]),bt.store}function tr(e,...t){let{plugins:o}=bt.plain;if(!(e in o)){for(let n of t)if(n in o){lP.info(`Migrating settings from old name ${n} to ${e}`),o[e]=o[n],delete o[n],bt.markAsChanged();break}}}function $1(e,t,o){let n=bt.plain.plugins[e];n&&(!Object.hasOwn(n,t)||Object.hasOwn(n,o)||(n[o]=n[t],delete n[t],bt.markAsChanged()))}function x(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return $.plugins[o.pluginName]},get plain(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return Cr.plugins[o.pluginName]},use:n=>Be(n?n.map(i=>`plugins.${o.pluginName}.${i}`):[`plugins.${o.pluginName}.*`]).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var N2=Z("button","buttonWrapper","notificationDot"),C2=Z("buttonContainer","channelTextArea","button"),Ji=new Map,uP=new B("ChatButtons");function pP(e){let{chatBarButtons:t}=Be(["uiElements.chatBarButtons.*"]).uiElements,{analyticsName:o}=e.type;return r(p,null,Array.from(Ji).filter(([n])=>t[n]?.enabled!==!1).map(([n,{render:i}])=>r(M,{noop:!0,key:n,onError:s=>uP.error(`Failed to render ${n}`,s.error)},r(i,{...e,isMainChat:o==="normal",isAnyChat:["normal","sidebar"].includes(o)}))))}function dP(e,t){t.disabled||e.length===0||e.unshift(r(pP,{key:"vencord-chat-buttons",...t}))}var op=(e,t,o)=>Ji.set(e,{render:t,icon:o}),H1=e=>Ji.delete(e),kr=M.wrap(e=>r(V,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>r("div",{className:`expression-picker-chat-input-button ${C2?.buttonContainer??""} vc-chatbar-button`},r(oo,{"aria-label":e.tooltip,onMouseEnter:t,onMouseLeave:o,className:R(N2.button,C2?.button),onClick:e.onClick,onContextMenu:e.onContextMenu,onAuxClick:e.onAuxClick,...e.buttonProps},r("div",{className:N2.buttonWrapper},e.children)))),{noop:!0});ic("textarea-context",(e,t)=>{let{chatBarButtons:o}=Be(["uiElements.chatBarButtons.*"]).uiElements,n=Array.from(Ji.entries());if(!n.length)return;let i=ze("submit-button",e);if(!i)return;let s=i.findIndex(l=>l?.props?.id==="submit-button");s!==-1&&i.splice(s,0,r(P.MenuItem,{id:"vc-chat-buttons",key:"vencord-chat-buttons",label:"Vencord Buttons"},n.map(([l])=>r(P.MenuCheckboxItem,{label:l,key:l,id:`vc-chat-button-${l}`,checked:o[l]?.enabled!==!1,action:()=>{let c=o[l]?.enabled!==!1;o[l]??={},o[l].enabled=!c}}))))});var K1={};rt(K1,{ApplicationCommandInputType:()=>Cn,ApplicationCommandOptionType:()=>Xi,ApplicationCommandType:()=>rp,BUILT_IN:()=>en,OptionalMessageOption:()=>ac,RequiredMessageOption:()=>j1,_handleCommand:()=>gP,_init:()=>fP,commands:()=>W1,findOption:()=>or,generateId:()=>sc,prepareOption:()=>q1,registerCommand:()=>da,sendBotMessage:()=>Nt,unregisterCommand:()=>ma});a();le();ir();a();F();v();var mP=fe('username:"Clyde"');function sc(){return`-${No.fromTimestamp(Date.now())}`}function Nt(e,t){let o=mP({channelId:e,content:"",embeds:[]});return Xt.receiveMessage(e,pa(t,o)),t}function or(e,t,o){return e.find(n=>n.name===t)?.value??o}a();a();a();a();a();var Xi=(g=>(g[g.SUB_COMMAND=1]="SUB_COMMAND",g[g.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",g[g.STRING=3]="STRING",g[g.INTEGER=4]="INTEGER",g[g.BOOLEAN=5]="BOOLEAN",g[g.USER=6]="USER",g[g.CHANNEL=7]="CHANNEL",g[g.ROLE=8]="ROLE",g[g.MENTIONABLE=9]="MENTIONABLE",g[g.NUMBER=10]="NUMBER",g[g.ATTACHMENT=11]="ATTACHMENT",g))(Xi||{}),Cn=(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))(Cn||{}),rp=(n=>(n[n.CHAT_INPUT=1]="CHAT_INPUT",n[n.USER=2]="USER",n[n.MESSAGE=3]="MESSAGE",n))(rp||{});a();a();a();var en,W1={},k2=Symbol("OptionalMessageOption"),A2=Symbol("RequiredMessageOption"),ac=k2,j1=A2,R2,fP=function(e){try{en=e,ac=e.find(t=>(t.untranslatedName||t.displayName)==="shrug").options[0],j1=e.find(t=>(t.untranslatedName||t.displayName)==="me").options[0],R2=Math.abs(en.map(t=>Number(t.id)).sort((t,o)=>t-o)[0])-en.length}catch(t){new B("CommandsAPI").error("Failed to load CommandsApi",t," - cmds is",e)}return e},gP=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let n=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),Nt(o.channel.id,{content:`${s}:
${Oi(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(n):i}catch(i){return n(i)}};function q1(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,n)=>{t===k2?n[o]=ac:t===A2&&(n[o]=j1),t.choices?.forEach(i=>i.displayName||=i.name),q1(n[o])}),e}function hP(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 n={...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};da(n,t)})}function da(e,t){if(!en){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(en.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??=`-${en.length+R2+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,q1(e),e.options?.[0]?.type===1){hP(e,t);return}W1[e.name]=e,en.push(e)}function ma(e){let t=en.findIndex(o=>o.name===e);return t===-1?!1:(en.splice(t,1),delete W1[e],!0)}var Y1={};rt(Y1,{__getDecorators:()=>yP,addMemberListDecorator:()=>Vi,decoratorsFactories:()=>np,removeMemberListDecorator:()=>es});a();var np=new Map;function Vi(e,t,o){np.set(e,{render:t,onlyIn:o})}function es(e){np.delete(e)}function yP(e,t){let o=Array.from(np.entries(),([n,{render:i,onlyIn:s}])=>s==="guilds"&&t!=="guild"||s==="dms"&&t!=="dm"?null:r(M,{noop:!0,key:n,message:`Failed to render ${n} Member List Decorator`},r(i,{...e,type:t})));return r("div",{className:"vc-member-list-decorators-wrapper"},o)}var Z1={};rt(Z1,{_modifyAccessories:()=>vP,accessories:()=>ip,addMessageAccessory:()=>lc,removeMessageAccessory:()=>cc});a();var ip=new Map;function lc(e,t,o){ip.set(e,{render:t,position:o})}function cc(e){ip.delete(e)}function vP(e,t){for(let[o,n]of ip.entries()){let i=r(M,{noop:!0,message:`Failed to render ${o} Message Accessory`,key:o},r(n.render,{...t}));e.splice(n.position!=null?n.position<0?e.length+n.position:n.position:e.length,0,i)}return e}var Q1={};rt(Q1,{__addDecorationsToMessage:()=>bP,addMessageDecoration:()=>ts,decorationsFactories:()=>sp,removeMessageDecoration:()=>os});a();var sp=new Map;function ts(e,t){sp.set(e,t)}function os(e){sp.delete(e)}function bP(e){let t=Array.from(sp.entries(),([o,n])=>r(M,{noop:!0,message:`Failed to render ${o} Message Decoration`,key:o},r(n,{...e})));return r("div",{className:"vc-message-decorations-wrapper"},t)}var r0={};rt(r0,{_handleClick:()=>TP,_handlePreEdit:()=>xP,_handlePreSend:()=>SP,addMessageClickListener:()=>t0,addMessagePreEditListener:()=>uc,addMessagePreSendListener:()=>rs,removeMessageClickListener:()=>o0,removeMessagePreEditListener:()=>pc,removeMessagePreSendListener:()=>ns});a();le();v();var J1=new B("MessageEvents","#e5c890"),X1=new Set,V1=new Set;async function SP(e,t,o,n){o.replyOptions=n;for(let i of X1)try{if((await i(e,t,o))?.cancel)return!0}catch(s){J1.error(`MessageSendHandler: Listener encountered an unknown error
`,s)}return!1}async function xP(e,t,o){for(let n of V1)try{if((await n(e,t,o))?.cancel)return!0}catch(i){J1.error(`MessageEditHandler: Listener encountered an unknown error
`,i)}return!1}function rs(e){return X1.add(e),e}function uc(e){return V1.add(e),e}function ns(e){return X1.delete(e)}function pc(e){return V1.delete(e)}var e0=new Set;function TP(e,t,o){e=Kt.getMessage(t.id,e.id)??e;for(let n of e0)try{n(e,t,o)}catch(i){J1.error(`MessageClickHandler: Listener encountered an unknown error
`,i)}}function t0(e){return e0.add(e),e}function o0(e){return e0.delete(e)}var i0={};rt(i0,{MessagePopoverButtonMap:()=>fa,_buildPopoverElements:()=>PP,addMessagePopoverButton:()=>ap,removeMessagePopoverButton:()=>n0});a();le();var wP=new B("MessagePopover"),fa=new Map;function ap(e,t,o){fa.set(e,{render:t,icon:o})}function n0(e){fa.delete(e)}function IP(e){let{Component:t,message:o}=e,{messagePopoverButtons:n}=Be(["uiElements.messagePopoverButtons.*"]).uiElements,i=Array.from(fa.entries()).filter(([s])=>n[s]?.enabled!==!1).map(([s,{render:l}])=>{try{let c=l(o);return c?r(M,{noop:!0},r(t,{key:s,...c})):null}catch(c){return wP.error(`[${s}]`,c),null}});return r(p,null,i)}function PP(e,t){return r(IP,{Component:e,message:t})}var c0={};rt(c0,{classNameFactory:()=>MP,compileStyle:()=>l0,coreStyleRootNode:()=>is,disableStyle:()=>ko,enableStyle:()=>no,initStyles:()=>s0,isStyleEnabled:()=>a0,managedStyleRootNode:()=>ss,requireStyle:()=>mc,setStyleClassNames:()=>CP,styleMap:()=>D2,toggleStyle:()=>NP,userStyleRootNode:()=>dc,vencordRootNode:()=>ga});a();br();we();var MP=q,D2=window.VencordStyles??=new Map,ga=document.createElement("vencord-root"),is=document.createElement("vencord-styles"),ss=document.createElement("vencord-managed-styles"),dc=document.createElement("vencord-user-styles");ga.style.display="none";ga.append(is,ss,dc);function s0(){let e=_o("vencord-os-theme-values",is);_o("vencord-text",is).textContent=wh();let t=_o("vencord-css-core",is),o=_o("vesktop-css-core",is);_o("vencord-margins",is).textContent=sh(),VencordNative.native.getRendererCss().then(n=>t.textContent=n),VesktopNative.app.getRendererCss&&(VesktopNative.app.getRendererCss().then(n=>o.textContent=n),VesktopNative.app.onRendererCssUpdate(n=>{o.textContent=n})),VencordNative.themes.getSystemValues().then(n=>{let i=Object.entries(n).filter(([,s])=>!!s).map(([s,l])=>`--${s}: ${l};`).join("");e.textContent=`:root{${i}}`})}document.addEventListener("DOMContentLoaded",()=>{document.documentElement.append(ga)},{once:!0});function mc(e){let t=D2.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function no(e){let t=mc(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),l0(t),ss.appendChild(t.dom),!0)}function ko(e){let t=mc(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var NP=e=>a0(e)?ko(e):no(e),a0=e=>mc(e).dom?.isConnected??!1,CP=(e,t,o=!0)=>{let n=mc(e);n.classNames=t,o&&a0(n.name)&&l0(n)},l0=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let n=e.classNames[o];return n?ih(n):t})};le();Sr();v();var m0={};rt(m0,{SYM_IS_PROXIED_FACTORY:()=>u0,SYM_ORIGINAL_FACTORY:()=>pi,SYM_PATCHED_BY:()=>d0,SYM_PATCHED_SOURCE:()=>p0,allWebpackInstances:()=>lp,getBuildNumber:()=>_2,getFactoryPatchedBy:()=>RP,getFactoryPatchedSource:()=>AP,patchTimings:()=>kP,patches:()=>as});a();qo();le();re();Ou();F();var as=[],u0=Symbol("WebpackPatcher.isProxiedFactory"),pi=Symbol("WebpackPatcher.originalFactory"),p0=Symbol("WebpackPatcher.patchedSource"),d0=Symbol("WebpackPatcher.patchedBy"),lp=new Set,kP=[],_2=ln(()=>{try{let t=function(i){let s=i.match(/"Trying to open a changelog for an invalid build number (\d+?)"\)/);return s==null?-1:Number(s[1])};var e=t;let o=String(ft.m[446023]);if(o.includes("Trying to open a changelog for an invalid build number")){let i=t(o);if(i!==-1)return i}let n=wl("Trying to open a changelog for an invalid build number");return t(String(n))}catch{return-1}});function AP(e,t=ft){return t.m[e]?.[p0]}function RP(e,t=ft){return t.m[e]?.[d0]}var pr=new B("WebpackPatcher","#8caaee"),L2=!1,Ar=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));Ar(Function.prototype,"m",{enumerable:!1,set(e){Ar(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];if(["sentry","libdiscore"].some(l=>o?.toLowerCase()?.includes(l)))return;Ar(this,"p",{enumerable:!1,set(l){Ar(this,"p",{value:l}),clearTimeout(n),!(l!=="/assets/"||/(?:=>|{return)"[^"]/.exec(String(this.u)))&&(ft==null&&this.c!=null&&(pr.info("Main WebpackInstance found"+cl` in ${o}`+", initializing internal references to WebpackRequire"),Tl(this)),s())}}),Ar(this,"O",{enumerable:!1,set(l){Ar(this,"O",{value:l}),clearTimeout(i);let c=this;Ar(l,"j",{enumerable:!1,set(u){Ar(this,"j",{value:u}),c.p==null&&s()}})}});let n=setTimeout(()=>Reflect.deleteProperty(this,"p"),0),i=setTimeout(()=>Reflect.deleteProperty(this,"O"),0),s=()=>{pr.info("Found Webpack module factories"+cl` in ${o}`),lp.add(this);for(let c in e)B2(e,c,e[c],e,!0);Ar(e,Symbol.toStringTag,{value:"ModuleFactories",enumerable:!1});let l=new Proxy(e,DP);Ar(this,"m",{value:l}),this.d=function(c,u){for(let d in u)Object.hasOwn(u,d)&&!Object.hasOwn(c,d)&&Object.defineProperty(c,d,{enumerable:!0,configurable:!0,get:u[d]})}}}});var DP={set:B2},LP={apply(e,t,o){if(e[pi]!=null)return O2(e,t,o);let n=e.name,i=E2(n,e);return O2(i,t,o)},get(e,t,o){if(t===u0)return!0;let n=e[pi]??e;if(t==="toString"||t===p0||t===d0){let i=Reflect.get(n,t,n);return t==="toString"?i.bind(n):i}return Reflect.get(e,t,o)}};function B2(e,t,o,n,i=!1){if(OP(e,t,o,n,i))return!0;_P(t,o);let s=new Proxy($.eagerPatches?E2(t,o):o,LP);return Reflect.set(e,t,s,n)}function OP(e,t,o,n,i){let s,l;for(let c of lp)if(!(i&&c.m===e)&&Object.hasOwn(c.m,t)){s=c.m[t],l=c.m;break}return s!=null?(l!==e&&s[u0]?Reflect.set(e,t,s,n):U2(t,o),s[pi]!=null&&(s[pi]=o),!0):!1}function U2(e,t){for(let o of lp)Ar(o.m,e,{value:t})}function _P(e,t){for(let o of xl)try{o(t,e)}catch(n){pr.error(`Error in Webpack factory listener:
`,n,o)}}function O2(e,t,o){let n=e[pi];e===n&&delete e[pi];let[i,s,l]=o;if(U2(i.id,n),ft==null&&!L2&&(L2=!0,typeof l=="function"&&l.m!=null&&l.c!=null)){let{stack:d}=new Error,f=d?.match(/\/assets\/(.+?\.js)/)?.[1];pr.warn(`WebpackRequire was not initialized, falling back to WebpackRequire passed to the first called wrapped module factory (id: ${String(i.id)}`+cl`, WebpackInstance origin: ${f}`+")"),Tl(l)}let c;try{c=e.apply(t,o)}catch(d){if(e===n)throw d;return pr.error(`Error in patched module factory:
`,d),n.apply(t,o)}if(s=i.exports,typeof l=="function"&&l.c&&Uu(l.c,s,i.id)||s==null)return c;for(let d of Bu)try{d(s,i.id)}catch(f){pr.error(`Error in Webpack module listener:
`,f,d)}for(let[d,f]of _i){try{if(d(s)){_i.delete(d),f(s,i.id);continue}}catch(g){pr.error(`Error while filtering or firing callback for Webpack waitFor subscription:
`,g,`
Module exports:`,s,`
Filter:`,d,`
Callback:`,f)}if(typeof s=="object")for(let g in s)try{try{var u=s[g]}catch{continue}if(u!=null&&d(u)){_i.delete(d),f(u,i.id);break}}catch(y){pr.error(`Error while filtering or firing callback for Webpack waitFor subscription:
`,y,`
Export value:`,s,`
Filter:`,d,`
Callback:`,f)}}return c}function E2(e,t){let o=String(t),i="0,"+(o.startsWith("(")?"":"function")+o.slice(o.indexOf("(")),s=i,l=t,c=new Set;for(let u=0;u<as.length;u++){let d=as[u],f=_2(),g=f!==-1;if(g&&d.fromBuild!=null&&f<d.fromBuild||d.toBuild!=null&&f>d.toBuild){as.splice(u--,1);continue}if(!(typeof d.find=="string"?i.includes(d.find):(d.find.global&&(d.find.lastIndex=0),d.find.test(i))))continue;let b=Jb(`patch by ${d.plugin}`,(N,_)=>(typeof N!="string"&&N.global&&(N.lastIndex=0),i.replace(N,_))),I=i,w=t,D=!1;for(let N of d.replacement){if(g&&N.fromBuild!=null&&f<N.fromBuild||N.toBuild!=null&&f>N.toBuild)continue;let _=i,W=t;try{let[H,K]=b(N.match,N.replace);if(H===i){if(d.noWarn||N.noWarn||pr.warn(`Patch by ${d.plugin} had no effect (Module id is ${String(e)}): ${N.match}`),d.group){pr.warn(`Undoing patch group ${d.find} by ${d.plugin} because replacement ${N.match} had no effect`),i=I,l=w,D&&c.delete(d.plugin);break}continue}let pe=[...c];c.has(d.plugin)||pe.push(d.plugin),i=H,s=`// Webpack Module ${String(e)} - Patched by ${pe.join(", ")}
${i}
//# sourceURL=file:///WebpackModule${String(e)}`,l=(0,eval)(s),c.has(d.plugin)||(c.add(d.plugin),D=!0)}catch(H){if(d.plugin==="ContextMenuAPI"&&H instanceof SyntaxError&&H.message.includes("arguments")||pr.error(`Patch by ${d.plugin} errored (Module id is ${String(e)}): ${N.match}
`,H),D&&c.delete(d.plugin),d.group){pr.warn(`Undoing patch group ${d.find} by ${d.plugin} because replacement ${N.match} errored`),i=I,l=w;break}i=_,l=W}}d.all||as.splice(u--,1)}return l[pi]=t,l}Ou();var Et=new B("PluginManager","#a6d189"),BP=Et,F2=!1,f0=new Set;function ke(e){return(je[e]?.required||je[e]?.isDependency||$.plugins[e]?.enabled)??!1}function $2(e,t,o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`){let n=e;if(n.plugin=t,!(n.predicate&&!n.predicate())){Nh(n),Array.isArray(n.replacement)||(n.replacement=[n.replacement]);for(let i of n.replacement)gl(i,o);n.replacement=n.replacement.filter(({predicate:i})=>!i||i()),as.push(n)}}function cp(e){return e.requiresRestart!==!1&&(e.requiresRestart||!!e.patches?.length)}var fc=mn("startAllPlugins",function(t){Et.info(`Starting plugins (stage ${t})`);for(let o in je)if(ke(o)){if((je[o].startAt??"WebpackReady")!==t)continue;gc(je[o])}});function up(e){let t=$.plugins,o=!1,n=[];return e.dependencies?.forEach(i=>{if(!t[i].enabled){let s=je[i];if(up(s),t[i].enabled=!0,s.isDependency=!0,cp(s)){Et.warn(`Enabling dependency ${i} requires restart.`),o=!0;return}gc(s)||n.push(i)}}),{restartNeeded:o,failures:n}}function g0(e,t){if(e.flux&&!f0.has(e.name)){f0.add(e.name),Et.debug("Subscribing to flux events of plugin",e.name);for(let[o,n]of Object.entries(e.flux)){let i=e.flux[o]=function(){try{let s=n.apply(e,arguments);return s instanceof Promise?s.catch(l=>Et.error(`${e.name}: Error while handling ${o}
`,l)):s}catch(s){Et.error(`${e.name}: Error while handling ${o}
`,s)}};t.subscribe(o,i)}}}function G2(e,t){if(e.flux){f0.delete(e.name),Et.debug("Unsubscribing from flux events of plugin",e.name);for(let[o,n]of Object.entries(e.flux))t.unsubscribe(o,n)}}function UP(e){F2=!0;for(let t in je)ke(t)&&g0(je[t],e)}var gc=mn("startPlugin",function(t){let{name:o,commands:n,contextMenus:i,managedStyle:s,userProfileBadge:l,onBeforeMessageEdit:c,onBeforeMessageSend:u,onMessageClick:d,renderChatBarButton:f,chatBarButton:g,renderMemberListDecorator:y,renderMessageAccessory:b,renderMessageDecoration:I,renderMessagePopoverButton:w,messagePopoverButton:D}=t;if(t.start){if(Et.info("Starting plugin",o),t.started)return Et.warn(`${o} already started`),!1;try{t.start()}catch(N){return Et.error(`Failed to start ${o}
`,N),!1}}if(t.started=!0,n?.length){Et.debug("Registering commands of plugin",o);for(let N of n)try{da(N,o)}catch(_){return Et.error(`Failed to register command ${N.name}
`,_),!1}}if(F2&&g0(t,L),i){Et.debug("Adding context menus patches of plugin",o);for(let N in i)ic(N,i[N])}return s&&no(s),l&&ul(l),c&&uc(c),u&&rs(u),d&&t0(d),g?op(o,g.render,g.icon):f&&op(o,f),y&&Vi(o,y),I&&ts(o,I),b&&lc(o,b),D?ap(o,D.render,D.icon):w&&ap(o,w),!0},e=>`startPlugin ${e.name}`),h0=mn("stopPlugin",function(t){let{name:o,commands:n,contextMenus:i,managedStyle:s,userProfileBadge:l,onBeforeMessageEdit:c,onBeforeMessageSend:u,onMessageClick:d,renderChatBarButton:f,chatBarButton:g,renderMemberListDecorator:y,renderMessageAccessory:b,renderMessageDecoration:I,renderMessagePopoverButton:w,messagePopoverButton:D}=t;if(t.stop){if(Et.info("Stopping plugin",o),!t.started)return Et.warn(`${o} already stopped`),!1;try{t.stop()}catch(N){return Et.error(`Failed to stop ${o}
`,N),!1}}if(t.started=!1,n?.length){Et.debug("Unregistering commands of plugin",o);for(let N of n)try{ma(N.name)}catch(_){return Et.error(`Failed to unregister command ${N.name}
`,_),!1}}if(G2(t,L),i){Et.debug("Removing context menus patches of plugin",o);for(let N in i)B1(N,i[N])}return s&&ko(s),l&&pl(l),c&&pc(c),u&&ns(u),d&&o0(d),(g||f)&&H1(o),y&&es(o),I&&os(o),b&&cc(o),(D||w)&&n0(o),!0},e=>`stopPlugin ${e.name}`),y0=Mn(function(){let t=Object.values(je),o=$.plugins,n=["onBeforeMessageEdit","onBeforeMessageSend","onMessageClick","renderChatBarButton","renderMemberListDecorator","renderMessageAccessory","renderMessageDecoration","renderMessagePopoverButton"],i=new Set;for(let s of t)if(ke(s.name)){s.dependencies?.forEach(l=>{let c=je[l];if(!c){let u=new Error(`Plugin ${s.name} has unresolved dependency ${l}`);Et.warn(u);return}o[l].enabled=!0,c.isDependency=!0}),s.commands?.length&&i.add("CommandsAPI"),(s.onBeforeMessageEdit||s.onBeforeMessageSend||s.onMessageClick)&&i.add("MessageEventsAPI"),(s.chatBarButton||s.renderChatBarButton)&&i.add("ChatInputButtonAPI"),s.renderMemberListDecorator&&i.add("MemberListDecoratorsAPI"),s.renderMessageAccessory&&i.add("MessageAccessoriesAPI"),s.renderMessageDecoration&&i.add("MessageDecorationsAPI"),(s.messagePopoverButton||s.renderMessagePopoverButton)&&i.add("MessagePopoverAPI"),s.userProfileBadge&&i.add("BadgeAPI");for(let l of n)s[l]&&=s[l].bind(s)}for(let s of i)je[s].isDependency=!0,o[s].enabled=!0;for(let s of t){if(s.settings){s.options??={},s.settings.pluginName=s.name;for(let l in s.settings.def){let c=s.settings.def[l],u=s.settings.checks?.[l];s.options[l]={...c,...u}}}if(s.options)for(let l in s.options){let c=s.options[l];c.onChange!=null&&bt.addChangeListener(`plugins.${s.name}.${l}`,c.onChange)}if(s.patches&&ke(s.name))for(let l of s.patches)$2(l,s.name)}});a();we();re();var EP=q("vc-card-");function Ae({variant:e="normal",defaultPadding:t,children:o,className:n,...i}){return r("div",{className:R(EP("base",e,(t??!n)&&"defaultPadding"),n),...i},o)}Vt();Xo();to();a();var yc=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)}};we();a();function di(e){return!!e}function Rr(e){return e!=null}le();re();dt();v();a();var b0={};rt(b0,{currentNotice:()=>cs,nextNotice:()=>H2,noticesQueue:()=>vc,popNotice:()=>us,showNotice:()=>kn});a();dt();F();var v0;Ve(e=>e.show&&e.dismiss&&!e.suppressAll,e=>v0=e);var vc=[],cs=null;function us(){v0.dismiss()}function H2(){cs=vc.shift(),cs&&v0.show(...cs,"VencordNotice")}function kn(e,t,o){let n=Oh(e)?e:r(M,{fallback:()=>"Error Showing Notice"},e);vc.push(["GENERIC",n,t,o]),cs||H2()}He();a();a();function S0({text:e,color:t}){return r("div",{className:"vc-addon-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}Hi();we();v();var mi=q("vc-addon-");function bc({disabled:e,isNew:t,name:o,infoButton:n,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:d,onMouseLeave:f}){let g=st(null),y=st(null);return r("div",{className:mi("card",{"card-disabled":e}),onMouseEnter:d,onMouseLeave:f},r("div",{className:mi("header")},r("div",{className:mi("name-author")},r(G,{variant:"text-md/bold",className:mi("name")},r("div",{ref:y,className:mi("title-container")},r("div",{ref:g,className:mi("title"),onMouseOver:()=>{let b=g.current,I=y.current;b.style.setProperty("--offset",`${I.clientWidth-b.scrollWidth}px`),b.style.setProperty("--duration",`${Math.max(.5,(b.scrollWidth-I.clientWidth)/7)}s`)}},o)),t&&r(S0,{text:"NEW",color:"#ED4245"})),!!s&&r(G,{variant:"text-md/normal",className:mi("author")},s)),n,r(Sn,{checked:l,onChange:c,disabled:e})),r(G,{className:mi("note"),variant:"text-sm/normal"},u),i)}re();v();a();a();a();var ps="Vendicated/Vencord";var xE=`Vencord/${In}${ps?` (https://github.com/${ps})`:""}`;we();qo();re();$e();F();v();a();a();Hi();v();a();we();re();ir();v();var ds=q("vc-plugins-setting-");function dr(e){return typeof e=="string"?e:e?null:"Invalid input provided"}function mr({tag:e="div",name:t,description:o,error:n,inlineSetting:i,children:s}){return r(e,{className:ds("section")},r("div",{className:R(ds("content"),i&&ds("inline"))},r("div",{className:ds("label")},t&&r(G,{className:ds("title"),variant:"text-md/medium"},dn(yl(t))),o&&r(G,{className:ds("description"),variant:"text-sm/normal"},o)),s),n&&r(G,{className:ds("error"),variant:"text-sm/normal"},n))}function z2({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){let s=t[n]??e.default,[l,c]=A(s??!1),[u,d]=A(null);function f(g){let y=e.isValid?.call(o,g)??!0;c(g),d(dr(y)),y===!0&&i(g)}return r(mr,{tag:"label",name:n,description:e.description,error:u,inlineSetting:!0},r(Sn,{checked:l,onChange:f,disabled:e.disabled?.call(o)??!1}))}a();function W2({option:e,onChange:t}){return e.component({setValue:t,option:e})}a();v();var FP=BigInt(Number.MAX_SAFE_INTEGER);function x0({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){function s(g){return e.type===2?BigInt(g):Number(g)}let[l,c]=A(`${t[n]??e.default??0}`),[u,d]=A(null);function f(g){let y=e.isValid?.call(o,g)??!0;d(dr(y)),y===!0&&i(s(g)),e.type===1&&BigInt(g)>=FP?c(`${Number.MAX_SAFE_INTEGER}`):c(g)}return r(mr,{name:n,description:e.description,error:u},r(yt,{type:"number",pattern:"-?[0-9]+",placeholder:e.placeholder??"Enter a number",value:l,onChange:f,disabled:e.disabled?.call(o)??!1,...e.componentProps}))}a();v();function j2({option:e,pluginSettings:t,definedSettings:o,onChange:n,id:i}){let s=t[i]??e.options?.find(g=>g.default)?.value,[l,c]=A(s??null),[u,d]=A(null);function f(g){let y=e.isValid?.call(o,g)??!0;c(g),d(dr(y)),y===!0&&n(g)}return r(mr,{name:i,description:e.description,error:u},r(mo,{placeholder:e.placeholder??"Select an option",options:e.options,maxVisibleItems:5,closeOnSelect:!0,select:f,isSelected:g=>g===l,serialize:g=>String(g),isDisabled:e.disabled?.call(o)??!1,...e.componentProps}))}a();v();function q2({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){let s=t[n]??e.default,[l,c]=A(null);function u(d){let f=e.isValid?.call(o,d)??!0;c(dr(f)),f===!0&&i(d)}return r(mr,{name:n,description:e.description,error:l},r(Vn,{markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:s,onValueChange:u,onValueRender:d=>String(d.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,disabled:e.disabled?.call(o)??!1,...e.componentProps}))}a();v();function K2({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){let[s,l]=A(t[n]??e.default??null),[c,u]=A(null);function d(f){let g=e.isValid?.call(o,f)??!0;l(f),u(dr(g)),g===!0&&i(f)}return r(mr,{name:n,description:e.description,error:c},e.multiline?r(Jr,{placeholder:e.placeholder??"Enter a value",value:s,onChange:d,disabled:e.disabled?.call(o)??!1,...e.componentProps}):r(yt,{type:"text",placeholder:e.placeholder??"Enter a value",value:s,onChange:d,maxLength:null,disabled:e.disabled?.call(o)??!1,...e.componentProps}))}var Y2={0:K2,1:x0,2:x0,3:z2,4:j2,5:q2,6:W2,7:()=>null};a();qt();S();we();se();re();$e();v();a();He();se();v();function $P(){let e=qs()===2?"#000000":"#FFFFFF";return r($l,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function GP(){let e=qs()===2?"#000000":"#FFFFFF";return r(jh,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function Z2({text:e,href:t,Icon:o}){return r(V,{text:e},n=>r(Kl,{...n,href:t},r(o,null)))}var pp=e=>r(Z2,{...e,Icon:GP}),dp=e=>r(Z2,{...e,Icon:$P});var ha=q("vc-author-modal-");function fi(e){ue(t=>r(ge,{...t},r(M,null,r(xe,{className:ha("root")},r(HP,{user:e})))))}function HP({user:e}){Be();let t=ie([_t],()=>_t.getUserProfile(e.id));te(()=>{!t&&!e.bot&&e.id&&Rl(e.id)},[e.id,e.bot,t]);let o=t?.connectedAccounts?.find(l=>l.type==="github")?.name,n=t?.connectedAccounts?.find(l=>l.type==="domain")?.name,i=ce(()=>{let l=Object.values(je);return(Di[e.id]?l.filter(u=>u.authors.includes(Di[e.id])):l.filter(u=>u.authors.some(d=>d.name===e.username))).filter(u=>!u.name.endsWith("API")).sort((u,d)=>Number(u.required??!1)-Number(d.required??!1))},[e.id,e.username]),s=r(Oe,{href:"https://vencord.dev/source"},"contributed");return r(p,null,r("div",{className:ha("header")},r("img",{className:ha("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),r(T.FormTitle,{tag:"h2",className:ha("name")},e.username),r("div",{className:R("vc-settings-modal-links",ha("links"))},n&&r(pp,{text:n,href:`https://${n}`}),o&&r(dp,{text:o,href:`https://github.com/${o}`}))),i.length?r(T.FormText,null,"This person has ",s," to ",hh(i.length,"plugin"),"!"):r(T.FormText,null,"This person has not made any plugins. They likely ",s," to Vencord in other ways!"),!!i.length&&r("div",{className:ha("plugins")},i.map(l=>r(Sc,{key:l.name,plugin:l,disabled:l.required??!1,onRestartNeeded:()=>_e("Restart to apply changes!")}))))}var Q2=q("vc-plugin-modal-"),T0=Z("moreUsers","avatar","clickableAvatar"),zP=It(()=>C.getCurrentUser().constructor);function w0(e){let t=new zP({username:e.username,id:e.id??sc(),avatar:e.avatar,bot:!0});return L.dispatch({type:"USER_UPDATE",user:t}),t}function J2({plugin:e,onRestartNeeded:t,onClose:o,transitionState:n}){let i=Be([`plugins.${e.name}.*`]).plugins[e.name],s=!!(i&&e.options&&!Li(e.options)),l=ce(()=>[w0({username:"Loading...",id:"-1465912127305809920"})],[]),[c,u]=A([]);te(()=>{(async()=>{for(let y of e.authors.slice(0,6))try{let b=y.id?await po.getUser(String(y.id)).catch(()=>w0({username:y.name})):w0({username:y.name});u(I=>[...I,b])}catch{continue}})()},[e.authors]);function d(){if(!s||!e.options)return r(T.FormText,null,"There are no settings for this plugin.");let y=Object.entries(e.options).map(([b,I])=>{if(I.type===7||I.hidden)return null;function w(N){let _=e.options?.[b];!_||_.type===7||(i[b]=N,_.restartNeeded&&t(b))}let D=Y2[I.type];return r(M,{noop:!0,key:b},r(D,{id:b,option:I,onChange:Zt(w),pluginSettings:i,definedSettings:e.settings}))});return r("div",{className:"vc-plugins-settings"},y)}function f(y,b){let I=e.authors.length-b,w=e.authors.length-I,D=w+e.authors.length-b;return r(V,{text:e.authors.slice(w,D).map(N=>N.name).join(", ")},({onMouseEnter:N,onMouseLeave:_})=>r("div",{className:T0.moreUsers,onMouseEnter:N,onMouseLeave:_},"+",I))}let g=gi[e.name];return r(ge,{transitionState:n,size:"medium"},r(Ce,{separator:!1,className:k.bottom8},r(G,{variant:"heading-xl/bold",style:{flexGrow:1}},e.name),r(Ke,{onClick:o})),r(xe,{className:"vc-settings-modal-content"},r("section",null,r(Y,{className:Q2("info")},r(T.FormText,{className:Q2("description")},e.description),!g.userPlugin&&r("div",{className:"vc-settings-modal-links"},r(pp,{text:"View more info",href:`https://vencord.dev/plugins/${e.name}`}),r(dp,{text:"View source code",href:`https://github.com/${ps}/tree/main/src/plugins/${g.folderName}`}))),r(G,{variant:"heading-lg/semibold",className:R(k.top8,k.bottom8)},"Authors"),r("div",{style:{width:"fit-content"}},r(M,{noop:!0},r(Pr,{users:c.length?c:l,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,renderMoreUsers:f,renderUser:y=>r(oo,{className:T0.clickableAvatar,onClick:()=>fi(y)},r("img",{className:T0.avatar,src:y.getAvatarURL(void 0,80,!0),alt:y.username,title:y.username}))})))),!!e.settingsAboutComponent&&r("div",{className:k.top16},r("section",null,r(M,{message:"An error occurred while rendering this plugin's custom Info Component"},r(e.settingsAboutComponent,null)))),r("section",null,r(G,{variant:"heading-lg/semibold",className:R(k.top16,k.bottom8)},"Settings"),d())))}function fr(e,t){ue(o=>r(J2,{...o,plugin:e,onRestartNeeded:n=>t?.(e.name,n)}))}function Sc({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:n,onMouseLeave:i,isNew:s}){let l=$.plugins[e.name],c=()=>ke(e.name);function u(){let d=c();if(!d){let{restartNeeded:g,failures:y}=up(e);if(y.length){X2.error(`Failed to start dependencies for ${e.name}: ${y.join(", ")}`),kn("Failed to start dependencies: "+y.join(", "),"Close",()=>null);return}if(g){l.enabled=!0,o(e.name,"enabled");return}}if(cp(e)){l.enabled=!d,o(e.name,"enabled");return}if(d&&!e.started){l.enabled=!d;return}if(!(d?h0(e):gc(e))){l.enabled=!1;let g=`Error while ${d?"stopping":"starting"} plugin ${e.name}`;_e(g,j.Type.FAILURE,{position:j.Position.BOTTOM});return}l.enabled=!d}return r(bc,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:u,disabled:t,onMouseEnter:n,onMouseLeave:i,infoButton:r("button",{role:"switch",onClick:()=>fr(e,o),className:Dr("info-button")},e.options&&!Li(e.options)?r(Bl,{className:Dr("info-icon")}):r(Fi,{className:Dr("info-icon")}))})}a();br();He();to();Hi();we();re();$e();v();var ms=q("vc-plugin-ui-elements-");function eS(){return r(oo,{onClick:()=>ue(e=>r(WP,{...e}))},r(Ae,{className:ms("button"),defaultPadding:!0},r("div",{className:ms("button-description")},r(ee,{size:"md",weight:"semibold"},"Manage plugin UI elements"),r(ee,{size:"xs"},"Allows you to hide buttons you don't like")),r("svg",{className:ms("button-arrow"),"aria-hidden":"true",viewBox:"0 0 24 24"},r("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"}))))}function V2(e){let{buttonMap:t,description:o,title:n,settings:i}=e,s=Array.from(t,([l,{icon:c}])=>{let u=c??Gl;return r(ee,{size:"md",weight:"semibold",key:l,className:ms("switches-row")},r(u,{height:20,width:20}),l,r(Sn,{checked:i[l]?.enabled??!0,onChange:d=>{i[l]??={},i[l].enabled=d}}))});return r("section",null,r(ao,{tag:"h3",size:"xl",weight:"bold"},n),r(ee,{size:"sm",className:R(k.top8,k.bottom20)},o),r("div",{className:ms("switches")},s.length===0&&r(ee,{weight:"medium",className:ms("switches-row"),style:{color:"var(--text-muted)"}},"Buttons of enabled plugins will appear here."),s))}function WP(e){let{uiElements:t}=Be(["uiElements.*"]);return r(ge,{...e,size:"medium"},r(xe,{className:ms("modal-content")},r(V2,{title:"Chatbar Buttons",description:"These are the buttons on the right side of the chat input bar",buttonMap:Ji,settings:t.chatBarButtons}),r(V2,{title:"Message Popover Buttons",description:"These are the floating buttons on the right when you hover over a message",buttonMap:fa,settings:t.messagePopoverButtons})))}var Dr=q("vc-plugins-"),X2=new B("PluginSettings","#a6d189");function jP({required:e}){return r(Ae,{variant:e?"warning":"normal",className:Dr("info-card")},e?r(p,null,r(Zr,null,"Restart required!"),r(ee,{className:Dr("dep-text")},"Restart now to apply new plugins and their settings"),r(U,{onClick:()=>location.reload(),className:Dr("restart-button")},"Restart")):r(p,null,r(Zr,null,"Plugin Management"),r(ee,null,"Press the cog wheel or info icon to get more info on a plugin"),r(ee,null,"Plugins with a cog wheel have settings you can modify!")))}function qP({search:e}){let t=e?Object.entries(tS).filter(([n])=>n.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 r(ee,{className:k.top16},t.length?r(p,null,r(ee,null,"Are you looking for:"),r("ul",null,t.map(([n,i])=>r("li",{key:n},r("b",null,n),": Only available on the ",o[i])))):"No plugins meet the search criteria.")}function KP(){let e=Be(),t=ce(()=>new yc,[]);Bh(()=>{t.hasChanges&&Ee.show({title:"Restart required",body:r(p,null,r("p",null,"The following plugins require a restart:"),r("div",null,t.map((w,D)=>r(p,null,D>0&&", ",Me.parse("`"+w.split(".")[0]+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})},[]);let o=ce(()=>{let w={};for(let D in je){let N=je[D].dependencies;if(N)for(let _ of N)w[_]??=[],w[_].push(D)}return w},[]),n=ce(()=>Object.values(je).sort((w,D)=>w.name.localeCompare(D.name)),[]),i=ce(()=>!1,[]),[s,l]=A({value:"",status:0}),c=s.value.toLowerCase(),u=w=>l(D=>({...D,value:w})),d=w=>l(D=>({...D,status:w})),f=w=>{let{status:D}=s,N=ke(w.name);switch(D){case 2:if(N)return!1;break;case 1:if(!N)return!1;break;case 3:if(!g?.includes(w.name))return!1;break;case 4:if(!gi[w.name]?.userPlugin)return!1;break;case 5:if(!w.name.endsWith("API"))return!1;break}return c.length?w.name.toLowerCase().includes(c)||w.description.toLowerCase().includes(c)||w.tags?.some(_=>_.toLowerCase().includes(c)):!0},[g]=pt(()=>zt("Vencord_existingPlugins").then(w=>{let D=Date.now()/1e3,N={},_=Object.values(n).map(H=>H.name),W=[];for(let{name:H}of n)(N[H]=w?.[H]??D)+3600*24*2>D&&W.push(H);return Wt("Vencord_existingPlugins",N),Ki.isEqual(W,_)?[]:W})),y=[],b=[],I=s.status===5;for(let w of n){if(w.hidden||!w.options&&w.name.endsWith("API")&&!I||!f(w))continue;if(w.required||w.isDependency||o[w.name]?.some(N=>e.plugins[N].enabled)){let N=w.required||!o[w.name]?"This plugin is required for Vencord to function.":YP(o[w.name]?.filter(_=>e.plugins[_].enabled));b.push(r(V,{text:N,key:w.name},({onMouseLeave:_,onMouseEnter:W})=>r(Sc,{onMouseLeave:_,onMouseEnter:W,onRestartNeeded:(H,K)=>t.handleChange(`${H}.${K}`),disabled:!0,plugin:w,key:w.name})))}else y.push(r(Sc,{onRestartNeeded:(N,_)=>t.handleChange(`${N}.${_}`),disabled:!1,plugin:w,isNew:g?.includes(w.name),key:w.name}))}return r(Eo,null,r(jP,{required:t.hasChanges}),r(eS,null),r(Zr,{className:R(k.top20,k.bottom8)},"Filters"),r("div",{className:R(k.bottom20,Dr("filter-controls"))},r(M,{noop:!0},r(yt,{autoFocus:!0,value:s.value,placeholder:"Search for a plugin...",onChange:u})),r("div",null,r(M,{noop:!0},r(mo,{options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3},i&&{label:"Show UserPlugins",value:4},{label:"Show API Plugins",value:5}].filter(di),serialize:String,select:d,isSelected:w=>w===s.status,closeOnSelect:!0})))),r(Zr,{className:k.top20},"Plugins"),y.length||b.length?r("div",{className:Dr("grid")},y.length?y:r(ee,null,"No plugins meet the search criteria.")):r(qP,{search:c}),r(Ue,{className:k.top20}),r(Zr,{className:R(k.top20,k.bottom8)},"Required Plugins"),r("div",{className:Dr("grid")},b.length?b:r(ee,null,"No plugins meet the search criteria.")))}function YP(e){return r(p,null,r(ee,null,"This plugin is required by:"),e.map(t=>r(ee,{key:t,className:Dr("dep-text")},t)))}var ya=Fo(KP,"Plugins");a();a();le();a();function mp(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 fp(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))})}v();var oS=(e,t)=>j.show({type:e,message:t,id:j.genId()}),ZP=()=>oS(j.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),QP=e=>oS(j.Type.FAILURE,`Failed to import settings: ${String(e)}`),JP=new B("SettingsSync:Offline","#39b7e0");function rS(e){if(e==null||typeof e!="object")return!0;for(let t in e)if(["__proto__","constructor","prototype"].includes(t)||!rS(e[t]))return!1;return!0}async function I0(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if(!rS(t))throw new Error("Unsafe Settings");if("settings"in t&&"quickCss"in t)Object.assign(Cr,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 P0({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 nS(){let e=`vencord-settings-backup-${aa().format("YYYY-MM-DD")}.json`,t=await P0(),o=new TextEncoder().encode(t);mp(new File([o],e,{type:"application/json"}))}async function iS(e=!0){{let t=await fp("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await I0(o.result),e&&ZP()}catch(n){JP.error(n),e&&QP(n)}},o.readAsText(t)}}Xo();to();v();function XP(){return r(Eo,null,r(Y,{flexDirection:"column",gap:"0.5em"},r(Ae,{variant:"warning"},r(eo,{tag:"h4"},"Warning"),r(ee,null,"Importing a settings file will overwrite your current settings.")),r(G,{variant:"text-md/normal",className:k.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),r(eo,{tag:"h4"},"Settings Export contains:"),r(G,{variant:"text-md/normal",className:k.bottom8},r("ul",null,r("li",null,"\u2014 Custom QuickCSS"),r("li",null,"\u2014 Theme Links"),r("li",null,"\u2014 Plugin Settings"))),r(Y,null,r(U,{onClick:()=>iS()},"Import Settings"),r(U,{onClick:nS},"Export Settings"))))}var gp=Fo(XP,"Backup & Restore");a();a();var C0={};rt(C0,{requestPermission:()=>pS,showNotification:()=>qe});a();a();a();var Ao=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}};v();a();re();v();var hp=M.wrap(function({title:t,body:o,richBody:n,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:d,className:f,dismissOnClick:g}){let{timeout:y,position:b}=Be(["notifications.timeout","notifications.position"]).notifications,I=ie([Vr],()=>Vr.isFocused()),[w,D]=A(!1),[N,_]=A(0),W=ce(()=>Date.now(),[y,w,I]);te(()=>{if(w||!I||y===0||d)return void _(0);let K=setInterval(()=>{let pe=Date.now()-W;pe>=y?c():_(pe)},10);return()=>clearInterval(K)},[y,w,I]);let H=N/y;return r("button",{className:R("vc-notification-root",f),style:b==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),g!==!1&&c()},onContextMenu:K=>{K.preventDefault(),K.stopPropagation(),c()},onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1)},r("div",{className:"vc-notification"},s&&r("img",{className:"vc-notification-icon",src:s,alt:""}),r("div",{className:"vc-notification-content"},r("div",{className:"vc-notification-header"},r("h2",{className:"vc-notification-title"},t),r("button",{className:"vc-notification-close-btn",onClick:K=>{K.preventDefault(),K.stopPropagation(),c()}},r("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},r("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),r("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??r("p",{className:"vc-notification-p"},o))),u&&r("img",{className:"vc-notification-img",src:u,alt:""}),y!==0&&!d&&r("div",{className:"vc-notification-progressbar",style:{width:`${(1-H)*100}%`,backgroundColor:i||"var(--brand-500)"}}))},{onError:({props:e})=>e.onClose()});a();a();re();$e();v();function sS(){return r("section",{className:k.top16},r(T.FormTitle,{tag:"h5"},"Notifications"),r(T.FormText,{className:k.bottom8},"Settings for Notifications sent by Vencord. This does NOT include Discord notifications (messages, etc)"),r(Y,null,r(U,{onClick:M0},"Notification Settings"),r(U,{onClick:va},"View Notification Log")))}function M0(){ue(e=>r(ge,{...e,size:"medium"},r(Ce,null,r(G,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Settings"),r(Ke,{onClick:e.onClose})),r(xe,null,r(VP,null))))}function VP(){let e=Be(["notifications.*"]).notifications;return r("div",{style:{padding:"1em 0"}},r(T.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&r(Rt,{style:{padding:"1em"},className:k.bottom8},r(T.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),r(T.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),r(T.FormText,{className:k.bottom8},"Some plugins may show you notifications. These come in two styles:",r("ul",null,r("li",null,r("strong",null,"Vencord Notifications"),": These are in-app notifications"),r("li",null,r("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),r(mo,{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:Us}),r(T.FormTitle,{tag:"h5",className:k.top16+" "+k.bottom8},"Notification Position"),r(mo,{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:Us}),r(T.FormTitle,{tag:"h5",className:k.top16+" "+k.bottom8},"Notification Timeout"),r(T.FormText,{className:k.bottom16},"Set to 0s to never automatically time out"),r(Vn,{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}),r(T.FormTitle,{tag:"h5",className:k.top16+" "+k.bottom8},"Notification Log Limit"),r(T.FormText,{className:k.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",r("code",null,"0")," to disable Notification log and ",r("code",null,"\u221E")," to never automatically remove old Notifications"),r(Vn,{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}))}we();$e();dt();v();a();a();var aS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var lS=(e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=aS[o[e]&63];return t};var yp="notification-log",cS=async()=>await zt(yp)??[],hi=q("vc-notification-log-"),xc=new Set;async function uS(e){if(e.noPersist)return;let t=$.notifications.logLimit;t!==0&&(await cr(yp,o=>{let n=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:d,...f}=e;return n.unshift({...f,timestamp:Date.now(),id:lS()}),n.length>t&&t!==200&&(n.length=t),n}),xc.forEach(o=>o()))}async function eM(e){let t=await cS(),o=t.findIndex(n=>n.timestamp===e);o!==-1&&(t.splice(o,1),await Wt(yp,t),xc.forEach(n=>n()))}function tM(){let[e,t]=Ws(s=>s+1,0);te(()=>(xc.add(t),()=>void xc.delete(t)),[]);let[o,n,i]=pt(cS,{fallbackValue:[],deps:[e]});return[o,i]}function oM({data:e}){let[t,o]=A(!1);return r("div",{className:hi("wrapper",{removing:t})},r(hp,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>eM(e.timestamp),200))},richBody:r("div",{className:hi("body-wrapper")},r("div",{className:hi("body")},e.body),r(ro,{timestamp:new Date(e.timestamp),className:hi("timestamp")}))}))}function rM({log:e,pending:t}){return!e.length&&!t?r("div",{className:hi("container")},r("div",{className:hi("empty")}),r(T.FormText,{style:{textAlign:"center"}},"No notifications yet")):r(u1,{className:hi("container"),sections:[e.length],sectionHeight:0,rowHeight:120,renderSection:()=>null,renderRow:o=>r(oM,{data:e[o.row],key:e[o.row].id})})}function nM({modalProps:e,close:t}){let[o,n]=tM();return r(ge,{...e,size:"large",className:hi("modal")},r(Ce,null,r(G,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),r(Ke,{onClick:t})),r("div",{style:{width:"100%"}},r(rM,{log:o,pending:n})),r(ht,null,r(Y,null,r(U,{onClick:M0},"Notification Settings"),r(U,{disabled:o.length===0,color:U.Colors.RED,onClick:()=>{Ee.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 Wt(yp,[]),xc.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log"))))}function va(){let e=ue(t=>r(nM,{modalProps:t,close:()=>gn(e)}))}var iM=new Ao,N0,sM=42;function aM(){if(!N0){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),N0=ji(e)}return N0}function lM(e,t){let o=aM();return new Promise(n=>{o.render(r(hp,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),n()}}))})}function cM(){if(typeof Notification>"u")return!1;let{useNative:e}=$.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function pS(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function qe(e){if(uS(e),cM()&&await pS()){let{title:t,body:o,icon:n,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:n,image:i});c.onclick=s,c.onclose=l}else iM.push(()=>lM(e,sM++))}le();$e();v();var dS=new B("SettingsSync:CloudSetup","#39b7e0"),yi=()=>new URL($.cloud.url),k0=()=>yi().origin;async function ba(){let{host:e}=yi();return e==="api.vencord.dev"||await VencordNative.csp.isDomainAllowed($.cloud.url,["connect-src"])?!0:(await VencordNative.csp.requestAddOverride($.cloud.url,["connect-src"],"Cloud Sync")==="ok"&&Ee.show({title:"Cloud Integration enabled",body:`${e} has been added to the whitelist. Please restart the app for the changes to take effect.`,confirmText:"Restart now",cancelText:"Later!",onConfirm:Ut}),!1)}var Tc=()=>{let e=C.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e};async function mS(){let e=await zt("Vencord_cloudSecret")??{},t=k0();return e[t]?(await cr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Tc()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Tc()}`]}async function uM(e){await cr("Vencord_cloudSecret",t=>(t??={},t[`${k0()}:${Tc()}`]=e,t))}async function wc(){await cr("Vencord_cloudSecret",e=>(e??={},delete e[`${k0()}:${Tc()}`],e))}async function A0(){if(await mS()!==void 0){$.cloud.authenticated=!0;return}if(await ba()){try{let o=await fetch(new URL("/v1/oauth/settings",yi()));var{clientId:e,redirectUri:t}=await o.json()}catch{qe({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),$.cloud.authenticated=!1;return}ue(o=>r(Wi,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:n})=>{if(!n){$.cloud.authenticated=!1;return}try{let i=await fetch(n,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(dS.info("Authorized with secret"),await uM(s),qe({title:"Cloud Integration",body:"Cloud integrations enabled!"}),$.cloud.authenticated=!0):(qe({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),$.cloud.authenticated=!1)}catch(i){dS.error("Failed to authorize",i),qe({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),$.cloud.authenticated=!1}}}))}}async function Ic(){let e=await mS();return window.btoa(`${e}:${Tc()}`)}a();a();var{localStorage:$o}=window;le();a();var yo=Uint8Array,rr=Uint16Array,E0=Int32Array,vp=new yo([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]),bp=new yo([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]),O0=new yo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yS=function(e,t){for(var o=new rr(31),n=0;n<31;++n)o[n]=t+=1<<e[n-1];for(var i=new E0(o[30]),n=1;n<30;++n)for(var s=o[n];s<o[n+1];++s)i[s]=s-o[n]<<5|n;return{b:o,r:i}},vS=yS(vp,2),bS=vS.b,_0=vS.r;bS[28]=258,_0[258]=28;var SS=yS(bp,0),pM=SS.b,fS=SS.r,B0=new rr(32768);for(Ye=0;Ye<32768;++Ye)An=(Ye&43690)>>1|(Ye&21845)<<1,An=(An&52428)>>2|(An&13107)<<2,An=(An&61680)>>4|(An&3855)<<4,B0[Ye]=((An&65280)>>8|(An&255)<<8)>>1;var An,Ye,tn=(function(e,t,o){for(var n=e.length,i=0,s=new rr(t);i<n;++i)e[i]&&++s[e[i]-1];var l=new rr(t);for(i=1;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(o){c=new rr(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var d=i<<4|e[i],f=t-e[i],g=l[e[i]-1]++<<f,y=g|(1<<f)-1;g<=y;++g)c[B0[g]>>u]=d}else for(c=new rr(n),i=0;i<n;++i)e[i]&&(c[i]=B0[l[e[i]-1]++]>>15-e[i]);return c}),vi=new yo(288);for(Ye=0;Ye<144;++Ye)vi[Ye]=8;var Ye;for(Ye=144;Ye<256;++Ye)vi[Ye]=9;var Ye;for(Ye=256;Ye<280;++Ye)vi[Ye]=7;var Ye;for(Ye=280;Ye<288;++Ye)vi[Ye]=8;var Ye,Nc=new yo(32);for(Ye=0;Ye<32;++Ye)Nc[Ye]=5;var Ye,dM=tn(vi,9,0),mM=tn(vi,9,1),fM=tn(Nc,5,0),gM=tn(Nc,5,1),R0=function(e){for(var t=e[0],o=1;o<e.length;++o)e[o]>t&&(t=e[o]);return t},Lr=function(e,t,o){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&o},D0=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},F0=function(e){return(e+7)/8|0},xS=function(e,t,o){return(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length),new yo(e.subarray(t,o))};var hM=["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"],Dn=function(e,t,o){var n=new Error(t||hM[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Dn),!o)throw n;return n},yM=function(e,t,o,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return o||new yo(0);var l=!o,c=l||t.i!=2,u=t.i;l&&(o=new yo(i*3));var d=function(il){var sl=o.length;if(il>sl){var Os=new yo(Math.max(sl*2,il));Os.set(o),o=Os}},f=t.f||0,g=t.p||0,y=t.b||0,b=t.l,I=t.d,w=t.m,D=t.n,N=i*8;do{if(!b){f=Lr(e,g,1);var _=Lr(e,g+1,3);if(g+=3,_)if(_==1)b=mM,I=gM,w=9,D=5;else if(_==2){var pe=Lr(e,g,31)+257,z=Lr(e,g+10,15)+4,ne=pe+Lr(e,g+5,31)+1;g+=14;for(var J=new yo(ne),Je=new yo(19),ae=0;ae<z;++ae)Je[O0[ae]]=Lr(e,g+ae*3,7);g+=z*3;for(var be=R0(Je),To=(1<<be)-1,Gt=tn(Je,be,1),ae=0;ae<ne;){var nt=Gt[Lr(e,g,To)];g+=nt&15;var W=nt>>4;if(W<16)J[ae++]=W;else{var kt=0,ot=0;for(W==16?(ot=3+Lr(e,g,3),g+=2,kt=J[ae-1]):W==17?(ot=3+Lr(e,g,7),g+=3):W==18&&(ot=11+Lr(e,g,127),g+=7);ot--;)J[ae++]=kt}}var Qt=J.subarray(0,pe),jt=J.subarray(pe);w=R0(Qt),D=R0(jt),b=tn(Qt,w,1),I=tn(jt,D,1)}else Dn(1);else{var W=F0(g)+4,H=e[W-4]|e[W-3]<<8,K=W+H;if(K>i){u&&Dn(0);break}c&&d(y+H),o.set(e.subarray(W,K),y),t.b=y+=H,t.p=g=K*8,t.f=f;continue}if(g>N){u&&Dn(0);break}}c&&d(y+131072);for(var Rs=(1<<w)-1,nr=(1<<D)-1,sn=g;;sn=g){var kt=b[D0(e,g)&Rs],Wo=kt>>4;if(g+=kt&15,g>N){u&&Dn(0);break}if(kt||Dn(2),Wo<256)o[y++]=Wo;else if(Wo==256){sn=g,b=null;break}else{var jo=Wo-254;if(Wo>264){var ae=Wo-257,wt=vp[ae];jo=Lr(e,g,(1<<wt)-1)+bS[ae],g+=wt}var zr=I[D0(e,g)&nr],Ds=zr>>4;zr||Dn(3),g+=zr&15;var jt=pM[Ds];if(Ds>3){var wt=bp[Ds];jt+=D0(e,g)&(1<<wt)-1,g+=wt}if(g>N){u&&Dn(0);break}c&&d(y+131072);var Ls=y+jo;if(y<jt){var Pu=s-jt,Mu=Math.min(jt,Ls);for(Pu+y<0&&Dn(3);y<Mu;++y)o[y]=n[Pu+y]}for(;y<Ls;++y)o[y]=o[y-jt]}}t.l=b,t.p=sn,t.b=y,t.f=f,b&&(f=1,t.m=w,t.d=I,t.n=D)}while(!f);return y!=o.length&&l?xS(o,0,y):o.subarray(0,y)},Rn=function(e,t,o){o<<=t&7;var n=t/8|0;e[n]|=o,e[n+1]|=o>>8},Pc=function(e,t,o){o<<=t&7;var n=t/8|0;e[n]|=o,e[n+1]|=o>>8,e[n+2]|=o>>16},L0=function(e,t){for(var o=[],n=0;n<e.length;++n)e[n]&&o.push({s:n,f:e[n]});var i=o.length,s=o.slice();if(!i)return{t:wS,l:0};if(i==1){var l=new yo(o[0].s+1);return l[o[0].s]=1,{t:l,l:1}}o.sort(function(K,pe){return K.f-pe.f}),o.push({s:-1,f:25001});var c=o[0],u=o[1],d=0,f=1,g=2;for(o[0]={s:-1,f:c.f+u.f,l:c,r:u};f!=i-1;)c=o[o[d].f<o[g].f?d++:g++],u=o[d!=f&&o[d].f<o[g].f?d++:g++],o[f++]={s:-1,f:c.f+u.f,l:c,r:u};for(var y=s[0].s,n=1;n<i;++n)s[n].s>y&&(y=s[n].s);var b=new rr(y+1),I=U0(o[f-1],b,0);if(I>t){var n=0,w=0,D=I-t,N=1<<D;for(s.sort(function(pe,z){return b[z.s]-b[pe.s]||pe.f-z.f});n<i;++n){var _=s[n].s;if(b[_]>t)w+=N-(1<<I-b[_]),b[_]=t;else break}for(w>>=D;w>0;){var W=s[n].s;b[W]<t?w-=1<<t-b[W]++-1:++n}for(;n>=0&&w;--n){var H=s[n].s;b[H]==t&&(--b[H],++w)}I=t}return{t:new yo(b),l:I}},U0=function(e,t,o){return e.s==-1?Math.max(U0(e.l,t,o+1),U0(e.r,t,o+1)):t[e.s]=o},gS=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new rr(++t),n=0,i=e[0],s=1,l=function(u){o[n++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return{c:o.subarray(0,n),n:t}},Mc=function(e,t){for(var o=0,n=0;n<t.length;++n)o+=e[n]*t[n];return o},TS=function(e,t,o){var n=o.length,i=F0(t+2);e[i]=n&255,e[i+1]=n>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<n;++s)e[i+s+4]=o[s];return(i+4+n)*8},hS=function(e,t,o,n,i,s,l,c,u,d,f){Rn(t,f++,o),++i[256];for(var g=L0(i,15),y=g.t,b=g.l,I=L0(s,15),w=I.t,D=I.l,N=gS(y),_=N.c,W=N.n,H=gS(w),K=H.c,pe=H.n,z=new rr(19),ne=0;ne<_.length;++ne)++z[_[ne]&31];for(var ne=0;ne<K.length;++ne)++z[K[ne]&31];for(var J=L0(z,7),Je=J.t,ae=J.l,be=19;be>4&&!Je[O0[be-1]];--be);var To=d+5<<3,Gt=Mc(i,vi)+Mc(s,Nc)+l,nt=Mc(i,y)+Mc(s,w)+l+14+3*be+Mc(z,Je)+2*z[16]+3*z[17]+7*z[18];if(u>=0&&To<=Gt&&To<=nt)return TS(t,f,e.subarray(u,u+d));var kt,ot,Qt,jt;if(Rn(t,f,1+(nt<Gt)),f+=2,nt<Gt){kt=tn(y,b,0),ot=y,Qt=tn(w,D,0),jt=w;var Rs=tn(Je,ae,0);Rn(t,f,W-257),Rn(t,f+5,pe-1),Rn(t,f+10,be-4),f+=14;for(var ne=0;ne<be;++ne)Rn(t,f+3*ne,Je[O0[ne]]);f+=3*be;for(var nr=[_,K],sn=0;sn<2;++sn)for(var Wo=nr[sn],ne=0;ne<Wo.length;++ne){var jo=Wo[ne]&31;Rn(t,f,Rs[jo]),f+=Je[jo],jo>15&&(Rn(t,f,Wo[ne]>>5&127),f+=Wo[ne]>>12)}}else kt=dM,ot=vi,Qt=fM,jt=Nc;for(var ne=0;ne<c;++ne){var wt=n[ne];if(wt>255){var jo=wt>>18&31;Pc(t,f,kt[jo+257]),f+=ot[jo+257],jo>7&&(Rn(t,f,wt>>23&31),f+=vp[jo]);var zr=wt&31;Pc(t,f,Qt[zr]),f+=jt[zr],zr>3&&(Pc(t,f,wt>>5&8191),f+=bp[zr])}else Pc(t,f,kt[wt]),f+=ot[wt]}return Pc(t,f,kt[256]),f+ot[256]},vM=new E0([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),wS=new yo(0),bM=function(e,t,o,n,i,s){var l=s.z||e.length,c=new yo(n+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(n,c.length-i),d=s.l,f=(s.r||0)&7;if(t){f&&(u[0]=s.r>>3);for(var g=vM[t-1],y=g>>13,b=g&8191,I=(1<<o)-1,w=s.p||new rr(32768),D=s.h||new rr(I+1),N=Math.ceil(o/3),_=2*N,W=function(rh){return(e[rh]^e[rh+1]<<N^e[rh+2]<<_)&I},H=new E0(25e3),K=new rr(288),pe=new rr(32),z=0,ne=0,J=s.i||0,Je=0,ae=s.w||0,be=0;J+2<l;++J){var To=W(J),Gt=J&32767,nt=D[To];if(w[Gt]=nt,D[To]=Gt,ae<=J){var kt=l-J;if((z>7e3||Je>24576)&&(kt>423||!d)){f=hS(e,u,0,H,K,pe,ne,Je,be,J-be,f),Je=z=ne=0,be=J;for(var ot=0;ot<286;++ot)K[ot]=0;for(var ot=0;ot<30;++ot)pe[ot]=0}var Qt=2,jt=0,Rs=b,nr=Gt-nt&32767;if(kt>2&&To==W(J-nr))for(var sn=Math.min(y,kt)-1,Wo=Math.min(32767,J),jo=Math.min(258,kt);nr<=Wo&&--Rs&&Gt!=nt;){if(e[J+Qt]==e[J+Qt-nr]){for(var wt=0;wt<jo&&e[J+wt]==e[J+wt-nr];++wt);if(wt>Qt){if(Qt=wt,jt=nr,wt>sn)break;for(var zr=Math.min(nr,wt-2),Ds=0,ot=0;ot<zr;++ot){var Ls=J-nr+ot&32767,Pu=w[Ls],Mu=Ls-Pu&32767;Mu>Ds&&(Ds=Mu,nt=Ls)}}}Gt=nt,nt=w[Gt],nr+=Gt-nt&32767}if(jt){H[Je++]=268435456|_0[Qt]<<18|fS[jt];var il=_0[Qt]&31,sl=fS[jt]&31;ne+=vp[il]+bp[sl],++K[257+il],++pe[sl],ae=J+Qt,++z}else H[Je++]=e[J],++K[e[J]]}}for(J=Math.max(J,ae);J<l;++J)H[Je++]=e[J],++K[e[J]];f=hS(e,u,d,H,K,pe,ne,Je,be,J-be,f),d||(s.r=f&7|u[f/8|0]<<3,f-=7,s.h=D,s.p=w,s.i=J,s.w=ae)}else{for(var J=s.w||0;J<l+d;J+=65535){var Os=J+65535;Os>=l&&(u[f/8|0]=d,Os=l),f=TS(u,f+1,e.subarray(J,Os))}s.i=l}return xS(c,0,n+F0(f)+i)};var SM=function(e,t,o,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),l=new yo(s.length+e.length);l.set(s),l.set(e,s.length),e=l,i.w=s.length}return bM(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,n,i)};function IS(e,t){return SM(e,t||{},0,0)}function PS(e,t){return yM(e,{i:2},t&&t.out,t&&t.dictionary)}var xM=typeof TextDecoder<"u"&&new TextDecoder,TM=0;try{xM.decode(wS,{stream:!0}),TM=1}catch{}var gr=new B("SettingsSync:Cloud","#39b7e0");function Sp(e){let t=$o.Vencord_cloudSyncDirection;return t===e||t==="both"}async function Cc(e){let t=await P0({minify:!0});if(await ba())try{let o=await fetch(new URL("/v1/settings",yi()),{method:"PUT",headers:{Authorization:await Ic(),"Content-Type":"application/octet-stream"},body:IS(new TextEncoder().encode(t))});if(!o.ok){gr.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:n}=await o.json();Cr.cloud.settingsSyncVersion=n,VencordNative.settings.set(Cr),gr.info("Settings uploaded to cloud successfully"),e&&qe({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0}),delete $o.Vencord_settingsDirty}catch(o){gr.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 xp(e=!0,t=!1){if(await ba())try{let o=await fetch(new URL("/v1/settings",yi()),{method:"GET",headers:{Authorization:await Ic(),Accept:"application/octet-stream","If-None-Match":$.cloud.settingsSyncVersion.toString()}});if(o.status===404)return gr.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 gr.info("Settings up to date"),e&&qe({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return gr.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 n=Number(o.headers.get("etag")),i=$.cloud.settingsSyncVersion;if(!t&&n<i){e&&qe({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await o.arrayBuffer(),l=new TextDecoder().decode(PS(new Uint8Array(s)));return await I0(l),Cr.cloud.settingsSyncVersion=n,VencordNative.settings.set(Cr),gr.info("Settings loaded from cloud successfully"),e&&qe({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Ut,noPersist:!0}),delete $o.Vencord_settingsDirty,!0}catch(o){return gr.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 MS(){if(await ba())try{let e=await fetch(new URL("/v1/settings",yi()),{method:"DELETE",headers:{Authorization:await Ic()}});if(!e.ok){gr.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}gr.info("Settings deleted from cloud successfully"),qe({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){gr.error("Failed to delete",e),qe({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}async function NS(){if(!await ba())return;let e=await fetch(new URL("/v1/",yi()),{method:"DELETE",headers:{Authorization:await Ic()}});if(!e.ok){gr.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}$.cloud.authenticated=!1,await wc(),qe({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}br();Po();a();v();function kc({value:e,onChange:t,validate:o}){let[n,i]=ye.useState(e),[s,l]=ye.useState();function c(u){i(u);let d=o(u);d===!0?(l(void 0),t(u)):l(d)}return r(p,null,r(yt,{type:"text",value:n,onChange:c,error:s}))}Vt();Xn();a();function Ac(e){let t={display:e.inline?"inline-grid":"grid",gridTemplateColumns:`repeat(${e.columns}, 1fr)`,gap:e.gap,...e.style};return r("div",{...e,style:t},e.children)}Xo();He();qt();to();re();v();function wM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}var $0=({text:e})=>r(ao,{tag:"h5",size:"lg",weight:"semibold",className:k.bottom16},e);function Rc({children:e,Icon:t,className:o,...n}){return r(et,{...n,className:R("vc-cloud-icon-with-button",o)},r(t,{className:"vc-cloud-button-icon"}),e)}function IM(){let{cloud:e}=Be(["cloud.authenticated","cloud.url"]);return r("section",null,r($0,{text:"Cloud Integrations"}),r(ee,{size:"md",className:k.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",r(Oe,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",r(Oe,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),r(Jo,{key:"backend",title:"Enable Cloud Integrations",description:"This will request authorization if you have not yet set up cloud integrations.",value:e.authenticated,onChange:t=>{t?A0():e.authenticated=t}}),r(eo,{tag:"h5",className:k.top16},"Backend URL"),r(ee,{className:k.bottom8},"Which backend to use when using cloud integrations."),r(kc,{key:"backendUrl",value:e.url,onChange:async t=>{e.url=t,e.authenticated=!1,wc()},validate:wM}),r(Ac,{columns:1,gap:"1em",className:k.top8},r(Rc,{variant:"primary",disabled:!e.authenticated,onClick:async()=>{await wc(),e.authenticated=!1,await A0()},Icon:$i},"Reauthorise")))}function PM(){let{cloud:e}=Be(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return r("section",null,r($0,{text:"Settings Sync"}),r(Y,{flexDirection:"column",gap:"1em"},r(Jo,{key:"cloud-sync",title:"Enable Settings Sync",description:"Save your Vencord settings to the cloud so you can easily keep them the same on all your devices",value:e.settingsSync,onChange:o=>{e.settingsSync=o},disabled:!e.authenticated,hideBorder:!0}),r("div",null,r(eo,{tag:"h5"},"Sync Rules for This Device"),r(ee,{className:k.bottom8},"This setting controls how settings move between ",r("strong",null,"this device")," and the cloud. You can let changes flow both ways, or choose one place to be the main source of truth."),r(mo,{options:[{label:"Two-way sync (changes go both directions)",value:"both",default:!0},{label:"This device is the source (upload only)",value:"push"},{label:"The cloud is the source (download only)",value:"pull"},{label:"Do not sync automatically (manual sync via buttons below only)",value:"manual"}],isSelected:o=>o===$o.Vencord_cloudSyncDirection,serialize:o=>String(o),select:o=>{$o.Vencord_cloudSyncDirection=o},closeOnSelect:!0})),r(Ac,{columns:2,gap:"1em",className:k.top20},r(Rc,{variant:"positive",disabled:!t,onClick:()=>Cc(!0),Icon:Vh},"Upload Settings"),r(V,{text:"This will replace your current settings with the ones saved in the cloud. Be careful!"},({onMouseLeave:o,onMouseEnter:n})=>r(Rc,{variant:"dangerPrimary",onMouseLeave:o,onMouseEnter:n,disabled:!t,onClick:()=>xp(!0,!0),Icon:Xh},"Download Settings")))))}function MM(){let{authenticated:e,settingsSync:t}=Be(["cloud.authenticated","cloud.settingsSync"]).cloud;return r("section",null,r($0,{text:"Reset Cloud Data"}),r(Ac,{columns:2,gap:"1em"},r(Rc,{variant:"dangerPrimary",disabled:!e||!t,onClick:()=>MS(),Icon:Yr},"Delete Settings from Cloud"),r(Rc,{variant:"dangerPrimary",disabled:!e,onClick:()=>Ee.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:NS,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"}),Icon:Yr},"Delete your Cloud Account")))}function NM(){return r(Eo,null,r(Y,{flexDirection:"column",gap:"1em"},r(IM,null),r(Ue,null),r(PM,null),r(Ue,null),r(MM,null)))}var Tp=Fo(NM,"Cloud");a();qt();v();a();Vt();qt();a();v();dt();var CM=["style-src","style-src-elem","img-src","font-src"],Sa=new Set,G0=new Set;document.addEventListener("securitypolicyviolation",({effectiveDirective:e,blockedURI:t})=>{!t||!CM.includes(e)||(Sa.add(t),G0.forEach(o=>o()))});function H0(){let e=Ko();return oi(()=>(G0.add(e),()=>void G0.delete(e)),[e]),[...Sa]}re();dt();v();function CS(){let e=H0(),t=Ko();if(!e.length)return null;let o=s=>s.startsWith("https://imgur.com/"),n=async s=>{let{origin:l,host:c}=new URL(s);await VencordNative.csp.requestAddOverride(l,["connect-src","img-src","style-src","font-src"],"Vencord Themes")==="ok"&&(Sa.forEach(d=>{new URL(d).host===c&&Sa.delete(d)}),t(),Ee.show({title:"Restart Required",body:"A restart is required to apply this change",confirmText:"Restart now",cancelText:"Later!",onConfirm:Ut}))},i=e.some(o);return r(Rt,{className:k.bottom16},r(T.FormTitle,{tag:"h5"},"Blocked Resources"),r(T.FormText,null,"Some images, styles, or fonts were blocked because they come from disallowed domains."),r(T.FormText,null,"It is highly recommended to move them to GitHub or Imgur. But you may also allow domains if you fully trust them."),r(T.FormText,null,"After allowing a domain, you have to fully close (from tray / task manager) and restart ","Vesktop"," to apply the change."),r(T.FormTitle,{tag:"h5",className:R(k.top16,k.bottom8)},"Blocked URLs"),r("div",{className:"vc-settings-csp-list"},e.map((s,l)=>r("div",{key:s},l!==0&&r(Ue,{className:k.bottom8}),r("div",{className:"vc-settings-csp-row"},r(Oe,{href:s},s),r(U,{color:U.Colors.PRIMARY,onClick:()=>n(s),disabled:o(s)},"Allow"))))),i&&r(p,null,r(Ue,{className:R(k.top8,k.bottom16)}),r(T.FormText,null,"Imgur links should be direct links in the form of ",r("code",null,"https://i.imgur.com/...")),r(T.FormText,null,'To obtain a direct link, right-click the image and select "Copy image address".')))}a();He();qt();a();we();var z0=q("vc-settings-quickActions-");function hr(e){let{Icon:t,action:o,text:n,disabled:i}=e;return r("button",{className:z0("pill"),onClick:o,disabled:i},r(t,{className:z0("img")}),n)}function Dc(e){return r(Ae,{className:z0("card")},e.children)}a();S();a();a();function kS(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,n=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,n),s=Math.min(t,o,n),l=i-s,c,u,d;return d=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*d-1)),i===t?c=(o-n)/l%6:i===o?c=(n-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,d*=100,{hue:c,saturation:u,lightness:d}}function AS(e){let t=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4,o=t(parseInt(e.substring(0,2),16)/255),n=t(parseInt(e.substring(2,4),16)/255),i=t(parseInt(e.substring(4,6),16)/255);return o*.2126+n*.7152+i*.0722}a();we();var W0="vc-clientTheme-vars",j0="vc-clientTheme-overrides",fs={};function q0(e){let{hue:t,saturation:o,lightness:n}=kS(e);OS(W0,`:root {
--theme-h: ${t};
--theme-s: ${o}%;
--theme-l: ${n}%;
}`)}async function DS(e){q0(e),DM(await AM())}function LS(){fs[W0]?.remove(),fs[j0]?.remove(),fs[W0]=null,fs[j0]=null}function kM(e){return fs[e]||(fs[e]=_o(e,ss)),fs[e]}function OS(e,t){let o=kM(e);o.textContent=t}async function AM(){let e=document.querySelectorAll('link[rel="stylesheet"]');return(await Promise.all(Array.from(e,async o=>o.href?fetch(o.href).then(n=>n.text()):null))).filter(Boolean).join(`
`)}var RM=/(--neutral-\d{1,3}?-hsl):.+?([\d.]+?)%;/g;function DM(e){let t={};for(let[,i,s]of e.matchAll(RM))t[i]=parseFloat(s);let o=t["--neutral-2-hsl"],n=t["--neutral-69-hsl"];OS(j0,[`.theme-light {
${RS(t,o)}
}`,`.theme-dark {
${RS(t,n)}
}`].join(`
`))}function RS(e,t){return Object.entries(e).map(([o,n])=>{let i=n-t,s=i>=0?"+":"-";return`${o}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${s} ${Math.abs(i).toFixed(2)}%);`}).join(`
`)}we();F();v();var LM=fe('type:"UNSYNCED_USER_SETTINGS_UPDATE','"system"==='),_S=gt("ClientThemesBackgroundStore"),wp=q("vc-clientTheme-"),OM=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];function US(e){let t=e.toString(16).padStart(6,"0");xa.store.color=t,q0(t)}function BS(e){LM({theme:e})}function ES(){let e=ie([oa],()=>oa.theme),t=e==="light",o=t?"Dark":"Light",n=ie([_S],()=>_S.gradientPreset!=null),i=AS(xa.store.color),s=!1,l=!0;return(t&&i<.26||!t&&i>.12)&&(s=!0),i<.26&&i>.12&&(l=!1),t&&i>.65&&(s=!0,l=!1),r("div",{className:wp("settings")},r("div",{className:wp("container")},r("div",{className:wp("settings-labels")},r(T.FormTitle,{tag:"h3"},"Theme Color"),r(T.FormText,null,"Add a color to your Discord client theme")),r(ei,{color:parseInt(xa.store.color,16),onChange:US,showEyeDropper:!1,suggestedColors:OM})),(s||n)&&r(p,null,r(Rt,{className:k.top8},r(T.FormTitle,{tag:"h2"},"Your theme won't look good!"),s&&r(T.FormText,null,">"," Selected color won't contrast well with text"),n&&r(T.FormText,null,">"," Nitro themes aren't supported"),r("div",{className:wp("buttons-container")},s&&l&&r(U,{onClick:()=>BS(o),color:U.Colors.RED},"Switch to ",o," mode"),n&&r(U,{onClick:()=>BS(e),color:U.Colors.RED},"Disable Nitro Theme")))))}function FS(){return r(U,{onClick:()=>US(3224376)},"Reset Theme Color")}var xa=x({color:{type:6,default:"313338",component:ES},resetColor:{type:6,component:FS}}),gs=h({name:"ClientTheme",authors:[m.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:xa,startAt:"DOMContentLoaded",start:()=>DS(xa.store.color),stop:LS});we();F();v();a();He();qt();se();v();function $S({theme:e,enabled:t,onChange:o,onDelete:n}){return r(bc,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:r(Y,{flexDirection:"row",gap:"0.2em"},!!e.website&&r(Oe,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&r(Oe,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&hn(e.invite).catch(()=>_e("Invalid or expired invite"))}},"Discord Server"))})}var _M=q("vc-settings-theme-"),KW=Ot(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef);function GS(e,t){if(t){if($.enabledThemes.includes(e))return;$.enabledThemes=[...$.enabledThemes,e]}else $.enabledThemes=$.enabledThemes.filter(o=>o!==e)}function HS(){let e=Be(["enabledThemes"]),t=st(null),[o,n]=A(null);te(()=>{i()},[]);async function i(){let s=await VencordNative.themes.getThemesList();n(s)}return r(Y,{flexDirection:"column",gap:"1em"},r(Ae,null,r(T.FormTitle,{tag:"h5"},"Find Themes:"),r("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},r(Oe,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),r(Oe,{href:"https://github.com/search?q=discord+theme"},"GitHub")),r(T.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),r(Ae,null,r(T.FormTitle,{tag:"h5"},"External Resources"),r(T.FormText,null,"For security reasons, loading resources (styles, fonts, images, ...) from most sites is blocked."),r(T.FormText,null,"Make sure all your assets are hosted on GitHub, GitLab, Codeberg, Imgur, Discord or Google Fonts.")),r("section",null,r(T.FormTitle,{tag:"h5"},"Local Themes"),r(Dc,null,r(p,null,r(hr,{text:"Open Themes Folder",action:()=>VencordNative.themes.openFolder(),Icon:El}),r(hr,{text:"Load missing Themes",action:i,Icon:$i}),r(hr,{text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor(),Icon:Gi}),ke(gs.name)&&r(hr,{text:"Edit ClientTheme",action:()=>fr(gs),Icon:Fl}))),r("div",{className:_M("grid")},o?.map(s=>r($S,{key:s.fileName,enabled:e.enabledThemes.includes(s.fileName),onChange:l=>GS(s.fileName,l),onDelete:async()=>{GS(s.fileName,!1),await VencordNative.themes.deleteTheme(s.fileName),i()},theme:s})))))}a();v();function zS(){let e=Be(["themeLinks"]),[t,o]=A(e.themeLinks.join(`
`));function n(){e.themeLinks=[...new Set(t.trim().split(/\n+/).map(i=>i.trim()).filter(Boolean))]}return r(Y,{flexDirection:"column",gap:"1em"},r(Ae,{variant:"warning",defaultPadding:!0},r(T.FormText,{size:"md"},"This section is for advanced users. If you are having difficulties using it, use the Local Themes tab instead.")),r(Ae,null,r(T.FormTitle,{tag:"h5"},"Paste links to css files here"),r(T.FormText,null,"One link per line"),r(T.FormText,null,"You can prefix lines with @light or @dark to toggle them based on your Discord theme"),r(T.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),r("section",null,r(T.FormTitle,{tag:"h5"},"Online Themes"),r(Jr,{value:t,onChange:o,className:"vc-settings-theme-links",placeholder:"Enter Theme Links...",spellCheck:!1,onBlur:n,rows:10})))}function BM(){let[e,t]=A(0);return r(Eo,null,r(Mo,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:e,onItemSelect:t},r(Mo.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),r(Mo.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),r(CS,null),e===0&&r(HS,null),e===1&&r(zS,null))}var hs=Fo(BM,"Themes");a();Po();Vt();Xn();Xo();qt();to();re();dt();v();a();qt();re();v();a();v();function UM(e){if(!e?.code||!e.cmd)return`An unknown error occurred.
Please try again or see the console for more info.`;let{code:t,path:o,cmd:n,stderr:i}=e;if(t==="ENOENT")return`Command \`${o}\` not found.
Please install it and try again.`;let s=i||`Code \`${t}\`. See the console for more info.`;return`An error occurred while running \`${n}\`:
${s}`}function K0(e,t){return async()=>{e(!0);try{await t()}catch(o){li.error(o);let n=UM(o);Ee.show({title:"Oops!",body:r(Rt,null,n.split(`
`).map((i,s)=>r("div",{key:s},Me.parse(i))))})}finally{e(!1)}}}function Y0({repo:e,hash:t,disabled:o=!1}){return r(Oe,{href:`${e}/commit/${t}`,disabled:o},t)}function WS({updates:e,repo:t,repoPending:o}){return r(Ae,{style:{padding:"0 0.5em"},defaultPadding:!1},e.map(({hash:n,author:i,message:s})=>r("div",{key:n,style:{marginTop:"0.5em",marginBottom:"0.5em"}},r("code",null,r(Y0,{repo:t,hash:n,disabled:o})),r("span",{style:{marginLeft:"0.5em",color:"var(--text-default)"}},s," - ",i))))}function jS(e){return r(p,null,r(T.FormText,{className:k.bottom8},"Your local copy has more recent commits. Please stash or reset them."),r(WS,{...e,updates:Qi}))}function qS(e){let[t,o]=A(Qi),[n,i]=A(!1),[s,l]=A(!1),c=(t?.length??0)>0;return r(p,null,!t&&ua?r(p,null,r(T.FormText,null,"Failed to check updates. Check the console for more info"),r(Rt,{style:{padding:"1em"}},r("p",null,ua.stderr||ua.stdout||"An unknown error occurred"))):r(T.FormText,{className:k.bottom8},c?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),c&&r(WS,{updates:t,...e}),r(Y,{className:R(k.bottom8,k.top8)},c&&r(U,{disabled:s||n,onClick:K0(l,async()=>{await ci()&&(o([]),await new Promise(u=>{Ee.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){Ut(),u()},onCancel:u})}))})},"Update Now"),r(U,{disabled:s||n,onClick:K0(i,async()=>{await Pn()?o(Qi):(o([]),j.show({message:"No updates found!",id:j.genId(),type:j.Type.MESSAGE,options:{position:j.Position.BOTTOM}}))})},"Check for Updates")))}function EM(){let[e]=pt(VesktopNative.app.isOutdated,{fallbackValue:!1});return r(Y,{className:k.bottom20,flexDirection:"column",gap:"1em"},r(Ae,{variant:"info"},r(Ir,null,"Vesktop & Vencord"),r(ee,null,"Vesktop and Vencord are two separate things. This updater is for Vencord."),r(ee,{className:k.top8},"You receive separate popups for Vesktop updates. You can also manually update by installing the ",r(Oe,{href:"https://vesktop.dev/install"},"latest version"),".")),e&&r(Ae,{variant:"warning"},r(Ir,null,"Vesktop Outdated"),r(Y,{flexDirection:"column",gap:"0.5em"},r(ee,null,"Your version of Vesktop is outdated!"),r(et,{variant:"link",onClick:()=>VesktopNative.app.openUpdater()},"Open Vesktop Updater"))))}function FM(){let e=Be(["autoUpdate","autoUpdateNotification"]),[t,o,n]=pt(N1,{fallbackValue:"Loading...",onError:s=>li.error("Failed to retrieve repo",o)}),i={repo:t,repoPending:n};return r(Eo,null,r(EM,null),r(Jo,{title:"Automatically update",description:"Automatically update Vencord without confirmation prompt",value:e.autoUpdate,onChange:s=>e.autoUpdate=s}),r(Jo,{title:"Get notified when an automatic update completes",description:"Show a notification when Vencord automatically updates",value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,disabled:!e.autoUpdate}),r(T.FormTitle,{tag:"h5",className:k.top20},"Repo"),r(T.FormText,null,n?t:o?"Failed to retrieve - check console":r(Oe,{href:t},t.split("/").slice(-2).join("/"))," ","(",r(Y0,{hash:In,repo:t,disabled:n}),")"),r(Ue,{className:R(k.top16,k.bottom16)}),r(T.FormTitle,{tag:"h5"},"Updates"),Vu?r(jS,{...i}):r(qS,{...i}))}var Ln=Fo(FM,"Updater");a();Vt();Xn();He();a();Vt();we();v();var Or=q("vc-special-");function Lc({title:e,subtitle:t,description:o,cardImage:n,backgroundImage:i,backgroundColor:s,buttonTitle:l,buttonOnClick:c,children:u}){let d={backgroundColor:s||"#9c85ef",backgroundImage:`url(${i||""})`};return r(Ae,{className:Or("card","card-special"),style:d},r("div",{className:Or("card-flex")},r("div",{className:Or("card-flex-main")},r(T.FormTitle,{className:Or("title"),tag:"h5"},e),r(T.FormText,{className:Or("subtitle")},t),r(T.FormText,{className:Or("text")},o),u),n&&r("div",{className:Or("image-container")},r("img",{role:"presentation",src:n,alt:"",className:Or("image")}))),l&&r(p,null,r(Ue,{className:Or("seperator")}),r(oo,{onClick:c,className:Or("hyperlink")},r(T.FormText,{className:Or("hyperlink-text")},l))))}S();re();v();a();S();v();var KS=e=>!!(Kn.getDonorBadges(e)?.length>0||Te?.getMember(al,e)?.roles.includes(ll));function Z0(){return r(tc,{look:U.Looks.FILLED,color:U.Colors.WHITE,style:{marginTop:"1em"}})}a();re();v();function YS(){let e=Be(["macosVibrancyStyle"]);return r(p,null,r(T.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),r(M,{noop:!0},r(mo,{className:k.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar",value:"sidebar"},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:t=>e.macosVibrancyStyle=t,isSelected:t=>e.macosVibrancyStyle===t,serialize:Us})))}var $M="https://cdn.discordapp.com/emojis/1026533090627174460.png",GM="https://media.discordapp.net/stickers/1039992459209490513.png",HM="https://cdn.discordapp.com/emojis/1238120638020063377.png",zM="https://cdn.discordapp.com/emojis/1026533070955872337.png",ZS="https://media.discordapp.net/stickers/1311070116305436712.png?size=2048",WM="https://media.discordapp.net/stickers/1311070166481895484.png?size=2048";function jM(){let e=Be(["useQuickCss","enableReactDevtools","frameless","winNativeTitleBar","transparent","winCtrlQ","disableMinSize"]);return[{key:"useQuickCss",title:"Enable Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",restartRequired:!0},{key:"frameless",title:"Disable the window frame",restartRequired:!0},{key:"transparent",title:"Enable window transparency",description:"A theme that supports transparency is required or this will do nothing. Stops the window from being resizable as a side effect",restartRequired:!0},!1,ph&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",restartRequired:!0}].map(o=>{if(!o)return null;let{key:n,title:i,description:s,restartRequired:l}=o;return r(Jo,{key:n,title:i,description:s,value:e[n],onChange:c=>{e[n]=c,l&&Ee.show({title:"Restart Required",body:"A restart is required to apply this change",confirmText:"Restart now",cancelText:"Later!",onConfirm:Ut})}})})}function qM(){let e=ce(()=>Math.random()>.5?$M:GM,[]),t=!1,o=C?.getCurrentUser();return r(Eo,null,KS(o?.id)?r(Lc,{title:"Donations",subtitle:"Thank you for donating!",description:"You can manage your perks at any time by messaging @vending.machine.",cardImage:HM,backgroundImage:ZS,backgroundColor:"#ED87A9"},r(Z0,null)):r(Lc,{title:"Support the Project",description:"Please consider supporting the development of Vencord by donating!",cardImage:e,backgroundImage:ZS,backgroundColor:"#c3a3ce"},r(Z0,null)),Wr(o?.id)&&r(Lc,{title:"Contributions",subtitle:"Thank you for contributing!",description:"Since you've contributed to Vencord you now have a cool new badge!",cardImage:zM,backgroundImage:WM,backgroundColor:"#EDCC87",buttonTitle:"See what you've contributed to",buttonOnClick:()=>fi(o)}),r("section",null,r(T.FormTitle,{tag:"h5"},"Quick Actions"),r(Dc,null,r(hr,{Icon:Wh,text:"Notification Log",action:va}),r(hr,{Icon:Gi,text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),r(p,null,r(hr,{Icon:$i,text:"Relaunch Discord",action:Ut}),r(hr,{Icon:El,text:"Open Settings Folder",action:()=>VencordNative.settings.openFolder()})),r(hr,{Icon:$l,text:"View Source Code",action:()=>VencordNative.native.openExternal("https://github.com/"+ps)}))),r(Ue,null),r("section",{className:k.top16},r(T.FormTitle,{tag:"h5"},"Settings"),r(T.FormText,{className:k.bottom20,style:{color:"var(--text-muted)"}},"Hint: You can change the position of this settings section in the"," ",r("a",{onClick:()=>fr(Vencord.Plugins.plugins.Settings)},"settings of the Settings plugin"),"!"),r(jM,null)),t&&r(YS,null),r(sS,null))}var Ip=Fo(qM,"Vencord Settings");S();se();le();re();$e();v();var KM="https://cdn.discordapp.com/emojis/1092089799109775453.png?size=64",YM={description:"Vencord Contributor",iconSrc:KM,position:0,shouldShow:({userId:e})=>gh(e),onClick:(e,{userId:t})=>fi(C.getUser(t))},X0={};async function Q0(e=!1){let t={};e&&(t.cache="no-cache"),X0=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var J0;function ZM({badge:e}){return r(P.Menu,{navId:"vc-badge-context",onClose:ct.closeContextMenu,"aria-label":"Badge Options"},e.description&&r(P.MenuItem,{id:"vc-badge-copy-name",label:"Copy Badge Name",action:()=>it(e.description)}),e.iconSrc&&r(P.MenuItem,{id:"vc-badge-copy-link",label:"Copy Badge Image Link",action:()=>it(e.iconSrc)}))}var Kn=h({name:"BadgeAPI",description:"API to add badges to users",authors:[m.Megu,m.Ven,m.TheSun],required:!0,patches:[{find:"#{intl::PROFILE_USER_BADGES}",replacement:[{match:/alt:" ","aria-hidden":!0,src:.{0,50}(\i).iconSrc/,replace:"...$1.props,$&"},{match:/(?<=forceOpen:.{0,40}?ariaHidden:!0,)children:(?=.{0,50}?(\i)\.id)/,replace:"children:$1.component?$self.renderBadgeComponent({...$1}) :"},{match:/href:(\i)\.link/,replace:"...$self.getBadgeMouseEventHandlers($1),$&"}]},{find:"getLegacyUsername(){",replacement:{match:/getBadges\(\)\{.{0,100}?return\[/,replace:"$&...$self.getBadges(this),"}}],get DonorBadges(){return X0},toolboxActions:{async"Refetch Badges"(){await Q0(!0),j.show({id:j.genId(),message:"Successfully refetched badges!",type:j.Type.SUCCESS})}},userProfileBadge:YM,async start(){await Q0(),clearInterval(J0),J0=setInterval(Q0,1e3*60*30)},async stop(){clearInterval(J0)},getBadges(e){if(!e)return[];try{return Sh(e)}catch(t){return new B("BadgeAPI#getBadges").error(t),[]}},renderBadgeComponent:M.wrap(e=>{let t=e.component;return r(t,{...e})},{noop:!0}),getBadgeMouseEventHandlers(e){let t={};if(!e)return t;let{onClick:o,onContextMenu:n}=e;return o&&(t.onClick=i=>o(i,e)),n&&(t.onContextMenu=i=>n(i,e)),t},getDonorBadges(e){return X0[e]?.map(t=>({iconSrc:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onContextMenu(o,n){ct.openContextMenu(o,()=>r(ZM,{badge:n}))},onClick(){let o=ue(n=>r(M,{noop:!0,onError:()=>{gn(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},r(ge,{...n},r(Ce,null,r(T.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},r(Y,{justifyContent:"center",alignItems:"center",gap:"0.5em"},r(dl,null),"Vencord Donor"))),r(xe,null,r(Y,null,r("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),r("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),r("div",{style:{padding:"1em"}},r(T.FormText,null,"This Badge is a special perk for Vencord Donors"),r(T.FormText,{className:k.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),r(ht,null,r(Y,{justifyContent:"center",style:{width:"100%"}},r(tc,null))))))}}))}});a();S();var Pp=h({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[m.Ven],patches:[{find:'"sticker")',replacement:{match:/0===(\i)\.length(?=.{0,25}?\(0,\i\.jsxs?\)\(.{0,75}?children:\1)/,replace:"(Vencord.Api.ChatButtons._injectButtons($1,arguments[0]),$&)"}}]});a();S();var Mp=h({name:"CommandsAPI",authors:[m.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,n)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${n})`}},{find:"#{intl::COMMANDS_OPTIONAL_COUNT}",replacement:[{match:/(?<=:(\i)\.displayDescription\}.{0,200}children:).{0,50}\.name(?=\}\))/,replace:"$1.plugin||($&)",noWarn:!0},{match:/children:(?=\i\?\?\i\?\.name)(?<=command:(\i),.+?)/,replace:"children:$1.plugin??"}]}]});a();S();var Np=h({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[m.Nuckyz,m.Ven,m.Kyuuhachi],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?=let{navId:)(?<=function \i\((\i)\).+?)/,replace:"$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);"}},{find:"navId:",all:!0,noWarn:!0,replacement:[{match:/navId:(?=.+?([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?`contextMenuAPIArguments:typeof arguments!=='undefined'?arguments:[],${e}`:e}]}]});a();S();var Cp=h({name:"DynamicImageModalAPI",authors:[m.sadan,m.Nuckyz],description:"Allows you to omit either width or height when opening an image modal",patches:[{find:".renderLinkComponent",replacement:{match:/(?<=\i=)(null!=\i&&0!==\i)&&(null!=\i&&0!==\i)/,replace:"($1)||($2)"}}]});a();S();a();(window.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});var QS="src/plugins/_api/memberListDecorators/style.css";var kp=h({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[m.TheSun,m.Ven],managedStyle:QS,patches:[{find:"#{intl::GUILD_OWNER}),children:",replacement:[{match:/children:\[(?=.{0,300},lostPermissionTooltipText:)/,replace:"children:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'guild'),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\)\?.+?:null)/,replace:"decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'dm'),$1]"}}]});a();S();Sr();var JS={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"},Ap=h({name:"MenuItemDemanglerAPI",description:"Demangles Discord's Menu Item module",authors:[m.Ven],required:!0,patches:[{find:"Menu API only allows Items",replacement:{match:/function.{0,80}type===(\i\.\i)\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let o=[],n=Lt(/\(\i\.type===(\i\.\i)\)/g),i=/type:"(\w+)"/g,s;for(;(s=n.exec(e))!==null;){let l=s[1];i.lastIndex=n.lastIndex;let c=i.exec(e)?.[1];if(c&&c in JS){let u=JS[c];o.push(`Object.defineProperty(${l},"name",{value:"${u}"})`)}}return o.length<6&&console.warn("[MenuItemDemanglerAPI] Expected to at least remap 6 items, only remapped",o.length),`${o.join(";")};${e}`}}}]});a();S();var Rp=h({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[m.Cyn],patches:[{find:"#{intl::REMOVE_ATTACHMENT_BODY}",replacement:{match:/children:(\[[^\]]{0,100}?this.renderSuppressConfirmModal[^\]]{0,100}?\])/,replace:"children:Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]});a();S();a();(window.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});var XS="src/plugins/_api/messageDecorations/style.css";var Dp=h({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[m.TheSun],managedStyle:XS,patches:[{find:"#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}",replacement:{match:/#{intl::GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE}.+?renderPopout:.+?(?=\])/,replace:"$&,Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]});a();S();var Lp=h({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[m.Arjix,m.hunt,m.Ven],patches:[{find:"#{intl::EDIT_TEXTAREA_HELP}",replacement:{match:/(?<=,channel:\i\}\)\.then\().+?(?=\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),.+?\.getSendMessageOptions\(\{.+?\}\)?;(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,n,i)=>e+`if(await Vencord.Api.MessageEvents._handlePreSend(${o}.id,${t},${i},${n}))return{shouldClear:false,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,n)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg,vcChan,${n});`}}]});a();S();var Op=h({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[m.KingFish,m.Ven,m.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i\.\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,replace:(e,t,o,n,i)=>`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${o},${i}),${n}?${t}:null,`}}]});a();S();var _p=h({name:"MessageUpdaterAPI",description:"API for updating and re-rendering messages.",authors:[m.Nuckyz],patches:[{find:"}renderStickersAccessories(",replacement:{match:/(?<=this.props,\i,\[)"message",/,replace:""}}]});a();S();var Bp=h({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[m.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:(e,t)=>`if(${t}?.id=="VencordNotice")return(${t}=null,Vencord.Api.Notices.nextNotice(),true);${e}`},{match:/(?<=function (\i)\(\i\){)return null!=(\i)(?=.+?NOTICE_DISMISS:\1)/,replace:(e,t,o)=>`if(${o}?.id=="VencordNotice")return(${o}=null,Vencord.Api.Notices.nextNotice(),true);${e}`,noWarn:!0}]}]});a();S();var Up=h({name:"ServerListAPI",authors:[m.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"#{intl::DISCODO_DISABLED}",replacement:{match:/(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,150}?tutorialId:"friends-list".+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:".setGuildsTree(",replacement:{match:/(?<=#{intl::SERVERS}\),gap:"xs",children:)\i\.map\(.{0,50}\.length\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]});a();S();var Ep=h({name:"UserSettingsAPI",description:"Patches Discord's UserSettings to expose their group and name.",authors:[m.Nuckyz],patches:[{find:",updateSetting:",replacement:[{match:/\.updateAsync\(.+?(?=,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,$&"}]}]});a();S();le();var VS=x({disableAnalytics:{type:3,description:"Disable Discord's tracking (analytics/'science')",default:!0,restartNeeded:!0}}),Fp=h({name:"NoTrack",description:"Disable Discord's tracking (analytics/'science'), metrics and Sentry crash reporting",authors:[m.Cyn,m.Ven,m.Nuckyz,m.Arrow],required:!0,settings:VS,patches:[{find:"AnalyticsActionHandlers.handle",predicate:()=>VS.store.disableAnalytics,replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS_V2",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;"}}],flux:{TRACK(e){e?.resolve?.()}},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 n=new XMLHttpRequest;if(n.open("GET",o,!1),n.send(),!!n.responseText.includes(".DiscordSentry="))throw new B("NoTrack","#8caaee").info("Disabling Sentry by erroring its WebpackInstance"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(window,"DiscordSentry"),new Error("Sentry successfully disabled")}}),Object.defineProperty(window,"DiscordSentry",{configurable:!0,set(){new B("NoTrack","#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(window,"DiscordSentry")}})}});a();He();S();F();var Ta={SECTION:1,SIDEBAR_ITEM:2,PANEL:3,CATEGORY:5,CUSTOM:19};Ve(["SECTION","SIDEBAR_ITEM","PANEL","CUSTOM"],e=>Ta=e);var ex={HEADER:"HEADER",DIVIDER:"DIVIDER",CUSTOM:"CUSTOM"},tx=x({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"}]}}),ox=[["VencordSettings","vencord_main_panel"],["VencordPlugins","vencord_plugins_panel"],["VencordThemes","vencord_themes_panel"],["VencordUpdater","vencord_updater_panel"],["VencordCloud","vencord_cloud_panel"],["VencordBackupAndRestore","vencord_backup_restore_panel"],["VencordPatchHelper","vencord_patch_helper_panel"]],_r=h({name:"Settings",description:"Adds Settings UI and debug info",authors:[m.Ven,m.Megu],required:!0,settings:tx,settingsSectionMap:ox,patches:[{find:"#{intl::COPY_VERSION}",replacement:[{match:/"text-xxs\/normal".{0,300}?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.\i,children:\["Build Override: ",\1\.id\]\})\)\}\))/,replace:(e,t,o,n,i)=>(i=i.replace(/children:\[.+\]/,""),`${e},$self.makeInfoElements(${n},${i}).map(e=>${o}e})),`)},{match:/"text-xs\/normal".{0,300}?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}className:\i.\i,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},$self.makeInfoElements(${t},${o})`)},{match:/copyValue:\i\.join\(" "\)/g,replace:"$& + $self.getInfoString()"}]},{find:".buildLayout().map",replacement:{match:/(\i)\.buildLayout\(\)(?=\.map)/,replace:"$self.buildLayout($1)"}},{find:"getWebUserSettingFromSection",replacement:{match:/new Map\(\[(?=\[.{0,10}\.ACCOUNT,.{0,10}\.ACCOUNT_PANEL)/,replace:"new Map([...$self.getSettingsSectionMappings(),"}}],buildEntry(e){let{key:t,title:o,panelTitle:n=o,Component:i,Icon:s}=e,l={key:t+"_panel",type:Ta.PANEL,useTitle:()=>n,buildLayout:()=>[{type:Ta.CATEGORY,key:t+"_category",buildLayout:()=>[{type:Ta.CUSTOM,key:t+"_custom",Component:i,useSearchTerms:()=>[o]}]}]};return{key:t,type:Ta.SIDEBAR_ITEM,useTitle:()=>o,icon:()=>r(s,{width:20,height:20}),buildLayout:()=>[l]}},getSettingsSectionMappings(){return ox},buildLayout(e){let t=e.buildLayout();if(e.key!=="$Root"||!Array.isArray(t)||t.some(d=>d?.key==="vencord_section"))return t;let{buildEntry:o}=this,n=[o({key:"vencord_main",title:"Vencord",panelTitle:"Vencord Settings",Component:Ip,Icon:qh}),o({key:"vencord_plugins",title:"Plugins",Component:ya,Icon:Kh}),o({key:"vencord_themes",title:"Themes",Component:hs,Icon:Gi}),Ln&&o({key:"vencord_updater",title:"Updater",panelTitle:"Vencord Updater",Component:Ln,Icon:Qh}),o({key:"vencord_cloud",title:"Cloud",panelTitle:"Vencord Cloud",Component:Tp,Icon:Yh}),o({key:"vencord_backup_restore",title:"Backup & Restore",Component:gp,Icon:Zh}),!1,...this.customEntries.map(o),...this.customSections.map((d,f)=>{let{section:g,element:y,label:b}=d(ex);return Object.values(ex).includes(g)?null:o({key:`vencord_deprecated_custom_${g}`,title:b,Component:y,Icon:g==="Vesktop"?Jh:Gl})})].filter(di),i={key:"vencord_section",type:Ta.SECTION,useTitle:()=>"Vencord Settings",buildLayout:()=>n},{settingsLocation:s}=tx.store,l={top:"user_section",aboveNitro:"billing_section",belowNitro:"billing_section",aboveActivity:"activity_section",belowActivity:"activity_section",bottom:"logout_section"},c=l[s]??l.top,u=t.findIndex(d=>typeof d?.key=="string"&&d.key===c);return u===-1?u=2:s.startsWith("below")&&(u+=1),t.splice(u,0,i),t},customSections:[],customEntries:[],get electronVersion(){return VencordNative.native.getVersions().electron||window.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` (Vesktop v${VesktopNative.app.getVersion()})`},getInfoRows(){let{electronVersion:e,chromiumVersion:t,additionalInfo:o}=this,n=[`Vencord ${In}${o}`];return e&&n.push(`Electron ${e}`),t&&n.push(`Chromium ${t}`),n},getInfoString(){return`
`+this.getInfoRows().join(`
`)},makeInfoElements(e,t){return this.getInfoRows().map((o,n)=>r(e,{key:n,...t},o))}});a();var ey={};rt(ey,{UserSettings:()=>V0,getUserSetting:()=>rx,getUserSettingLazy:()=>Ro});a();qo();le();F();var V0=Bo(()=>{let e=Qn('"textAndImages","renderSpoilers"');return e==null?new B("UserSettingsAPI").error("Didn't find settings module."):ft(e)});function rx(e,t){if(!ke("UserSettingsAPI"))throw new Error("Cannot use UserSettingsAPI without setting it as a dependency.");for(let o in V0){let n=V0[o];if(n.userSettingsAPIGroup===e&&n.userSettingsAPIName===t)return n}}function Ro(e,t){return It(()=>rx(e,t))}qt();a();Hi();S();se();le();re();ir();v();var QM=/```js\n(.+?)```/s,JM=["1024286218801926184"],XM=[ah,lh,ll],VM=async function(){}.constructor,e8=Ro("status","showCurrentGame"),nx=e=>e.parent_id===qn||JM.includes(e.id);async function ix(){let e=await Pn();return e&&(await ci(),Ut()),e}async function sx(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=`Vesktop v${VesktopNative.app.getVersion()}`,o={Vencord:`v1.14.6 \u2022 [${In}](<https://github.com/Vendicated/Vencord/commit/${In}>)${_r.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1773930247121)}`,Client:`${e} ~ ${t}`,Platform:navigator.platform},n={"Activity Sharing disabled":yh(()=>!e8.getSetting(),!1),"Vencord DevBuild":!1,"Has UserPlugins":Object.values(gi).some(s=>s.userPlugin),"More than two weeks out of date":1773930247121<Date.now()-12096e5},i=`>>> ${Object.entries(o).map(([s,l])=>`**${s}**: ${l}`).join(`
`)}`;return i+=`
`+Object.entries(n).filter(([,s])=>s).map(([s])=>`\u26A0\uFE0F ${s}`).join(`
`),i.trim()}function ax(){let e=s=>s.endsWith("API")||je[s].required,t=Object.keys(je).filter(s=>ke(s)&&!e(s)),o=t.filter(s=>!gi[s].userPlugin),n=t.filter(s=>gi[s].userPlugin),i=`**Enabled Plugins (${o.length}):**
${Oi(o.join(", "))}`;return n.length&&(i+=`**Enabled UserPlugins (${n.length}):**
${Oi(n.join(", "))}`),i}var t8=Mn(Pn),o8=x({}).withPrivateSettings(),$p=h({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[m.Ven],dependencies:["UserSettingsAPI"],settings:o8,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=>Wr(C.getCurrentUser()?.id)||nx(e.channel),execute:async()=>({content:await sx()})},{name:"vencord-plugins",description:"Send Vencord plugin list",predicate:e=>Wr(C.getCurrentUser()?.id)||nx(e.channel),execute:()=>({content:ax()})}],flux:{async CHANNEL_SELECT({channelId:e}){if(!(e===Au||Q.getChannel(e)?.parent_id===qn))return;let o=C.getCurrentUser()?.id;if(!o||Wr(o))return;if(await t8().catch(()=>{}),ca)return Ee.show({title:"Hold on!",body:r("div",null,r(T.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),r(T.FormText,{className:k.top8},"Please first update before asking for support!")),onCancel:()=>Nn(Ln),cancelText:"View Updates",confirmText:"Update & Restart Now",onConfirm:ix,secondaryConfirmText:"I know what I'm doing or I can't update"});let n=Te.getSelfMember(al)?.roles;!n||XM.some(i=>n.includes(i))}},renderMessageAccessory(e){let t=[];if((e.channel.id===ch||e.channel.parent_id===qn&&e.message.author.id===Bs)&&e.message.content?.toLowerCase().includes("update")&&t.push(r(U,{key:"vc-update",color:U.Colors.GREEN,onClick:async()=>{try{await ix()?_e("Success! Restarting...",j.Type.SUCCESS):_e("Already up to date!",j.Type.MESSAGE)}catch(n){new B(this.name).error("Error while updating:",n),_e("Failed to update :(",j.Type.FAILURE)}}},"Update Now")),e.channel.parent_id===qn&&Ie.can(me.SEND_MESSAGES,e.channel)&&((e.message.content.includes("/vencord-debug")||e.message.content.includes("/vencord-plugins"))&&t.push(r(U,{key:"vc-dbg",color:U.Colors.PRIMARY,onClick:async()=>Jn(e.channel.id,{content:await sx()})},"Run /vencord-debug"),r(U,{key:"vc-plg-list",color:U.Colors.PRIMARY,onClick:async()=>Jn(e.channel.id,{content:ax()})},"Run /vencord-plugins")),e.message.author.id===Bs)){let n=QM.exec(e.message.content||e.message.embeds[0]?.rawDescription||"");n&&t.push(r(U,{key:"vc-run-snippet",onClick:async()=>{try{await VM(n[1])(),_e("Success!",j.Type.SUCCESS)}catch(i){new B(this.name).error("Error while running snippet:",i),_e("Failed to run snippet :(",j.Type.FAILURE)}}},"Run Snippet"))}return t.length?r(Y,null,t):null},renderContributorDmWarningCard:M.wrap(({channel:e})=>{let t=e.getRecipientId();return!Wr(t)||Pe.isFriend(t)||Wr(C.getCurrentUser()?.id)?null:r(Ae,{variant:"warning",className:k.top8,defaultPadding:!0},"Please do not private message Vencord plugin developers for support!",r("br",null),"Instead, use the Vencord support channel: ",Me.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),!Q.getChannel(Au)&&" (Click the link to join)")},{noop:!0})});a();S();se();F();v();var lx=he(".POPOUT,user"),Gp=!1,ty={current:null},r8=M.wrap(()=>{let{prioritizeServerProfile:e}=Oc.use(["prioritizeServerProfile"]);return r(P.Menu,{navId:"vc-ap-server-profile",onClose:ct.closeContextMenu},r(P.MenuItem,{id:"vc-ap-view-alternate-popout",label:e?"View Account Profile":"View Server Profile",disabled:Yo()?.getGuildId()==null,action:t=>{Gp=!0,ty.current?.click()}}),r(P.MenuCheckboxItem,{id:"vc-ap-prioritize-server-profile",label:"Prioritize Server Profile",checked:e,action:()=>Oc.store.prioritizeServerProfile=!e}))},{noop:!0}),Oc=x({prioritizeServerProfile:{type:3,description:"Prioritize Server Profile when left clicking your account panel",default:!1}}),Hp=h({name:"AccountPanelServerProfile",description:"Right click your account panel in the bottom left to view your profile in the current server",authors:[m.Nuckyz,m.relitrix],settings:Oc,patches:[{find:"handleOpenSettingsContextMenu=",group:!0,replacement:[{match:/(\.AVATAR,children:.+?renderPopout:(\i)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,replace:(e,t,o,n,i)=>`${t}$self.UserProfile({popoutProps:${o},currentUser:${i},originalRenderPopout:()=>{${n}}})`},{match:/\.AVATAR,children:.+?onRequestClose:\(\)=>\{/,replace:"$&$self.onPopoutClose();"},{match:/ref:(\i),style:\i(?=.{0,250}#{intl::USER_PROFILE_ACCOUNT_POPOUT_BUTTON_A11Y_LABEL})/,replace:"$&,onContextMenu:($self.grabRef($1),$self.openAccountPanelContextMenu)"}]}],get accountPanelRef(){return ty},grabRef(e){return ty=e,e},openAccountPanelContextMenu(e){ct.openContextMenu(e,r8)},onPopoutClose(){Gp=!1},UserProfile:M.wrap(({popoutProps:e,currentUser:t,originalRenderPopout:o})=>{if(Oc.store.prioritizeServerProfile&&Gp||!Oc.store.prioritizeServerProfile&&!Gp)return o();let n=Yo();return n?.getGuildId()==null||!lx.$$vencordGetWrappedComponent()?o():r(lx,{...e,user:t,currentUser:t,guildId:n.getGuildId(),channelId:n.id})},{noop:!0})});a();S();var zp=h({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[m.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?([,}].*?\))/g,replace:(e,t)=>t.match(/}=.+/)==null?`canAnimate:!0${t}`:e}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(\.CUSTOM_STATUS.+?animateEmoji:)\i/,replace:"$1!0"}},{find:"#{intl::DISCOVERABLE_GUILD_HEADER_PUBLIC_INFO}",replacement:{match:/(guildBanner:\i,animate:)\i(?=}\):null)/,replace:"$1!0"}},{find:".MINI_PREVIEW,[",replacement:{match:/animate:\i,loop:/,replace:"animate:true,loop:true,_loop:"}}]});a();S();tr("AlwaysExpandRoles","ShowAllRoles");var Wp=h({name:"AlwaysExpandRoles",description:"Always expands the role list in profile popouts",authors:[m.surgedevs],patches:[{find:"hasDeveloperContextMenu:",replacement:[{match:/(?<=\?\i\.current\[\i\].{0,100}?)useState\(!1\)/,replace:"useState(!0)"},{match:/(?<=useLayoutEffect\(\(\)=>\{if\()\i/,replace:"false"}]}]});a();S();var oy=x({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}}),jp=h({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[m.zt,m.Trwy],patches:[{find:'="MaskedLinkStore",',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>oy.store.domain},{find:"bitbucket.org",replacement:{match:/function \i\(\i\){(?=.{0,30}pathname:\i)/,replace:"$&return null;"},predicate:()=>oy.store.file}],settings:oy});a();S();F();v();var n8=fe("Children.map","isValidElement","dangerous:");var ry=Symbol("vcAnonymise"),i8=/\.tar\.\w+$/,bi=x({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:()=>bi.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>bi.store.method!==1}}),qp=h({name:"AnonymiseFileNames",authors:[m.fawn],description:"Anonymise uploaded file names",settings:bi,patches:[{find:"async uploadFiles(",replacement:[{match:/async uploadFiles\((\i)\){/,replace:"$&$1.forEach($self.anonymise);"}]},{find:"#{intl::ATTACHMENT_UTILITIES_SPOILER}",replacement:{match:/(?<=children:\[)(?=.{10,80}tooltip:.{0,100}#{intl::ATTACHMENT_UTILITIES_SPOILER})/,replace:"arguments[0].canEdit!==false?$self.AnonymiseUploadButton(arguments[0]):null,"}}],AnonymiseUploadButton:M.wrap(({upload:e})=>{let[t,o]=A(e[ry]??bi.store.anonymiseByDefault);function n(){e[ry]=!t,o(!t)}return r(n8,{tooltip:t?"Using anonymous file name":"Using normal file name",onClick:n},t?r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},r("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"})):r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{transform:"scale(-1,1)"}},r("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[ry]??bi.store.anonymiseByDefault)===!1)return;let t=e.filename,n=i8.exec(t)?.index??t.lastIndexOf("."),i=n!==-1?t.slice(n):"",s=(()=>{switch(bi.store.method){case 0:let l="0123456789bdfhjkmnpqrstvwxz";return Array.from({length:bi.store.randomisedLength},()=>l[Math.floor(Math.random()*l.length)]).join("")+i;case 1:return bi.store.consistent+i;case 2:return Date.now()+i}})();e.filename=s}});a();S();v();var l8=VencordNative.pluginHelpers.AppleMusicRichPresence;var ux="1239490006054207550";function c8(e){L.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"AppleMusic"})}var Do=x({activityType:{type:4,description:"Which type of activity",options:[{label:"Playing",value:0,default:!0},{label:"Listening",value:2}]},statusDisplayType:{description:"Show the track / artist name in the member list",type:4,options:[{label:"Don't show (shows generic listening message)",value:"off",default:!0},{label:"Show artist name",value:"artist"},{label:"Show track name",value:"track"}]},refreshInterval:{type:5,description:"The interval between activity refreshes (seconds)",markers:[1,2,2.5,3,5,10,15],default:5,restartNeeded:!0},enableTimestamps:{type:3,description:"Whether or not to enable timestamps",default:!0},enableButtons:{type:3,description:"Whether or not to enable buttons",default:!0},nameString:{type:0,description:"Activity name format string",default:"Apple Music"},detailsString:{type:0,description:"Activity details format string",default:"{name}"},stateString:{type:0,description:"Activity state format string",default:"{artist} \xB7 {album}"},largeImageType:{type:4,description:"Activity assets large image type",options:[{label:"Album artwork",value:"Album",default:!0},{label:"Artist artwork",value:"Artist"},{label:"Disabled",value:"Disabled"}]},largeTextString:{type:0,description:"Activity assets large text format string",default:"{album}"},smallImageType:{type:4,description:"Activity assets small image type",options:[{label:"Album artwork",value:"Album"},{label:"Artist artwork",value:"Artist",default:!0},{label:"Disabled",value:"Disabled"}]},smallTextString:{type:0,description:"Activity assets small text format string",default:"{artist}"}});function _c(e,t){return e.replaceAll("{name}",t.name).replaceAll("{album}",t.album??"").replaceAll("{artist}",t.artist??"")}function cx(e,t){let o=e==="Album"?t.albumArtwork:t.artistArtwork;if(o)return wn.fetchAssetIds(ux,[o]).then(n=>n[0])}var Yp=h({name:"AppleMusicRichPresence",description:"Discord rich presence for your Apple Music!",authors:[m.RyanCaoDev],hidden:!wo,reporterTestable:2,settingsAboutComponent(){return r(p,null,r(T.FormText,null,"For the customizable activity format strings, you can use several special strings to include track data in activities!"," ",r("code",null,"{name}")," is replaced with the track name; ",r("code",null,"{artist}")," is replaced with the artist(s)' name(s); and ",r("code",null,"{album}")," is replaced with the album name."))},settings:Do,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},Do.store.refreshInterval*1e3)},stop(){clearInterval(this.updateInterval),L.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null})},updatePresence(){this.getActivity().then(e=>{c8(e)})},async getActivity(){let e=await l8.fetchTrackData();if(!e)return null;let[t,o]=await Promise.all([cx(Do.store.largeImageType,e),cx(Do.store.smallImageType,e)]),n={},i=Number.isNaN(e.duration)&&e.playerPosition===0;Do.store.largeImageType!=="Disabled"&&(n.large_image=t,i||(n.large_text=_c(Do.store.largeTextString,e))),Do.store.smallImageType!=="Disabled"&&(n.small_image=o,i||(n.small_text=_c(Do.store.smallTextString,e)));let s=[];return Do.store.enableButtons&&(e.appleMusicLink&&s.push({label:"Listen on Apple Music",url:e.appleMusicLink}),e.songLink&&s.push({label:"View on SongLink",url:e.songLink})),{application_id:ux,name:_c(Do.store.nameString,e),details:_c(Do.store.detailsString,e),state:i?void 0:_c(Do.store.stateString,e),timestamps:e.playerPosition&&e.duration&&Do.store.enableTimestamps?{start:Date.now()-e.playerPosition*1e3,end:Date.now()-e.playerPosition*1e3+e.duration*1e3}:void 0,assets:n,buttons:!i&&s.length?s.map(l=>l.label):void 0,metadata:!i&&s.length?{button_urls:s.map(l=>l.url)}:void 0,type:Do.store.activityType,status_display_type:{off:0,artist:1,track:2}[Do.store.statusDisplayType],flags:1}}});a();qt();S();F();v();var u8=fe('"Invalid Origin"',".application");async function px(e,t){return(await wn.fetchAssetIds(e,[t]))[0]}var dx={};async function p8(e){let t={};return await u8(t,e),t.application}var wa,Zp=h({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[m.Ducko],reporterTestable:2,hidden:!0,settingsAboutComponent:()=>r(p,null,r(T.FormTitle,{tag:"h3"},"How to use arRPC"),r(T.FormText,null,r(Oe,{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,n=o?.assets;if(n?.large_image&&(n.large_image=await px(o.application_id,n.large_image)),n?.small_image&&(n.small_image=await px(o.application_id,n.small_image)),o){let i=o.application_id;dx[i]||=await p8(i);let s=dx[i];o.name||=s.name}L.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if(wa&&wa.close(),wa=new WebSocket("ws://127.0.0.1:1337"),wa.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(wa.readyState===WebSocket.OPEN),5e3))){kn("Failed to connect to arRPC, is it running?","Retry",()=>{us(),this.start()});return}j.show({message:"Connected to arRPC",type:j.Type.SUCCESS,id:j.genId(),options:{duration:1e3,position:j.Position.BOTTOM}})},stop(){L.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),wa?.close()}});a();S();se();le();F();v();a();F();v();var d8=he('("guildsnav")');function m8(){let e=Ia.getExpandedFolders(),t=Qp.getGuildFolders(),o=new Set;for(let n of t)e.has(n.folderId)&&n.guildIds?.length&&o.add(n.folderId);return o}var mx=M.wrap(e=>{let t=ie([Ia,Qp],()=>m8()),o=ie([sa],()=>sa.isFullscreenInContext()),n=r(d8,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex"};return!s||!Ft.store.sidebarAnim?i?r("div",{className:"vc-betterFolders-sidebar",style:l},n):null:r(Yu.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&r(Yu.animated.div,{className:"vc-betterFolders-sidebar",style:{...c,...l}},n))},{noop:!0});var Ia=gt("ExpandedGuildFolderStore"),Qp=gt("SortedGuildStore"),ay=X("move","toggleGuildFolderExpand"),fx=null,iy=!1;function f8(e){return Qp.getGuildFolders().find(t=>t.guildIds.includes(e))}function sy(){for(let e of Ia.getExpandedFolders())ay.toggleGuildFolderExpand(e)}function ly(e,t){if(e==null)return!1;if(!Array.isArray(e))return t(e)?!0:ly(e.props?.children,t);let o=!1;for(let n=0;n<e.length;n++){if(ly(e[n],t)){o=!0;continue}e.splice(n--,1)}return o}var Ft=x({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}}),gx="typeof isBetterFolders!=='undefined'?isBetterFolders:arguments[0]?.isBetterFolders",g8="typeof betterFoldersExpandedIds!=='undefined'?betterFoldersExpandedIds:arguments[0]?.betterFoldersExpandedIds",h8="vc-betterFolders-sidebar-grid",Jp=h({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[m.juby,m.AutumnVN,m.Nuckyz],settings:Ft,patches:[{find:'("guildsnav")',predicate:()=>Ft.store.sidebar,replacement:[{match:/let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i)/,replace:"$&,isBetterFolders,betterFoldersExpandedIds"},{match:/,{guildDiscoveryButton:\i,/g,replace:"$&isBetterFolders:arguments[0]?.isBetterFolders,betterFoldersExpandedIds:arguments[0]?.betterFoldersExpandedIds,"},{match:/switch\((\i)\.type\){.+?default:return null}/,replace:`return $self.wrapGuildNodeComponent($1,()=>{$&},${gx},${g8});`},{match:/switch\(\i\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,/,replace:`$&isBetterFolders:${gx},`},{match:/switch\(\i\.type\).+?,\i,\i\.setNodeRef/,replace:"$&,arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds"},{match:/lastTargetNode:\i\[\i\.length-1\].+?}\)(?::null)?\](?=}\))/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0]?.isBetterFolders))"},{match:/reverse:!0,.{0,150}?barClassName:.+?\}\)\]/,replace:"$&.filter($self.makeGuildsBarSidebarFilter(!!arguments[0]?.isBetterFolders))"}]},{find:".toggleGuildFolderExpand(",predicate:()=>Ft.store.sidebar&&Ft.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:".FOLDER_ITEM_ANIMATION_DURATION),",predicate:()=>Ft.store.sidebar,replacement:[{predicate:()=>Ft.store.keepIcons,match:/(?<=let ?(?:\i,)*?{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0]?.isBetterFolders&&${t};`},{predicate:()=>!Ft.store.keepIcons,match:/(?=,\{from:\{height)/,replace:"&&$self.shouldShowTransition(arguments[0])"},{predicate:()=>!Ft.store.keepIcons,match:/"--custom-folder-color".+?(?=\i\(\(\i,\i,\i\)=>{let{key:.{0,70}"ul")(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}$self.shouldRenderContents(arguments[0],${t})?null:`},{predicate:()=>Ft.store.showFolderIcon!==1,match:/"--custom-folder-color".{0,110}?children:\[/,replace:"$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&"},{predicate:()=>Ft.store.showFolderIcon!==1,match:/"--custom-folder-color".+?className:\i\.\i}\),(?=\i,)/,replace:"$&!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render:",predicate:()=>Ft.store.sidebar,group:!0,replacement:[{match:/(?<=[[,])((?:!?\i&&)+)\(.{0,50}({className:\i\.\i,themeOverride:\i})\)/g,replace:(e,t,o)=>`${e},${t}$self.FolderSideBar(${o})`},{match:/(?<=className:)\i\.\i(?=,"data-fullscreen")/,replace:`"${h8} "+$&`}]},{find:"#{intl::DISCODO_DISABLED}",predicate:()=>Ft.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!Ft.store.closeAllFolders&&!Ft.store.forceOpen)&&fx!==e.guildId){fx=e.guildId;let t=f8(e.guildId);t?.folderId?Ft.store.forceOpen&&!Ia.isFolderExpanded(t.folderId)&&ay.toggleGuildFolderExpand(t.folderId):Ft.store.closeAllFolders&&sy()}},TOGGLE_GUILD_FOLDER_EXPAND(e){Ft.store.closeOthers&&!iy&&(iy=!0,L.wait(()=>{let t=Ia.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&ay.toggleGuildFolderExpand(o);iy=!1}))},LOGOUT(){sy()}},FolderSideBar:mx,closeFolders:sy,wrapGuildNodeComponent(e,t,o,n){return!o||e.type==="folder"&&n?.has(e.id)||e.type==="guild"&&n?.has(e.parentId)?t():r("div",{style:{display:"none"}},t())},makeGuildsBarGuildListFilter(e){return t=>{if(!e)return!0;try{let o=Le("SERVERS");return o?t?.props?.["aria-label"]===o:(new B("BetterFolders").error("Failed to get SERVERS intl message"),!0)}catch(o){return console.error(o),!0}}},makeGuildsBarSidebarFilter(e){return t=>{if(!e)return!0;try{return ly(t,o=>o?.props?.renderTreeNode!=null)}catch(o){return console.error(o),!0}}},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(Ft.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}});a();S();var Xp=h({name:"BetterGifAltText",authors:[m.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:".modalContext})};",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}});a();S();var Vp=h({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[m.Samwich],patches:[{find:"renderHeaderContent(){",replacement:[{match:/(?<=state={resultType:)null/,replace:'"Favorites"'}]}]});a();S();Sr();var cy=x({hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>$.plugins.BetterNotesBox.hide,default:!1}}),ed=h({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[m.Ven],settings:cy,patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>cy.store.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>{if(t.match(/}=.+/)){let n=e.match(Lt(/hideNote:(\i)=!?\d/));return n?`hideNote:${n[1]}=!0`:e}return"hideNote:!0"}}},{find:"#{intl::NOTE_PLACEHOLDER}",replacement:{match:/#{intl::NOTE_PLACEHOLDER}\),/,replace:"$&spellCheck:!$self.noSpellCheck,"}}],get noSpellCheck(){return cy.store.noSpellCheck}});a();He();cn();S();se();F();v();var hx=X("open","selectRole","updateGuild"),y8=Ro("appearance","developerMode");function v8(){return r("svg",{role:"img",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24"},r("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 b8(){return r("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},r("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 yx=x({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"}]}}),td=h({name:"BetterRoleContext",description:"Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile",authors:[m.Ven,m.goodbee],dependencies:["UserSettingsAPI"],settings:yx,start(){y8.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=yn();if(!o)return;let n=xt.getRole(o.id,t);n&&(n.colorString&&e.unshift(r(P.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>lo(n.colorString),icon:b8})),Ie.getGuildPermissionProps(o).canManageRoles&&e.unshift(r(P.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await hx.open(o.id,"ROLES"),hx.selectRole(t)},icon:v8})),n.icon&&e.push(r(P.MenuItem,{id:"vc-view-role-icon",label:"View Role Icon",action:()=>{Zo({url:`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${n.id}/${n.icon}.${yx.store.roleIconFileFormat}`,height:128,width:128})},icon:Tr})))}}});a();S();se();var od=h({name:"BetterRoleDot",authors:[m.Ven,m.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:"M0 4C0 1.79086 1.79086 0 4 0H16C18.2091 0 20 1.79086 20 4V16C20 18.2091 18.2091 20 16 20H4C1.79086 20 0 18.2091 0 16V4Z",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>$.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:"#{intl::ADD_ROLE_A11Y_LABEL}",all:!0,predicate:()=>$.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!$.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",all:!0,predicate:()=>$.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!$.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){it(e)}});a();S();F();v();a();Po();$e();a();a();v();a();dt();F();var vx=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},r("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"})),bx=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},r("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"}),r("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"}),r("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"}),r("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"})),Sx=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 24 24"},r("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"})),xx=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},r("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"})),Tx=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},r("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"})),wx=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 496 512"},r("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"})),Ix=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},r("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"})),Px=e=>r("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},r("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"})),Mx=ut(()=>Gs("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"));var Nx=()=>`BetterSessions_savedSessions_${C.getCurrentUser().id}`,Go=new Map;function Bc(e){return`${e.os} \xB7 ${e.platform}`}function Uc(){return Wt(Nx(),Go)}async function Cx(){(await zt(Nx())||new Map).forEach((t,o)=>{Go.set(o,t)})}function kx(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 Ax(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return vx;case"Android Chrome":case"Chrome iOS":case"Chrome":return bx;case"Edge":return Sx;case"Firefox":return xx;case"Internet Explorer":return Tx;case"Opera Mini":case"Opera":return wx;case"Mobile Safari":case"Safari":return Ix;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return Mx;default:return Px}}$e();v();function Rx({props:e,session:t,state:o}){let[n,i]=o,[s,l]=ye.useState(Go.get(t.id_hash)?.name??"");function c(){Go.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:Bc(t.client_info)),Uc(),e.onClose()}return r(ge,{...e},r(Ce,null,r(T.FormTitle,{tag:"h4"},"Rename")),r(xe,null,r(T.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),r(yt,{style:{marginBottom:"10px"},placeholder:Bc(t.client_info),value:s,onChange:l,onKeyDown:u=>{u.key==="Enter"&&c()}}),r(U,{style:{marginBottom:"20px",paddingLeft:"1px",paddingRight:"1px",opacity:.6},look:U.Looks.LINK,color:U.Colors.LINK,size:U.Sizes.NONE,onClick:()=>l("")},"Reset Name")),r(ht,null,r("div",{className:"vc-betterSessions-footer-buttons"},r(U,{color:U.Colors.PRIMARY,onClick:()=>e.onClose()},"Cancel"),r(U,{color:U.Colors.BRAND,onClick:c},"Save"))))}function Dx({session:e,state:t}){return r(et,{variant:"secondary",size:"xs",className:"vc-betterSessions-rename-btn",onClick:()=>ue(o=>r(Rx,{props:o,session:e,state:t}))},"Rename")}var S8=gt("AuthSessionsStore"),x8=Z("timestamp","blockquoteContainer"),T8=Z("sessionIcon"),w8=he("!1,lowerBadgeSize:"),uy=x({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}}),rd=h({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:[m.amia],settings:uy,patches:[{find:"#{intl::AUTH_SESSIONS_SESSION_LOG_OUT}",replacement:[{match:/({variant:"eyebrow",className:\i\.\i,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\.\i,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/,replace:"$1$self.renderTimestamp({...arguments[0],timeLabel:$2})}"},{match:/children:\[(?=.{0,125}?width:"32")(?<=,icon:(\i)\}.+?)/,replace:"children:[$self.renderIcon({...arguments[0],DeviceIcon:$1}),false&&"}]}],renderName:M.wrap(({session:e})=>{let t=Go.get(e.id_hash),o=ye.useState(t?.name?`${t.name}*`:Bc(e.client_info)),[n,i]=o;return r(p,null,r("span",null,n),(t==null||t.isNew)&&r("div",{className:"vc-addon-badge",style:{backgroundColor:"#ED4245",marginLeft:"2px"}},"NEW"),r(Dx,{session:e,state:o}))},{noop:!0}),renderTimestamp:M.wrap(({session:e,timeLabel:t})=>r(V,{text:e.approx_last_used_time.toLocaleString()},o=>r("span",{...o,className:x8.timestamp},t)),{noop:!0}),renderIcon:M.wrap(({session:e,DeviceIcon:t})=>{let o=Ax(e.client_info.platform);return r(w8,{isFolder:!0,style:{cursor:"unset"},selected:!1,lowerBadge:r("div",{style:{width:"20px",height:"20px",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"50%",backgroundColor:"var(--interactive-icon-default)",color:"var(--background-base-lower)"}},r(o,{width:14,height:14})),lowerBadgeSize:{width:20,height:20}},r("div",{className:T8.sessionIcon,style:{backgroundColor:kx(e.client_info.os)}},r(t,{size:"md",color:"currentColor"})))},{noop:!0}),async checkNewSessions(){let e=await Mt.get({url:St.Endpoints.AUTH_SESSIONS});for(let t of e.body.user_sessions)Go.has(t.id_hash)||(Go.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:()=>si.openUserSettings("sessions_panel")}));Uc()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=S8.getSessions().map(t=>t.id_hash);e.forEach(t=>{Go.has(t)||Go.set(t,{name:"",isNew:!1})}),e.length>0&&Go.forEach((t,o)=>{e.includes(o)||Go.delete(o)}),Go.forEach(t=>{t.isNew=!1}),Uc()}},async start(){await Cx(),this.checkNewSessions(),uy.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,uy.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}});a();a();dt();ir();v();a();S();F();v();var I8=he(".HEADER_BAR_BADGE_BOTTOM,",'position:"bottom"'),py=x({showPluginMenu:{type:3,default:!0,description:"Show the plugins menu in the toolbox"}});function P8({isShown:e}){return r("svg",{viewBox:"0 0 27 27",width:18,height:18,className:"vc-toolbox-icon"},e?r("path",{fill:"currentColor",d:"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"}):r("path",{fill:"currentColor",d:"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 M8(){let e=st(null),[t,o]=A(!1);return r(Vs,{position:"bottom",align:"right",animation:Vs.Animation.NONE,shouldShow:t,onRequestClose:()=>o(!1),targetElementRef:e,renderPopout:()=>Lx(()=>o(!1))},(n,{isShown:i})=>r(I8,{ref:e,className:"vc-toolbox-btn",onClick:()=>o(s=>!s),tooltip:i?null:"Vencord Toolbox",icon:()=>r(P8,{isShown:i}),selected:i}))}var ys=h({name:"VencordToolbox",description:"Adds a button to the titlebar that houses Vencord quick actions",authors:[m.Ven,m.AutumnVN],settings:py,patches:[{find:'?"BACK_FORWARD_NAVIGATION":',replacement:{match:/(?<=trailing:.{0,50})\i\.Fragment,(?=\{children:\[)/,replace:"$self.TrailingWrapper,"}}],TrailingWrapper({children:e}){return r(p,null,e,r(M,{key:"vc-toolbox",noop:!0},r(M8,null)))}});function N8(){let{showPluginMenu:e}=py.use(["showPluginMenu"]),t=dy();return e?r(P.MenuItem,{id:"plugins",label:"Plugins",action:()=>Nn(ya)},t):null}function dy(e=!1){let t=Be().plugins,[o,n]=A(""),i=o.toLowerCase(),s=ce(()=>Object.values(je).sort((c,u)=>c.name.localeCompare(u.name)),[]),l=ce(()=>s.filter(c=>!ke(c.name)||c.name.endsWith("API")?!1:c.name.toLowerCase().includes(i)),[i]);return r(p,null,r(P.MenuControlItem,{id:"plugins-search",control:(c,u)=>r(P.MenuSearchControl,{...c,query:o,onChange:n,ref:u})}),r(P.MenuSeparator,null),l.map(c=>{let u=[],d=!1;if(c.options)for(let[y,b]of Object.entries(c.options)){if("hidden"in b&&b.hidden)continue;d=!0;let I=t[c.name],w={id:`${c.name}-${y}`,key:y,label:dn(yl(y)),disabled:"disabled"in b?b.disabled?.call(c.settings):!1};switch(b.type){case 3:u.push(r(P.MenuCheckboxItem,{...w,checked:I[y],action:()=>{I[y]=!I[y],b.restartNeeded&&_e("Restart to apply the change")}}));break;case 4:u.push(r(P.MenuItem,{...w},b.options.map(D=>r(P.MenuRadioItem,{group:`${c.name}-${y}`,id:`${c.name}-${y}-${D.value}`,key:D.label,label:D.label,checked:I[y]===D.value,action:()=>{I[y]=D.value,b.restartNeeded&&_e("Restart to apply the change")}}))));break;case 5:if(b.stickToMarkers||b.componentProps)continue;u.push(r(P.MenuControlItem,{...w,control:(D,N)=>r(P.MenuSliderControl,{ref:N,...D,minValue:b.markers[0],maxValue:b.markers.at(-1),value:I[y],onChange:_=>I[y]=_})}));break}}let f=u.length>0;return!f&&!(e&&d)?null:r(P.MenuItem,{id:`${c.name}-menu`,key:c.name,label:c.name,action:()=>fr(c)},f&&r(p,null,r(P.MenuGroup,{label:c.name},u),r(P.MenuSeparator,null),r(P.MenuItem,{id:`${c.name}-open`,label:"Open Settings",action:()=>fr(c)})))}))}function C8(){return r(P.MenuItem,{id:"themes",label:"Themes",action:()=>Nn(hs)},my())}function my(){let{useQuickCss:e,enabledThemes:t}=Be(["useQuickCss","enabledThemes"]),[o]=pt(VencordNative.themes.getThemesList);return r(p,null,r(P.MenuCheckboxItem,{id:"toggle-quickcss",checked:e,label:"Enable QuickCSS",action:()=>{$.useQuickCss=!e}}),r(P.MenuItem,{id:"edit-quickcss",label:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),r(P.MenuItem,{id:"manage-themes",label:"Manage Themes",action:()=>Nn(hs)}),!!o?.length&&r(P.MenuGroup,null,o.map(n=>r(P.MenuCheckboxItem,{id:`theme-${n.fileName}`,key:n.fileName,label:n.name,checked:t.includes(n.fileName),action:()=>{t.includes(n.fileName)?$.enabledThemes=t.filter(i=>i!==n.fileName):$.enabledThemes=[...t,n.fileName]}}))))}function k8(){let e=[];for(let o of Object.values(je))if(o.toolboxActions&&ke(o.name)){let n=typeof o.toolboxActions=="function"?o.toolboxActions():Object.entries(o.toolboxActions).map(([i,s])=>{let l=`${o.name}-${i}`;return r(P.MenuItem,{id:l,key:l,label:i,action:s})});if(!n||Array.isArray(n)&&n.length===0)continue;e.push({plugin:o,node:r(P.MenuGroup,{label:o.name,key:`${o.name}-group`},n)})}if(e.length<=5)return e.map(o=>o.node);let t=e.map(({node:o,plugin:n})=>r(P.MenuItem,{id:`${n.name}-menu`,key:`${n.name}-menu`,label:n.name,action:()=>fr(n)},o));return r(P.MenuGroup,null,t)}function Lx(e){return r(P.Menu,{navId:"vc-toolbox",onClose:e},r(P.MenuItem,{id:"notifications",label:"Open Notification Log",action:va}),C8(),N8(),k8())}S();we();le();F();v();a();(window.VencordStyles??=new Map).set("src/plugins/betterSettings/fullHeightContext.css",{name:"src/plugins/betterSettings/fullHeightContext.css",source:`/*
* Discord has dumb max height logic for their context menus.
* If a context menu is at the bottom of the screen, its submenus are capped to its max height and can't even grow upwards
* We unset the variable they use to cap height. This allows submenus to grow as tall as they want
*/
#user-settings-cog,
[aria-activedescendant^="user-settings-cog"] {
--reference-position-layer-max-height: initial !important;
}`,classNames:{},dom:null});var fy="src/plugins/betterSettings/fullHeightContext.css";var A8=q(""),gy=Z("animating","baseLayer","bg","layer","layers"),On=x({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,restartNeeded:!0},eagerLoad:{description:"Removes the loading delay when opening the menu for the first time",type:3,default:!0,restartNeeded:!0}});function R8({mode:e,baseLayer:t=!1,...o}){let n=e==="HIDDEN",i=st(null);te(()=>()=>{Uo.dispatch("LAYER_POP_START"),Uo.dispatch("LAYER_POP_COMPLETE")},[]);let s=r("div",{ref:i,"aria-hidden":n,className:A8({[gy.layer]:!0,[gy.baseLayer]:t,"stop-animations":n}),style:{opacity:n?0:void 0},...o});return t?s:r(Ku,{containerRef:i},s)}var nd=h({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[m.Kyuuhachi],settings:On,start(){On.store.organizeMenu&&no(fy)},stop(){ko(fy)},patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/class (\i)(?= extends \i\.PureComponent.+?static contextType=.+?jsx\)\(\1,\{mode:)/,replace:"var $1=$self.Layer;class VencordPatchedOldFadeLayer",predicate:()=>On.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>On.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:()=>On.store.disableFade},{find:'"data-mana-component":"layer-modal"',replacement:[{match:/(\i)\.animated\.div(?=,\{"data-mana-component":"layer-modal")/,replace:'"div"'},{match:/(?<="data-mana-component":"layer-modal"[^}]*?)style:\i,/,replace:"style:{},"}],predicate:()=>On.store.disableFade},{find:"headerId:void 0,headerIdIsManaged:!1",replacement:{match:/let (\i)=300/,replace:"let $1=0"},predicate:()=>On.store.disableFade},{find:"handleOpenSettingsContextMenu=",replacement:{match:/(?=handleOpenSettingsContextMenu=.{0,100}?null!=\i&&.{0,100}?(await [^};]*?\)\)))/,replace:"_vencordBetterSettingsEagerLoad=(async ()=>$1)();"},predicate:()=>On.store.eagerLoad},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",predicate:()=>On.store.organizeMenu,replacement:[{match:/children:\[(\i),(?<=\1=.{0,30}\.openUserSettings.+?)/,replace:"children:[$self.transformSettingsEntries($1),"}]}],Layer(e){try{[Ku.$$vencordGetWrappedComponent(),Uo,gy.layer].forEach(t=>t.test)}catch{return new B("BetterSettings").error("Failed to find some components"),e.children}return r(R8,{...e})},transformSettingsEntries(e){let t=[];for(let o of e){let{key:n,props:i}=o;if(i)if(n==="vencord_plugins"||n==="vencord_themes"){let s=n==="vencord_plugins"?dy():my();t.push(r(P.MenuItem,{key:n,label:i.label,id:i.label,...i},s))}else n.endsWith("_section")&&i.label?t.push(r(P.MenuItem,{key:n,label:i.label,id:i.label},this.transformSettingsEntries(i.children))):t.push(o)}return t}});a();S();var id=h({name:"BetterUploadButton",authors:[m.fawn,m.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:".CHAT_INPUT_BUTTON_NOTIFICATION,",replacement:[{match:/onClick:(\i\?void 0:\i)(?=,onDoubleClick:(\i\?void 0:\i),)/,replace:"$&,...$self.getOverrides(arguments[0],$1,$2)"}]}],getOverrides(e,t,o){return e?.className?.includes("attachButton")?{onClick:o,onContextMenu:t}:{}}});a();He();S();se();v();a();F();var Ox=gt("ApplicationStreamPreviewStore"),_x=gt("ApplicationStreamingStore");var D8=async({guildId:e,channelId:t,ownerId:o})=>{let n=await Ox.getPreviewURL(e,t,o);n&&Zo({url:n,height:720,width:1280})},Bx=(e,{userId:t})=>{let o=_x.getAnyStreamForUser(t);if(!o)return;let n=r(P.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Gh,action:()=>o&&D8(o),disabled:!o});e.push(r(P.MenuSeparator,null),n)},L8=(e,{stream:t})=>Bx(e,{userId:t.ownerId}),O8=(e,{user:t})=>{if(t)return Bx(e,{userId:t.id})},sd=h({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[m.phil],contextMenus:{"user-context":O8,"stream-context":L8}});a();S();we();var hy;function Ux(){hy.textContent=`
.vc-nsfw-img [class*=imageContainer],
.vc-nsfw-img [class*=wrapperPaused] {
filter: blur(${$.plugins.BlurNSFW.blurAmount}px);
transition: filter 0.2s;
&:hover {
filter: blur(0);
}
}
`}var ad=h({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[m.Ven],patches:[{find:"}renderStickersAccessories(",replacement:[{match:/(\.renderReactions\(\i\).+?className:)/,replace:'$&(this.props?.channel?.nsfw?"vc-nsfw-img ":"")+'}]}],options:{blurAmount:{type:1,description:"Blur Amount (in pixels)",default:10,onChange:Ux}},start(){hy=_o("VcBlurNsfw",ss),Ux()},stop(){hy?.remove()}});a();S();dt();a();(window.VencordStyles??=new Map).set("src/plugins/callTimer/alignedChatInputFix.css",{name:"src/plugins/callTimer/alignedChatInputFix.css",source:`[class*="panels"] [class*="inner"],
[class*="rtcConnectionStatus"] {
height: fit-content !important;
}`,classNames:{},dom:null});var Ex="src/plugins/callTimer/alignedChatInputFix.css";function _8(e){let t=$.plugins.CallTimer.format==="human",o=f=>t?f:f.toString().padStart(2,"0"),n=f=>t?f:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),d="";return s&&(d+=`${s}d `),(l||d)&&(d+=`${o(l)}${n("h")}${i}`),(c||d||!t)&&(d+=`${o(c)}${n("m")}${i}`),d+=`${o(u)}${n("s")}`,d}var ld=h({name:"CallTimer",description:"Adds a timer to vcs",authors:[m.Ven],managedStyle:Ex,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:/(lineClamp:1,children:)(\i)(?=,|}\))/,replace:"$1[$2,$self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return r(M,{noop:!0},r(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Cl({deps:[e]});return r("p",{style:{margin:0,fontFamily:"var(--font-code)"}},_8(t))}});a();S();var B8="https://raw.githubusercontent.com/ClearURLs/Rules/master/data.min.json",cd=h({name:"ClearURLs",description:"Automatically removes tracking elements from URLs you send",authors:[m.adryd,m.thororen],rules:[],async start(){await this.createRules()},stop(){this.rules=[]},onBeforeMessageSend(e,t){return this.cleanMessage(t)},onBeforeMessageEdit(e,t,o){return this.cleanMessage(o)},async createRules(){let e=await fetch(B8).then(t=>t.json());this.rules=[];for(let[t,o]of Object.entries(e.providers)){let n=new RegExp(o.urlPattern,"i"),i=o.rules?.map(c=>new RegExp(c,"i")),s=o.rawRules?.map(c=>new RegExp(c,"i")),l=o.exceptions?.map(c=>new RegExp(c,"i"));this.rules.push({name:t,urlPattern:n,rules:i,rawRules:s,exceptions:l})}},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.rules.forEach(({urlPattern:o,exceptions:n,rawRules:i,rules:s})=>{if(!o.test(t.href)||n?.some(u=>u.test(t.href)))return;let l=[];s&&t.searchParams.forEach((u,d)=>{s.some(f=>f.test(d))&&l.push(d)}),l.forEach(u=>t.searchParams.delete(u));let c=t.href;i?.forEach(u=>{c=c.replace(u,"")}),t=new URL(c)}),t.toString())},cleanMessage(e){/http(s)?:\/\//.test(e.content)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))}});a();S();var ud=h({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[m.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'$1status_$:$2="online"'}}]});a();S();v();var Br=()=>{},U8={logDangerously:Br,log:Br,verboseDangerously:Br,verbose:Br,info:Br,warn:Br,error:Br,trace:Br,time:Br,fileOnly:Br},vs=new Set;function E8({settingKey:e}){let{allowLevel:t}=bs.use(["allowLevel"]),o=t[e];return r(a1,{value:o,onChange:(n,i)=>bs.store.allowLevel[e]=i,size:20},r(G,{variant:"text-sm/normal"},e[0].toUpperCase()+e.slice(1)))}var F8=M.wrap(()=>r(mr,{name:"Filter List",description:"Always allow loggers of these types"},r("div",{style:{display:"flex",flexDirection:"row"}},Object.keys(bs.store.allowLevel).map(e=>r(E8,{key:e,settingKey:e}))))),bs=x({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:"Semicolon (;) separated list of loggers to allow even if others are hidden",default:"GatewaySocket; Routing/Utils",multiline:!0,onChange(e){vs.clear(),e.split(";").map(t=>t.trim()).forEach(vs.add.bind(vs))}},allowLevel:{type:6,component:F8,default:{error:!0,warn:!1,trace:!1,log:!1,info:!1,debug:!1}}}),pd=h({name:"ConsoleJanitor",description:"Disables annoying console messages/errors",authors:[m.Nuckyz,m.sadan],settings:bs,startAt:"Init",start(){vs.clear(),this.settings.store.whitelistedLoggers?.split(";").map(e=>e.trim()).forEach(vs.add.bind(vs))},Noop:Br,NoopLogger:()=>U8,shouldLog(e,t){return vs.has(e)||bs.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(?=\(`\$\{\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: \$\{(\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: \$\{\i\}`\)/,replace:""}]},{find:"Slow dispatch on",replacement:[{match:/\i\.totalTime>\i&&\i\.verbose\([`"]Slow dispatch on.{0,55}\);/,replace:""}]},{find:'"file-only"!==',predicate:()=>bs.store.disableLoggers,replacement:{match:/(?<=&&)(?=console)/,replace:"$self.shouldLog(arguments[0],arguments[1])&&"}},{find:'("Spotify")',predicate:()=>bs.store.disableSpotifyLogger,replacement:{match:/new \i\.\i\("Spotify"\)/,replace:"$self.NoopLogger()"}}]});a();S();se();Fs();qo();re();$e();Sr();F();F();v();a();le();Sr();F();F();var yy=e=>()=>{if(Vesktop.Settings.store.discordBranch===e)throw new Error(`Already on ${e}`);Vesktop.Settings.store.discordBranch=e,VesktopNative.app.relaunch()},dd=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));function vy(){function e(s,l=!1){let c=new Map;return function(...u){let d=String(u);if(c.has(d))return c.get(d);let f=Zn(s(...u),{topLevelOnly:l}),g=(()=>{switch(f.length){case 0:return null;case 1:return f[0];default:let y=[...new Set(f)];return y.length>1&&console.warn(`Warning: This filter matches ${y.length} exports. Make it more specific!
`,y),f[0]}})();return g&&d&&c.set(d,g),g}}function t(s){let l=new Map;return function(c){let u=String(c);if(l.has(u))return l.get(u);let d;try{d=s(c)}catch{}return d&&l.set(u,d),d}}let o,n=e(s=>s),i=e(O.byProps);return{...Object.fromEntries(Object.keys(Yn).map(s=>[s,{getter:()=>Yn[s]}])),wp:Gu,wpc:{getter:()=>sr},wreq:{getter:()=>ft},wpPatcher:{getter:()=>Vencord.WebpackPatcher},wpInstances:{getter:()=>Vencord.WebpackPatcher.allWebpackInstances},wpsearch:zs,wpex:Nl,wpexs:s=>Nl(Qn(s)),loadLazyChunks:()=>{throw new Error("loadLazyChunks is dev only.")},find:n,findAll:Zn,findByProps:i,findAllByProps:(...s)=>Zn(O.byProps(...s)),findByCode:e(O.byCode),findCssClasses:e(O.byClassNames,!0),findAllByCode:s=>Zn(O.byCode(s)),findComponentByCode:e(O.componentByCode),findAllComponentsByCode:(...s)=>Zn(O.componentByCode(...s)),findExportedComponent:(...s)=>i(...s)[s[0]],findStore:t(Pl),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:Ut,canonicalizeMatch:Lt,canonicalizeReplace:fl,canonicalizeReplacement:gl,runtimeHashMessageKey:pn,fakeRender:(s,l)=>{let c=o?.deref(),u=c?.closed===!1?c:window.open("about:blank","Fake Render","popup,width=500,height=500");o=new WeakRef(u),u.focus();let d=u.document;d.body.style.margin="1em",u.prepared||(u.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(g=>{let y=g.cloneNode(!0);g.parentElement?.tagName==="HEAD"?d.head.append(y):y.id?.startsWith("vencord-")||y.id?.startsWith("vcd-")?d.documentElement.append(y):d.body.append(y)}));let f=ji(d.body.appendChild(document.createElement("div")));f.render(ye.createElement(s,l)),d.addEventListener("close",()=>f.unmount(),{once:!0})},preEnable:s=>(Vencord.Settings.plugins[s]??={enabled:!0}).enabled=!0,channel:{getter:()=>Yo(),preload:!1},channelId:{getter:()=>Ge.getChannelId(),preload:!1},guild:{getter:()=>yn(),preload:!1},guildId:{getter:()=>uo.getGuildId(),preload:!1},me:{getter:()=>C.getCurrentUser(),preload:!1},meId:{getter:()=>C.getCurrentUser().id,preload:!1},messages:{getter:()=>Kt.getMessages(Ge.getChannelId()),preload:!1},openModal:{getter:()=>kl.openModal},openModalLazy:{getter:()=>kl.openModalLazy},Stores:{getter:()=>Object.fromEntries(jr)},setExperiment:(s,l)=>{L.dispatch({type:"EXPERIMENT_OVERRIDE_BUCKET",experimentId:s,experimentBucket:l})},vesktopStable:yy("stable"),vesktopCanary:yy("canary"),vesktopPtb:yy("ptb")}}function Fx(e,t,o){let n=t.getter();if(!n||t.preload===!1)return n;function i(l){if(l[yr])o?n[yr]():n[an];else if(l.$$vencordGetWrappedComponent)return o?l.$$vencordGetWrappedComponent():l;return l}let s=i(n);if(typeof s=="object"&&s!==null){let l=Object.getOwnPropertyDescriptors(s);for(let c in l){if(s[c]==null)continue;let u=l[c];if(u.writable===!0||u.set!=null){let d=s[c],f=i(d);f!=null&&d!==f&&(s[c]=f)}}}return s!=null&&(dd(window.shortcutList,e,{value:s}),dd(window,e,{value:s})),s}var $8=$s.then(()=>vr(1e3)),md=h({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[m.Ven],startAt:"Init",patches:[{find:"&&this.initializeIfNeeded()",replacement:[{match:/\i&&this\.initializeIfNeeded\(\)/,replace:"$&,Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1})"}]}],start(){let e=vy();window.shortcutList={};for(let[t,o]of Object.entries(e))"getter"in o?(dd(window.shortcutList,t,{get:()=>Fx(t,o,!0)}),dd(window,t,{get:()=>window.shortcutList[t]})):(window.shortcutList[t]=o,window[t]=o);this.eagerLoad(!1),VencordNative.pluginHelpers.ConsoleShortcuts.initDevtoolsOpenEagerLoad()},async eagerLoad(e){await $8;let t=vy();for(let[o,n]of Object.entries(t))if(!(!Object.hasOwn(n,"getter")||n.preload===!1))try{Fx(o,n,e)}catch{}},stop(){delete window.shortcutList;for(let e in vy())delete window[e]}});a();S();se();F();v();var{convertNameToSurrogate:G8}=X("convertNameToSurrogate");function H8(e,t){let{id:o,name:n}=e.dataset;if(!o)return t?G8(n):`:${n}:`;let i=new URL(e.firstChild.src),s=i.searchParams.get("animated")==="true",l=i.pathname.endsWith(".gif");return`<${s||l?"a":""}:${n.replace(/~\d+$/,"")}:${o}>`}var $x=x({copyUnicode:{type:3,description:"Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",default:!0}}),fd=h({name:"CopyEmojiMarkdown",description:"Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",authors:[m.HappyEnderman,m.Vishnya],settings:$x,contextMenus:{"expression-picker"(e,{target:t}){t.dataset.type==="emoji"&&e.push(r(P.MenuItem,{id:"vc-copy-emoji-markdown",label:"Copy Emoji Markdown",action:()=>{it(H8(t,$x.store.copyUnicode),"Success! Copied emoji markdown.")}}))}}});a();He();S();se();v();var z8=()=>r("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r("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"})),gd=h({name:"CopyFileContents",description:"Adds a button to text file attachments to copy their contents",authors:[m.Obsidian,m.Nuckyz],patches:[{find:"#{intl::PREVIEW_BYTES_LEFT}",replacement:{match:/fileName:\i,fileSize:\i}\),(?=.{0,75}?setLanguage:)(?<=fileContents:(\i),bytesLeft:(\i).+?)/g,replace:"$&$self.addCopyButton({fileContents:$1,bytesLeft:$2}),"}}],addCopyButton:M.wrap(({fileContents:e,bytesLeft:t})=>{let[o,n]=A(!1);return r(V,{text:o?"Copied!":t>0?"File too large to copy":"Copy File Contents"},i=>r("div",{...i,className:"vc-cfc-button",role:"button",onClick:()=>{!o&&t<=0&&(it(e),n(!0),setTimeout(()=>n(!1),2e3))}},o?r(z8,null):t>0?r(Ul,{color:"var(--channel-icon)"}):r(bn,null)))},{noop:!0})});a();a();S();se();le();$e();F();v();var j8=fe(".GUILD_EMOJIS(","EMOJI_UPLOAD_START"),q8=fe(".additionalEmojiSlots"),K8={1:"png",2:"png",3:"json",4:"gif"},Gx={0:5,1:15,2:30,3:60},Y8=256*1024,Z8=512*1024;function Q8(e){return e.features.has("MORE_STICKERS")&&e.premiumTier===3?120:Gx[e.premiumTier]??Gx[0]}function Hx(e,t){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.webp?size=${t}&lossless=true&animated=true`:`${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${K8[e.format_type]}?size=${t}&lossless=true&animated=true`}async function zx(e){let t=ho.getStickerById(e);if(t)return t;let{body:o}=await Mt.get({url:St.Endpoints.STICKER(e)});return L.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function J8(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 Wx(t));let{body:n}=await Mt.post({url:St.Endpoints.GUILD_STICKER_PACKS(e),body:o});L.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...n,user:C.getCurrentUser()}})}async function X8(e,t){let o=await Wx(t),n=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return j8({guildId:e,name:t.name.split("~")[0],image:n})}function V8(e){let t=C.getCurrentUser().id;return Object.values(Ne.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Ie.getGuildPermissions({id:o.id})&me.CREATE_GUILD_EXPRESSIONS)===me.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker"){let u=Q8(o),d=ho.getStickersByGuildId(o.id);return!d||d.length<u}let{isAnimated:i}=e,s=q8(o),l=lr.getGuildEmoji(o.id),c=0;for(let u of l)u.animated===i&&!u.managed&&c++;return c<s}).sort((o,n)=>o.name.localeCompare(n.name))}async function Wx(e){let t=e.t==="Sticker"?Z8:Y8;for(let o=4096;o>=16;o/=2){let n=Hx(e,o),i=await fetch(n);if(!i.ok)throw new Error(`Failed to fetch ${n} - ${i.status}`);let s=await i.blob();if(s.size<=t)return s}throw new Error(`Failed to fetch ${e.t} within size limit of ${t/1e3}kB`)}async function e6(e,t){try{t.t==="Sticker"?await J8(e,t):await X8(e,t),j.show({message:`Successfully cloned ${t.name} to ${Ne.getGuild(e)?.name??"your server"}!`,type:j.Type.SUCCESS,id:j.genId()})}catch(o){let n="Something went wrong (check console!)";try{n=JSON.parse(o.text).message}catch{}new B("ExpressionCloner").error("Failed to clone",t.name,"to",e,o),j.show({message:"Failed to clone: "+n,type:j.Type.FAILURE,id:j.genId()})}}var t6=e=>[20,20,18,18,16,14,12][e.length]??4,o6=/^\w+$/i;function r6({data:e}){let[t,o]=ye.useState(!1),[n,i]=ye.useState(e.name),[s,l]=ye.useReducer(u=>u+1,0),c=ye.useMemo(()=>V8(e),[e.id,s]);return r(p,null,r(T.FormTitle,{className:k.top20},"Custom Name"),r(kc,{value:n,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&o6.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),r("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>r(V,{key:u.id,text:u.name},({onMouseLeave:d,onMouseEnter:f})=>r("div",{onMouseLeave:d,onMouseEnter:f,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-base-lower)",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),e6(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?r("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:at.getGuildIconURL({id:u.id,icon:u.icon,canAnimate:!0,size:512}),alt:u.name}):r(T.FormText,{style:{fontSize:t6(Ks(u)),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},Ks(u)))))))}function hd(e,t){return r(P.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Al(async()=>{let o=await t(),n={t:e,...o},i=Hx(n,128);return s=>r(ge,{...s},r(Ce,null,r("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),r(T.FormText,null,"Clone ",n.name)),r(xe,null,r(r6,{data:n})))})})}function jx(e){let t=new URL(e);return t.pathname.endsWith(".gif")||t.searchParams.get("animated")==="true"}var n6=(e,t)=>{let{favoriteableId:o,itemHref:n,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${o}>|https://cdn\\.discordapp\\.com/emojis/${o}\\.`)),u=t.message.reactions.find(g=>g.emoji.id===o);if(!c&&!u)return;let d=(c&&c[1])??u?.emoji.name??"FakeNitroEmoji";return hd("Emoji",()=>({id:o,name:d,isAnimated:jx(n??i)}));case"sticker":return t.message.stickerItems.find(g=>g.id===o)?.format_type===3?void 0:hd("Sticker",()=>zx(o))}})();l&&ze("copy-link",e)?.push(l)},i6=(e,t)=>{let{id:o,name:n,type:i}=t?.target?.dataset??{};if(o)if(i==="emoji"&&n){let s=t.target.firstChild;e.push(hd("Emoji",()=>({id:o,name:n,isAnimated:s&&jx(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(hd("Sticker",()=>zx(o)))};tr("ExpressionCloner","EmoteCloner");var Pa=h({name:"ExpressionCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner","EmoteCloner","EmojiCloner"],authors:[m.Ven,m.Nuckyz],contextMenus:{message:n6,"expression-picker":i6}});S();se();v();var s6=[,"png","png","json","gif"];function qx(e){return e.format_type===4?`https:${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.gif?size=512&lossless=true`:`https://${window.GLOBAL_ENV.CDN_HOST}/stickers/${e.id}.${s6[e.format_type]}?size=512&lossless=true`}function Kx(e,t){return r(p,null,r(P.MenuGroup,null,r(P.MenuItem,{id:"vc-copy-sticker-link",key:"vc-copy-sticker-link",label:"Copy Link",action:()=>it(qx(e),"Link copied!")}),r(P.MenuItem,{id:"vc-open-sticker-link",key:"vc-open-sticker-link",label:"Open Link",action:()=>VencordNative.native.openExternal(qx(e))})),t&&r(P.MenuSeparator,null))}var a6=(e,{favoriteableId:t,favoriteableType:o,message:n})=>{if(!t||o!=="sticker")return;let i=n.stickerItems.find(l=>l.id===t);if(!i?.format_type)return;let s=e.findIndex(l=>Array.isArray(l)&&ze("vc-copy-sticker-url",l)!=null);e.splice(s,0,Kx(i,s!==-1))},l6=(e,t)=>{let o=t?.target?.dataset?.id;if(!o||t.target.className?.includes("lottieCanvas"))return;let n=ho.getStickerById(o);n&&e.push(Kx(n,ke(Pa.name)))},yd=h({name:"CopyStickerLinks",description:"Adds the ability to copy & open Sticker links",authors:[m.Ven,m.Byeoon],contextMenus:{message:a6,"expression-picker":l6}});a();He();cn();S();v();var c6=(e,{user:t})=>{t&&e.push(r(P.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>lo(`<https://discord.com/users/${t.id}>`),icon:Ei}))},vd=h({name:"CopyUserURLs",authors:[m.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":c6}});a();S();le();$e();F();v();var Ur=new B("CrashHandler"),{ModalStack:u6,DraftManager:p6}=Bo(()=>{let[e,t]=Eu(O.byProps("pushLazy","popAll"),O.byProps("clearDraft","saveDraft"));return{ModalStack:e,DraftManager:t}}),by=x({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}}),Yx=!1,Sy=!1,xy=!0,bd=h({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[m.Nuckyz],enabledByDefault:!0,settings:by,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(!xy){try{qe({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}xy=!1,setTimeout(()=>xy=!0,1e3)}catch{}try{Yx||(Yx=!0,oc("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{by.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){Ur.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=Ge.getChannelId();for(let o in Ht)Number.isNaN(Number(o))&&p6.clearDraft(t,Ht[o])}catch(t){Ur.debug("Failed to clear drafts.",t)}try{Vl.closeExpressionPicker()}catch(t){Ur.debug("Failed to close expression picker.",t)}try{L.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){Ur.debug("Failed to close open context menu.",t)}try{u6.popAll()}catch(t){Ur.debug("Failed to close old modals.",t)}try{qr()}catch(t){Ur.debug("Failed to close all open modals.",t)}try{L.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){Ur.debug("Failed to close user popout.",t)}try{L.dispatch({type:"LAYER_POP_ALL"})}catch(t){Ur.debug("Failed to pop all layers.",t)}try{L.dispatch({type:"DEV_TOOLS_SETTINGS_UPDATE",settings:{displayTools:!1,lastOpenTabId:"analytics"}})}catch(t){Ur.debug("Failed to close DevTools.",t)}if(by.store.attemptToNavigateToHome)try{Mr.transitionToGuild("@me")}catch(t){Ur.debug("Failed to navigate to home",t)}setImmediate(()=>Sy=!1);try{e.setState({error:null,info:null})}catch(t){Ur.debug("Failed to update crash handler component.",t)}}});a();S();var Sd=h({name:"CtrlEnterSend",authors:[m.UlyssesZhan],description:"Use Ctrl+Enter to send messages (customizable)",settings:x({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:"!$self.shouldSubmit($1,$2)"}},{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=wo?e.metaKey:e.ctrlKey;break;case"enter":o=!e.shiftKey&&!e.ctrlKey;break}return this.settings.store.sendMessageInTheMiddleOfACodeBlock||(o&&=!t),o}});a();S();se();v();a();br();Po();a();re();v();He();function xd({children:e,renderContent:t,className:o,initialExpanded:n=!1}){let[i,s]=A(n),l=i?t1:o1;return r(Ae,{"data-expanded":i,className:R("vc-expandable-card",o)},r(oo,{className:"vc-expandable-card-header",onClick:()=>s(c=>!c)},e,r(l,{className:"vc-expandable-card-icon"})),i?r("div",{className:"vc-expandable-card-content"},r(t,null)):null)}Xo();He();to();$e();v();a();a();br();Po();He();to();function Zx(){let{tagsList:e}=Si.use(["tagsList"]);return r("section",{className:k.top8},r(ao,{size:"md",weight:"semibold"},"Registered Tags"),r(Y,{flexDirection:"column",gap:"0.5em",className:k.top8},Object.values(e).map(t=>r(Ae,{key:t.name,className:"vc-customCommands-card"},r(ee,{size:"md",weight:"medium"},t.name),r(et,{variant:"secondary",size:"iconOnly",onClick:()=>Ec(t)},r(Fl,{"aria-label":"Edit Tag",width:20,height:20})),r(et,{variant:"dangerSecondary",size:"iconOnly",onClick:()=>Td(t.name)},r(Yr,{"aria-label":"Delete Tag",width:20,height:20})))),r(et,{onClick:()=>Ec()},"Create Tag")))}var Si=x({tagsList:{type:7,default:{}},tagComponent:{type:6,component:Zx}});function Ty(){return Si.store.tagsList}function wd(e){return Si.store.tagsList[e]}function Qx(e){ma(e.name),Si.store.tagsList[e.name]=e,wy(e)}function Td(e){delete Si.store.tagsList[e],ma(e)}function Ec(e={name:"",message:""}){ue(t=>r(d6,{initialValue:e,modalProps:t}))}var Jx="Hello {{user}}! I am feeling {{mood = great}}.";function d6({initialValue:e,modalProps:t}){let[o,n]=A(e.name),[i,s]=A(e.message.replaceAll("\\n",`
`)),l=Iy(i),c=l.some(d=>d.name==="ephemeral"),u=o!==e.name&&wd(o);return r(ge,{...t,size:"medium"},r(Ce,null,r(ao,{size:"lg",weight:"semibold",style:{flexGrow:1}},"Create Tag"),r(Ke,{onClick:t.onClose})),r(xe,null,r(Y,{flexDirection:"column",gap:12},r(ee,null,"Create a new tag which will be registered as a slash command."),r("section",{className:k.top8},r(Ir,null,"Name"),r(yt,{value:o,onChange:n,placeholder:"greet"})),r("section",null,r(Ir,null,"Response"),r(Jr,{value:i,onChange:s,placeholder:Jx})),l.length>0&&r("section",null,r(Ir,null,"Detected Arguments"),r(ee,null,r("ul",null,l.map(d=>r("li",{key:d.name},"\u2014 ",r("b",null,d.name),d.defaultValue?` (default: ${d.defaultValue})`:""))))),r(xd,{renderContent:()=>r(Y,{flexDirection:"column",gap:12},r(ee,null,"Your response can include variables wrapped in double curly braces which will become command arguments, for example ",r(ui,null,"Hello {{user}}"),"."),r(ee,null,"You can specify arguments with default values by using an equals sign, for example ",r(ui,null,"Hello {{user = pal}}"),"."),r("section",null,r(ee,null,r("b",null,"Example Command response:")," ",r(ui,null,Jx)),r(ee,null,r("b",null,"Example usage:")," ",r(ui,null,"/greet user:@Clyde")),r(ee,null,r("b",null,"Example output:")," ",r(ui,null,"Hello @Clyde! I am feeling great."))))},r(Y,{alignItems:"center",gap:8},r(Fi,{color:"var(--text-muted)",height:16,width:16}),"View Arguments guide")),c&&r(Ae,{variant:"danger",className:k.top8,defaultPadding:!0},r(ee,null,'The argument name "ephemeral" is reserved and cannot be used.')),u&&r(Ae,{variant:"warning",className:k.top8,defaultPadding:!0},r(ee,null,"A tag with the name ",r(ui,null,o)," already exists and will be overwritten.")))),r(ht,null,r(Y,null,r(et,{variant:"secondary",onClick:t.onClose},"Cancel"),r(et,{onClick:()=>{Qx({name:o,message:i}),t.onClose()},disabled:!o||!i||c},"Create"))))}var m6=Symbol("CustomCommands"),Xx=/{{(.+?)}}/g;function Iy(e){let t=[];for(let[,o]of e.matchAll(Xx)){let[n,i]=o.split("=").map(s=>s.trim());n&&(t.some(s=>s.name===n)||t.push({name:n.toLowerCase(),defaultValue:i??null}))}return t}function wy(e){let t=Iy(e.message);da({name:e.name,description:e.name,inputType:0,options:[...t.map(o=>({name:o.name,description:o.name,type:3,required:o.defaultValue===null})),{name:"ephemeral",description:"Whether the response should only be visible to you",type:5,required:!1}],execute:async(o,{channel:n})=>{let i=or(o,"ephemeral",!1),s=e.message.replace(Xx,(c,u)=>{let[d,f]=u.split("=").map(g=>g.trim());return or(o,d,null)??f??c}).replaceAll("\\n",`
`);(i?Nt:Jn)(n.id,{content:s},!1,Xt.getSendMessageOptionsForReply(xn.getPendingReply(n.id))),L.dispatch({type:"DELETE_PENDING_REPLY",channelId:n.id})},[m6]:!0},"CustomCommands")}tr("CustomCommands","MessageTags");var Id=h({name:"CustomCommands",description:"Allows you to create custom slash commands / tags",tags:["MessageTags"],authors:[m.Ven,m.Luna],settings:Si,async start(){let e=Ty();for(let t in e)wy(e[t])},commands:[{name:"tags",description:"Manage all custom commands",inputType:0,options:[{name:"create",description:"Create a new tag",type:1},{name:"list",description:"List all your tags",type:1,options:[]},{name:"delete",description:"Remove a tag by name",type:1,options:[{name:"tag-name",description:"The name of the tag",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{Ec();break}case"delete":{let o=or(e[0].options,"tag-name","");if(!wd(o))return Nt(t.channel.id,{content:`A Tag with the name **${o}** does not exist!`});Td(o),Nt(t.channel.id,{content:`Successfully deleted the tag **${o}**!`});break}case"list":{let o=Object.values(Ty()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`);Nt(t.channel.id,{content:o||"Woops! There are no tags yet, use `/tags create` to create one!"});break}}}}]});a();S();v();var Py=x({idleTimeout:{description:"Minutes before Discord goes idle (0 to disable auto-idle)",type:5,markers:er(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}}),Pd=h({name:"CustomIdle",description:"Allows you to set the time before Discord goes idle (or disable auto-idle)",authors:[m.newwares],settings:Py,patches:[{find:'type:"IDLE",idle:',replacement:[{match:/(?<=Date\.now\(\)-\i>)\i\.\i\|\|/,replace:"$self.getIdleTimeout()||"},{match:/Math\.min\((\i\*\i\.\i\.\i\.SECOND),\i\.\i\)/,replace:"$1"},{match:/\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,replace:"$self.handleOnline()"}]}],handleOnline(){if(!Py.store.remainInIdle){L.dispatch({type:"IDLE",idle:!1});return}let e="Welcome back! Click the button to go online. Click the X to stay idle until reload.";cs?.[1]===e||vc.some(([,t])=>t===e)||kn(e,"Exit idle",()=>{us(),L.dispatch({type:"IDLE",idle:!1})})},getIdleTimeout(){let{idleTimeout:e}=Py.store;return e===0?1/0:e*6e4}});a();Vt();qt();S();re();dt();F();v();a();Vt();Xo();we();v();var $c=q("vc-customRPC-settings-"),kd=(e,t=!1)=>o=>t&&!o?"This field is required.":o.length>e?`Must be not longer than ${e} characters.`:!0,Md=kd(128);function f6(e){return/^\d{16,21}$/.test(e)?!0:"Must be a valid Discord ID."}var g6=Zt(()=>{Gc(!0),ke(Na.name)&&Gc()});function h6(){return Er.store.type!==1}function y6(e){return!h6()&&!/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 Nd(e){return e?parseInt(e,10):0}function Cd(e){return isNaN(e)?"Must be a number.":e<0?"Must be a positive number.":!0}function Ma(e){return e&&!/^https?:\/\/.+/.test(e)?"Must be a valid URL.":!0}function Vx(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}function _n(e){let[t,o]=e.data;return r("div",{className:$c("pair")},r(Fc,{...t}),r(Fc,{...o}))}function Fc({settingsKey:e,label:t,disabled:o,isValid:n,transform:i}){let[s,l]=A(Er.store[e]??""),[c,u]=A(null);function d(f){i&&(f=i(f));let g=n?.(f)??!0;l(f),u(dr(g)),g===!0&&(Er.store[e]=f,g6())}return r("div",{className:$c("single",{disabled:o})},r(eo,{tag:"h5"},t),r(yt,{type:"text",placeholder:"Enter a value",value:s,onChange:d,disabled:o}),c&&r(G,{className:$c("error"),variant:"text-sm/normal"},c))}function eT({settingsKey:e,label:t,options:o,disabled:n}){return r("div",{className:$c("single",{disabled:n})},r(eo,{tag:"h5"},t),r(mo,{placeholder:"Select an option",options:o,maxVisibleItems:5,closeOnSelect:!0,select:i=>Er.store[e]=i,isSelected:i=>i===Er.store[e],serialize:i=>String(i),isDisabled:n}))}function tT(){let e=Er.use();return r("div",{className:$c("root")},r(eT,{settingsKey:"type",label:"Activity Type",options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]}),r(_n,{data:[{settingsKey:"appID",label:"Application ID",isValid:f6},{settingsKey:"appName",label:"Application Name",isValid:kd(128,!0)}]}),r(_n,{data:[{settingsKey:"details",label:"Detail (line 1)",isValid:Md},{settingsKey:"detailsURL",label:"Detail URL",isValid:Ma}]}),r(_n,{data:[{settingsKey:"state",label:"State (line 2)",isValid:Md},{settingsKey:"stateURL",label:"State URL",isValid:Ma}]}),r(Fc,{settingsKey:"streamLink",label:"Stream Link (Twitch or YouTube, only if activity type is Streaming)",disabled:e.type!==1,isValid:y6}),r(_n,{data:[{settingsKey:"partySize",label:"Party Size",transform:Nd,isValid:Cd,disabled:e.type!==0},{settingsKey:"partyMaxSize",label:"Maximum Party Size",transform:Nd,isValid:Cd,disabled:e.type!==0}]}),r(Ue,null),r(_n,{data:[{settingsKey:"imageBig",label:"Large Image URL/Key",isValid:Vx},{settingsKey:"imageBigTooltip",label:"Large Image Text",isValid:Md}]}),r(Fc,{settingsKey:"imageBigURL",label:"Large Image clickable URL",isValid:Ma}),r(_n,{data:[{settingsKey:"imageSmall",label:"Small Image URL/Key",isValid:Vx},{settingsKey:"imageSmallTooltip",label:"Small Image Text",isValid:Md}]}),r(Fc,{settingsKey:"imageSmallURL",label:"Small Image clickable URL",isValid:Ma}),r(Ue,null),r(_n,{data:[{settingsKey:"buttonOneText",label:"Button1 Text",isValid:kd(31)},{settingsKey:"buttonOneURL",label:"Button1 URL",isValid:Ma}]}),r(_n,{data:[{settingsKey:"buttonTwoText",label:"Button2 Text",isValid:kd(31)},{settingsKey:"buttonTwoURL",label:"Button2 URL",isValid:Ma}]}),r(Ue,null),r(eT,{settingsKey:"timestampMode",label:"Timestamp Mode",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}]}),r(_n,{data:[{settingsKey:"startTime",label:"Start Timestamp (in milliseconds)",transform:Nd,isValid:Cd,disabled:e.timestampMode!==3},{settingsKey:"endTime",label:"End Timestamp (in milliseconds)",transform:Nd,isValid:Cd,disabled:e.timestampMode!==3}]}))}var v6=fe("profileThemeStyle:","--profile-gradient-primary-color"),b6=he(".party?(0","USER_PROFILE_ACTIVITY"),oT=Ro("status","showCurrentGame");async function rT(e){return(await wn.fetchAssetIds(Er.store.appID,[e]))[0]}var Er=x({config:{type:6,component:tT}}).withPrivateSettings();async function nT(){let{appID:e,appName:t,details:o,detailsURL:n,state:i,stateURL:s,type:l,streamLink:c,startTime:u,endTime:d,imageBig:f,imageBigURL:g,imageBigTooltip:y,imageSmall:b,imageSmallURL:I,imageSmallTooltip:w,buttonOneText:D,buttonOneURL:N,buttonTwoText:_,buttonTwoURL:W,partyMaxSize:H,partySize:K,timestampMode:pe}=Er.store;if(!t)return;let z={application_id:e||"0",name:t,state:i,details:o,type:l??0,flags:1};switch(l===1&&(z.url=c),pe){case 1:z.timestamps={start:Date.now()};break;case 2:z.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(u||d)&&(z.timestamps={},u&&(z.timestamps.start=u),d&&(z.timestamps.end=d));break;case 0:default:break}n&&(z.details_url=n),s&&(z.state_url=s),D&&(z.buttons=[D,_].filter(di),z.metadata={button_urls:[N,W].filter(di)}),f&&(z.assets={large_image:await rT(f),large_text:y||void 0,large_url:g||void 0}),b&&(z.assets={...z.assets,small_image:await rT(b),small_text:w||void 0,small_url:I||void 0}),H&&K&&(z.party={size:[K,H]});for(let ne in z){if(ne==="type")continue;let J=z[ne];(!J||J.length===0)&&delete z[ne]}return z}async function Gc(e){let t=await nT();L.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var Na=h({name:"CustomRPC",description:"Add a fully customisable Rich Presence (Game status) to your Discord profile",authors:[m.captain,m.AutumnVN,m.nin0dev],dependencies:["UserSettingsAPI"],requiresRestart:!1,settings:Er,start:Gc,stop:()=>Gc(!0),patches:[{find:".USER_PROFILE_ACTIVITY_BUTTONS),",replacement:{match:/.getId\(\)===\i.id/,replace:"$& && false"}}],settingsAboutComponent:()=>{let[e]=pt(nT,{fallbackValue:void 0,deps:Object.values(Er.store)}),t=oT.useSetting(),{profileThemeStyle:o}=v6({});return r(p,null,!t&&r(Rt,{className:R(k.top16,k.bottom16),style:{padding:"1em"}},r(T.FormTitle,null,"Notice"),r(T.FormText,null,"Activity Sharing isn't enabled, people won't be able to see your custom rich presence!"),r(U,{color:U.Colors.TRANSPARENT,className:k.top8,onClick:()=>oT.updateSetting(!0)},"Enable")),r(Y,{flexDirection:"column",gap:".5em",className:k.top16},r(T.FormText,null,"Go to the ",r(Oe,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),r(T.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),r(T.FormText,null,"If you want to use an image link, download your image and reupload the image to ",r(Oe,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and selecting "Copy image address".'),r(T.FormText,null,"You can't see your own buttons on your profile, but everyone else can see it fine."),r(T.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.')),r(Ue,{className:k.top8}),r("div",{style:{width:"284px",...o,marginTop:8,borderRadius:8,background:"var(--background-mod-muted)"}},e&&r(b6,{activity:e,user:C.getCurrentUser(),currentUser:C.getCurrentUser()})))}});a();S();le();v();var S6=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;async function x6(){try{let{embed:e}=this.props,{replaceElements:t,dearrowByDefault:o}=Ad.store;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let n=S6.exec(e.video.url)?.[1];if(!n)return;let i=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${n}`);if(!i.ok)return;let{titles:s,thumbnails:l}=await i.json(),c=s[0]?.votes>=0,u=l[0]?.votes>=0&&!l[0].original;if(!c&&!u)return;if(e.dearrow={enabled:o},c&&t!==2){let d=s[0].title.replace(/(^|\s)>(\S)/g,"$1$2");e.dearrow.oldTitle=o?e.rawTitle:d,o&&(e.rawTitle=d)}if(u&&t!==1){let d=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${n}&time=${l[0].timestamp}`;e.dearrow.oldThumb=o?e.thumbnail.proxyURL:d,o&&(e.thumbnail.proxyURL=d)}this.forceUpdate()}catch(e){new B("Dearrow").error("Failed to dearrow embed",e)}}function T6({component:e}){let{embed:t}=e.props;return t?.dearrow?r(V,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:n})=>r("button",{onMouseEnter:o,onMouseLeave:n,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;Ad.store.dearrowByDefault=!i,t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},r("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"},r("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"}),r("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"}),r("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 Ad=x({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}}),Rd=h({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[m.Ven],settings:Ad,embedDidMount:x6,renderButton(e){return r(M,{noop:!0},r(T6,{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:()=>!Ad.store.hideButton}]}]});a();S();v();a();var w6="https://decor.fieryflames.dev",xi=w6+"/api",iT=xi+"/authorize",sT="https://ugc.decor.fieryflames.dev",aT="1096966363416899624",Ss="100101099111114",Hc="11497119",Ca="1096357702931841148",zc="dXp2SdxDcP",My=1e3*60*60*4;a();qo();le();$e();v();var I6={async getItem(e){return zt(e).then(t=>t??null)},async setItem(e,t){await Wt(e,t)},async removeItem(e){await D1(e)}},Ti=It(()=>Zi(M1((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[C.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[C.getCurrentUser().id]:o}}),remove:o=>{let{tokens:n,init:i}=t(),s={...n};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,n)=>ue(i=>r(Wi,{...i,scopes:["identify"],responseType:"code",redirectUri:iT,permissions:0n,clientId:aT,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let c=await fetch(l);if(c?.ok){let u=await c.text();t().setToken(u)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&(_e(`Failed to authorize: ${l.message}`,j.Type.FAILURE),new B("Decor").error("Failed to authorize",l),n(l))}}}),{onCloseCallback(){n(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",storage:I6,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})));a();a();async function Dd(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${Ti.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var lT=async e=>{if(e?.length===0)return{};let t=new URL(xi+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},cT=async(e="@me")=>Dd(xi+`/users/${e}/decorations`).then(t=>t.json()),uT=async(e="@me")=>Dd(xi+`/users/${e}/decoration`).then(t=>t.json()),Ny=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"),Dd(xi+`/users/${t}/decoration`,{method:"PUT",body:o}).then(n=>e&&"file"in e?n.json():n.text())};var pT=async e=>{await Dd(xi+`/decorations/${e}`,{method:"DELETE"})},dT=async()=>fetch(xi+"/decorations/presets").then(e=>e.json());a();function Cy(e){return`${e.animated?"a_":""}${e.hash}`}function Ld(e){return{asset:Cy(e),skuId:Ss}}qo();v();a();qo();v();var Bn=It(()=>Zi((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:Zt(async()=>{let{fetchQueue:o,usersDecorations:n}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=[...o],s=await lT(i),l=new Map(n),c=new Date;for(let u of i){let d=s[u]??null;l.set(u,{asset:d,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,n=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!n&&Date.now()-c.getTime()<My||(e({fetchQueue:new Set(s).add(o)}),l())},async fetchMany(o){if(!o.length)return;let{usersDecorations:n,fetchQueue:i,bulkFetch:s}=t(),l=new Set(i),c=Date.now();for(let u of o){let{fetchedAt:d}=n.get(u)??{};d&&c-d.getTime()<My||l.add(u)}e({fetchQueue:l}),s()},get(o){return t().usersDecorations.get(o)},getAsset(o){return t().usersDecorations.get(o)?.asset},has(o){return t().usersDecorations.has(o)},set(o,n){let{usersDecorations:i}=t(),s=new Map(i);s.set(o,{asset:n,fetchedAt:new Date}),e({usersDecorations:s})}})));function mT(e){try{let[t,o]=A(e?Bn.getState().getAsset(e.id)??null:null);return te(()=>{let n=(()=>{try{return Bn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);s&&t!==s&&o(s)})}catch{return()=>{}}})();try{if(e){let{fetch:i}=Bn.getState();i(e.id)}}catch{}return n},[]),t?{asset:t,skuId:Ss}:null}catch(t){console.error(t)}return null}var on=It(()=>Zi((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await cT(),n=await uT();e({decorations:o,selectedDecoration:n})},async create(o){let n=await Ny(o);e({decorations:[...t().decorations,n]})},async delete(o){let n=typeof o=="object"?o.hash:o;await pT(n);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==n),selectedDecoration:i?.hash===n?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),Ny(o),Bn.getState().set(C.getCurrentUser().id,o?Cy(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})));a();qt();re();$e();v();a();Po();a();we();F();var We=q("vc-decor-"),ka=Z("modalPreview","modalCloseButton","spinner","modal"),Aa=Bi(["initialSelectedDecoration:",/initialSelectedDecoration:\i,.{0,300}\i\.e\(/]),fT=Bi([".CREATE_STICKER_MODAL,","isDisplayingIndividualStickers"]);a();Po();a();F();var Wc,gT=e=>Wc=e,Od=he("#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}"),ky,hT=e=>ky=e;a();He();se();v();function Ay(e){return r(Wc,{...e,isSelected:!1},r(Hh,null),r(G,{variant:"text-xs/normal",color:"text-strong"},Le("CREATE")))}a();He();se();v();function Ry(e){return r(Wc,{...e},r(Ul,null),r(G,{variant:"text-xs/normal",color:"text-strong"},Le("NONE")))}a();v();a();He();cn();v();function Dy({decoration:e}){let{delete:t}=on();return r(P.Menu,{navId:We("decoration-context-menu"),onClose:ct.closeContextMenu,"aria-label":"Decoration Options"},r(P.MenuItem,{id:We("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:bn,action:()=>lo(e.hash)}),e.authorId===C.getCurrentUser().id&&r(P.MenuItem,{id:We("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Yr,action:()=>Ee.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:We("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}function Ly(e){let{decoration:t}=e;return r(ky,{...e,onContextMenu:o=>{ct.openContextMenu(o,()=>r(Dy,{decoration:t}))},avatarDecoration:Ld(t)})}a();re();F();a();v();function Oy({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:n}){return r("div",{className:We("sectioned-grid-list-grid")},n.map(i=>r(ye.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var P6=Z("managedReactiveScroller","thin");function _y(e){return r("div",{className:R(We("sectioned-grid-list-container"),P6.thin)},e.sections.map(t=>r("div",{key:e.getSectionKey(t),className:We("sectioned-grid-list-section")},e.renderSectionHeader(t),r(Oy,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}se();$e();v();a();qt();se();$e();F();v();var M6=he(".currentTarget.files","lineClamp:1"),{HelpMessage:yT,HelpMessageTypes:vT}=Xe('POSITIVE="positive',{HelpMessageTypes:O.byProps("POSITIVE","WARNING","INFO"),HelpMessage:O.byCode("messageType:")});function N6(e){let[t,o]=A(null);return te(()=>{if(!e)return;let n=URL.createObjectURL(e);return o(n),()=>{URL.revokeObjectURL(n),o(null)}},[e]),t}function C6(e){let[t,o]=A(""),[n,i]=A(null),[s,l]=A(!1),[c,u]=A(null);te(()=>{c&&u(null)},[n]);let{create:d}=on(),f=N6(n),g=ce(()=>f?{asset:f,skuId:Hc}:null,[f]);return r(ge,{...e,size:"medium",className:ka.modal},r(Ce,{separator:!1,className:We("modal-header")},r(G,{color:"text-strong",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),r(Ke,{onClick:e.onClose})),r(xe,{className:We("create-decoration-modal-content"),scrollbarType:"none"},r(M,null,r(yT,{messageType:vT.WARNING},"Make sure your decoration does not violate ",r(Oe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),r("div",{className:We("create-decoration-modal-form-preview-container")},r("div",{className:We("create-decoration-modal-form")},c!==null&&r(G,{color:"text-danger",variant:"text-xs/normal"},c.message),r("section",null,r(T.FormTitle,{tag:"h5"},"File"),r(M6,{filename:n?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),r(T.FormText,{className:k.top8},"File should be APNG or PNG.")),r("section",null,r(T.FormTitle,{tag:"h5"},"Name"),r(yt,{placeholder:"Companion Cube",value:t,onChange:o}),r(T.FormText,{className:k.top8},"This name will be used when referring to this decoration."))),r("div",null,r(Od,{avatarDecoration:g,user:C.getCurrentUser()}))),r(yT,{messageType:vT.INFO,className:k.bottom8},"To receive updates on your decoration's review, join ",r(Oe,{href:`https://discord.gg/${zc}`,onClick:async y=>{y.preventDefault(),Ne.getGuild(Ca)?(qr(),L.dispatch({type:"LAYER_POP_ALL"}),Mr.transitionToGuild(Ca)):await hn(zc)&&(qr(),L.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server")," and allow direct messages."))),r(ht,{className:We("modal-footer")},r("div",{className:We("modal-footer-btn-container")},r(U,{onClick:e.onClose,color:U.Colors.PRIMARY},"Cancel"),r(U,{onClick:()=>{l(!0),d({alt:t,file:n}).then(e.onClose).catch(y=>{l(!1),u(y)})},disabled:!n||!t||s},"Submit for Review"))))}var _d=()=>Promise.all([Aa(),fT()]).then(()=>ue(e=>r(C6,{...e})));a();qt();$e();v();function k6(e){return r(ge,{...e,size:"small",className:ka.modal},r(Ce,{separator:!1,className:We("modal-header")},r(G,{color:"text-strong",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),r(Ke,{onClick:e.onClose})),r(xe,{scrollbarType:"none"},r(T.FormText,null,"By submitting a decoration, you agree to ",r(Oe,{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.")),r(ht,{className:We("modal-footer")},r(Y,{gap:"4px"},r(U,{onClick:()=>{Ra.store.agreedToGuidelines=!0,e.onClose(),_d()}},"Continue"),r(U,{onClick:e.onClose,color:U.Colors.PRIMARY,look:U.Looks.LINK},"Go Back"))))}var bT=()=>Aa().then(()=>ue(e=>r(k6,{...e})));function A6(){let[e,t]=A([]);return te(()=>{dT().then(t)},[]),e}var R6=new Ao;function D6({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[n,i]=A([]);return te(()=>{R6.push(async()=>{if(e.authorIds)for(let s of e.authorIds){let l=C.getUser(s)??await po.getUser(s).catch(()=>null);l!=null&&i(c=>[...c,l])}})},[e.authorIds]),r("div",null,r(Y,null,r(T.FormTitle,{style:{flexGrow:1}},e.title),o&&r(Pr,{users:n,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:k.bottom8})),t&&r(T.FormText,{className:k.bottom8},e.subtitle))}function L6(e){let[t,o]=A(void 0),n=typeof t<"u",i=t!=null?Ld(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=on();te(()=>{c()},[]);let d=n?t:l,f=typeof d?.authorId<"u",g=s.some(_=>_.reviewed===!1),y=A6(),b=y.flatMap(_=>_.decorations),I=y.find(_=>_.id===d?.presetId),w=typeof I<"u",N=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(_=>!b.some(W=>W.hash===_.hash)),"create"]},...y.map(_=>({title:_.name,subtitle:_.description||void 0,sectionKey:`preset-${_.id}`,items:_.decorations,authorIds:_.authorIds}))];return r(ge,{...e,size:"dynamic",className:ka.modal},r(Ce,{separator:!1,className:We("modal-header")},r(G,{color:"text-strong",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),r(Ke,{onClick:e.onClose})),r(xe,{className:We("change-decoration-modal-content"),scrollbarType:"none"},r(M,null,r(_y,{renderItem:_=>{if(typeof _=="string")switch(_){case"none":return r(Ry,{className:We("change-decoration-modal-decoration"),isSelected:d===null,onSelect:()=>o(null)});case"create":return r(V,{text:"You already have a decoration pending review",shouldShow:g},W=>r(Ay,{className:We("change-decoration-modal-decoration"),...W,onSelect:g?()=>{}:Ra.store.agreedToGuidelines?_d:bT}))}else return r(V,{text:"Pending review",shouldShow:_.reviewed===!1},W=>r(Ly,{...W,className:We("change-decoration-modal-decoration"),onSelect:_.reviewed!==!1?()=>o(_):()=>{},isSelected:d?.hash===_.hash,decoration:_}))},getItemKey:_=>typeof _=="string"?_:_.hash,getSectionKey:_=>_.sectionKey,renderSectionHeader:_=>r(D6,{section:_}),sections:N}),r("div",{className:We("change-decoration-modal-preview")},r(Od,{avatarDecoration:i,user:C.getCurrentUser()}),w&&r(T.FormTitle,{className:""},"Part of the ",I.name," Preset"),typeof d=="object"&&r(G,{variant:"text-sm/semibold",color:"text-strong"},d?.alt),f&&r(G,{key:`createdBy-${d.authorId}`},"Created by ",Me.parse(`<@${d.authorId}>`)),w&&r(U,{onClick:()=>it(I.id)},"Copy Preset ID")))),r(ht,{className:We("change-decoration-modal-footer","modal-footer")},r("div",{className:We("modal-footer-btn-container")},r(U,{onClick:e.onClose,color:U.Colors.PRIMARY},"Cancel"),r(U,{onClick:()=>{u(t).then(e.onClose)},disabled:!n},"Apply")),r("div",{className:We("modal-footer-btn-container")},r(V,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},_=>r(et,{..._,onClick:async()=>{Ne.getGuild(Ca)?(e.onClose(),L.dispatch({type:"LAYER_POP_ALL"}),Mr.transitionToGuild(Ca)):await hn(zc)&&(qr(),L.dispatch({type:"LAYER_POP_ALL"}))},variant:"link"},"Discord Server")),r(et,{onClick:()=>Ee.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:We("danger-btn"),cancelText:"Cancel",onConfirm(){Ti.getState().remove(C.getCurrentUser().id),e.onClose()}}),variant:"dangerSecondary"},"Log Out"))))}var By=()=>Aa().then(()=>ue(e=>r(L6,{...e})));F();v();var O6=he(".DESCRIPTION","hasBackground:");function jc({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let n=Ti(),{selectedDecoration:i,select:s,fetch:l}=on();return te(()=>{n.isAuthorized()&&l()},[n.token]),r(O6,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&We("section-remove-margin")},r(Y,{gap:"4px"},r(et,{onClick:()=>{n.isAuthorized()?By():n.authorize().then(By).catch(()=>{})},variant:"primary",size:"small"},"Change Decoration"),i&&n.isAuthorized()&&r(et,{onClick:()=>s(null),variant:"secondary",size:"small"},"Remove Decoration")))}var Ra=x({changeDecoration:{type:6,component(){return Da.started?r("div",null,r(jc,{hideTitle:!0,hideDivider:!0,noMargin:!0}),r(T.FormText,{className:R(k.top8,k.bottom8)},"You can also access Decor decorations from the ",r(Oe,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),qr(),L.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):r(T.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}});var Da=h({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[m.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}\)},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:"80,onlyAnimateOnHoverOrFocus:!",replacement:[{match:/(?<==)\i=>{let{children.{20,200}isSelected:\i=!1.{0,5}\}=\i/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.\i\.PURCHASE)(?=,)(?<=avatarDecoration:(\i).+?)/,replace:"||$1.skuId===$self.SKU_ID"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=\.avatarDecoration,guildId:\i\}\)\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:".DISPLAY_NAME_STYLES_COACHMARK)",replacement:[{match:/(?<=\i\)\({avatarDecoration:)\i(?=,)(?<=currentUser:(\i).+?)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]},...["#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}","#{intl::COLLECTIBLES_NAMEPLATE_PREVIEW_A11Y}","#{intl::COLLECTIBLES_PROFILE_PREVIEW_A11Y}"].map(e=>({find:e,replacement:{match:/(?<=userValue:)((\i(?:\.author)?)\?\.avatarDecoration)/,replace:"$self.useUserDecorAvatarDecoration($2)??$1"}})),{find:"#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}",replacement:{match:/(#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}.+?return null!=(\i)&&\()(null==\i)/,replace:(e,t,o,n)=>`${t}(${o}.skuId!==$self.SKU_ID&&${o}.skuId!==$self.RAW_SKU_ID&&${n})`}}],settings:Ra,flux:{CONNECTION_OPEN:()=>{Ti.getState().init(),on.getState().clear(),Bn.getState().fetch(C.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Bn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){gT(e)},set DecorationGridDecoration(e){hT(e)},SKU_ID:Ss,RAW_SKU_ID:Hc,useUserDecorAvatarDecoration:mT,async start(){Bn.getState().fetch(C.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===Ss){let o=e.asset.split("_");return e.asset.startsWith("a_")&&!t&&o.shift(),`${sT}/${o.join("_")}.png`}else if(e?.skuId===Hc)return e.asset},DecorSection:M.wrap(jc,{noop:!0})});a();S();var Bd=h({name:"DisableCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",authors:[m.Nuckyz],patches:[{find:"this.idleTimeout.start(",replacement:{match:/this\.idleTimeout\.(start|stop)/g,replace:"$self.noop"}},{find:"handleIdleUpdate(){",replacement:{match:"handleIdleUpdate(){",replace:"handleIdleUpdate(){return;"}}],noop(){}});a();S();v();var Ud=h({name:"DontRoundMyTimestamps",authors:[m.Lexi],description:"Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",start(){aa.relativeTimeRounding(Math.floor)},stop(){aa.relativeTimeRounding(Math.round)}});a();to();S();F();v();a();(window.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});var Uy="src/plugins/experiments/hideBugReport.css";var Ed=X("key","combo"),_6=Ot(e=>e?.definition?.name==="2026-01-bug-reporter"),B6=wo?"cmd":"ctrl",U6=wo?"opt":"alt",ST=x({toolbarDevMenu:{type:3,description:"Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",default:!1,restartNeeded:!0}}),Fd=h({name:"Experiments",description:"Enable Access to Experiments & other dev-only features in Discord!",authors:[m.Megu,m.Ven,m.Nickyux,m.BanTheNons,m.Nuckyz],settings:ST,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)(?=&&"CONNECTION_OPEN")/,replace:"!($1=true)"}},{find:'placeholder:"Search experiments"',replacement:{match:/(?<=children:\[)(?=\(0,\i\.jsx?\)\(\i\.\i,{placeholder:"Search experiments")/,replace:"$self.WarningCard(),"}},{find:'?"BACK_FORWARD_NAVIGATION":',replacement:{match:/hasBugReporterAccess:(\i)/,replace:"_hasBugReporterAccess:$1=true"},predicate:()=>ST.store.toolbarDevMenu},{find:'navId:"staff-help-popout"',replacement:{match:/(isShown.+?)onClick:\i/,replace:(e,t)=>`${t}onClick:()=>{}`}},{find:"Clear Treatment ",replacement:[{match:/\i\??\.isStaff\(\)/,replace:"true"},{match:/\.isStaffPersonal\(\).+?if\(null==(\i)\|\|null==\i(?=\)return null;)/,replace:"$&||({})[$1]!=null"}]},{find:"}getServerAssignment(",replacement:{match:/}getServerAssignment\((\i),\i,\i\){/,replace:"$&if($1==null)return;"}}],start:()=>!_6.getConfig().hasBugReporterAccess&&no(Uy),stop:()=>ko(Uy),settingsAboutComponent:()=>r(ye.Fragment,null,r(T.FormTitle,{tag:"h3"},"More Information"),r(ee,{size:"md"},"You can open Discord's DevTools via "," ",r("div",{className:Ed.combo,style:{display:"inline-flex"}},r("kbd",{className:Ed.key},B6)," +"," ",r("kbd",{className:Ed.key},U6)," +"," ",r("kbd",{className:Ed.key},"O")," "))),WarningCard:M.wrap(()=>r(Rt,{id:"vc-experiments-warning-card",className:k.bottom16},r(T.FormTitle,{tag:"h2"},"Hold on!!"),r(T.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),r(T.FormText,{className:k.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know."),r(T.FormText,{className:k.top8},'No, you cannot use server-side features like checking the "Send to Client" box.')),{noop:!0})});a();S();var $d=h({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[m.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}});a();a();var Fy=class{width=0;height=0;numPlays=0;playTime=0;frames=[]},MT=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let o=0;o<8;o++)t=t&1?3988292384^t>>>1:t>>>1;MT[e]=t}function E6(e,t=0,o){o=o??e.length-t;let n=-1;for(let i=t,s=t+o;i<s;i++)n=n>>>8^MT[(n^e[i])&255];return n^-1}var Ey=new Uint8Array([137,80,78,71,13,10,26,10]);function NT(e){let t=new Uint8Array(e);return new Promise(function(o,n){for(let b=0;b<Ey.length;b++)if(Ey[b]!=t[b]){n("Not a PNG file (invalid file signature)");return}let i=!1;if(xT(t,function(b){return b=="acTL"?(i=!0,!1):!0}),!i){n("Not an animated PNG");return}let s=[],l=[],c=null,u=null,d=new Fy;if(xT(t,function(b,I,w,D){switch(b){case"IHDR":c=I.subarray(w+8,w+8+D),d.width=wi(I,w+8),d.height=wi(I,w+12);break;case"acTL":d.numPlays=wi(I,w+8+4);break;case"fcTL":u&&d.frames.push(u),u={},u.width=wi(I,w+8+4),u.height=wi(I,w+8+8),u.left=wi(I,w+8+12),u.top=wi(I,w+8+16);let N=TT(I,w+8+20),_=TT(I,w+8+22);_==0&&(_=100),u.delay=1e3*N/_,u.delay<=10&&(u.delay=100),d.playTime+=u.delay,u.disposeOp=wT(I,w+8+24),u.blendOp=wT(I,w+8+25),u.dataParts=[];break;case"fdAT":u&&u.dataParts.push(I.subarray(w+8+4,w+8+D));break;case"IDAT":u&&u.dataParts.push(I.subarray(w+8,w+8+D));break;case"IEND":l.push(IT(I,w,12+D));break;default:s.push(IT(I,w,12+D))}}),u&&d.frames.push(u),d.frames.length==0){n("Not an animated PNG");return}let f=0,g=new Blob(s),y=new Blob(l);for(let b=0;b<d.frames.length;b++){u=d.frames[b];let I=[];I.push(Ey),c.set(Gd(u.width),0),c.set(Gd(u.height),4),I.push(PT("IHDR",c)),I.push(g);for(let N=0;N<u.dataParts.length;N++)I.push(PT("IDAT",u.dataParts[N]));I.push(y);let w=URL.createObjectURL(new Blob(I,{type:"image/png"}));delete u.dataParts;let D=u.img=new Image;D.onload=function(){URL.revokeObjectURL(D.src),f++,f==d.frames.length&&o(d)},D.onerror=function(){n("Image creation error")},D.src=w}})}function xT(e,t){let o=8,n,i;do{let s=wi(e,o);i=F6(e,o+4,4),n=t(i,e,o,s),o+=12+s}while(n!==!1&&i!="IEND"&&o<e.length)}function wi(e,t){let o=0;o+=e[0+t]<<24>>>0;for(let n=1;n<4;n++)o+=e[n+t]<<(3-n)*8;return o}function TT(e,t){let o=0;for(let n=0;n<2;n++)o+=e[n+t]<<(1-n)*8;return o}function wT(e,t){return e[t]}function IT(e,t,o){let n=new Uint8Array(o);return n.set(e.subarray(t,t+o)),n}function F6(e,t,o){let n=Array.prototype.slice.call(e.subarray(t,t+o));return String.fromCharCode.apply(String,n)}function Gd(e){return[e>>>24&255,e>>>16&255,e>>>8&255,e&255]}function $6(e){let t=[];for(let o=0;o<e.length;o++)t.push(e.charCodeAt(o));return t}function PT(e,t){let o=e.length+t.length,n=new Uint8Array(new ArrayBuffer(o+8));n.set(Gd(t.length),0),n.set($6(e),4),n.set(t,8);let i=E6(n,4,o);return n.set(Gd(i),o+4),n}S();se();le();F();v();var La=nh(Wy()),$T=X("readerFactory");function WT(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}var Kd=Bo(()=>Ll.PreloadedUserSettingsActionCreators),Ts=Bo(()=>WT("appearance",Kd.ProtoClass)),GT=Bo(()=>WT("clientThemeSettings",Ts)),lN=fe(".getUserIsAdmin(");var jd="[3,4].includes(fakeNitroIntention)";var jy=/\/emojis\/(\d+?)\.(png|webp|gif)/,qy=/\/stickers\/(\d+?)\./,qd=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,HT=/\[.+?\]\((https?:\/\/.+?)\)/,Ze=x({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,56,64,96,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}});function Yd(e,t){let o=Q.getChannel(e);return!o||o.isPrivate()?!0:Ie.can(t,o)}var cN=e=>Yd(e,me.USE_EXTERNAL_EMOJIS),uN=e=>Yd(e,me.USE_EXTERNAL_STICKERS),zT=e=>Yd(e,me.EMBED_LINKS),pN=e=>Yd(e,me.ATTACH_FILES);function dN(){return{find:"canUseCustomStickersEverywhere:",replacement:[{func:"canUseCustomStickersEverywhere",predicate:()=>Ze.store.enableStickerBypass},{func:"canUseHighVideoUploadQuality",predicate:()=>Ze.store.enableStreamQualityBypass},{func:"canStreamQuality",predicate:()=>Ze.store.enableStreamQualityBypass},{func:"canUseClientThemes"},{func:"canUsePremiumAppIcons"}].map(({func:t,predicate:o})=>({match:new RegExp(String.raw`(?<=${t}:)\i`),replace:"() => true",predicate:o}))}}var Zd=h({name:"FakeNitro",authors:[m.Arjix,m.D3SOX,m.Ven,m.fawn,m.captain,m.Nuckyz,m.AutumnVN,m.sadan],description:"Allows you to send fake emojis/stickers, use nitro themes, and stream in nitro quality",dependencies:["MessageEventsAPI"],settings:Ze,patches:[dN(),{find:'.getByName("fork_and_knife")',predicate:()=>Ze.store.enableEmojiBypass,replacement:{match:".CHAT",replace:".STATUS"}},{find:".GUILD_SUBSCRIPTION_UNAVAILABLE;",group:!0,predicate:()=>Ze.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}&&!${jd}`},{match:/!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,replace:e=>`${e}&&!${jd}`},{match:/!(\i\.\i\.canUseEmojisEverywhere\(\i\))/,replace:e=>`(${e}&&!${jd})`},{match:/(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/,replace:e=>`(${e}||${jd})`}]},{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:()=>Ze.store.enableStickerBypass,replacement:{match:/\i\.available\?/,replace:"true?"}},{find:"#{intl::STREAM_FPS_OPTION}",predicate:()=>Ze.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,n,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${n});`}},{find:"customUserThemeSettings:{",all:!0,replacement:{match:/(?<=\i=)\(0,\i\.\i\)\(\i\.\i\.TIER_2\)(?=,|;)/g,replace:"true"}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Ze.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Ze.store.transformEmojis||Ze.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,hasBailedAst:\i,content:(\i))/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"}renderStickersAccessories(",replacement:[{predicate:()=>Ze.store.transformEmojis||Ze.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\(\((\i),\i\)?=>{)/,replace:(e,t,o,n,i)=>`${t}const fakeNitroMessage=${o};${n}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Ze.store.transformStickers,match:/renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;/,replace:(e,t,o)=>`${e}${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>Ze.store.transformStickers,match:/renderAttachments\(\i\){.+?{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:"#{intl::STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION}",predicate:()=>Ze.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,n,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${n}$self.addFakeNotice(0,${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Ze.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:"#{intl::EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION}",predicate:()=>Ze.store.transformEmojis,replacement:{match:/(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,replace:(e,t,o)=>`$self.addFakeNotice(1,${t},!!${o}?.fakeNitroNode?.fake)`}},{find:"getCurrentDesktopIcon(),",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 yn()?.id},get canUseEmotes(){return(C.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(C.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){try{if(e==null||typeof e=="string")return;if((t?.premium_type??C?.getCurrentUser()?.premiumType??0)!==2){e.appearance??=Ts.create();let n=Jl.settings.appearance,i=Ts.create({...e.appearance,theme:n?.theme,clientThemeSettings:n?.clientThemeSettings});e.appearance=i}}catch(o){new B("FakeNitro").error(o)}},handleGradientThemeSelect(e,t,o){if((C?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!Kd||!Ts||!GT||!$T)return;let i=Kd.getCurrentValue().appearance,s=i!=null?Ts.fromBinary(Ts.toBinary(i),$T):Ts.create();s.theme=t;let l=GT.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=Kd.ProtoClass.create();c.appearance=s,L.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"?(e[0]=t.trimStart(),e[0]||e.shift()):typeof t?.props?.children=="string"&&(t.props.children=t.props.children.trimStart(),t.props.children||e.shift());let o=e.length-1,n=e[o];typeof n=="string"?(e[o]=n.trimEnd(),e[o]||e.pop()):typeof n?.props?.children=="string"&&(n.props.children=n.props.children.trimEnd(),n.props.children||e.pop())},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!Ze.store.transformCompoundSentence)return e;let o=e.length,n=c=>{if(Ze.store.transformEmojis){let u=c.props.href.match(jy);if(u){let d=null;try{d=new URL(c.props.href)}catch{}let f=lr.getCustomEmojiById(u[1])?.name??d?.searchParams.get("name")??"FakeNitroEmoji",g=u[2]==="gif"||d?.searchParams.get("animated")==="true";return Me.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:g,emojiId:u[1],name:f,fake:!0},void 0,{key:String(o++)})}}if(Ze.store.transformStickers){if(qy.test(c.props.href))return null;let u=c.props.href.match(qd);if(u&&ho.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?n(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let d=!1;for(let[f,g]of u.props.children.entries()){if(g==null){delete u.props.children[f];continue}this.ensureChildrenIsArray(g),g.props.children.length>0?d=!0:delete u.props.children[f]}if(!d)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,d]of c.entries())c[u]=s(d);return c=this.clearEmptyArrayItems(c),c};try{let c=l(Ki.cloneDeep(e));return this.trimContent(c),c}catch(c){return new B("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],n=t.content.split(/\s/);Ze.store.transformCompoundSentence?o.push(...n):n.length===1&&o.push(n[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!Ze.store.transformCompoundSentence&&!i.startsWith("http")&&!HT.test(i))continue;let s=i.match(qy);if(s){let c=null;try{c=new URL(i)}catch{}let u=ho.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(qd);if(l){if(!ho.getStickerById(l[1]))continue;let c=ho.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){try{let o=t.content.split(/\s/);if(o.length>1&&!Ze.store.transformCompoundSentence)return!1;switch(e.type){case"image":{let n=e.url??e.image?.url;if(!n||!Ze.store.transformCompoundSentence&&!o.some(i=>i===n||i.match(HT)?.[1]===n))return!1;if(Ze.store.transformEmojis&&jy.test(n))return!0;if(Ze.store.transformStickers){if(qy.test(n))return!0;let i=n.match(qd);if(i&&ho.getStickerById(i[1]))return!0}break}}}catch(o){new B("FakeNitro").error("Error in shouldIgnoreEmbed:",o)}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(qd);return!(o&&ho.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&jy.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({format_type:e,id:t}){let o=e===4?"gif":"png";return`https://media.discordapp.net/stickers/${t}.${o}?size=${Ze.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{frames:n,width:i,height:s}=await fetch(e).then(b=>b.arrayBuffer()).then(NT),l=(0,La.GIFEncoder)(),c=Ze.store.stickerSize,u=document.createElement("canvas");u.width=c,u.height=c;let d=u.getContext("2d",{willReadFrequently:!0}),f=c/Math.max(i,s);d.scale(f,f);let g;for(let b of n){let{left:I,top:w,width:D,height:N,img:_,delay:W,blendOp:H,disposeOp:K}=b;g=d.getImageData(I,w,D,N),H===0&&d.clearRect(I,w,D,N),d.drawImage(_,I,w,D,N);let{data:pe}=d.getImageData(0,0,c,c),z=(0,La.quantize)(pe,256),ne=(0,La.applyPalette)(pe,z);l.writeFrame(ne,c,c,{transparent:!0,palette:z,delay:W}),K===1?d.clearRect(I,w,D,N):K===2&&d.putImageData(g,I,w)}l.finish();let y=new File([l.bytesView()],`${t}.gif`,{type:"image/gif"});Xl.promptToUpload([y],Q.getChannel(o),Ht.ChannelMessage)},canUseEmote(e,t){if(e.type===0)return!0;if(e.available===!1||lN(e,this.guildId,!0))return!1;let o=!1;if(e.managed&&e.guildId){let n=Te.getSelfMember(e.guildId)?.roles??[];o=e.roles.some(i=>n.includes(i))}return this.canUseEmotes||o?e.guildId===this.guildId||cN(t):!e.animated&&e.guildId===this.guildId},start(){let e=Ze.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(n,i){return!n[i]||/\s/.test(n[i])?"":" "}function o(){return new Promise(n=>{Ee.show({title:"Hold on!",body:r("div",null,r(T.FormText,null,"You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."),r(T.FormText,null,"You can disable this notice in the plugin settings.")),confirmText:"Send Anyway",cancelText:"Cancel",secondaryConfirmText:"Do not show again",onConfirm:()=>n(!0),onCloseCallback:()=>setImmediate(()=>n(!1)),onConfirmSecondary(){Ze.store.disableEmbedPermissionCheck=!0,n(!0)}})})}this.preSend=rs(async(n,i,s)=>{let{guildId:l}=this,c=!1;e:{if(!e.enableStickerBypass)break e;let u=ho.getStickerById(s.stickers?.[0]);if(!u||"pack_id"in u)break e;let d=this.canUseStickers&&uN(n);if(u.available!==!1&&(d||u.guild_id===l))break e;let f=this.getStickerLink(u);if(u.format_type===2)return pN(n)?this.sendAnimatedSticker(f,u.id,n):Ee.show({title:"Hold on!",body:r("div",null,r(T.FormText,null,"You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."))}),{cancel:!0};{c=!0;let g=new URL(f);g.searchParams.set("name",u.name),g.searchParams.set("lossless","true");let y=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${y}](${g})`:g}`,s.stickers.length=0}}if(e.enableEmojiBypass)for(let u of i.validNonShortcutEmojis){if(this.canUseEmote(u,n))continue;c=!0;let d=`<${u.animated?"a":""}:${u.originalName||u.name}:${u.id}>`,f=new URL(at.getEmojiURL({id:u.id,animated:u.animated,size:e.emojiSize}));f.searchParams.set("size",e.emojiSize.toString()),f.searchParams.set("name",u.name),f.searchParams.set("lossless","true");let g=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content=i.content.replace(d,(y,b,I)=>`${t(I,b-1)}${e.useHyperLinks?`[${g}](${f})`:f}${t(I,b+y.length)}`)}return c&&!e.disableEmbedPermissionCheck&&!zT(n)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=uc(async(n,i,s)=>{if(!e.enableEmojiBypass)return;let l=!1;return s.content=s.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,d,f)=>{let g=lr.getCustomEmojiById(u);if(g==null||this.canUseEmote(g,n))return c;l=!0;let y=new URL(at.getEmojiURL({id:g.id,animated:g.animated,size:e.emojiSize}));y.searchParams.set("size",e.emojiSize.toString()),y.searchParams.set("name",g.name),y.searchParams.set("lossless","true");let b=e.hyperLinkText.replaceAll("{{NAME}}",g.name);return`${t(f,d-1)}${e.useHyperLinks?`[${b}](${y})`:y}${t(f,d+c.length)}`}),l&&!e.disableEmbedPermissionCheck&&!zT(n)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){ns(this.preSend),pc(this.preEdit)}});a();Vt();S();se();re();dt();F();v();a();function mN(...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 n={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"])n[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,n)}var jT=mN;function KT(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,n="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(n||"")+" "+i}function YT(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 qT=x({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),fN=he("isTryItOut:","pendingThemeColors:","pendingAvatarDecoration:","EDIT_PROFILE_BANNER");function gN(){let[,,e]=pt(()=>Rl(C.getCurrentUser().id));return!e&&r(hN,null)}function hN(){let e=YT(_t.getUserProfile(C.getCurrentUser().id)?.bio??"")??[0,0],[t,o]=A(e[0]),[n,i]=A(e[1]);return r("section",null,r(T.FormTitle,{tag:"h3"},"Usage"),r(T.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins."," "),r(T.FormText,{className:k.top8},r("strong",null,"To set your own profile theme colors:"),r("ul",null,r("li",null,"\u2014 use the color pickers below to choose your colors"),r("li",null,'\u2014 click the "Copy 3y3" button'),r("li",null,"\u2014 paste the invisible text anywhere in your bio")),r(Ue,{className:R(k.top8,k.bottom8)}),r(T.FormTitle,{tag:"h3"},"Color pickers"),r(Y,{gap:"1em"},r(ei,{color:t,label:r(G,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Primary"),onChange:s=>{o(s)}}),r(ei,{color:n,label:r(G,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Accent"),onChange:s=>{i(s)}}),r(U,{onClick:()=>{let s=KT(t,n);it(s)},color:U.Colors.PRIMARY,size:U.Sizes.XLARGE,style:{marginBottom:"auto"}},"Copy 3y3")),r(Ue,{className:R(k.top8,k.bottom8)}),r(T.FormTitle,{tag:"h3"},"Preview"),r("div",{className:"vc-fpt-preview"},r(fN,{user:C.getCurrentUser(),pendingThemeColors:[t,n],onAvatarChange:()=>{},onBannerChange:()=>{},canUsePremiumCustomization:!0,hideExampleButton:!0,hideFakeActivity:!0,isTryItOut:!0}))))}var Qd=h({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[m.Alyxia,m.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(.+?)(?=})/,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:gN,settings:qT,colorDecodeHook(e){if(e?.bio){if(qT.store.nitroFirst&&e.themeColors)return e;let t=YT(e.bio);if(t)return jT(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:M.wrap(function({primary:e,accent:t}){return r(U,{onClick:()=>{let o=KT(e,t);it(o)},color:U.Colors.PRIMARY,size:U.Sizes.XLARGE,className:k.left16},"Copy 3y3")},{noop:!0})});a();S();v();var Jd=h({name:"FavoriteEmojiFirst",authors:[m.Aria,m.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"numEmojiResults:",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=lr.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,n)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(n);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??1/0)}});a();S();v();var ZT=x({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}]}}),Xd=h({name:"FavoriteGifSearch",authors:[m.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:.{0,50}?return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $<searchComp>) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:ZT,getTargetString:QT,instance:null,renderSearchBar(e,t){return this.instance=e,r(M,{noop:!0},r(yN,{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}});function yN({instance:e,SearchBarComponent:t}){let[o,n]=A(""),i=st(null),s=Zu(l=>{n(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.closest("#gif-picker-tab-panel")?.querySelector('[class*="scrollerBase"]')?.scrollTo(0,0);let u=c.favCopy.map(d=>({score:vN(l.toLowerCase(),QT(d.url??d.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:d})).filter(d=>d.score!=null);u.sort((d,f)=>f.score-d.score),c.favorites=u.map(d=>d.gif),e.forceUpdate()},[e.state]);return te(()=>()=>{e.dead=!0},[]),r(t,{ref:i,autoFocus:!0,size:"md",className:"",onChange:s,onClear:()=>{n(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function QT(e){let t;try{t=new URL(e)}catch{return e}switch(ZT.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 vN(e,t){let o=0,n=0;for(let i=0;i<t.length;i++)if(t[i]===e[o]?(n++,o++):n--,o===e.length)return n;return null}a();S();var Vd=h({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[m.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?"}}]});a();to();S();le();var JT=x({originalImagesInChat:{type:3,description:"Also load the original image in Chat. WARNING: Read the caveats above",default:!1}}),em=h({name:"FixImagesQuality",description:"Improves quality of images by loading them at their original resolution",authors:[m.Nuckyz,m.Ven],settings:JT,patches:[{find:".handleImageLoad)",replacement:{match:/getSrc\(\i\)\{/,replace:"$&var _vcSrc=$self.getSrc(this.props,arguments[1]);if(_vcSrc)return _vcSrc;"}}],settingsAboutComponent(){return r(Ae,{variant:"normal"},r(Y,{flexDirection:"column",gap:"4px"},r(ee,{size:"md",weight:"semibold"},"The default behaviour is the following:"),r(ee,null,r("ul",null,r("li",null,"\u2014 In chat, optimised but full resolution images will be loaded."),r("li",null,"\u2014 In the image modal, the original image will be loaded."))),r(ee,{size:"md",weight:"semibold",className:k.top8},"You can also enable original image in chat, but beware of the following caveats:"),r(ee,null,r("ul",null,r("li",null,"\u2014 Animated images (GIF, WebP, etc.) in chat will always animate, regardless of if the App is focused."),r("li",null,"\u2014 May cause lag.")))))},getSrc(e,t){if(e?.src)try{let{contentType:o,height:n,src:i,width:s,mosaicStyleAlt:l,trigger:c}=e;if(!(o?.startsWith("image/")??typeof l=="boolean")||i.startsWith("data:"))return;let d=new URL(i);if(!d.pathname.startsWith("/attachments/"))return;d.searchParams.set("animated",String(!t)),t&&d.pathname.endsWith(".gif")&&d.searchParams.set("format","webp");let f=!!c;if(!JT.store.originalImagesInChat&&!f){let g=s*n,y=2e3*1200;if(g<=y)return d.toString();let b=Math.sqrt(g/y);return d.searchParams.set("width",Math.round(s/b).toString()),d.searchParams.set("height",Math.round(n/b).toString()),d.toString()}return d.hostname="cdn.discordapp.com",d.toString()}catch(o){new B("FixImagesQuality").error("Failed to make image src",o);return}}});a();S();var bN=x({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:er(0,100,10),stickToMarkers:!1,default:10}}),tm=h({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[m.Ven],settings:bN});a();S();var om=h({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[m.coolelectronics]});a();S();v();var rm=h({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[m.D3SOX,m.Nickyux],patches:[{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(?<=decorators:.{0,200}?isOwner:)\i/,replace:"$self.isGuildOwner(arguments[0])"}}],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 Ne.getGuild(t)?.ownerId===o}});a();S();F();var Ky=X("createFriendInvite"),nm=h({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[m.afn,m.Dziurwa],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:0,execute:async(e,t)=>{let o=await Ky.createFriendInvite();Nt(t.channel.id,{content:`
discord.gg/${o.code} \xB7
Expires: <t:${new Date(o.expires_at).getTime()/1e3}:R> \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 n=(await Ky.getAllFriendInvites()).map(i=>`
_discord.gg/${i.code}_ \xB7
Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
Times used: \`${i.uses}/${i.max_uses}\`
`.trim().replace(/\s+/g," "));Nt(t.channel.id,{content:n.join(`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:0,execute:async(e,t)=>{await Ky.revokeFriendInvites(),Nt(t.channel.id,{content:"All friend invites have been revoked."})}}]});a();S();se();F();v();var SN=Z("memberSinceWrapper"),xN=Z("memberSince"),XT=fe('month:"short",day:"numeric"'),VT=X("getLocale"),e4=he("headingVariant:",'"section"',"headingIcon:"),im=h({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[m.Elvyra,m.Antti],patches:[{find:".SIDEBAR}),nicknameIcons",replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"}},{find:",applicationRoleConnection:",replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),"}},{find:".MODAL_V2,onClose:",replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),"}}],FriendsSinceComponent:M.wrap(({userId:e,isSidebar:t})=>{if(!Pe.isFriend(e))return null;let o=Pe.getSince(e);return o?t?r(e4,{heading:"Friends Since",headingVariant:"text-xs/semibold",headingColor:"text-strong"},r(G,{variant:"text-sm/normal"},XT(o,VT.getLocale()))):r(e4,{heading:"Friends Since",headingVariant:"text-xs/medium",headingColor:"text-default",className:"vc-friendsSince-profile-section"},r("div",{className:SN.memberSinceWrapper},r("div",{className:xN.memberSince},!!Yo()?.guild_id&&r("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--interactive-icon-default)"},r("path",{d:"M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),r("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"})),r(G,{variant:"text-sm/normal"},XT(o,VT.getLocale()))))):null},{noop:!0})});a();S();se();dt();F();v();var TN=fe(".MESSAGE,commandTargetId:"),t4=Lh;Ve(O.componentByCode('"cannot copy null text"'),e=>t4=e);function wN({message:e,channel:t,onHeightUpdate:o}){let n=e.author&&!(e.author.id===C.getCurrentUser().id||e.author.system);return TN({navId:"message-actions",ariaLabel:Le("MESSAGE_UTILITIES_A11Y_LABEL"),message:e,channel:t,canReport:n,onHeightUpdate:o,onClose:()=>ct.closeContextMenu(),textSelection:"",favoriteableType:null,favoriteableId:null,favoriteableName:null,itemHref:void 0,itemSrc:void 0,itemSafeSrc:void 0,itemTextContent:void 0,isFullSearchContextMenu:!0})}var IN=(e,t)=>{if(t?.isFullSearchContextMenu==null)return;ze("devmode-copy-id",e,!0)?.push(t4({id:t.message.author.id,label:Le("COPY_ID_AUTHOR")}))};tr("FullSearchContext","SearchReply");var sm=h({name:"FullSearchContext",description:"Makes the message context menu in message search results have all options you'd expect",authors:[m.Ven,m.Aria],patches:[{find:"onClick:this.handleMessageClick,",replacement:{match:/this(?=\.handleContextMenu\(\i,\i\))/,replace:"$self"}}],handleContextMenu(e,t){let o=Q.getChannel(t.channel_id);o&&(e.stopPropagation(),ct.openContextMenu(e,n=>r(wN,{message:t,channel:o,onHeightUpdate:n.onHeightUpdate})))},contextMenus:{"message-actions":IN}});a();S();F();v();var PN=he(".USER_MENTION)"),am=h({name:"FullUserInChatbox",description:"Makes the user mention in the chatbox have more functionalities, like left/right clicking",authors:[m.sadan],patches:[{find:'"text":"locked"',replacement:{match:/(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/,replace:"$1return $self.UserMentionComponent({...arguments[0],originalComponent:()=>{$2}});"}}],UserMentionComponent:M.wrap(e=>ie([C],()=>C.getUser(e.id))==null?e.originalComponent():r(PN,{className:"mention",userId:e.id,channelId:e.channelId}),{fallback:({wrappedProps:{originalComponent:e}})=>e()})});a();S();F();v();a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="panels"] [class*="avatarWrapper"] {
min-width: 0;
}`,classNames:{},dom:null});var o4="src/plugins/gameActivityToggle/style.css";var MN=he(".GREEN,positionKeyStemOverride:"),Kc=Ro("status","showCurrentGame"),lm=x({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1},location:{type:4,description:"Where to show the game activity toggle button",options:[{label:"Next to Mute/Deafen",value:"PANEL",default:!0},{label:"Vencord Toolbox",value:"TOOLBOX"}],get hidden(){return!ke(ys.name)}}});function NN(){let{oldIcon:e}=lm.use(["oldIcon"]),t=Kc.useSetting();return r("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},r("path",{fill:!t&&!e?"var(--status-danger)":"currentColor",mask:t?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"}),!t&&r(p,null,r("path",{fill:"var(--status-danger)",d:e?"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("mask",{id:"gameActivityMask"},r("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),r("path",{fill:"black",d:e?"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"}))))}function CN(e){let{location:t}=lm.use(["location"]),o=Kc.useSetting();return t!=="PANEL"&&ke(ys.name)?null:r(MN,{tooltipText:o?"Disable Game Activity":"Enable Game Activity",icon:NN,role:"switch","aria-checked":!o,redGlow:!o,plated:e?.nameplate!=null,onClick:()=>Kc.updateSetting(n=>!n)})}var cm=h({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[m.Nuckyz,m.RuukuLada],dependencies:["UserSettingsAPI"],settings:lm,managedStyle:o4,patches:[{find:".DISPLAY_NAME_STYLES_COACHMARK)",replacement:{match:/children:\[(?=.{0,25}?accountContainerRef)/,replace:"children:[$self.GameActivityToggleButton(arguments[0]),"}}],toolboxActions(){let{location:e}=lm.use(["location"]),t=Kc.useSetting();return e!=="TOOLBOX"?null:r(P.MenuCheckboxItem,{id:"game-activity-toggle-toolbox",label:"Enable Game Activity",checked:t,action:()=>Kc.updateSetting(o=>!o)})},GameActivityToggleButton:M.wrap(CN,{noop:!0})});a();S();se();v();var um=h({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[m.Ven],patches:[{find:"handleSelectGIF=",replacement:{match:/handleSelectGIF=(\i)=>\{/,replace:"$&if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(Ui(e.url+" "),Vl.closeExpressionPicker())}});a();S();F();v();var i4=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(i4||{}),pm=x({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(),r4=Ot(e=>Array.isArray(e)&&e[0]?.name==="Wave");function n4(e,t,o){let n=Xt.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(pm.store.greetMode==="Message"||o.length>1){n.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Xt._sendMessage(e.id,i,n)}else Xt.sendGreetMessage(e.id,o[0],n)}function kN({channel:e,message:t}){let o=pm.use(["greetMode","multiGreetChoices"]),{greetMode:n,multiGreetChoices:i=[]}=o;return r(P.Menu,{navId:"greet-sticker-picker",onClose:()=>L.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},r(P.MenuGroup,{label:"Greet Mode"},Object.values(i4).map(s=>r(P.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===n,action:()=>o.greetMode=s}))),r(P.MenuSeparator,null),r(P.MenuGroup,{label:"Greet Stickers"},r4.map(s=>r(P.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>n4(e,t,[s.id])}))),pm.store.unholyMultiGreetEnabled?r(p,null,r(P.MenuSeparator,null),r(P.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},r4.map(s=>{let l=i.some(c=>c===s.id);return r(P.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),r(P.MenuSeparator,null),r(P.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>n4(e,t,i),disabled:i.length===0}))):null)}var dm=h({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[m.Ven],settings:pm,patches:[{find:"#{intl::WELCOME_CTA_LABEL}",replacement:{match:/className:\i\.\i,(?=.{0,40}?"sticker")(?<={channel:\i,message:\i}=(\i).+?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||ct.openContextMenu(e,()=>r(kN,{...t}))}});a();var Yy={};rt(Yy,{updateMessage:()=>ws});a();v();function ws(e,t,o){let n=Ju.getOrCreate(e);if(!n.has(t))return;let i=n.update(t,s=>o?s.merge(o):new s.constructor(s));Ju.commit(i),Kt.emitChange()}He();S();re();v();var a4="HideAttachments_HiddenIds",Yc=new Set;async function l4(){return Yc=await zt(a4)??new Set,Yc}var AN=e=>Wt(a4,e);tr("HideMedia","HideAttachments");var s4=e=>e.attachments.length>0||e.embeds.length>0||e.stickerItems.length>0||e.components.length>0;async function RN(e,t){let o=await l4();o.delete(t)||o.add(t),await AN(o),ws(e,t)}var mm=h({name:"HideMedia",description:"Hide attachments and embeds for individual messages via hover button",authors:[m.Ven],dependencies:["MessageUpdaterAPI"],patches:[{find:"this.renderAttachments(",replacement:{match:/(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories|ComponentAccessories)\((\i)\)/g,replace:"$self.shouldHide($1?.id)?null:$&"}}],messagePopoverButton:{icon:Ys,render(e){if(!s4(e)&&!e.messageSnapshots.some(o=>s4(o.message)))return null;let t=Yc.has(e.id);return{label:t?"Show Media":"Hide Media",icon:t?_l:Ys,message:e,channel:Q.getChannel(e.channel_id),onClick:()=>RN(e.channel_id,e.id)}}},renderMessageAccessory({message:e}){return this.shouldHide(e.id)?r("span",{className:R("vc-hideAttachments-accessory",!e.content&&"vc-hideAttachments-no-content")},"Media Hidden"):null},async start(){await l4()},stop(){Yc.clear()},shouldHide(e){return Yc.has(e)}});a();S();var fm=h({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[m.botato,m.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:0x40000000|(?:1<<30|1073741824))\)return/,replace:"if($1===(1<<20))return false;$&"}}]});a();S();v();var DN=Ro("status","showCurrentGame");function u4(e,t,o,n){return r(V,{text:t},i=>r("button",{...i,onClick:s=>_N(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},r("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},r("path",{fill:n,d:o}))))}var LN=(e,t)=>u4(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),ON=(e,t)=>u4(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);function c4(e,t=!1){let o=At.use(["ignoredActivities"]),{ignoredActivities:n}=o;return n.some(i=>i.id===e.id)?ON(e,"var(--status-danger)"):LN(e,t?"var(--green-300)":"var(--interactive-icon-default)")}function _N(e,t){e.stopPropagation();let o=At.store.ignoredActivities.findIndex(n=>n.id===t.id);o===-1?At.store.ignoredActivities.push(t):At.store.ignoredActivities.splice(o,1)}function Pi(){DN.updateSetting(e=>e)}function BN(){return r(Y,{flexDirection:"column"},r(T.FormText,null,"Import the application id of the CustomRPC plugin to the filter list"),r("div",null,r(U,{onClick:()=>{let e=$.plugins.CustomRPC?.appID;if(!e)return _e("CustomRPC application ID is not set.",j.Type.FAILURE);Zy?.(e)&&_e("CustomRPC application ID is already added.",j.Type.FAILURE)}},"Import CustomRPC ID")))}var Zy=null;function UN(e){let[t,o]=A(At.store.idsList??"");Zy=i=>{let s=new Set(t.split(",").map(u=>u.trim()).filter(Boolean)),l=s.has(i)||(s.add(i),!1),c=Array.from(s).join(", ");return o(c),e.setValue(c),l},te(()=>()=>{Zy=null},[]);function n(i){o(i),e.setValue(i)}return r("section",null,r(T.FormTitle,{tag:"h3"},"Filter List"),r(T.FormText,{className:k.bottom8},"Comma separated list of activity IDs to filter (Useful for filtering specific RPC activities and CustomRPC"),r(Jr,{type:"text",value:t,onChange:n,placeholder:"235834946571337729, 343383572805058560"}))}var At=x({importCustomRPC:{type:6,component:BN},listMode:{type:4,description:"Change the mode of the filter list",options:[{label:"Whitelist",value:0,default:!0},{label:"Blacklist",value:1}],onChange:Pi},idsList:{type:6,default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));At.store.idsList=Array.from(t).join(", "),Pi()},component:e=>r(UN,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1,onChange:Pi},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1,onChange:Pi},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1,onChange:Pi},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1,onChange:Pi},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1,onChange:Pi},ignoredActivities:{type:7,default:[],onChange:Pi}});function EN(e,t){if(t&&At.store.idsList.includes(t))return At.store.listMode===1;switch(e){case 0:return At.store.ignorePlaying;case 1:return At.store.ignoreStreaming;case 2:return At.store.ignoreListening;case 3:return At.store.ignoreWatching;case 5:return At.store.ignoreCompeting}return!1}var gm=h({name:"IgnoreActivities",authors:[m.Nuckyz,m.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:At,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:/(\i)&&!\i\|\|\i\?null(?<=(\i)\.verified&&.+?)/,replace:"$self.renderToggleGameActivityButton($2,$1),$&"}},{find:"#{intl::EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY}",replacement:{match:/lineClamp:1.{0,50}?(?=!\i&&\i\?.+?application:(\i))/,replace:"$&$self.renderToggleActivityButton($1),"}}],async start(){if(At.store.ignoredActivities.length!==0){let e=ia.getGamesSeen();for(let[t,o]of At.store.ignoredActivities.entries())o.type===0&&(e.some(n=>n.id===o.id||n.exePath===o.id)||At.store.ignoredActivities.splice(t,1))}},isActivityNotIgnored(e){if(EN(e.type,e.application_id))return!1;if(e.application_id!=null)return!At.store.ignoredActivities.some(t=>t.id===e.application_id)||At.store.listMode===0&&At.store.idsList.includes(e.application_id);{let t=ia.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!At.store.ignoredActivities.some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return r(M,{noop:!0},r("div",{style:{marginLeft:12,zIndex:0}},c4({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return r(M,{noop:!0},c4({id:e.id,name:e.name,type:1}))}});a();S();var FN=/\.(png|jpg|jpeg|gif|webp|avif)$/i,$N=/^(.+?\.)?(tenor|giphy|imgur)\.com$/i,p4=x({showFullUrl:{description:"Show the full URL of the image instead of just the file name. Always enabled for GIFs because they usually have no meaningful file name",type:3,default:!1}}),hm=h({name:"ImageFilename",authors:[m.Ven],description:"Display the file name of images & GIFs as a tooltip when hovering over them",settings:p4,patches:[{find:".RESPONSIVE?",replacement:{match:/(?="data-role":"img","data-safe-src":)(?<=href:(\i).+?)/,replace:"title:$self.getTitle($1),"}}],getTitle(e){try{let t=new URL(e),o=$N.test(t.hostname);return!o&&!FN.test(t.pathname)?void 0:o||p4.store.showFullUrl?e:t.pathname.split("/").pop()}catch{return}}});a();S();var ym=h({name:"ImageLink",description:"Never hide image links in messages, even if it's the only content",authors:[m.Kyuuhachi,m.Sqaaakoi],patches:[{find:"unknownUserMentionPlaceholder:",replacement:{match:/\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/,replace:"false"}}]});a();S();le();v();a();a();var Zc="vc-imgzoom-magnify-modal";a();function Qy(e,t){e()?t():requestAnimationFrame(()=>Qy(e,t))}we();v();var d4=q("vc-imgzoom-"),Jy=M.wrap(({instance:e,size:t,zoom:o})=>{let[n,i]=A(!1),[s,l]=A({x:0,y:0}),[c,u]=A({x:0,y:0}),[d,f]=A(0),g=st(!1),y=st(o),b=st(t),I=st(null),w=st(null),D=st(null),N=st(null);oi(()=>{let H=ae=>{ae.key==="Shift"&&(g.current=!0)},K=ae=>{ae.key==="Shift"&&(g.current=!1)},pe=()=>{w.current&&D.current&&(w.current.currentTime=D.current.currentTime)},z=ae=>{if(I.current)if(e.state.mouseOver&&e.state.mouseDown){let be=b.current/2,To={x:ae.pageX,y:ae.pageY},Gt=-((To.x-I.current.getBoundingClientRect().left)*y.current-be),nt=-((To.y-I.current.getBoundingClientRect().top)*y.current-be);l({x:ae.x-be,y:ae.y-be}),u({x:Gt,y:nt}),f(1)}else f(0)},ne=ae=>{e.state.mouseOver&&ae.button===0&&(y.current=vt.store.zoom,b.current=vt.store.size,document.getElementById("image-context")&&L.dispatch({type:"CONTEXT_MENU_CLOSE"}),z(ae),f(1))},J=()=>{f(0)},Je=async ae=>{if(e.state.mouseOver&&e.state.mouseDown&&!g.current){let be=y.current+ae.deltaY/100*(vt.store.invertScroll?-1:1)*vt.store.zoomSpeed;y.current=be<=1?1:be,vt.store.saveZoomValues&&(vt.store.zoom=y.current),z(ae)}if(e.state.mouseOver&&e.state.mouseDown&&g.current){let be=b.current+ae.deltaY*(vt.store.invertScroll?-1:1)*vt.store.zoomSpeed;b.current=be<=50?50:be,vt.store.saveZoomValues&&(vt.store.size=b.current),z(ae)}};return Qy(()=>e.state.readyState==="READY",()=>{let ae=document.getElementById(Zc);I.current=ae,ae.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(D.current=ae.querySelector("video"),D.current.addEventListener("timeupdate",pe)),i(!0)}),document.addEventListener("keydown",H),document.addEventListener("keyup",K),document.addEventListener("mousemove",z),document.addEventListener("mousedown",ne),document.addEventListener("mouseup",J),document.addEventListener("wheel",Je),()=>{document.removeEventListener("keydown",H),document.removeEventListener("keyup",K),document.removeEventListener("mousemove",z),document.removeEventListener("mousedown",ne),document.removeEventListener("mouseup",J),document.removeEventListener("wheel",Je)}},[]);let _=ce(()=>{try{let H=new URL(e.props.src);return H.pathname.startsWith("/attachments/")&&(H.hostname="cdn.discordapp.com"),H.searchParams.set("animated","true"),H.toString()}catch{return e.props.src}},[e.props.src]);if(!n)return null;let W=I.current?.getBoundingClientRect();return W?r("div",{className:d4("lens",{"nearest-neighbor":vt.store.nearestNeighbour,square:vt.store.square}),style:{opacity:d,width:b.current+"px",height:b.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?r("video",{ref:w,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${W.width*y.current}px`,height:`${W.height*y.current}px`,poster:e.props.src,src:D.current?.src??e.props.src,autoPlay:!0,loop:!0,muted:!0}):r("img",{className:d4("image"),ref:N,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${W.width*y.current}px`,height:`${W.height*y.current}px`,src:_,alt:""})):null},{noop:!0});a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
position: absolute;
inset: 0;
z-index: 9999;
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});var m4="src/plugins/imageZoom/styles.css";var vt=x({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:[1,5,10,20,30,40,50],default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:[50,100,250,500,750,1e3],default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:[.1,.5,1,2,3,4,5],default:.5,stickToMarkers:!1}}),GN=(e,t)=>{if("href"in t||t.target?.classList?.contains("emoji"))return;let{square:o,nearestNeighbour:n}=vt.use(["square","nearestNeighbour"]);e.push(r(P.MenuGroup,{id:"image-zoom"},r(P.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:o,action:()=>{vt.store.square=!o}}),r(P.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:n,action:()=>{vt.store.nearestNeighbour=!n}}),r(P.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(i,s)=>r(P.MenuSliderControl,{ref:s,...i,minValue:1,maxValue:50,value:vt.store.zoom,onChange:Zt(l=>vt.store.zoom=l,100)})}),r(P.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(i,s)=>r(P.MenuSliderControl,{ref:s,...i,minValue:50,maxValue:1e3,value:vt.store.size,onChange:Zt(l=>vt.store.size=l,100)})}),r(P.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(i,s)=>r(P.MenuSliderControl,{ref:s,...i,minValue:.1,maxValue:5,value:vt.store.zoomSpeed,onChange:Zt(l=>vt.store.zoomSpeed=l,100),renderValue:l=>`${l.toFixed(3)}x`})})))},vm=h({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[m.Aria],tags:["ImageUtilities"],managedStyle:m4,patches:[{find:"disableArrowKeySeek:!0",replacement:[{match:/useFullWidth:!0,shouldLink:/,replace:`id:"${Zc}",$&`},{match:/(?<=null!=(\i)\?.{0,20})\i\.\i,{children:\1/,replace:"'div',{onClick:e=>e.stopPropagation(),children:$1"}]},{find:'="FOCUS_SENSITIVE",',replacement:{match:/(?<=\[\i\.\i]:)\i&&!\i&&"PINNED"!==\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:vt,contextMenus:{"image-context":GN},currentMagnifierElement:null,element:null,Magnifier:Jy,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){try{e.props.id===Zc&&(this.currentMagnifierElement||(this.currentMagnifierElement=r(Jy,{size:vt.store.size,zoom:vt.store.zoom,instance:e}),this.root=ji(this.element),this.root.render(this.currentMagnifierElement)))}catch(t){new B("ImageZoom").error("Failed to render magnifier:",t)}},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()}});a();S();le();F();v();var f4=gt("UserAffinitiesV2Store"),bm=h({name:"ImplicitRelationships",description:"Shows your implicit relationships in the Friends tab.",authors:[m.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}),className:",replacement:{match:/,{id:(\i\.\i)\.PENDING,show:.+?className:(\i\.\i)(?=\},\{id:)/,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:()=>$.plugins.ImplicitRelationships.sortByAffinity,match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:".REQUEST_GUILD_MEMBERS,",replacement:{match:/\.send\(\i\.\i\.REQUEST_GUILD_MEMBERS,{/,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:x({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?f4.getUserAffinity(t.user.id)?.communicationRank??0:e(t)},async fetchImplicitRelationships(){let e=f4.getUserAffinities(),t=Pe.getMutableRelationships(),o=e.filter(u=>!Pe.getRelationshipType(u.otherUserId));o.forEach(u=>{t.set(u.otherUserId,5)}),Pe.emitChange();let n=o.filter(u=>!C.getUser(u.otherUserId)),i=Object.keys(Ne.getGuilds()),s=No.fromTimestamp(Date.now()),l=i.length*Math.ceil(n.length/100),c=({chunks:u})=>{try{let d=u.filter(f=>f.nonce===s).length;if(d===0)return;l-=d,Pe.emitChange(),l<=0&&L.unsubscribe("GUILD_MEMBERS_CHUNK_BATCH",c)}catch(d){new B("ImplicitRelationships").error("Error in GUILD_MEMBERS_CHUNK_BATCH handler",d)}};L.subscribe("GUILD_MEMBERS_CHUNK_BATCH",c);for(let u=0;u<n.length;u+=100)L.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:i,userIds:n.slice(u,u+100),presences:!0,nonce:s})},start(){St.FriendsSections.IMPLICIT="IMPLICIT"}});a();Mh();S();v();function g4(e){let{lightness:t}=Is.use(["lightness"]),o=ce(()=>e?Du(e):null,[e]);return o&&`hsl(${o%360n}, 100%, ${t}%)`}var Is=x({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}}),Sm=h({name:"IrcColors",description:"Makes username colors in chat unique, like in IRC clients",authors:[m.Grzesiek11,m.jamesbt365],settings:Is,patches:[{find:'="SYSTEM_TAG"',replacement:{match:/(?<=colorString:\i,colorStrings:\i,colorRoleName:\i.*?}=)(\i),/,replace:"$self.wrapMessageColorProps($1, arguments[0]),"}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(?<=roleName:\i,)colorString:/,replace:"colorString:$self.calculateNameColorForListContext(arguments[0]),originalColor:"},predicate:()=>Is.store.memberListColors}],wrapMessageColorProps(e,t){try{let o=this.calculateNameColorForMessageContext(t);return o===e.colorString?e:{...e,colorString:o,colorStrings:e.colorStrings&&{primaryColor:o,secondaryColor:void 0,tertiaryColor:void 0}}}catch(o){return console.error("Failed to calculate message color strings:",o),e}},calculateNameColorForMessageContext(e){let t=e?.message?.author?.id,o=e?.author?.colorString,n=g4(t);return e?.message?.channel_id==="1337"&&t==="313337"||Is.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!Is.store.applyColorOnlyToUsersWithoutColor||!o?n:o},calculateNameColorForListContext(e){try{let t=e?.user?.id,o=e?.colorString,n=g4(t);return Is.store.applyColorOnlyInDms&&e?.guildId!==void 0?o:!Is.store.applyColorOnlyToUsersWithoutColor||!o?n:o}catch(t){console.error("Failed to calculate name color for list context:",t)}}});a();S();v();var xm=!1,Fr,Tm=h({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[m.Nuckyz],patches:[{find:'"Switching accounts"',replacement:{match:/goHomeAfterSwitching:\i/,replace:"goHomeAfterSwitching:!1"}}],flux:{LOGOUT(e){({isSwitchingAccount:xm}=e)},CONNECTION_OPEN(){xm&&(xm=!1,Fr?.channelId&&(Q.hasChannel(Fr.channelId)?la.transitionToChannel(Fr.channelId):Mr.transitionToGuild("@me")))},async CHANNEL_SELECT({guildId:e,channelId:t}){xm||(Fr={guildId:e,channelId:t},await Wt("KeepCurrentChannel_previousData",Fr))}},async start(){Fr=await zt("KeepCurrentChannel_previousData"),Fr?Fr.channelId&&la.transitionToChannel(Fr.channelId):(Fr={guildId:uo.getGuildId(),channelId:Ge.getChannelId()??null},await Wt("KeepCurrentChannel_previousData",Fr))}});a();Po();Xo();to();S();le();v();var HN="790c37d90400163a5a5fe00d6ca32ef0",wm="1108588077900898414",zN="2a96cbd8b46e442fc41c2b86b821562f",h4=new B("LastFMRichPresence");async function Xy(e){return(await wn.fetchAssetIds(wm,[e]))[0]}function WN(e){L.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var vo=x({apiKey:{description:"Custom Last.fm API key. Not required but highly recommended to avoid rate limiting with our shared key",type:0},username:{description:"Last.fm username",type:0},shareUsername:{description:"Show link to Last.fm profile",type:3,default:!1},clickableLinks:{description:"Make track, artist and album names clickable links",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"},statusDisplayType:{description:"Show the track / artist name in the member list",type:4,options:[{label:"Don't show (shows generic listening message)",value:"off"},{label:"Show artist name",value:"artist",default:!0},{label:"Show track name",value:"track"}]},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}}),Im=h({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[m.dzshn,m.RuiNtD,m.blahajZip,m.archeruwu],settings:vo,settingsAboutComponent(){return r(Ae,null,r(eo,{tag:"h5"},"How to create an API key"),r(ee,null,"Set ",r("strong",null,"Application name")," and ",r("strong",null,"Application description")," to anything and leave the rest blank."),r(Hl,{size:"small",href:"https://www.last.fm/api/account/create",className:k.top8},"Create API Key"))},start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!vo.store.username)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:vo.store.apiKey||HN,user:vo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return h4.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let n=o.recenttracks?.track[0];return n?.["@attr"]?.nowplaying?{name:n.name||"Unknown",album:n.album["#text"],artist:n.artist["#text"]||"Unknown",url:n.url,imageUrl:n.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return h4.error("Failed to query Last.fm API",e),null}},async updatePresence(){WN(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(zN))return e.imageUrl;if(vo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(vo.store.hideWithActivity&&fo.getActivities(Yt.getId()).some(l=>l.application_id!==wm&&l.type!==4)||vo.store.hideWithSpotify&&fo.getActivities(Yt.getId()).some(l=>l.type===2&&l.application_id!==wm))return null;let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await Xy(t),large_text:e.album||void 0,...vo.store.showLastFmLogo&&{small_image:await Xy("lastfm-small"),small_text:"Last.fm"}}:{large_image:await Xy("lastfm-large"),large_text:e.album||void 0},n=[];vo.store.shareUsername&&n.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${vo.store.username}`});let i=(()=>{switch(vo.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||vo.store.statusName;default:return vo.store.statusName}})(),s={application_id:wm,name:i,details:e.name,state:e.artist,status_display_type:{off:0,artist:1,track:2}[vo.store.statusDisplayType],assets:o,buttons:n.length?n.map(l=>l.label):void 0,metadata:{button_urls:n.map(l=>l.url)},type:vo.store.useListeningStatus?2:0,flags:1};return vo.store.clickableLinks&&(s.details_url=e.url,s.state_url=`https://www.last.fm/music/${encodeURIComponent(e.artist)}`,e.album&&(s.assets.large_url=`https://www.last.fm/music/${encodeURIComponent(e.artist)}/${encodeURIComponent(e.album)}`)),s}});a();S();le();a();var y4=`# 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 jN=y4.split(`
`).map(e=>/^\s*[^#\s]/.test(e)&&e.trim()).filter(Boolean),qN="Did you really disable all loading quotes? What a buffoon you are...",Vy=x({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:"",multiline:!0},additionalQuotesDelimiter:{description:"Delimiter for additional quotes",type:0,default:"|"}}),Pm=h({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[m.Ven,m.KraXen72,m.UlyssesZhan],settings:Vy,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:()=>Vy.store.replaceEvents}]}],mutateQuotes(e){try{let{enableDiscordPresetQuotes:t,additionalQuotes:o,additionalQuotesDelimiter:n,enablePluginPresetQuotes:i}=Vy.store;t||(e.length=0),i&&e.push(...jN),e.push(...o.split(n).filter(Boolean)),e.length||e.push(qN)}catch(t){new B("LoadingQuotes").error("Failed to mutate quotes",t)}}});a();S();we();F();a();se();re();v();a();function ev({className:e}){return r("svg",{viewBox:"0 0 24 24",className:e},r("circle",{cx:"12",cy:"12",r:"8"}))}a();qo();re();v();var Mm=It(()=>{let e=new Ao,t=new Map;class o extends ea.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await Ol.preload(i,Xr.getDefaultChannel(i).id)}ensureCount(i){!i||t.has(i)||e.push(()=>this._ensureCount(i).then(()=>vr(200),()=>vr(200)))}}return new o(L,{GUILD_MEMBER_LIST_UPDATE({guildId:n,groups:i}){t.set(n,i.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0))},ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId:n,count:i}){t.set(n,i)}})});a();function v4({className:e}){return r("svg",{viewBox:"0 0 32 32",fill:"currentColor",className:e},r("path",{d:"M15.6668 3C14.2523 3 12.8958 3.5619 11.8956 4.5621C10.8954 5.56229 10.3335 6.91884 10.3335 8.33333V13.6666C10.3335 15.0811 10.8954 16.4378 11.8956 17.438C12.8958 18.4381 14.2523 19 15.6668 19C17.0813 19 18.4378 18.4381 19.438 17.438C20.4382 16.4378 21.0001 15.0811 21.0001 13.6666V8.33333C21.0001 6.91884 20.4382 5.56229 19.438 4.5621C18.4378 3.5619 17.0813 3 15.6668 3Z"}),r("path",{d:"M7.66667 13.6666C7.66667 13.313 7.52619 12.9739 7.27614 12.7238C7.02609 12.4738 6.68695 12.3333 6.33333 12.3333C5.97971 12.3333 5.64057 12.4738 5.39052 12.7238C5.14047 12.9739 5 13.313 5 13.6666C4.99911 16.2653 5.94692 18.7749 7.66545 20.7243C9.38399 22.6736 11.7551 23.9285 14.3334 24.2533V27H11.6667C11.3131 27 10.9739 27.1404 10.7239 27.3905C10.4738 27.6405 10.3334 27.9797 10.3334 28.3333C10.3334 28.6869 10.4738 29.0261 10.7239 29.2761C10.9739 29.5262 11.3131 29.6666 11.6667 29.6666H19.6667C20.0203 29.6666 20.3595 29.5262 20.6095 29.2761C20.8596 29.0261 21 28.6869 21 28.3333C21 27.9797 20.8596 27.6405 20.6095 27.3905C20.3595 27.1404 20.0203 27 19.6667 27H17V24.2533C19.5783 23.9285 21.9494 22.6736 23.6679 20.7243C25.3864 18.7749 26.3343 16.2653 26.3334 13.6666C26.3334 13.313 26.1929 12.9739 25.9428 12.7238C25.6928 12.4738 25.3536 12.3333 25 12.3333C24.6464 12.3333 24.3073 12.4738 24.0572 12.7238C23.8072 12.9739 23.6667 13.313 23.6667 13.6666C23.6667 15.7884 22.8238 17.8232 21.3235 19.3235C19.8233 20.8238 17.7884 21.6666 15.6667 21.6666C13.545 21.6666 11.5101 20.8238 10.0098 19.3235C8.50952 17.8232 7.66667 15.7884 7.66667 13.6666Z"}))}function rv({isTooltip:e,tooltipGuildId:t}){let{voiceActivity:o}=Jc.use(["voiceActivity"]),n=o&&!e,i=ie([Ge],()=>Yo()),s=e?t:i?.guild_id,l=ie([go],()=>{if(!n)return 0;let b=go.getVoiceStates(s);return b?Object.values(b).filter(({channelId:I})=>{if(!I)return!1;let w=Q.getChannel(I);return w&&Ie.can(me.VIEW_CHANNEL,w)}).length:0}),c=ie([ta],()=>ta.getMemberCount(s)),u=ie([Mm],()=>Mm.getCount(s)),{groups:d}=ie([tv],()=>tv.getProps(s,i?.id)),f=ie([ov],()=>ov.getMemberListSections(i?.id));if(!e&&(d.length>=1||d[0].id!=="unknown")&&(u=d.reduce((b,I)=>b+(I.id==="offline"?0:I.count),0)),!e&&f&&!Li(f)&&(u=Object.values(f).reduce((b,I)=>b+(I.sectionId==="offline"?0:I.userIds.length),0)),te(()=>{Mm.ensureCount(s)},[s]),c==null)return null;let g=Qc(l??0),y=u!=null?Qc(u):"?";return r("div",{className:$r("widget",{tooltip:e,"member-list":!e})},r(V,{text:`${y} online in this channel`,position:"bottom"},b=>r("div",{...b,className:$r("container")},r(ev,{className:$r("online-count")}),r("span",{className:$r("online")},y))),r(V,{text:`${Qc(c)} total server members`,position:"bottom"},b=>r("div",{...b,className:$r("container")},r(ev,{className:$r("total-count")}),r("span",{className:$r("total")},Qc(c)))),n&&l>0&&r(V,{text:`${g} members in voice`,position:"bottom"},b=>r("div",{...b,className:$r("container")},r(v4,{className:$r("voice-icon")}),r("span",{className:$r("voice")},g))))}var tv=gt("ChannelMemberStore"),ov=gt("ThreadMemberListStore"),Jc=x({toolTip:{type:3,description:"Show member count on the server tooltip",default:!0,restartNeeded:!0},memberList:{type:3,description:"Show member count in the member list",default:!0,restartNeeded:!0},voiceActivity:{type:3,description:"Show voice activity with member count in the member list",default:!0}}),KN=new Intl.NumberFormat,Qc=e=>KN.format(e),$r=q("vc-membercount-"),Nm=h({name:"MemberCount",description:"Shows the number of online members, total members, and users in voice channels on the server \u2014 in the member list and tooltip.",authors:[m.Ven,m.Commandtechno,m.Apexo],settings:Jc,patches:[{find:"{isSidebarVisible:",replacement:[{match:/children:\[(\i\.useMemo[^}]+"aria-multiselectable")(?<=className:(\i),.+?)/,replace:"children:[$2?.includes('members')?$self.render():null,$1"}],predicate:()=>Jc.store.memberList},{find:"GuildTooltip - ",replacement:{match:/#{intl::VIEW_AS_ROLES_MENTIONS_WARNING}.{0,100}(?=])/,replace:"$&,$self.renderTooltip(arguments[0].guild)"},predicate:()=>Jc.store.toolTip}],render:M.wrap(()=>r(rv,null),{noop:!0}),renderTooltip:M.wrap(e=>r(rv,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})});a();S();v();var S4=x({showAtSymbol:{type:3,description:"Whether the the @ symbol should be displayed on user mentions",default:!0}});function YN(){return r("svg",{className:"vc-mentionAvatars-icon vc-mentionAvatars-role-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r("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"}),r("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"}),r("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"}))}var Cm=h({name:"MentionAvatars",description:"Shows user avatars and role icons inside mentions",authors:[m.Ven,m.SerStars],patches:[{find:".USER_MENTION)",replacement:{match:/children:`@\$\{(\i\?\?\i)\}`(?<=\.useName\((\i)\).+?)/,replace:"children:$self.renderUsername({username:$1,user:$2})"}},{find:".ROLE_MENTION)",replacement:{match:/children:\[\i&&.{0,100}className:\i.\i,background:!1,.{0,50}?,\i(?=\])/,replace:"$&,$self.renderRoleIcon(arguments[0])"}}],settings:S4,renderUsername:M.wrap(e=>{let{user:t,username:o}=e,[n,i]=A(!1);return t?r("span",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},r("img",{src:t.getAvatarURL(uo.getGuildId(),16,n),className:"vc-mentionAvatars-icon",style:{borderRadius:"50%"}}),b4(o)):r(p,null,b4(o))},{noop:!0}),renderRoleIcon:M.wrap(({roleId:e,guildId:t})=>{if(!e)return null;let o=xt.getRole(t,e);return o?.icon?r("img",{className:"vc-mentionAvatars-icon vc-mentionAvatars-role-icon",src:`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${e}/${o.icon}.webp?size=24&quality=lossless`}):r(YN,null)},{noop:!0})});function b4(e){return S4.store.showAtSymbol?`@${e}`:e}a();a();S();v();var Xc=x({userList:{description:"List of user ids to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445",multiline:!0},roleList:{description:"List of role ids to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445",multiline:!0},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users / roles",value:!1},{label:"Only ping the listed users / roles",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),rn=h({name:"NoReplyMention",description:"Disables reply pings by default",authors:[m.DustyAngel47,m.rae,m.pylix,m.outfoxxed],settings:Xc,shouldMention(e,t){let o=Xc.store.userList.includes(e.author.id),n=Q.getChannel(e.channel_id);if(n?.guild_id&&!o){let s=Te.getMember(n.guild_id,e.author.id)?.roles;o=!!s&&s.some(l=>Xc.store.roleList.includes(l))}let i=Xc.store.shouldPingListed?o:!o;return Xc.store.inverseShiftReply?t!==i:!t&&i},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]});S();F();v();var x4=X("deleteMessage","startEditMessage"),QN=X("isEditing","isEditingAny"),km=!1,T4=e=>e.key==="Backspace"&&(km=!0),w4=e=>e.key==="Backspace"&&(km=!1),I4=()=>!Vr.isFocused()&&(km=!1),Oa=x({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}}),Am=h({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[m.Ven],settings:Oa,start(){document.addEventListener("keydown",T4),document.addEventListener("keyup",w4),Vr.addChangeListener(I4)},stop(){document.removeEventListener("keydown",T4),document.removeEventListener("keyup",w4),Vr.removeChangeListener(I4)},onMessageClick(e,t,o){let n=Yt.getId(),i=e.author.id===n,s=e.interactionMetadata?.authorizing_integration_owners[1]===n;if(km)Oa.store.enableDeleteOnClick&&(i||Ie.can(me.MANAGE_MESSAGES,t)||s)&&(e.deleted?L.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:e.id,mlDeleted:!0}):x4.deleteMessage(t.id,e.id),o.preventDefault());else{if(o.detail<2||Oa.store.requireModifier&&!o.ctrlKey&&!o.shiftKey||t.guild_id&&!Ie.can(me.SEND_MESSAGES,t)||e.deleted===!0)return;if(i){if(!Oa.store.enableDoubleClickToEdit||QN.isEditing(t.id,e.id)||e.state!=="SENT")return;x4.startEditMessage(t.id,e.id,e.content),o.preventDefault()}else{if(!Oa.store.enableDoubleClickToReply||!ec.REPLYABLE.has(e.type)||e.hasFlag(64))return;let l=o.shiftKey&&!Oa.store.requireModifier,c=ke(rn.name)?rn.shouldMention(e,l):!l;L.dispatch({type:"CREATE_PENDING_REPLY",channel:t,message:e,shouldMention:c,showMentionToggle:t.guild_id!==null})}}}});a();S();v();var P4=1471228928,Rm=h({name:"MessageLatency",description:"Displays an indicator for messages that took \u2265n seconds to send",authors:[m.arHSM],settings:x({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},ignoreSelf:{type:3,description:"Don't add indicator to your own messages",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)},n=l=>o[l]>0?`${o[l]} ${o[l]>1?l:l.substring(0,l.length-1)}`:null;return Object.keys(o).reduce((l,c)=>{let u=n(c);return l+(Rr(u)?(l!==""?(t?c==="milliseconds":c==="seconds")?" and ":" ":"")+u:"")},"")||"0 seconds"},latencyTooltipData(e){let{latency:t,detectDiscordKotlin:o,showMillis:n,ignoreSelf:i}=this.settings.store,{id:s,nonce:l}=e;if(!Rr(l)||e.author.bot||i&&e.author.id===Yt.getId())return null;let c=!1,u=No.extractTimestamp(s)-No.extractTimestamp(l);n||(u=Math.round(u/1e3)*1e3),-u>=P4-864e5&&(c=o,u+=P4);let d=Math.abs(u),f=d!==u,g=t*1e3,y=d>=g?this.stringDelta(d,n):null,b=120*1e3,I=c?["status-positive","status-positive","text-muted"]:u>=b||f?["text-muted","text-muted","text-muted"]:u>=g*2?["status-danger","text-muted","text-muted"]:["status-warning","status-warning","text-muted"];return d>=g||c?{delta:y,ahead:f,fill:I,isDiscordKotlin:c}:null},Tooltip(){return M.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",r(V,{text:o,position:"top"},n=>r(this.Icon,{delta:t.delta,fill:t.fill,props:n}))},{noop:!0})},Icon({delta:e,fill:t,props:o}){return r("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},r("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"}),r("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"}),r("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"}))}});a();S();re();F();v();var _a=new Map,JN=Hs(e=>e.prototype?.renderSuppressButton),XN=he("withFooter","childrenMessageContent:"),VN=he("childrenExecutedCommand:",".hideAccessories"),M4=Z("message","searchResult"),nv=Z("embedAuthorIcon","embedAuthor","embedAuthor","embedMargin"),N4=Ro("textAndImages","messageDisplayCompact"),iv=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(?:\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,C4=/^https:\/\/(?:www\.)?tenor\.com\//,eC=new Ao,Dm=x({messageBackgroundColor:{description:"Background color for messages in rich embeds",type:3},automodEmbeds:{description:"Use automod embeds instead of rich embeds (smaller but less info)",type:4,options:[{label:"Always use automod embeds",value:"always"},{label:"Prefer automod embeds, but use rich embeds if some content can't be shown",value:"prefer"},{label:"Never use automod embeds",value:"never",default:!0}]},listMode:{description:"Whether to use ID list as blacklist or whitelist",type:4,options:[{label:"Blacklist",value:"blacklist",default:!0},{label:"Whitelist",value:"whitelist"}]},idList:{description:"Guild/channel/user IDs to blacklist or whitelist (separate with comma)",type:0,default:"",multiline:!0},clearMessageCache:{type:6,component:()=>r(U,{onClick:()=>_a.clear()},"Clear the linked message cache")}});async function tC(e,t){let o=_a.get(t);if(o)return o.message;_a.set(t,{fetched:!1});let i=(await Mt.get({url:St.Endpoints.MESSAGES(e),query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Kt.getMessages(i.channel_id).receiveMessage(i).get(i.id);if(s)return _a.set(s.id,{message:s,fetched:!0}),s}function oC(e){let t=[];for(let{content_type:o,height:n,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:n,width:i,url:s,proxyURL:l});for(let{type:o,image:n,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...n??i}):s&&o==="gifv"&&!C4.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function rC(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 nC(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||C4.test(t.url))))}function iC(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 sC(e,t){return new Proxy(e,{get(o,n){return n==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function aC({message:e}){let t=e.vencordEmbeddedBy??[],o=[];for(let[n,i,s]of e.content.matchAll(iv)){if(t.includes(s)||t.length>2)continue;let l=Q.getChannel(i);if(!l||!l.isPrivate()&&!Ie.can(me.VIEW_CHANNEL,l))continue;let{listMode:c,idList:u}=Dm.store,d=[l.guild_id,i,e.author.id].some(b=>b&&u.includes(b));if(c==="blacklist"&&d||c==="whitelist"&&!d)continue;let f=_a.get(s)?.message;if(!f)if(f??=Kt.getMessage(i,s),f)_a.set(s,{message:f,fetched:!0});else{eC.unshift(()=>tC(i,s).then(b=>b&&ws(e.channel_id,e.id)));continue}let g={message:sC(f,[...t,e.id]),channel:l},y=Dm.store.automodEmbeds;o.push(y==="always"||y==="prefer"&&!nC(f)?r(cC,{...g}):r(lC,{...g}))}return o.length?r(p,null,o):null}function k4(e){return e.isDM()?["Direct Message",at.getUserAvatarURL(C.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",at.getChannelIconURL(e)]:["Server",at.getGuildIconURL(Ne.getGuild(e.guild_id))]}function lC({message:e,channel:t}){let o=N4.useSetting(),n=C.getUser(Q.getChannel(t.id).recipients?.[0]),[i,s]=k4(t);return r(JN,{embed:{rawDescription:"",color:"var(--background-base-lower)",author:{name:r(G,{variant:"text-xs/medium",tag:"span"},r("span",null,i," - "),Me.parse(t.isDM()?`<@${n.id}>`:`<#${t.id}>`)),iconProxyURL:s}},renderDescription:()=>r("div",{key:e.id,className:R(M4.message,Dm.store.messageBackgroundColor&&M4.searchResult)},r(VN,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1,compact:o}))})}function cC(e){let{message:t,channel:o}=e,n=N4.useSetting(),i=oC(t),{parse:s}=Me,[l,c]=k4(o);return r(XN,{channel:o,childrenAccessories:r(G,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${nv.embedAuthor} ${nv.embedMargin}`},c&&r("img",{src:c,className:nv.embedAuthorIcon,alt:""}),r("span",null,r("span",null,l," - "),o.isDM()?Me.parse(`<@${Q.getChannel(o.id).recipients[0]}>`):Me.parse(`<#${o.id}>`))),compact:n,content:r(p,null,t.content||t.attachments.length<=i.length?s(t.content):[rC(t.attachments.length,t.embeds.length)],i.map((u,d)=>{let{width:f,height:g}=iC(u.width,u.height);return r("div",{key:d},r("img",{src:u.url,width:f,height:g}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Lm=h({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[m.TheSun,m.Ven,m.RyanCaoDev],dependencies:["MessageAccessoriesAPI","MessageUpdaterAPI","UserSettingsAPI"],settings:Dm,start(){lc("MessageLinkEmbeds",e=>iv.test(e.message.content)?(iv.lastIndex=0,r(aC,{message:e.message})):null,4)},stop(){cc("MessageLinkEmbeds")}});a();S();se();le();re();F();v();a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
background-color: hsl(var(--red-430-hsl, 0 85% 61%) / 15%) !important;
}`,classNames:{},dom:null});var sv="src/plugins/messageLogger/deleteStyleOverlay.css";a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`.messagelogger-deleted {
--text-default: var(--status-danger, #f04747);
--interactive-icon-default: var(--status-danger, #f04747);
--text-muted: var(--status-danger, #f04747);
--embed-title: var(--red-460, #be3535);
--text-link: var(--red-460, #be3535);
--text-strong: var(--red-460, #be3535);
}`,classNames:{},dom:null});var av="src/plugins/messageLogger/deleteStyleText.css";a();zi();we();re();$e();F();v();var uC=Z("markup","codeContainer"),pC=Z("messageContent","markupRtl"),Vc=q("vc-ml-modal-");function A4(e){ue(t=>r(M,null,r(dC,{modalProps:t,message:e})))}function dC({modalProps:e,message:t}){let[o,n]=A(t.editHistory.length),i=[t.firstEditTimestamp,...t.editHistory.map(l=>l.timestamp)],s=[...t.editHistory.map(l=>l.content),t.content];return r(ge,{...e,size:"large"},r(Ce,{className:Vc("head")},r(G,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Message Edit History"),r(Ke,{onClick:e.onClose})),r(xe,{className:Vc("contents")},r(Mo,{type:"top",look:"brand",className:R("vc-settings-tab-bar",Vc("tab-bar")),selectedItem:o,onItemSelect:n},t.firstEditTimestamp.getTime()!==t.timestamp.getTime()&&r(Vo,{text:"This edit state was not logged so it can't be displayed."},r(Mo.Item,{className:"vc-settings-tab-bar-item",id:-1,disabled:!0},r(ro,{className:Vc("timestamp"),timestamp:t.timestamp,isEdited:!0,isInline:!1}))),i.map((l,c)=>r(Mo.Item,{key:c,className:"vc-settings-tab-bar-item",id:c},r(ro,{className:Vc("timestamp"),timestamp:l,isEdited:!0,isInline:!1})))),r("div",{className:R(uC.markup,pC.messageContent,k.top20)},lv(s[o],t))))}var mC=Z("edited","communicationDisabled","isSystemMessage");function R4(){$.plugins.MessageLogger.deleteStyle==="text"?(no(av),ko(sv)):(ko(av),no(sv))}var D4="ml-remove-history",L4="ml-toggle-style",fC=(e,t)=>{let{message:o}=t,{deleted:n,editHistory:i,id:s,channel_id:l}=o;if(!(!n&&!i?.length)){e:{if(!n)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(r(P.MenuItem,{id:L4,key:L4,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(r(P.MenuItem,{id:D4,key:D4,label:"Remove Message History",color:"danger",action:()=>{n?L.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))}},Om=(e,{channel:t})=>{let o=Kt.getMessages(t?.id);if(!o?.some(i=>i.deleted||i.editHistory?.length))return;(ze("mark-channel-read",e)??e).push(r(P.MenuItem,{id:"vc-ml-clear-channel",label:"Clear Message Log",color:"danger",action:()=>{o.forEach(i=>{i.deleted?L.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:i.id,mlDeleted:!0}):ws(t.id,i.id,{editHistory:[]})})}}))};function lv(e,t){return Me.parse(e,!0,{channelId:t.channel_id,messageId:t.id,allowLinks:!0,allowHeading:!0,allowList:!0,allowEmojiLinks:!0,viewingChannelId:Ge.getChannelId()})}var _m=h({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[m.rushii,m.Ven,m.AutumnVN,m.Nickyux,m.Kyuuhachi],dependencies:["MessageUpdaterAPI"],contextMenus:{message:fC,"channel-context":Om,"thread-context":Om,"user-context":Om,"gdm-context":Om},start(){R4()},renderEdits:M.wrap(({message:{id:e,channel_id:t}})=>{let o=ie([Kt],()=>Kt.getMessage(t,e),null,(n,i)=>n?.editHistory===i?.editHistory);return $.plugins.MessageLogger.inlineEdits&&r(p,null,o.editHistory?.map((n,i)=>r("div",{key:i,className:"messagelogger-edited"},lv(n.content,o),r(ro,{timestamp:n.timestamp,isEdited:!0,isInline:!1},r("span",{className:mC.edited}," ","(",Le("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:()=>R4()},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:"",multiline:!0},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:"",multiline:!0},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:"",multiline:!0}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let n=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(d=>(d.deleted=!0,d))))};o?t.ids.forEach(n):n(t.id)}catch(n){new B("MessageLogger").error("Error during handleDelete",n)}return e},shouldIgnore(e,t=!1){try{let{ignoreBots:o,ignoreSelf:n,ignoreUsers:i,ignoreChannels:s,ignoreGuilds:l,logEdits:c,logDeletes:u}=$.plugins.MessageLogger,d=C.getCurrentUser().id;return o&&e.author?.bot||n&&e.author?.id===d||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(Q.getChannel(e.channel_id)?.parent_id)||(t?!c:!u)||l.includes(Q.getChannel(e.channel_id)?.guild_id)||e.author?.id===Bs&&Q.getChannel(e.channel_id)?.parent_id===qn}catch{return!1}},EditMarker({message:e,className:t,children:o,...n}){return r("span",{...n,className:R("messagelogger-edit-marker",t),onClick:()=>A4(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:".PREMIUM_REFERRAL&&(",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:"#{intl::REMOVE_ATTACHMENT_TOOLTIP_TEXT}",replacement:[{match:/\.SPOILER,(?=\[\i\.\i\]:)/,replace:'$&"messagelogger-deleted-attachment":arguments[0]?.item?.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:".SEND_FAILED,",replacement:{match:/\]:\i.isUnsupported.{0,20}?,children:\[/,replace:"$&arguments[0]?.message?.editHistory?.length>0&&$self.renderEdits(arguments[0]),"}},{find:"#{intl::MESSAGE_EDITED}",replacement:{match:/(isInline:!1,children:.{0,50}?)"span",\{(?=className:)/,replace:"$1$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:()=>$.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:()=>$.plugins.MessageLogger.collapseDeleted}]});a();S();var O4=x({reactionCount:{description:"Number of reactions (0-42)",type:1,default:5}}),Bm=h({name:"MoreQuickReactions",description:"Increases the number of reactions available in the Quick React hover menu",authors:[m.iamme],settings:O4,get reactionCount(){return O4.store.reactionCount},patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/(?<=length>=3\?.{0,40})\.slice\(0,3\)/,replace:".slice(0,$self.reactionCount)"}}]});a();br();S();le();F();v();var gC=X("selectPrivateChannel"),hC=X("getGlobalName"),_4=Z("empty","textContainer","connectionIcon"),yC=Z("tabPanelScroller","tabBarPanel"),Um=Z("row","icon","name","details"),vC=he('action:"PRESS_SECTION"',"section");function bC(e){return e.name||e.recipients.map(C.getUser).filter(Rr).map(t=>Pe.getNickname(t.id)||hC.getName(t)).join(", ")}var Em=e=>Q.getSortedPrivateChannels().filter(t=>t.isGroupDM()&&t.recipients.includes(e)),SC=e=>e.bot||e.id===C.getCurrentUser().id;function xC(e){let t=Em(e.id).length;return`${t===0?"No":t} Mutual Group${t!==1?"s":""}`}function B4(e,t){return e.map(o=>r(oo,{key:o.id,className:Um.row,onClick:()=>{t(),gC.selectPrivateChannel(o.id)}},r(Wl,{src:at.getChannelIconURL({id:o.id,icon:o.icon,size:32}),size:"SIZE_40",className:Um.icon}),r("div",{className:Um.details},r("div",{className:Um.name},bC(o)),r(G,{variant:"text-xs/medium"},o.recipients.length+1," Members"))))}var U4=Symbol("MutualGroupDMs.Patched"),Fm=h({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[m.amia],patches:[{find:".BOT_DATA_ACCESS?(",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]):$&"},{match:/className:\i\.\i(?=,type:"top")/,replace:'$& + " vc-mutual-gdms-modal-tab-bar"'}]},{find:".WIDGETS?",replacement:[{match:/items:(\i),.+?(?=return\(0,\i\.jsxs?\)\("div)/,replace:"$&$self.pushSection($1,arguments[0].user);"},{match:/children:(?=.{0,100}?component:.+?section:(\i))/,replace:"$&$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):"},{match:/type:"top",/,replace:'$&className:"vc-mutual-gdms-modal-v2-tab-bar",'}]},{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)\.\i}\)).{0,50}?"MUTUAL_FRIENDS".+?)/,replace:(e,t,o,n,i)=>`${e},$self.renderDMPageList({user:arguments[0].user,hasDivider:${t}||${o},Divider:${n},listStyle:${i}.list})`}]}],getMutualGroupDms(e){try{return Em(e)}catch(t){new B("MutualGroupDMs").error("Failed to get mutual group dms:",t)}return[]},pushSection(e,t){try{if(SC(t)||e[U4])return;e[U4]=!0,e.push({text:xC(t),section:"MUTUAL_GDMS"})}catch(o){new B("MutualGroupDMs").error("Failed to push mutual group dms section:",o)}},renderMutualGDMs:M.wrap(({user:e,onClose:t})=>{let o=ce(()=>Em(e.id),[e.id]),n=B4(o,t);return r(ti,{className:yC.tabPanelScroller,fade:!0,onClose:t},n.length>0?n:r("div",{className:_4.empty},r("div",{className:_4.textContainer},r(ao,{tag:"h3",size:"md",weight:"medium",style:{color:"var(--text-strong)"}},"You don't have any group chats in common"))))}),renderDMPageList:M.wrap(({user:e,hasDivider:t,Divider:o,listStyle:n})=>{let i=Em(e.id);return i.length===0?null:r(p,null,t&&o,r(vC,{listClassName:n,header:"Mutual Groups",isLoading:!1,items:B4(i,()=>{})}))},{noop:!0})});a();He();S();F();v();var{updateGuildNotificationSettings:E4}=X("updateGuildNotificationSettings"),{toggleShowAllChannels:TC}=Xe(".onboardExistingMember(",{toggleShowAllChannels:e=>{let t=String(e);return t.length<100&&!t.includes("onboardExistingMember")&&!t.includes("getOptedInChannels")}}),wC=fe(".COMMUNITY)||",".isOptInEnabled("),Un=x({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}}),F4=e=>(t,{guild:o})=>{if(!o)return;ze("privacy",t)?.push(r(P.MenuItem,{label:"Apply NewGuildSettings",id:"vc-newguildsettings-apply",icon:e?Bl:void 0,action:()=>cv(o.id)}))};function cv(e){e==="@me"||e==="null"||e==null||(E4(e,{muted:Un.store.guild,suppress_everyone:Un.store.everyone,suppress_roles:Un.store.role,mute_scheduled_events:Un.store.events,notify_highlights:Un.store.highlights?1:0}),Un.store.messages!==3&&E4(e,{message_notifications:Un.store.messages}),Un.store.showAllChannels&&wC(e)&&TC(e))}var $m=h({name:"NewGuildSettings",description:"Automatically mute new servers and change various other settings upon joining",tags:["MuteNewGuild","mute","server"],authors:[m.Glitch,m.Nuckyz,m.carince,m.Mopi,m.GabiRP],contextMenus:{"guild-context":F4(!1),"guild-header-popout":F4(!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:Un,applyDefaultSettings:cv,flux:{GUILD_JOIN_REQUEST_UPDATE({guildId:e,request:t,status:o}){o==="APPROVED"&&t.user_id===C.getCurrentUser().id&&cv(e)}}});a();S();Fs();le();v();$1("NoBlockedMessages","ignoreBlockedMessages","ignoreMessages");var Gm=x({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}}),Ps=h({name:"NoBlockedMessages",description:"Hides all blocked/ignored messages from chat completely",authors:[m.rushii,m.Samu,m.jamesbt365],settings:Gm,patches:[{find:".__invalid_blocked,",replacement:[{match:/let{messages:\i,[^}]*?collapsedReason[^}]*}/,replace:"if($self.shouldHide(arguments[0]))return null;$&"}]},...['"MessageStore"','"ReadStateStore"'].map(e=>({find:e,predicate:()=>Gm.store.ignoreMessages,replacement:[{match:/(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,replace:(t,o,n)=>`if($self.shouldIgnoreMessage(${n}.message))return;`}]}))],shouldIgnoreMessage(e){try{return Pe.isBlocked(e.author.id)?!0:Gm.store.applyToIgnoredUsers&&Pe.isIgnored(e.author.id)}catch(t){return new B("NoBlockedMessages").error("Failed to check if user is blocked or ignored:",t),!1}},shouldHide(e){try{let t=e.collapsedReason(),o=n=>t===Kr.t[pn(n)]();return o("BLOCKED_MESSAGE_COUNT")||Gm.store.applyToIgnoredUsers&&o("IGNORED_MESSAGE_COUNT")}catch(t){return new B("NoBlockedMessages").error("Failed to check if message should be hidden:",t),!1}}});a();S();var Hm=h({name:"DisableDeepLinks",description:"Disables Discord's stupid deep linking feature which tries to force you to use their Desktop App",authors:[m.Ven],required:!0,noop:()=>{},patches:[{find:/\.openNativeAppModal\(.{0,50}?\.DEEP_LINK/,replacement:{match:/\i\.\i\.openNativeAppModal/,replace:"$self.noop"}}]});a();S();var zm=h({name:"NoDefaultHangStatus",description:"Disable the default hang status when joining voice channels",authors:[m.D3SOX],patches:[{find:".CHILLING)",replacement:{match:/{enableHangStatus:(\i),/,replace:"{_enableHangStatus:$1=false,"}}]});a();S();var Wm=h({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[m.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.app\.getVersion\(\)\)/,replace:"if(true)"}}]});a();S();var jm=h({name:"NoF1",description:"Disables F1 help bind.",authors:[m.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]});a();S();var qm=h({name:"NoMaskedUrlPaste",authors:[m.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)"}}]});a();S();var $4=x({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),Km=h({name:"NoMosaic",authors:[m.AutumnVN],description:"Removes Discord image mosaic",tags:["image","mosaic","media"],settings:$4,patches:[{find:'"PLAINTEXT_PREVIEW":"OTHER"',replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/,replace:(e,t)=>t!=null?`=>${t};`:"=>false;"}},{find:"renderAttachments(",predicate:()=>$4.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]});a();S();var Ym=h({name:"NoOnboardingDelay",description:"Skips the slow and annoying onboarding delay",authors:[m.nekohaxx],patches:[{find:"#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}",replacement:{match:"3e3",replace:"0"}}]});a();S();F();var IC=X("getMessageRequestsCount"),eu=x({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}}),Zm=h({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[m.amia],settings:eu,patches:[{find:"getPendingCount(){",predicate:()=>eu.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>eu.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount();return",predicate:()=>eu.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>eu.store.hidePremiumOffersCount,replacement:{match:/(\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.+?)\2\+\3/,replace:(e,t)=>`${t}0`}}],getRealMessageRequestCount(){return IC.getMessageRequestChannelIds().size}});a();S();v();var Qm=h({name:"NoProfileThemes",description:"Completely removes Nitro profile themes from everyone but yourself",authors:[m.TheKodeToad],patches:[{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&$self.isCurrentUser(this.userId)&&"}}],isCurrentUser:e=>e===C.getCurrentUser()?.id});a();S();var uv=x({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"}]}}),Jm=h({name:"NoServerEmojis",authors:[m.UlyssesZhan],description:"Do not show server emojis in the autocomplete menu.",settings:uv,patches:[{find:"}searchWithoutFetchingLatest(",replacement:{match:/\.nameMatchesChain\(\i\)\.reduce\(\((\i),(\i)\)=>\{(?<=channel:(\i).+?)/,replace:"$&if($self.shouldSkip($3,$2))return $1;"}}],shouldSkip(e,t){return t.type!==1?!1:uv.store.shownEmojis==="onlyUnicode"?!0:uv.store.shownEmojis==="currentServer"?t.guildId!==(e!=null?e.getGuildId():null):!1}});a();S();var Xm=h({name:"NoTypingAnimation",authors:[m.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/focused:(\i)/g,replace:(e,t)=>`_focused:${t}=false`}}]});a();S();var Vm=h({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked or ignored users and likely spammers without unblocking them",authors:[m.dzshn],patches:[{find:"#{intl::UNIGNORE_TO_JUMP_BODY}",replacement:{match:/if\(\i\.\i\.isBlockedForMessage\(/,replace:"return true;$&"}}]});a();S();var PC=x({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),ef=h({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[m.philipbry],settings:PC,patches:[{find:"ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,replace:"$self.settings.store.notificationVolume/100*"}}]});a();S();v();var tu=x({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}}),tf=h({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:[m.ProffDea],settings:tu,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,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=Q.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&tu.store.channelToAffect==="group_dm"||t===3&&tu.store.channelToAffect==="user_dm"||tu.store.allowMentions&&e.mentions.some(o=>o.id===C.getCurrentUser().id)||tu.store.allowEveryone&&e.mention_everyone?!0:ri.getOldestUnreadMessageId(e.channel_id)===e.id}});a();S();var of=h({name:"oneko",description:"cat follow mouse (real)",authors:[m.Ven,m.adryd],start(){fetch("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()}});a();S();v();var pv={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:\/\/(?:listen\.)?tidal\.com\/(?:browse\/)?(track|album|artist|playlist|user|video|mix)\/([a-f0-9-]+).*/,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,n,i)=>i?`itunes://music.apple.com/us/${o}/${n}/${i}`:`itunes://music.apple.com/us/${o}/${n}`,description:"Open Apple Music links in the iTunes app"}},rf=x(Object.entries(pv).reduce((e,[t,o])=>(e[t]={type:3,description:o.description,default:!0},e),{})),MC=VencordNative.pluginHelpers.OpenInApp,En=h({name:"OpenInApp",description:"Open links in their respective apps instead of your browser",authors:[m.Ven,m.surgedevs],settings:rf,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:()=>rf.store.spotify,replacement:[{match:/\i\.\i\.isProtocolRegistered\(\)/g,replace:"true"},{match:/\(0,\i\.isDesktop\)\(\)/,replace:"true"}]},...[".__invalid_connectedAccountOpenIconContainer",".BLUESKY||"].map(e=>({find:e,replacement:{match:/(?<=onClick:(\i)=>\{)(?=.{0,100}\.CONNECTED_ACCOUNT_VIEWED)(?<==(\i)\.metadata.+?)/,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[n,i]of Object.entries(pv))if(rf.store[n]&&(i.shortlinkMatch?.test(o)&&(t?.preventDefault(),o=await MC.resolveRedirect(o)),i.match.test(o))){_e("Opened link in native app",j.Type.SUCCESS);let s=o.replace(i.match,i.replace);return VencordNative.native.openExternal(s),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){let n=pv[t];if(n?.accountViewReplace&&rf.store[t])return VencordNative.native.openExternal(n.accountViewReplace(o)),e.preventDefault(),!0}});a();S();var dv=x({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"}}),nf=h({name:"OverrideForumDefaults",description:"Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",authors:[m.Inbestigator],patches:[{find:"getDefaultLayout(){",replacement:[{match:/}getDefaultLayout\(\){/,replace:"$&return $self.getLayout();"},{match:/}getDefaultSortOrder\(\){/,replace:"$&return $self.getSortOrder();"}]}],getLayout:()=>dv.store.defaultLayout,getSortOrder:()=>dv.store.defaultSortOrder,settings:dv});a();S();se();v();function NC(e){let t=Ne.getGuild(e);return t?!Dl(t,"INVITES_DISABLED")&&Ie.getGuildPermissionProps(t).canManageRoles:!1}function CC(e){let o=[...Ne.getGuild(e).features,"INVITES_DISABLED"];Mt.patch({url:St.Endpoints.GUILD(e),body:{features:o}})}var sf=h({name:"PauseInvitesForever",tags:["DisableInvitesForever"],description:"Brings back the option to pause invites indefinitely that stupit Discord removed.",authors:[m.Dolfies,m.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:M.wrap(({guildId:e,setChecked:t})=>r("div",null,Le("GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION"),NC(e)&&r("a",{role:"button",onClick:()=>{t(!0),CC(e)}}," Pause Indefinitely.")),{noop:!0})});a();S();Sr();var mv=x({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}}),af=h({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[m.lewisakura],patches:[{find:"#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>mv.store.lockout},{find:"#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}",replacement:[{match:/{(?:\i:\(\)=>\i,?){2}}/,replace:e=>e.replaceAll(Lt(/\(\)=>\i/g),"()=>()=>Promise.resolve(true)")}],predicate:()=>mv.store.onboarding}],settings:mv});a();He();zi();S();re();F();v();a();He();a();we();F();v();var{getGuildPermissionSpecMap:lf}=X("getGuildPermissionSpecMap"),lt=q("vc-permviewer-");function cf({id:e},t){return xt.getSortedRoles(e).filter(o=>o.id===e||t.roles.includes(o.id))}function H4(e){switch(Mi.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 uf(e,t){let o=xt.getRolesSnapshot(t);return e.sort((n,i)=>{if(n.type!==0||i.type!==0)return 0;let s=o[n.id];return o[i.id].position-s.position})}cn();se();$e();F();v();a();function fv(){return r("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},r("title",null,"Denied"),r("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 gv(){return r("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},r("title",null,"Allowed"),r("path",{fill:"var(--status-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function W4(){return r("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},r("g",null,r("title",null,"Not overwritten"),r("polygon",{fill:"var(--text-default)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var AC=fe("convertSurrogateToName","customIconSrc","unicodeEmoji");function RC(e){let t=AC(e,20);if(!t)return;let{customIconSrc:o,unicodeEmoji:n}=t;return o??n?.url}function DC({permissions:e,guild:t,modalProps:o,header:n}){let i=ce(()=>lf(t),[t.id]);ie([Te],()=>Te.getMemberIds(t.id),null,(d,f)=>d.length===f.length),te(()=>{e.sort((d,f)=>d.type-f.type)},[e]),te(()=>{let d=e.filter(f=>f.type===1&&!Te.isMember(t.id,f.id)).map(({id:f})=>f);L.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:d})},[]);let[s,l]=A(0),c=e[s],u=xt.getRolesSnapshot(t.id);return r(ge,{...o,size:"large"},r(Ce,null,r(G,{className:lt("modal-title"),variant:"heading-lg/semibold"},n," Permissions"),r(Ke,{onClick:o.onClose})),r(xe,{className:lt("modal-content")},!c&&r("div",{className:lt("modal-no-perms")},r(G,{variant:"heading-lg/normal"},"No permissions to display!")),c&&r("div",{className:lt("modal-container")},r(ti,{className:lt("modal-list"),orientation:"auto"},e.map((d,f)=>{let g=C.getUser(d.id??""),y=u[d.id??""],b=y!=null?RC(y):void 0;return r("div",{key:f,className:lt("modal-list-item-btn"),onClick:()=>l(f),role:"button",tabIndex:0},r("div",{className:lt("modal-list-item",{"modal-list-item-active":s===f}),onContextMenu:I=>{d.type===0?ct.openContextMenu(I,()=>r(LC,{guild:t,roleId:d.id,onClose:o.onClose})):d.type===1&&ct.openContextMenu(I,()=>r(OC,{userId:d.id}))}},(d.type===0||d.type===2)&&r("span",{className:lt("modal-role-circle"),style:{backgroundColor:y?.colorString??"var(--primary-300)"}}),d.type===0&&b!=null&&r("img",{className:lt("modal-role-image"),src:b}),d.type===1&&g!=null&&r("img",{className:lt("modal-user-img"),src:g.getAvatarURL(void 0,void 0,!1)}),r(G,{variant:"text-md/normal",className:lt("modal-list-item-text")},d.type===0?y?.name??"Unknown Role":d.type===1?(g!=null&&vn(g))??"Unknown User":r(Y,{gap:"0.2em"},"@owner",r($h,{height:18,width:18,"aria-hidden":"true"})))))})),r("div",{className:lt("modal-divider")}),r(ti,{className:lt("modal-perms"),orientation:"auto"},Object.values(me).map(d=>r("div",{key:d,className:lt("modal-perms-item")},r("div",{className:lt("modal-perms-item-icon")},(()=>{let{permissions:f,overwriteAllow:g,overwriteDeny:y}=c;return f?(f&d)===d?gv():fv():g&&(g&d)===d?gv():y&&(y&d)===d?fv():W4()})()),r(G,{variant:"text-md/normal"},i[String(d)].title),r(V,{text:(()=>{let{description:f}=i[String(d)];return typeof f=="function"?Kr.intl.format(f,{}):f})()},f=>r(Fi,{...f}))))))))}function LC({guild:e,roleId:t,onClose:o}){return r(P.Menu,{navId:lt("role-context-menu"),onClose:ct.closeContextMenu,"aria-label":"Role Options"},r(P.MenuItem,{id:lt("copy-role-id"),label:Le("COPY_ID_ROLE"),action:()=>{lo(t)}}),Mi.store.unsafeViewAsRole&&r(P.MenuItem,{id:lt("view-as-role"),label:Le("VIEW_AS_ROLE"),action:()=>{let n=xt.getRole(e.id,t);n&&(o(),L.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:n}}}))}}))}function OC({userId:e}){return r(P.Menu,{navId:lt("user-context-menu"),onClose:ct.closeContextMenu,"aria-label":"User Options"},r(P.MenuItem,{id:lt("copy-user-id"),label:Le("COPY_ID_USER"),action:()=>{lo(e)}}))}var _C=M.wrap(DC);function Ms(e,t,o){return ue(n=>r(_C,{modalProps:n,permissions:e,guild:t,header:o}))}a();Xo();se();re();F();v();var ou=Z("role","roleName","roleRemoveButton","roleNameOverflow","root"),BC=Z("roleCircle","dot","dotBorderColor");function j4({text:e,color:t,...o}){return r("div",{...o,className:R(ou.role)},r("div",{className:ou.roleRemoveButton},r("span",{className:BC.roleCircle,style:{backgroundColor:t}})),r("div",{className:ou.roleName},r(G,{className:ou.roleNameOverflow,variant:"text-xs/medium"},e)))}function UC({roleName:e,roleColor:t}){return r(p,null,r(G,{variant:"text-sm/medium"},"Granted By"),r(j4,{text:e,color:t}))}function EC({guild:e,guildMember:t,closePopout:o}){let{permissionsSortOrder:n}=Mi.use(["permissionsSortOrder"]),i=ce(()=>lf(e),[e.id]),[s,l]=ce(()=>{let c=[],u=cf(e,t),d=u.map(f=>({type:0,...f}));if(e.ownerId===t.userId){d.push({type:2,permissions:Object.values(me).reduce((g,y)=>g|y,0n)});let f=Le("GUILD_OWNER")??"Server Owner";c.push({permission:f,roleName:"Owner",roleColor:"var(--primary-300)",rolePosition:1/0})}H4(u);for(let f of Object.values(me))for(let{permissions:g,colorString:y,position:b,name:I}of u)if((g&f)===f){c.push({permission:i[String(f)].title,roleName:I,roleColor:y||"var(--primary-300)",rolePosition:b});break}return c.sort((f,g)=>g.rolePosition-f.rolePosition),[d,c]},[n]);return r("div",null,r("div",{className:lt("user-header-container")},r(Zr,null,"Permissions"),r("div",{className:lt("user-header-btns")},r(V,{text:`Sorting by ${n===0?"Highest Role":"Lowest Role"}`},c=>r("div",{...c,className:lt("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{Mi.store.permissionsSortOrder=n===0?1:0}},r("svg",{width:"24",height:"24",viewBox:"0 96 960 960",transform:n===0?"scale(1 1)":"scale(1 -1)"},r("path",{fill:"var(--text-default)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"})))),r(V,{text:"Role Details"},c=>r("div",{...c,className:lt("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{o(),Ms(s,e,t.nick||C.getUser(t.userId).username)}},r("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r("path",{fill:"var(--text-default)",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"})))))),l.length>0&&r("div",{className:R(ou.root)},l.map(({permission:c,roleColor:u,roleName:d})=>r(V,{key:c,text:r(UC,{roleName:d,roleColor:u}),tooltipClassName:lt("granted-by-container"),tooltipContentClassName:lt("granted-by-content")},f=>r(j4,{...f,text:c,color:u})))))}var q4=M.wrap(EC,{noop:!0});var FC=Z("container","scroller","list");var Mi=x({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}]}});function hv(e,t,o){return o===0&&!Te.isMember(e,t)?null:r(P.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let n=Ne.getGuild(e),{permissions:i,header:s}=Qu(o).returnType().with(0,()=>{let l=Te.getMember(e,t),c=cf(n,l).map(u=>({type:0,...u}));return n.ownerId===t&&c.push({type:2,permissions:Object.values(me).reduce((u,d)=>u|d,0n)}),{permissions:c,header:l.nick??C.getUser(l.userId).username}}).with(1,()=>{let l=Q.getChannel(t);return{permissions:uf(Object.values(l.permissionOverwrites).map(({id:u,allow:d,deny:f,type:g})=>({type:g,id:u,overwriteAllow:d,overwriteDeny:f})),e),header:l.name}}).otherwise(()=>({permissions:xt.getSortedRoles(n.id).map(c=>({type:0,...c})),header:n.name}));Ms(i,n,s)}})}function pf(e,t){return(o,n)=>{if(!n||t===0&&!n.user||t===2&&!n.guild||t===1&&(!n.channel||!n.guild))return;let i=ze(e,o),s=Qu(t).with(0,()=>hv(n.guildId,n.user.id,t)).with(1,()=>hv(n.guild.id,n.channel.id,t)).with(2,()=>hv(n.guild.id)).otherwise(()=>null);if(s!=null){if(i)return i.push(s);e==="roles"&&n.guildId&&o.splice(-1,0,r(P.MenuGroup,null,s))}}}var Ba=h({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[m.Nuckyz,m.Ven],settings:Mi,patches:[{find:"#{intl::COLLAPSE_ROLES}",replacement:{match:/(?<=\i\.id\)\),\i\(\))(?=,\i\?)/,replace:",$self.ViewPermissionsButton(arguments[0])"}}],ViewPermissionsButton:M.wrap(({className:e,guild:t,userId:o})=>{let n=Te.getMember(t.id,o);if(!n)return null;let i=st(null);return r(Vs,{position:"bottom",align:"center",targetElementRef:i,renderPopout:({closePopout:s})=>r(l1,{className:FC.container,style:{width:"500px"}},r(q4,{guild:t,guildMember:n,closePopout:s}))},s=>r(Vo,{text:"View Permissions"},r(U,{...s,ref:i,color:U.Colors.CUSTOM,look:U.Looks.FILLED,size:U.Sizes.NONE,className:R(e,"vc-permviewer-role-button")},r(zh,{height:"16",width:"16"}))))},{noop:!0}),contextMenus:{"user-context":pf("roles",0),"channel-context":pf(["mute-channel","unmute-channel"],1),"guild-context":pf("privacy",2),"guild-header-popout":pf("privacy",2)}});a();S();qo();v();var Ua=nh(Wy()),$C=20,GC=128,df=10,HC=ln(()=>Promise.all(Array.from({length:df},(e,t)=>K4(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`))));function K4(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((n,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),n(s)},s.onerror=l=>i(Error(`An error occurred while loading ${o}. Check the console for more info.`)),s.crossOrigin="Anonymous",s.src=o})}async function zC(e,t,o){for(let n of e)switch(n.name){case"image":let i=ni.getUpload(t.channel.id,n.name,Ht.SlashCommand);if(i){if(!i.isImage)throw Yi.clearAll(t.channel.id,Ht.SlashCommand),"Upload is not an image";return i.item.file}break;case"url":return n.value;case"user":try{return(await po.getUser(n.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),Yi.clearAll(t.channel.id,Ht.SlashCommand),"Failed to fetch user. Check the console for more info."}}return Yi.clearAll(t.channel.id,Ht.SlashCommand),null}function WC(e,t,o){return e<<8&63488|t<<3&2016|o>>3}function jC(e,t,o,n){let i=new Uint8Array(Math.floor(e.length/4));for(let s=0;s<i.length;s+=1){let l=e[4*s],c=e[4*s+1],u=e[4*s+2];if(e[4*s+3]<n)i[s]=255;else{let f=WC(l,c,u);i[s]=f in o?o[f]:o[f]=(0,Ua.nearestColorIndex)(t,[l,c,u])}}return i}var mf=h({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[m.Ven,m.u32],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 in ms. Rounded to nearest 10ms. Defaults to the minimum value of 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 HC(),n=or(e,"no-server-pfp",!1);try{var i=await zC(e,t,n);if(!i)throw"No Image specified!"}catch(D){Yi.clearAll(t.channel.id,Ht.SlashCommand),Nt(t.channel.id,{content:String(D)});return}let s=await K4(i),l=or(e,"delay",$C);if(l<20)return Nt(t.channel.id,{content:"Delay must be at least 20."});let c=or(e,"resolution",GC),u=(0,Ua.GIFEncoder)(),d=Math.min(120,c),f=document.createElement("canvas");f.width=c,f.height=Math.max(c,2*d);let g=f.getContext("2d",{willReadFrequently:!0});Yi.clearAll(t.channel.id,Ht.SlashCommand),g.drawImage(s,0,d,.8*d,.8*d),g.drawImage(o[0],0,0,d,d);let{data:y}=g.getImageData(0,0,d,2*d),b=(0,Ua.quantize)(y,255),I=new Array(2**16);for(let D=0;D<df;D++){g.clearRect(0,0,f.width,f.height);let N=D<df/2?D:df-D,_=.8+N*.02,W=.8-N*.05,H=(1-_)*.5+.1,K=1-W-.08;g.drawImage(s,H*c,K*c,_*c,W*c),g.drawImage(o[D],0,0,c,c);let{data:pe}=g.getImageData(0,0,c,c),z=jC(pe,b,I,1);u.writeFrame(z,c,c,{transparent:!0,transparentIndex:255,delay:l,palette:D===0?b:void 0})}u.finish();let w=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>Xl.promptToUpload([w],t.channel,Ht.ChannelMessage),10)}}]});a();S();v();var Y4=x({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),ff=h({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[m.Lumap],settings:Y4,patches:[{find:'["VIDEO","CLIP","AUDIO"]',replacement:{match:/(\[\i>0&&\i\.length>0.{0,150}?children:)(\i.slice\(\i\))(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/,replace:(e,t,o,n,i)=>`${t}[${n}&&${i}&&$self.PictureInPictureButton(),...${o}]`}}],PictureInPictureButton:M.wrap(()=>r(V,{text:"Toggle Picture in Picture"},e=>r("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"),n=document.body.appendChild(o.cloneNode(!0));n.loop=Y4.store.loop,n.style.display="none",n.onleavepictureinpicture=()=>n.remove();function i(){n.currentTime=o.currentTime,n.requestPictureInPicture(),o.pause(),n.play()}n.readyState===4?i():n.onloadedmetadata=i}},r("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},r("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})});a();S();re();F();v();a();a();dt();v();var Z4,Ct=[];async function yv(){let e=C.getCurrentUser()?.id;e!=null&&(Ct=bo.store.userBasedCategoryList[e]??=[],Z4?.())}function Q4(){Z4=Ko(),bo.use(["pinOrder","canCollapseDmSection","dmSectionCollapsed","userBasedCategoryList"])}function J4(e){return Ct.find(t=>t.id===e)}function nu(e){return Ct[e]}function X4(e){Ct.push(e)}function V4(e,t){let o=Ct.find(n=>n.id===t);o!=null&&(o.channels.includes(e)||o.channels.push(e))}function ew(e){let t=Ct.find(o=>o.channels.includes(e));t!=null&&(t.channels=t.channels.filter(o=>o!==e))}function tw(e){let t=Ct.findIndex(o=>o.id===e);t!==-1&&Ct.splice(t,1)}function ow(e,t=!0){let o=Ct.find(n=>n.id===e);o!=null&&(o.collapsed=t)}function iu(e){return Ct.some(t=>t.channels.includes(e))}function gf(){return Ct.length}function rw(){if(bo.store.pinOrder===0){let e=xv.getPrivateChannelIds();return Ct.filter(t=>!t.collapsed).flatMap(t=>e.filter(o=>t.channels.includes(o)))}return Ct.filter(e=>!e.collapsed).flatMap(e=>e.channels)}function nw(){return Ct.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}var iw=(e,t,o)=>{let n=e[t],i=e[t+o];return n&&i},ru=(e,t)=>{let o=Ct.findIndex(n=>n.id===e);return iw(Ct,o,t)},sw=e=>ru(e,-1)||ru(e,1),vv=(e,t)=>{let o=Ct.find(i=>i.channels.includes(e));if(o==null)return!1;let n=o.channels.indexOf(e);return iw(o.channels,n,t)};function aw(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}function bv(e,t){let o=Ct.findIndex(i=>i.id===e),n=o+t;aw(Ct,o,n)}function Sv(e,t){let o=Ct.find(s=>s.channels.includes(e));if(o==null)return;let n=o.channels.indexOf(e),i=n+t;aw(o.channels,n,i)}v();a();Vt();a();var lw=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306];we();$e();F();v();var KC=he('id:"color-picker"'),Tv=Bi(['type:"USER_SETTINGS_MODAL_OPEN"']),YC=q("vc-pindms-modal-");function ZC(e,t){return ce(()=>{if(e)return J4(e);if(t)return{id:j.genId(),name:`Pin Category ${gf()+1}`,color:10070709,collapsed:!1,channels:[t]}},[e,t])}function QC({categoryId:e,modalProps:t,initialChannelId:o}){let n=ZC(e,o);if(!n)return null;let[i,s]=A(n.name),[l,c]=A(n.color),u=d=>{d.preventDefault(),n.name=i,n.color=l,e||X4(n),t.onClose()};return r(ge,{...t},r(Ce,null,r(G,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),r("form",{onSubmit:u},r(xe,{className:YC("content")},r("section",null,r(T.FormTitle,null,"Name"),r(yt,{value:i,onChange:d=>s(d)})),r(Ue,null),r("section",null,r(T.FormTitle,null,"Color"),r(KC,{key:n.id,defaultColor:10070709,colors:lw,onChange:d=>c(d),value:l,renderDefaultButton:()=>null,renderCustomButton:()=>r(ei,{color:l,onChange:d=>c(d),key:n.id,showEyeDropper:!1})}))),r(ht,null,r(U,{type:"submit",onClick:u,disabled:!i},e?"Save":"Create"))))}var hf=(e,t)=>Al(async()=>(await Tv(),o=>r(QC,{categoryId:e,modalProps:o,initialChannelId:t})));function uw(e){let t=iu(e);return r(P.MenuItem,{id:"pin-dm",label:"Pin DMs"},!t&&r(p,null,r(P.MenuItem,{id:"vc-add-category",label:"Add Category",color:"brand",action:()=>hf(null,e)}),r(P.MenuSeparator,null),Ct.map(o=>r(P.MenuItem,{key:o.id,id:`pin-category-${o.id}`,label:o.name,action:()=>V4(e,o.id)}))),t&&r(p,null,r(P.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>ew(e)}),bo.store.pinOrder===1&&vv(e,-1)&&r(P.MenuItem,{id:"move-up",label:"Move Up",action:()=>Sv(e,-1)}),bo.store.pinOrder===1&&vv(e,1)&&r(P.MenuItem,{id:"move-down",label:"Move Down",action:()=>Sv(e,1)})))}var JC=(e,t)=>{ze("leave-channel",e)?.unshift(uw(t.channel.id))},XC=(e,t)=>{let o=ze("close-dm",e);if(o){let n=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(n,0,uw(t.channel.id))}},pw={"gdm-context":JC,"user-context":XC};var dw=Z("privateChannelsHeaderContainer","headerText"),xv=gt("PrivateChannelSortStore"),ek;var bo=x({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:{}}}),yf=h({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:[m.Ven,m.Aria],settings:bo,contextMenus:pw,patches:[{find:'"dm-quick-launcher"===',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:/renderSection(?:",|=).{0,300}?"span",{/,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:"=()=>!1,ensureChatIsVisible:",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,ek=e},startAt:"WebpackReady",start:yv,flux:{CONNECTION_OPEN:yv},usePinnedDms:Q4,isPinned:iu,categoryLen:gf,getSections:nw,getAllUncollapsedChannels:rw,requireSettingsMenu:Tv,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 bo.store.canCollapseDmSection?{onClick:()=>this.collapseDMList(),role:"button",style:{cursor:"pointer"}}:void 0},getChunkSize(){let e=this.getSections();return(e.length*40+e.reduce((o,n)=>o+=n+44,0)+256)*1.5},isCategoryIndex(e){return this.sections&&e>0&&e<this.sections.length-1},isChannelIndex(e,t){if(bo.store.canCollapseDmSection&&bo.store.dmSectionCollapsed&&e!==0)return!0;let o=nu(e-1);return this.isCategoryIndex(e)&&(o?.channels?.length===0||o?.channels[t])},collapseDMList(){bo.store.dmSectionCollapsed=!bo.store.dmSectionCollapsed},isChannelHidden(e,t){if(e===0)return!1;if(bo.store.canCollapseDmSection&&bo.store.dmSectionCollapsed&&this.getSections().length+1===e)return!0;if(!this.instance||!this.isChannelIndex(e,t))return!1;let o=nu(e-1);return o?o.collapsed&&this.instance.props.selectedChannelId!==this.getCategoryChannels(o)[t]:!1},getScrollOffset(e,t,o,n,i){return iu(e)?t*(this.getAllUncollapsedChannels().indexOf(e)+n)+o:(t+o)*2+t*this.getAllUncollapsedChannels().length+i},renderCategory:M.wrap(({section:e})=>{let t=nu(e-1);return t?r(oo,{onClick:()=>ow(t.id,!t.collapsed),onContextMenu:o=>{ct.openContextMenu(o,()=>r(P.Menu,{navId:"vc-pindms-header-menu",onClose:()=>L.dispatch({type:"CONTEXT_MENU_CLOSE"}),color:"danger","aria-label":"Pin DMs Category Menu"},r(P.MenuItem,{id:"vc-pindms-edit-category",label:"Edit Category",action:()=>hf(t.id,null)}),sw(t.id)&&r(p,null,ru(t.id,-1)&&r(P.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>bv(t.id,-1)}),ru(t.id,1)&&r(P.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>bv(t.id,1)})),r(P.MenuSeparator,null),r(P.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>tw(t.id)})))}},r("h2",{className:R(dw.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`}},r("span",{className:dw.headerText},t?.name??"uh oh"),r("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"},r("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 M.wrap(()=>{let{channel:n,category:i}=this.getChannel(e,t,this.instance.props.channels);return!n||!i||this.isChannelHidden(e,t)?null:r(o,{channel:n,selected:this.instance.props.selectedChannelId===n.id},n.id)},{noop:!0})},getChannel(e,t,o){let n=nu(e-1);if(!n)return{channel:null,category:null};let i=this.getCategoryChannels(n)[t];return{channel:o[i],category:n}},getCategoryChannels(e){return e.channels.length===0?[]:bo.store.pinOrder===0?xv.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}});a();S();var vf=h({name:"PlainFolderIcon",description:"Dont show the small guild icons in folders",authors:[m.botato],patches:[{find:"#{intl::GUILD_FOLDER_TOOLTIP_A11Y_LABEL}",replacement:[{match:/\.slice\(0,4\).+?\]:(\i),\[\i\.\i\]:!\1/,replace:(e,t)=>`${e},"vc-plainFolderIcon-plain":!${t}`}]}]});a();S();F();v();var tk=gt("SessionsStore"),{useStatusFillColor:ok}=Xe([".5625*","translate"],{useStatusFillColor:O.byCode(".hex")}),rk={embedded:"Console",vr:"VR"};function su(e,t){return({color:o,tooltip:n,small:i})=>r(V,{text:n},s=>r("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},r("path",{d:e})))}var mw={desktop:su("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:su("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:su("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:su("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"}),vr:su("M8.46 8.64a1 1 0 0 1 1 1c0 .44-.3.8-.72.92l-.11.07c-.08.06-.2.19-.2.41a.99.99 0 0 1-.98.86h-.06a1 1 0 0 1-.94-1.05l.02-.32c.05-1.06.92-1.9 1.99-1.9ZM15.55 5a5.5 5.5 0 0 1 5.15 3.67h.3a2 2 0 0 1 2 2v3.18a2 2 0 0 1-2 1.99h-.2A4.54 4.54 0 0 1 16.55 19a4.45 4.45 0 0 1-3.6-1.83 1.2 1.2 0 0 0-1.9 0 4.44 4.44 0 0 1-3.9 1.82 4.54 4.54 0 0 1-3.94-3.15H3a2 2 0 0 1-2-2v-3.18c0-1.1.9-1.99 2-1.99h.3A5.5 5.5 0 0 1 8.46 5h7.09Zm-7.1 2C6.6 7 5.06 8.5 4.97 10.41l-.02.66v3.18c0 1.43 1.05 2.66 2.34 2.74.85.06 1.63-.32 2.14-1.01a3.2 3.2 0 0 1 2.57-1.3c1 0 1.97.48 2.57 1.3.5.69 1.3 1.08 2.14 1.01 1.3-.08 2.34-1.31 2.34-2.74l-.02-3.84a3.54 3.54 0 0 0-3.49-3.43H8.45Z",{viewBox:"0 4 24 16",height:20,width:20})};function nk(e){return rk[e]??e.charAt(0).toUpperCase()+e.slice(1)}var hw=({platform:e,status:t,small:o})=>{let n=nk(e),i=mw[e]??mw.desktop;return r(i,{color:ok(t),tooltip:n,small:o})};function yw(e){if(e.id===Yt.getId()){let t=tk.getSessions();if(typeof t!="object")return null;let o=Object.values(t).sort(({status:s},{status:l})=>s===l?0:s==="online"?1:l==="online"?-1:s==="idle"?1:l==="idle"?-1:0),n=Object.values(o).reduce((s,l)=>(l.clientInfo.client!=="unknown"&&(s[l.clientInfo.client]=l.status),s),{}),{clientStatuses:i}=fo.getState();i[Yt.getId()]=n}}function ik({userId:e}){let t=C.getUser(e);if(!t||t.bot)return[];yw(t);let o=fo.getClientStatus(t.id);return o?Object.entries(o).map(([n,i])=>({key:`vc-platform-indicator-${n}`,component:()=>r("span",{className:"vc-platform-indicator"},r(hw,{key:n,platform:n,status:i,small:!1}))})):[]}var fw=({user:e,small:t=!1})=>{yw(e);let o=ie([fo],()=>fo.getClientStatus(e.id));if(!o)return null;let n=Object.entries(o).map(([i,s])=>r(hw,{key:i,platform:i,status:s,small:t}));return n.length?r("span",{className:"vc-platform-indicator",style:{gap:"2px"}},n):null},gw={getBadges:ik,position:0},wv={list:{description:"In the member list",onEnable:()=>Vi("platform-indicator",({user:e})=>e&&!e.bot?r(fw,{user:e,small:!0}):null),onDisable:()=>es("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>ul(gw),onDisable:()=>pl(gw)},messages:{description:"Inside messages",onEnable:()=>ts("platform-indicator",e=>{let t=e.message?.author;return t&&!t.bot?r(fw,{user:e.message?.author}):null}),onDisable:()=>os("platform-indicator")}},bf=h({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[m.kemo,m.TheSun,m.Nuckyz,m.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=$.plugins.PlatformIndicators;Object.entries(wv).forEach(([t,o])=>{e[t]&&o.onEnable()})},stop(){Object.entries(wv).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>$.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:()=>$.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,\{.{0,15}isMobile:(\i))/,replace:'$2?"online":$1'},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>$.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(wv).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}}});a();S();v();var vw=e=>ra.getDraft(e,Ht.ChannelMessage),sk=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),ak=async e=>await Promise.all(ni.getUploads(e,Ht.ChannelMessage).map(async t=>{let{isImage:o,filename:n,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:sc(),filename:i?"SPOILER_"+n:n,content_type:void 0,size:t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let u=await sk(l);if(!u)return c;c.width=u.width,c.height=u.height}return c})),bw=({height:e=20,width:t=20,className:o})=>r("svg",{fill:"currentColor",fillRule:"evenodd",width:t,height:e,className:o,viewBox:"0 0 24 24",style:{scale:"1.096",translate:"0 -1px"}},r("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"})),lk=({isAnyChat:e,isEmpty:t,type:{attachments:o},channel:{id:n}})=>{let i=ie([ra],()=>vw(n));if(!e)return null;let s=o&&ni.getUploads(n,Ht.ChannelMessage).length>0;return!(!t&&i?.length>0)&&!s?null:r(kr,{tooltip:"Preview Message",onClick:async()=>Nt(n,{content:vw(n),author:C.getCurrentUser(),attachments:s?await ak(n):void 0}),buttonProps:{style:{translate:"0 2px"}}},r(bw,null))},Sf=h({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[m.Aria],startAt:"Init",chatBarButton:{icon:bw,render:lk}});a();S();se();v();function Sw({height:e=24,width:t=24,className:o="icon"}){return r("svg",{className:o,height:e,width:t,viewBox:"0 0 24 24",fill:"currentColor"},r("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"}))}var xf=h({name:"QuickMention",authors:[m.kemo],description:"Adds a quick mention button to the message actions bar",messagePopoverButton:{icon:Sw,render(e){let t=Q.getChannel(e.channel_id);return t.guild_id&&!Ie.can(me.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:Sw,message:e,channel:t,onClick:()=>Ui(`<@${e.author.id}> `)}}}});a();S();v();var au=null,lu=null;var Iv=x({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention plugin (if enabled)",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]},ignoreBlockedAndIgnored:{type:3,description:"Ignore messages by blocked/ignored users when navigating",default:!0}}),Tf=h({name:"QuickReply",authors:[m.fawn,m.Ven,m.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:Iv,start(){document.addEventListener("keydown",xw)},stop(){document.removeEventListener("keydown",xw)},flux:{DELETE_PENDING_REPLY(){au=null},MESSAGE_END_EDIT(){lu=null},CHANNEL_SELECT(){au=null,lu=null},MESSAGE_START_EDIT:ck,CREATE_PENDING_REPLY:uk}});function ck({messageId:e,_isQuickEdit:t}){t||(lu=e)}function uk({message:e,_isQuickReply:t}){t||(au=e.id)}var pk=e=>wo?e.metaKey:e.ctrlKey,dk=e=>e.altKey||!wo&&e.metaKey;function xw(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!pk(e)||dk(e)||(e.preventDefault(),e.shiftKey?gk(t):fk(t))}function Tw(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let n=Math.max(document.documentElement.clientHeight,window.innerHeight),i=o.getBoundingClientRect();(i.bottom<150||i.top-n>=-150)&&Xt.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function ww(e,t){let o=Kt.getMessages(Ge.getChannelId())._array,n=C.getCurrentUser().id,i=ke(Ps.name);o=o.filter(l=>!(l.deleted||!t&&l.author.id!==n||!ec.REPLYABLE.has(l.type)||l.hasFlag(64)||Iv.store.ignoreBlockedAndIgnored&&Pe.isBlockedOrIgnored(l.author.id)||i&&Ps.shouldIgnoreMessage(l)));let s=l=>{if(l===null)return o[o.length-1];let c=o.findIndex(d=>d.id===l);if(c===-1)return o[o.length-1];let u=e?c-1:c+1;return o[u]??null};if(t){let l=s(au);return au=l?.id??null,l}else{let l=s(lu);return lu=l?.id??null,l}}function mk(e){switch(Iv.store.shouldMention){case 2:return ke(rn.name)?rn.shouldMention(e,!1):!0;case 0:return!1;default:return!0}}function fk(e){let t=Q.getChannel(Ge.getChannelId());if(t.guild_id&&!Ie.can(me.SEND_MESSAGES,t))return;let o=ww(e,!0);if(!o)return void L.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ge.getChannelId()});let n=Q.getChannel(o.channel_id),i=C.getCurrentUser().id;L.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:o,shouldMention:mk(o),showMentionToggle:!n.isPrivate()&&o.author.id!==i,_isQuickReply:!0}),Uo.dispatchToLastSubscribed("TEXTAREA_FOCUS"),Tw(n.id,o.id)}function gk(e){let t=Q.getChannel(Ge.getChannelId());if(t.guild_id&&!Ie.can(me.SEND_MESSAGES,t))return;let o=ww(e,!1);if(!o)return L.dispatch({type:"MESSAGE_END_EDIT",channelId:Ge.getChannelId()});L.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),Tw(o.channel_id,o.id)}a();S();v();var Pv,wf=h({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[m.Cyn,m.maisymoe],patches:[{find:"React has blocked a javascript: URL as a security precaution.",replacement:{match:/"https:\/\/react.dev\/errors\/"\+\i;/,replace:"$&const vcDecodedError=$self.decodeError(...arguments);if(vcDecodedError)return vcDecodedError;"}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${ye.version}/scripts/error-codes/codes.json`;Pv=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
`,t))},stop(){Pv=void 0},decodeError(e,...t){let o=0;return Pv?.[e]?.replace(/%s/g,()=>{let n=t[o];return o++,n})}});a();var Nv={};rt(Nv,{ServerListRenderPosition:()=>If,addServerListElement:()=>cu,removeServerListElement:()=>uu,renderAll:()=>vk});a();var If=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(If||{}),hk=new Set,yk=new Set;function Mv(e){return e===0?hk:yk}function cu(e,t){Mv(e).add(t)}function uu(e,t){Mv(e).delete(t)}var vk=e=>Array.from(Mv(e),(t,o)=>r(M,{noop:!0,key:o},r(t,null)));Po();S();v();function bk(){let e=[];Object.values(Ne.getGuilds()).forEach(t=>{Xr.getChannels(t.id).SELECTABLE.concat(Xr.getChannels(t.id).VOCAL).concat(Object.values(Zl.getActiveJoinedThreadsForGuild(t.id)).flatMap(o=>Object.values(o))).forEach(o=>{ri.hasUnread(o.channel.id)&&e.push({channelId:o.channel.id,messageId:ri.lastMessageId(o.channel.id),readStateType:0})})}),L.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var Sk=()=>r(ju,{variant:"secondary",onClick:bk,className:"vc-ranb-button"},"Read All"),Pf=h({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[m.kemo],dependencies:["ServerListAPI"],renderReadAllButton:M.wrap(Sk,{noop:!0}),start(){cu(0,this.renderReadAllButton)},stop(){uu(0,this.renderReadAllButton)}});a();S();a();se();v();a();var Ho=x({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}});a();se();F();v();var Cv=gt("GuildAvailabilityStore"),Ea=new Map,Fa=new Map,Ns={friends:[],requests:[]},Iw=()=>`relationship-notifier-guilds-${C.getCurrentUser().id}`,Pw=()=>`relationship-notifier-groups-${C.getCurrentUser().id}`,Mw=()=>`relationship-notifier-friends-${C.getCurrentUser().id}`;async function Tk(){L1(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function kv(){if(await Tk(),C.getCurrentUser()==null)return;let[e,t,o]=await R1([Iw(),Pw(),Mw()]);if(await Promise.all([Mf(),Nf(),pu()]),Ho.store.offlineRemovals){if(Ho.store.groups&&t?.size)for(let[n,i]of t)Fa.has(n)||Fn(`You are no longer in the group ${i.name}.`,i.iconURL);if(Ho.store.servers&&e?.size)for(let[n,i]of e)!Ea.has(n)&&!Cv.isUnavailable(n)&&Fn(`You are no longer in the server ${i.name}.`,i.iconURL);if(Ho.store.friends&&o?.friends.length)for(let n of o.friends){if(Ns.friends.includes(n))continue;let i=await po.getUser(n).catch(()=>{});i&&Fn(`You are no longer friends with ${vn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Qo(i.id))}if(Ho.store.friendRequestCancels&&o?.requests?.length)for(let n of o.requests){if(Ns.requests.includes(n)||[1,2,4].includes(Pe.getRelationshipType(n)))continue;let i=await po.getUser(n).catch(()=>{});i&&Fn(`Friend request from ${vn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Qo(i.id))}}}function Fn(e,t,o){Ho.store.notices&&kn(e,"OK",()=>us()),qe({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function Nw(e){return Ea.get(e)}function Av(e){Ea.delete(e),Mf()}async function Mf(){Ea.clear();let e=C.getCurrentUser().id;for(let[t,{name:o,icon:n}]of Object.entries(Ne.getGuilds()))Te.isMember(t,e)&&Ea.set(t,{id:t,name:o,iconURL:n&&`https://cdn.discordapp.com/icons/${t}/${n}.png`});await Wt(Iw(),Ea)}function Cw(e){return Fa.get(e)}function Rv(e){Fa.delete(e),Nf()}async function Nf(){Fa.clear();for(let{type:e,id:t,name:o,rawRecipients:n,icon:i}of Q.getSortedPrivateChannels())e===3&&Fa.set(t,{id:t,name:o||n.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await Wt(Pw(),Fa)}async function pu(){Ns.friends=[],Ns.requests=[];let e=Pe.getMutableRelationships();for(let[t,o]of e)switch(o){case 1:Ns.friends.push(t);break;case 3:Ns.requests.push(t);break}await Wt(Mw(),Ns)}var Dv,Lv,Ov,kw=e=>Dv=e,Aw=e=>Lv=e,Rw=e=>Ov=e;async function Dw({relationship:{type:e,id:t}}){if(Dv===t){Dv=void 0;return}let o=await po.getUser(t).catch(()=>null);if(o)switch(e){case 1:Ho.store.friends&&Fn(`${vn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Qo(o.id));break;case 3:Ho.store.friendRequestCancels&&Fn(`A friend request from ${vn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Qo(o.id));break}}function Lw({guild:{id:e,unavailable:t}}){if(!Ho.store.servers||t||Cv.isUnavailable(e))return;if(Lv===e){Av(e),Lv=void 0;return}let o=Nw(e);o&&(Av(e),Fn(`You were removed from the server ${o.name}.`,o.iconURL))}function Ow({channel:{id:e,type:t}}){if(!Ho.store.groups||t!==3)return;if(Ov===e){Rv(e),Ov=void 0;return}let o=Cw(e);o&&(Rv(e),Fn(`You were removed from the group ${o.name}.`,o.iconURL))}var Cf=h({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[m.nick],settings:Ho,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:Mf,GUILD_DELETE:Lw,CHANNEL_CREATE:Nf,CHANNEL_DELETE:Ow,RELATIONSHIP_ADD:pu,RELATIONSHIP_UPDATE:pu,RELATIONSHIP_REMOVE(e){Dw(e),pu()},CONNECTION_OPEN:kv},async start(){setTimeout(()=>{kv()},5e3)},removeFriend:kw,removeGroup:Rw,removeGuild:Aw});a();S();v();var Bw={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=",Startpage:"https://www.startpage.com/sp/search?query="};var Uw=x({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="},replacementEngine:{description:"Replace with a specific search engine instead of adding a menu",type:4,options:[{label:"Off",value:"off",default:!0},{label:"Custom Engine",value:"custom"},...Object.keys(Bw).map(e=>({label:e,value:e}))]}});function _w(e,t){open(t+encodeURIComponent(e.trim()),"_blank")}function wk(e){let{customEngineName:t,customEngineURL:o,replacementEngine:n}=Uw.store,i=!!(t&&o),s=n!=="off"&&!(n==="custom"&&!i),l={...Bw};if(i&&(l[t]=o),s){let c=n==="custom"&&i?t:n;return r(P.MenuItem,{label:`Search with ${c}`,key:"search-custom-engine",id:"vc-search-custom-engine",action:()=>_w(e,l[c])})}return r(P.MenuItem,{label:"Search Text",key:"search-text",id:"vc-search-text"},Object.keys(l).map(c=>{let u="vc-search-content-"+c;return r(P.MenuItem,{key:u,id:u,label:r(Y,{gap:"0.5em",alignItems:"center"},r("img",{style:{borderRadius:"50%"},"aria-hidden":"true",height:16,width:16,src:`https://icons.duckduckgo.com/ip3/${new URL(l[c]).hostname}.ico`}),c),action:()=>_w(e,l[c])})}))}var Ik=(e,t)=>{let o=document.getSelection()?.toString();if(!o)return;let n=ze("search-google",e);if(n){let i=n.findIndex(s=>s?.props?.id==="search-google");i!==-1&&(n[i]=wk(o))}},kf=h({name:"ReplaceGoogleSearch",description:"Replaces the Google search with different Engine(s)",authors:[m.Moxxie,m.Ethan],settings:Uw,contextMenus:{message:Ik}});a();S();F();v();var Pk=Z("separator","latin24CompactTimeStamp");function Ew(e){return r("i",{className:Pk.separator,"aria-hidden":!0,...e})}function Mk({referencedMessage:e,baseMessage:t}){if(e.state!==0)return null;let o=e.message.timestamp,n=t.timestamp;return r(ro,{className:"vc-reply-timestamp",compact:ai.isSameDay(o,n),timestamp:o,isInline:!1},r(Ew,null,"["),ai.isSameDay(o,n)?ai.dateFormat(o,"LT"):ai.calendarFormat(o),r(Ew,null,"]"))}var Af=h({name:"ReplyTimestamp",description:"Shows a timestamp on replied-message previews",authors:[m.Kyuuhachi],patches:[{find:"#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}",replacement:{match:/\.onClickReply,.+?}\),(?=\i,\i,\i\])/,replace:"$&$self.ReplyTimestamp(arguments[0]),"}}],ReplyTimestamp:M.wrap(Mk,{noop:!0})});a();S();F();var Nk=Z("spoilerContent","hidden"),Ck=Z("messagesWrapper","navigationDescription"),Rf=h({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[m.whqwert],patches:[{find:".removeObscurity,",replacement:{match:/(?<=removeObscurity(?:",|=)(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,metaKey:o,shiftKey:n,target:i}=e;if(!(wo?o:t))return;let{spoilerContent:s,hidden:l}=Nk,{messagesWrapper:c}=Ck,u=n?document.querySelector(`div.${c}`):i.parentElement;for(let d of u.querySelectorAll(`span.${s}.${l}`))d.click()}});a();He();S();v();var Df={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=",Bing:"https://www.bing.com/images/search?view=detailv2&iss=sbi&q=imgurl:",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};function Fw(e,t){open(t+encodeURIComponent(e),"_blank")}function $w(e){return r(P.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Df).map((t,o)=>{let n="search-image-"+t;return r(P.MenuItem,{key:n,id:n,label:r(Y,{alignItems:"center",gap:"0.5em"},r("img",{style:{borderRadius:"50%"},"aria-hidden":"true",height:16,width:16,src:`https://icons.duckduckgo.com/ip3/${new URL(Df[t]).host}.ico`}),t),action:()=>Fw(e,Df[t])})}),r(P.MenuItem,{key:"search-image-all",id:"search-image-all",label:r(Y,{alignItems:"center",gap:"0.5em"},r(ar,{height:16,width:16}),"All"),action:()=>Object.values(Df).forEach(t=>Fw(e,t))}))}var kk=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;ze("copy-link",e)?.push($w(o))},Ak=(e,t)=>{if(!t?.src)return;(ze("copy-native-link",e)??e).push($w(t.src))},Lf=h({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[m.Ven,m.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:kk,"image-context":Ak}});a();He();to();Qs();S();re();dt();F();v();a();le();$e();v();var Gw="rdb-auth",Tt={};async function _v(){Tt=await Hw()??{}}async function Hw(){return(await zt(Gw))?.[C.getCurrentUser()?.id]}async function $n(){return(await Hw())?.token}async function du(e){return cr(Gw,t=>(t??={},Tt=t[C.getCurrentUser().id]??={},e.token&&(Tt.token=e.token),e.user&&(Tt.user=e.user),t))}function $a(e){ue(t=>r(Wi,{...t,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async o=>{try{let n=new URL(o.location);n.searchParams.append("clientMod","vencord");let i=await fetch(n,{headers:{Accept:"application/json"}});if(!i.ok){let{message:l}=await i.json();_e(l||"An error occured while authorizing",j.Type.FAILURE);return}let{token:s}=await i.json();du({token:s}),_e("Successfully logged in!",j.Type.SUCCESS),e?.()}catch(n){new B("ReviewDB").error("Failed to authorize",n)}}}))}a();a();v();a();a();Po();se();a();a();we();v();var mt=q("vc-rdb-");function zw(e,t){let o=C.getCurrentUser().id;return o===e||t.sender.discordID===o||Tt.user?.type===1}function Ww(e,t){let o=C.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function jw(e){return e.sender.discordID!==C.getCurrentUser().id}function So(e,t=j.Type.MESSAGE){j.show({id:j.genId(),message:e,type:t,options:{position:j.Position.BOTTOM}})}le();$e();dt();v();function Rk(e){return r(V,{text:"Unblock user"},t=>r("div",{...t,role:"button",onClick:e.onClick,className:mt("block-modal-unblock")},r("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"var(--status-danger)"},r("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 Dk({user:e,isBusy:t,setIsBusy:o}){let[n,i]=A(!1);return n?null:r("div",{className:mt("block-modal-row")},r("img",{className:mt("block-modal-avatar"),src:e.profilePhoto,alt:""}),r(T.FormText,{className:mt("block-modal-username")},e.username),r(Rk,{onClick:t?void 0:async()=>{o(!0);try{await _f(e.discordID),i(!0)}finally{o(!1)}}}))}function Lk(){let[e,t]=A(!1),[o,n,i]=pt(qw,{onError:s=>new B("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:n?r(T.FormText,null,"Failed to fetch blocks: $",String(n)):o.length?r(p,null,o.map(s=>r(Dk,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):r(T.FormText,null,"No blocked users.")}function Of(){ue(e=>r(ge,{...e},r(Ce,{className:mt("block-modal-header")},r(T.FormTitle,{style:{margin:0}},"Blocked Users"),r(Ke,{onClick:e.onClose})),r(xe,{className:mt("block-modal")},Tt.token?r(Lk,null):r(T.FormText,null,"You are not logged into ReviewDB!"))))}var Gn=x({authorize:{type:6,component:()=>r(et,{onClick:()=>$a()},"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:()=>r("div",{className:mt("button-grid")},r(et,{onClick:Of},"Manage Blocked Users"),r(et,{variant:"positive",onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),r(et,{variant:"link",onClick:async()=>{let e="https://reviewdb.mantikafasi.dev",t=await $n();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),r(et,{variant:"link",onClick:()=>hn("eWPBSbvznt")},"ReviewDB Support Server"))}}).withPrivateSettings();var Kw="https://manti.vendicated.dev/api/reviewdb",Bf=50,Ok=2;async function Cs(e,t={}){return fetch(Kw+e,{...t,headers:{...t.headers,Authorization:await $n()||""}})}async function Uf(e,{limit:t,offset:o=0}={}){let n=0;Gn.store.showWarning||(n|=Ok);let i=new URLSearchParams;n&&i.append("flags",String(n)),o&&i.append("offset",String(o)),t&&i.append("limit",String(t));let s=await fetch(`${Kw}/users/${e}/reviews?${i}`),l=s.ok?await s.json():{message:s.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,hasOptedOut:!1};return s.ok?l:(So(l.message,j.Type.FAILURE),{...l,reviews:[{id:0,comment:l.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 Yw(e){return await $n()?await Cs(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let n=await o.json();return So(n.message),o.ok?n:null}):(So("Please authorize to add a review."),$a(),null)}async function Zw(e){return await Cs(`/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 So(o.message),t.ok?o:null})}async function Qw(e){let t=await Cs("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());So(t.message)}async function Jw(e,t){if(!(await Cs("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)So(`Failed to ${e} user`,j.Type.FAILURE);else if(So(`Successfully ${e}ed user`,j.Type.SUCCESS),Tt?.user?.blockedUsers){let n=e==="block"?[...Tt.user.blockedUsers,t]:Tt.user.blockedUsers.filter(i=>i!==t);du({user:{...Tt.user,blockedUsers:n}})}}var Xw=e=>Jw("block",e),_f=e=>Jw("unblock",e);async function qw(){let e=await Cs("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function Vw(e){return Cs("/users",{method:"POST"}).then(t=>t.json())}async function e5(e){return Cs(`/notifications?id=${e}`,{method:"PATCH"})}$e();dt();v();a();se();re();F();v();a();He();re();F();v();var Ef=Z("button","wrapper","disabled","separator","dangerous");function t5({onClick:e}){return r(V,{text:"Delete Review"},t=>r("div",{...t,className:R(Ef.button,Ef.dangerous),onClick:e,role:"button"},r(Yr,{width:"20",height:"20"})))}function o5({onClick:e}){return r(V,{text:"Report Review"},t=>r("div",{...t,className:Ef.button,onClick:e,role:"button"},r("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},r("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 r5({onClick:e,isBlocked:t}){return r(V,{text:`${t?"Unblock":"Block"} user`},o=>r("div",{...o,className:Ef.button,onClick:e,role:"button"},r("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"currentColor"},t?r("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"}):r("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"}))))}a();v();function Ff(e){let t=e.redirectURL?Kl:o=>r("span",{...o,role:"button"},o.children);return r(V,{text:e.name},({onMouseEnter:o,onMouseLeave:n})=>r(t,{className:mt("blocked-badge"),href:e.redirectURL,onClick:e.onClick},r("img",{className:mt("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:n,src:e.icon,alt:e.description})))}var mu=Z("cozyMessage","message","groupStart","buttons","buttonsInner"),n5=Z("container","isHeader"),Ga=Z("avatar","wrapper","cozy","clickable","username"),_k=Z("button","wrapper","selected"),fu=Z("botTagVerified","botTagRegular","botText","px","rem"),Bk=new Intl.DateTimeFormat;function gu({review:e,refetch:t,profileId:o}){let[n,i]=A(!1);function s(){Qo(e.sender.discordID)}function l(){Ee.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await $n())Zw(e.id).then(f=>{f&&t()});else return So("You must be logged in to delete reviews.")}})}function c(){Ee.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await $n())Qw(e.id);else return So("You must be logged in to report reviews.")}})}let u=Tt?.user?.blockedUsers?.includes(e.sender.discordID)??!1;function d(){if(u)return _f(e.sender.discordID);Ee.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 $n())Xw(e.sender.discordID);else return So("You must be logged in to block users.")}})}return r("div",{className:R(mt("review"),mu.cozyMessage,Ga.wrapper,mu.message,mu.groupStart,Ga.cozy),style:{marginLeft:"0px",paddingLeft:"52px"}},r("img",{className:R(Ga.avatar,Ga.clickable),onClick:s,src:e.sender.profilePhoto||at.getDefaultAvatarURL(e.sender.discordID),style:{left:"0px",zIndex:0},onError:f=>f.currentTarget.src=at.getDefaultAvatarURL(e.sender.discordID)}),r("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},r("span",{className:R(Ga.clickable,Ga.username),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>s()},e.sender.username),e.type===3&&r("span",{className:R(fu.botTagVerified,fu.botTagRegular,fu.px,fu.rem),style:{marginLeft:"4px"}},r("span",{className:fu.botText},"System"))),u&&r(Ff,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>Of()}),e.sender.badges.map((f,g)=>r(Ff,{key:g,...f})),!Gn.store.hideTimestamps&&e.type!==3&&r(ro,{timestamp:new Date(e.timestamp*1e3)},Bk.format(e.timestamp*1e3)),r("div",{className:mt("review-comment")},e.comment.length>200&&!n?r(p,null,Me.parseGuildEventDescription(e.comment.substring(0,200)),"...",r("br",null),r("a",{onClick:()=>i(!0)},"Read more"),"]"):Me.parseGuildEventDescription(e.comment)),e.id!==0&&r("div",{className:R(n5.container,n5.isHeader,mu.buttons),style:{padding:"0px"}},r("div",{className:R(_k.wrapper,mu.buttonsInner)},jw(e)&&r(o5,{onClick:c}),Ww(o,e)&&r(r5,{isBlocked:u,onClick:d}),zw(o,e)&&r(t5,{onClick:l}))))}a();dt();F();v();var Uk=X("insertNodes","textToText"),i5=X("start","end","toSlateRange"),Ek=X("FORM","USER_PROFILE"),Fk=he("editorClassName","CHANNEL_TEXT_AREA"),$k=fe(".GUILD_TEXT]","fromServer)");function Uv({discordId:e,name:t,onFetchReviews:o,refetchSignal:n,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:c=!1,type:u}){let[d,f]=Ko(!0),[g]=pt(()=>Uf(e,{offset:(s-1)*Bf}),{fallbackValue:null,deps:[n,d,s],onSuccess:y=>{Gn.store.hideBlockedUsers&&(y.reviews=y.reviews?.filter(b=>!Pe.isBlocked(b.sender.discordID))),y.reviews.reverse(),i?.(),o(y)}});return g?r(p,null,r(Gk,{refetch:f,reviews:g.reviews,hideOwnReview:c,profileId:e,type:u}),l&&r(Ev,{name:t,discordId:e,refetch:f,isAuthor:g.reviews?.some(y=>y.sender.discordID===C.getCurrentUser().id)})):null}function Gk({refetch:e,reviews:t,hideOwnReview:o,profileId:n,type:i}){let s=C.getCurrentUser().id;return r("div",{className:mt("view")},t?.map(l=>(l.sender.discordID!==s||!o)&&r(gu,{key:l.id,review:l,refetch:e,profileId:n})),t?.length===0&&r(T.FormText,{className:mt("placeholder")},"Looks like nobody reviewed this ",i===0?"user":"server"," yet. You could be the first!"))}function Ev({discordId:e,isAuthor:t,refetch:o,name:n,modalKey:i}){let{token:s}=Tt,l=st(null),c=Ek.USER_PROFILE_REPLY;c.disableAutoFocus=!0;let u=$k({id:"0",type:1});return r(p,null,r("div",{onClick:()=>{s||(So("Opening authorization window..."),$a())}},r(Fk,{className:mt("input"),channel:u,placeholder:s?t?`Update review for @${n}`:`Review @${n}`:"You need to authorize to review users!",type:c,disableThemedBackground:!0,setEditorRef:d=>l.current=d,parentModalKey:i,textValue:"",onSubmit:async d=>{if(await Yw({userid:e,comment:d.value})){o();let g=l.current.ref.current.getSlateEditor();Uk.delete(g,{at:{anchor:i5.start(g,[]),focus:i5.end(g,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}function Hk({modalProps:e,modalKey:t,discordId:o,name:n,type:i}){let[s,l]=A(),[c,u]=Ko(!0),[d,f]=A(1),g=st(null),y=s?.reviewCount,b=s?.reviews.find(I=>I.sender.discordID===Tt.user?.discordID);return r(M,null,r(ge,{...e,size:"medium"},r(Ce,null,r(G,{variant:"heading-lg/semibold",className:mt("modal-header")},n,"'s Reviews",!!y&&r("span",null," (",y," Reviews)")),r(Ke,{onClick:e.onClose})),r(xe,{scrollerRef:g},r("div",{className:mt("modal-reviews")},r(Uv,{discordId:o,name:n,page:d,refetchSignal:c,onFetchReviews:l,scrollToTop:()=>g.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0,type:i}))),r(ht,{className:mt("modal-footer")},r("div",{className:mt("modal-footer-wrapper")},b&&r(gu,{refetch:u,review:b,profileId:o}),r(Ev,{isAuthor:b!=null,discordId:o,name:n,refetch:u,modalKey:t}),!!y&&r(c1,{currentPage:d,maxVisiblePages:5,pageSize:Bf,totalCount:y,onPageChange:f})))))}function $f(e,t,o){let n="vc-rdb-modal-"+Date.now();ue(i=>r(Hk,{modalKey:n,modalProps:i,discordId:e,name:t,type:o}),{modalKey:n})}var zk=Z("widgetPreviews"),Gf=Z("cardsList","firstCardContainer","card","container"),ks=Z("innerContainer","icons","icon","displayCount","displayCountText","displayCountTextColor","breadcrumb"),Wk=Z("overlay","isPrivate","outer"),s5=(e,{guild:t})=>{t&&e.push(r(P.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:ar,action:()=>$f(t.id,t.name,1)}))},Fv=(e,{user:t})=>{t&&e.push(r(P.MenuItem,{label:"View Reviews",id:"vc-rdb-user-reviews",icon:ar,action:()=>$f(t.id,t.username,0)}))},Hf=h({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[m.mantikafasi,m.Ven],settings:Gn,contextMenus:{"guild-header-popout":s5,"guild-context":s5,"user-context":Fv,"user-profile-actions":Fv,"user-profile-overflow-menu":Fv},patches:[{find:".SIDEBAR,disableToolbar:",replacement:{match:/user:(\i),widgets:.{0,100}?\}\),/,replace:"$&$self.renderProfileComponent({user:$1,isSideBar:true}),"}},{find:/\.POPOUT,onClose:\i}\),nicknameIcons:.+?\.isProvisional/,replacement:{match:/user:(\i),widgets:.{0,100}?\}\),/,replace:"$&$self.renderProfileComponent({user:$1}),"}}],flux:{CONNECTION_OPEN:_v},async start(){let e=Gn.store,{lastReviewId:t,notifyReviews:o}=e;await _v(),setTimeout(async()=>{if(!Tt.token)return;let n=await Vw(Tt.token);if(du({user:n}),o&&t&&t<n.lastReviewID&&(e.lastReviewId=n.lastReviewID,n.lastReviewID!==0&&So("You have new reviews on your profile!")),n.notification){let i=n.notification.type===1?{cancelText:"Appeal",confirmText:"Ok",onCancel:async()=>VencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:Tt.token,page:"dashboard/appeal"}))}:{};Ee.show({title:n.notification.title,body:Me.parse(n.notification.content,!1),...i}),e5(n.notification.id)}},4e3)},renderProfileComponent:M.wrap(({user:e,isSideBar:t=!1})=>{let[o]=pt(()=>Uf(e.id,{limit:4}),{deps:[e.id],fallbackValue:null}),n=r("section",{className:Gf.container},r("ul",{className:Gf.cardsList,tabIndex:-1},r("li",{className:Gf.firstCardContainer},r(oo,{className:R(ks.breadcrumb,o?.hasOptedOut&&mt("profile-popout-disabled")),onClick:()=>!o?.hasOptedOut&&$f(e.id,e.username,0)},r("div",{className:R(Wk.overlay,ks.innerContainer,Gf.card)},r(ee,{size:t?"sm":"xs",weight:"medium"},"User Reviews"),o?.reviewCount?r("div",{className:ks.icons},o.reviews.filter(i=>i.id!==0).slice(0,4).reverse().map((i,s)=>{let l=s===3&&o.reviewCount>4;return r("div",{className:ks.icon,key:i.id},r("img",{src:i.sender.profilePhoto,alt:i.sender.username,className:l?ks.displayCount:void 0,onError:c=>c.currentTarget.src=at.getDefaultAvatarURL(i.sender.discordID)}),l&&r("div",{className:ks.displayCountText},r(wr,{className:ks.displayCountTextColor,size:"xs",weight:"medium",defaultColor:!1},"+",o.reviewCount-3)))})):r(ee,{size:t?"sm":"xs"},o?.hasOptedOut?"User opted out":"No reviews yet"))))));return t?r("div",{className:zk.widgetPreviews},n):n},{noop:!0})});a();S();le();F();v();var jk=fe('"Result cannot be null because the message is not null"'),nn=x({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:er(0,100,10),default:30}}),zf=h({name:"RoleColorEverywhere",authors:[m.KingFish,m.lewisakura,m.AutumnVN,m.Kyuuhachi,m.jamesbt365],description:"Adds the top role color anywhere possible",settings:nn,patches:[{find:".USER_MENTION)",replacement:[{match:/(?<=user:(\i),guildId:([^,]+?),.{0,100}?children:\i=>\i)\((\i)\)/,replace:"({...$3,color:$self.getColorInt($1?.id,$2)})"}],predicate:()=>nn.store.chatMentions},{find:'"text":"locked"',replacement:[{match:/let\{id:(\i),guildId:\i,channelId:(\i)[^}]*\}.*?\.\i,{(?=children)/,replace:"$&color:$self.getColorInt($1,$2),"}],predicate:()=>nn.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/(#{intl::CHANNEL_MEMBERS_A11Y_LABEL}.+}\):null,).{0,100}?— ",\i\]\}\)\]/,replace:(e,t)=>`${t}$self.RoleGroupColor(arguments[0])]`}],predicate:()=>nn.store.memberList},{find:"#{intl::THREAD_BROWSER_PRIVATE}",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.RoleGroupColor(arguments[0])]"}],predicate:()=>nn.store.memberList},{find:"#{intl::GUEST_NAME_SUFFIX})]",replacement:[{match:/#{intl::GUEST_NAME_SUFFIX}.{0,50}?""\](?<=guildId:(\i),.+?user:(\i).+?)/,replace:"$&,style:$self.getColorStyle($2.id,$1),"}],predicate:()=>nn.store.voiceUsers},{find:"MessageReactions.render:",replacement:{match:/tag:"strong",variant:"text-md\/(?:medium|normal)"(?<=onContextMenu:.{0,15}\((\i),(\i),\i\).+?)/,replace:"$&,style:$self.getColorStyle($2?.id,$1?.channel?.id)"},predicate:()=>nn.store.reactorsList},{find:",reactionVoteCounts",replacement:{match:/\.SIZE_32.+?variant:"text-md\/normal",className:\i\.\i,(?="aria-label":)/,replace:"$&style:$self.getColorStyle(arguments[0]?.user?.id,arguments[0]?.channel?.id),"},predicate:()=>nn.store.pollResults},{find:".SEND_FAILED,",replacement:{match:/(?<=\]:(\i)\.isUnsupported.{0,50}?,)(?=children:\[)/,replace:"style:$self.useMessageColorsStyle($1),"},predicate:()=>nn.store.colorChatMessages}],getColorString(e,t){try{let o=Q.getChannel(t)?.guild_id??Ne.getGuild(t)?.id;return o==null?null:Te.getMember(o,e)?.colorString??null}catch(o){new B("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}=nn.use(["messageSaturation"]),o=jk(e);if(e.state==="SEND_FAILED")return;if(o.colorString!=null&&t!==0){let n=`color-mix(in oklab, ${o.colorString} ${t}%, var({DEFAULT}))`;return{color:n.replace("{DEFAULT}","--text-default"),"--text-strong":n.replace("{DEFAULT}","--text-strong"),"--text-muted":n.replace("{DEFAULT}","--text-muted")}}}catch(t){new B("RoleColorEverywhere").error("Failed to get message color",t)}return null},RoleGroupColor:M.wrap(({id:e,count:t,title:o,guildId:n,label:i})=>{let s=xt.getRole(n,e);return r("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},{noop:!0})});a();S();var a5=x({onlySnow:{type:3,description:"Only play the Snow Halation Theme",default:!1,restartNeeded:!0}}),Wf=h({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[m.AndrewDLO,m.FieryFlames,m.RamziAH],settings:a5,patches:[{find:'"call_ringing_beat"',replacement:[{match:/500!==\i\(\)\.random\(1,1e3\)/,replace:"false"},{predicate:()=>a5.store.onlySnow,match:/"call_ringing_beat",/,replace:""}]}]});a();S();se();F();v();var qk=X("allSummaries","findSummary"),Kk=fe(".people)),startId:",".type}"),l5=x({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}}),jf=h({name:"Summaries",description:"Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",authors:[m.mantikafasi],settings:l5,patches:[{find:"SUMMARIZEABLE.has",replacement:{match:/\i\.features\.has\(\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=>({...Kk(o),time:Date.now()}));cr("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 cr("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<Date.now()-1e3*60*60*24*l5.store.summaryExpiryThresholdDays&&e[t].splice(o,1);e[t].length===0&&delete e[t]}return Object.assign(qk.allSummaries(),e),e})},shouldFetch(e){let t=Q.getChannel(e),o=Ne.getGuild(t.guild_id);return Dl(o,"SUMMARIES_ENABLED_GA")}});a();S();we();se();$e();v();var c5=x({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});function u5(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),`<t:${Math.round(o)}:t>`)}var Yk=["","t","T","d","D","f","F","s","S","R"],Ni=q("vc-st-");function Zk({rootProps:e,close:t}){let[o,n]=A(),[i,s]=A(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(f,g)=>`<t:${f}${g&&`:${g}`}>`,[u,d]=ce(()=>{let f=c(l,i);return[f,Me.parse(f)]},[l,i]);return r(ge,{...e},r(Ce,{className:Ni("modal-header")},r(T.FormTitle,{tag:"h2",className:Ni("modal-title")},"Timestamp Picker"),r(Ke,{onClick:t,className:Ni("modal-close-button")})),r(xe,{className:Ni("modal-content")},r("input",{className:Ni("date-picker"),type:"datetime-local",value:o,onChange:f=>n(f.currentTarget.value),style:{colorScheme:qs()===2?"light":"dark"}}),r(T.FormTitle,null,"Timestamp Format"),r("div",{className:Ni("format-select")},r(mo,{options:Yk.map(f=>({label:f,value:f})),isSelected:f=>f===i,select:f=>s(f),serialize:f=>f,renderOptionLabel:f=>r("div",{className:Ni("format-label")},Me.parse(c(l,f.value))),renderOptionValue:()=>d})),r(T.FormTitle,{className:k.bottom8},"Preview"),r(T.FormText,{className:Ni("preview-text")},d," (",u,")")),r(ht,null,r(U,{onClick:()=>{Ui(u+" "),t()}},"Insert")))}var p5=({height:e=20,width:t=20,className:o})=>r("svg",{"aria-hidden":"true",role:"img",width:t,height:e,className:o,viewBox:"0 0 24 24",style:{scale:"1.2"}},r("g",{fill:"none",fillRule:"evenodd"},r("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"}),r("rect",{width:"24",height:"24"}))),Qk=({isAnyChat:e})=>e?r(kr,{tooltip:"Insert Timestamp",onClick:()=>{let t=ue(o=>r(Zk,{rootProps:o,close:()=>gn(t)}))},buttonProps:{"aria-haspopup":"dialog"}},r(p5,null)):null,qf=h({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[m.Ven,m.Tyler,m.Grzesiek11],settings:c5,chatBarButton:{icon:p5,render:Qk},onBeforeMessageSend(e,t){c5.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,u5))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return r(p,null,r(T.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),r(T.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),r(T.FormText,null,"Examples:",r("ul",null,e.map(t=>r("li",{key:t},r("code",null,t)," ","->"," ",Me.parse(u5(t)))))))}});a();S();v();a();we();se();re();$e();dt();F();v();var d5=Z("icon","acronym","childWrapper"),Jk=he("discriminatorClass:",".isMobileOnline","getAvatarURL"),io=q("vc-gp-");function f5(e){ue(t=>r(ge,{...t,size:"medium"},r(Xk,{guild:e})))}var hu={friends:!1,blocked:!1,ignored:!1};function m5(e){return r(ro,{timestamp:new Date(e)})}function Xk({guild:e}){let[t,o]=A(),[n,i]=A(),[s,l]=A();te(()=>{hu.friends=!1,hu.blocked=!1,hu.ignored=!1},[]);let[c,u]=A(0),d=e.banner&&at.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),f=e.icon&&at.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return r("div",{className:io("root")},d&&c===0&&r("img",{className:io("banner"),src:d,alt:"",onClick:()=>Zo({url:d,width:1024})}),r("div",{className:io("header")},f?r("img",{className:io("icon"),src:f,alt:"",onClick:()=>Zo({url:f,height:512,width:512})}):r("div",{"aria-hidden":!0,className:R(d5.childWrapper,d5.acronym)},Ks(e)),r("div",{className:io("name-and-description")},r(T.FormTitle,{tag:"h5",className:io("name")},e.name),e.description&&r(T.FormText,null,e.description))),r(Mo,{type:"top",look:"brand",className:io("tab-bar"),selectedItem:c,onItemSelect:u},r(Mo.Item,{className:io("tab",{selected:c===0}),id:0},"Server Info"),r(Mo.Item,{className:io("tab",{selected:c===1}),id:1},"Friends",t!==void 0?` (${t})`:""),r(Mo.Item,{className:io("tab",{selected:c===2}),id:2},"Blocked Users",n!==void 0?` (${n})`:""),r(Mo.Item,{className:io("tab",{selected:c===3}),id:3},"Ignored Users",s!==void 0?` (${s})`:"")),r("div",{className:io("tab-content")},c===0&&r(eA,{guild:e}),c===1&&r(tA,{guild:e,setCount:o}),c===2&&r(oA,{guild:e,setCount:i}),c===3&&r(rA,{guild:e,setCount:l})))}function Vk(e,t){let o=Te.getMember(e,t.id)?.avatar,n=o?at.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):at.getUserAvatarURL(t,!0);return r("div",{className:io("owner")},r("img",{className:io("owner-avatar"),src:n,alt:"",onClick:()=>Zo({url:n,height:512,width:512})}),Me.parse(`<@${t.id}>`))}function eA({guild:e}){let[t]=pt(()=>po.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?Vk(e.id,t):"Loading...","Created At":m5(No.extractTimestamp(e.id)),"Joined At":e.joinedAt?m5(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?r("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Server Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:Xr.getChannels(e.id)?.count-1||"?",Roles:xt.getSortedRoles(e.id).length-1};return r("div",{className:io("info")},Object.entries(o).map(([n,i])=>r("div",{className:io("server-info-pair"),key:n},r(T.FormTitle,{tag:"h5"},n),typeof i=="string"?r("span",null,i):i)))}function tA({guild:e,setCount:t}){return $v("friends",e,Pe.getFriendIDs(),t)}function oA({guild:e,setCount:t}){let o=Pe.getBlockedIDs();return $v("blocked",e,o,t)}function rA({guild:e,setCount:t}){let o=Pe.getIgnoredIDs();return $v("ignored",e,o,t)}function $v(e,t,o,n){let i=[],s=[];for(let l of o)Te.isMember(t.id,l)?s.push(l):i.push(l);return ie([Te],()=>Te.getMemberIds(t.id),null,(l,c)=>l.length===c.length),te(()=>{!hu[e]&&i.length&&(hu[e]=!0,L.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),te(()=>n(s.length),[s.length]),r(ti,{fade:!0,className:io("scroller")},s.map(l=>r(Jk,{key:l,user:C.getUser(l),status:fo.getStatus(l)||"offline",onSelect:()=>Qo(l),onContextMenu:()=>{}})))}var g5=(e,{guild:t})=>{ze("privacy",e)?.push(r(P.MenuItem,{id:"vc-server-info",label:"Server Info",action:()=>f5(t)}))},Kf=h({name:"ServerInfo",description:"Allows you to view info about a server",authors:[m.Ven,m.Nuckyz],dependencies:["DynamicImageModalAPI"],tags:["guild","info","ServerProfile"],contextMenus:{"guild-context":g5,"guild-header-popout":g5}});a();S();F();v();var h5=gt("UserGuildJoinRequestStore");function nA(){let e=ie([Pe,fo],()=>{let t=0,o=Pe.getFriendIDs();for(let n of o)(fo.getStatus(n)??"offline")!=="offline"&&t++;return t});return r("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--text-default)",textTransform:"uppercase",textAlign:"center"}},e," online")}function iA(){let e=ie([Ne,h5],()=>{let t=h5.computeGuildIds(),o=Ne.getGuilds();return Ne.getGuildCount()+t.filter(n=>o[n]==null).length});return r("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--text-default)",textTransform:"uppercase",textAlign:"center"}},e," servers")}var Yf=h({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[m.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}=$.plugins.ServerListIndicators;return r(M,{noop:!0},r("div",{style:{marginBottom:"4px"}},!!(e&2)&&r(nA,null),!!(e&1)&&r(iA,null)))},start(){cu(0,this.renderIndicator)},stop(){uu(0,this.renderIndicator)}});a();S();a();var y5=`/* eslint-disable simple-header/header */
import React from "react";
const handleClick = async () =>
console.log((await import("@utils/clipboard")).copyToClipboard("\\u200b"));
export const Example: React.FC<{
real: boolean,
shigged?: number,
}> = ({ real, shigged }) => <>
<p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
<button onClick={handleClick}>Click Me</button>
</>;`;a();a();v();var Zf={id:null,theme:null},Gv=new Set,v5=()=>{let[,e]=ye.useState(Zf);return ye.useEffect(()=>(Gv.add(e),()=>void Gv.delete(e)),[]),Zf};function Hv(e){Zf.id!==e.id&&(Object.assign(Zf,e),Gv.forEach(t=>t(e)))}a();var b5="https://cdn.jsdelivr.net/npm/@vap/shiki-worker@0.0.8/dist/index.min.js",S5="https://cdn.jsdelivr.net/npm/@vap/shiki@0.10.3/dist/onig.wasm";var A5=nh(M5());a();a();var Vv="shikijs/textmate-grammars-themes",eb="bc5436518111d87ea58eb56d97b3f9bec30e6b83",oe=e=>`https://cdn.jsdelivr.net/gh/${Vv}@${eb}/packages/tm-themes/themes/${e}.json`,zn={DarkPlus:oe("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",Andromeeda:oe("andromeeda"),AuroraX:oe("aurora-x"),AyuDark:oe("ayu-dark"),CatppuccinLatte:oe("catppuccin-latte"),CatppuccinFrappe:oe("catppuccin-frappe"),CatppuccinMacchiato:oe("catppuccin-macchiato"),CatppuccinMocha:oe("catppuccin-mocha"),DraculaSoft:oe("dracula-soft"),Dracula:oe("dracula"),EverforestDark:oe("everforest-dark"),EverforestLight:oe("everforest-light"),GithubDarkDefault:oe("github-dark-default"),GithubDarkDimmed:oe("github-dark-dimmed"),GithubDarkHighContrast:oe("github-dark-high-contrast"),GithubDark:oe("github-dark"),GithubLightDefault:oe("github-light-default"),GithubLightHighContrast:oe("github-light-high-contrast"),GithubLight:oe("github-light"),GruvBoxDarkHard:oe("gruvbox-dark-hard"),GruvBoxDarkMedium:oe("gruvbox-dark-medium"),GruvBoxDarkSoft:oe("gruvbox-dark-soft"),GruvBoxLightHard:oe("gruvbox-light-hard"),GruvBoxLightMedium:oe("gruvbox-light-medium"),GruvBoxLightSoft:oe("gruvbox-light-soft"),Houston:oe("houston"),KanagawaDragon:oe("kanagawa-dragon"),KanagawaLotus:oe("kanagawa-lotus"),KanagawaWave:oe("kanagawa-wave"),LaserWave:oe("laserwave"),LightPlus:oe("light-plus"),MaterialDarker:oe("material-theme-darker"),MaterialDefault:oe("material-theme"),MaterialLighter:oe("material-theme-lighter"),MaterialOcean:oe("material-theme-ocean"),MaterialPalenight:oe("material-theme-palenight"),MinDark:oe("min-dark"),MinLight:oe("min-light"),Monokai:oe("monokai"),NightOwl:oe("night-owl"),Nord:oe("nord"),OneDarkPro:oe("one-dark-pro"),OneLight:oe("one-light"),Plastic:oe("plastic"),Poimandres:oe("poimandres"),Red:oe("red"),RosePineDawn:oe("rose-pine-dawn"),RosePineMoon:oe("rose-pine-moon"),RosePine:oe("rose-pine"),SlackDark:oe("slack-dark"),SlackOchin:oe("slack-ochin"),SnazzyLight:oe("snazzy-light"),SolarizedDark:oe("solarized-dark"),SolarizedLight:oe("solarized-light"),Synthwave84:oe("synthwave-84"),TokyoNight:oe("tokyo-night"),Vesper:oe("vesper"),VitesseBlack:oe("vitesse-black"),VitesseDark:oe("vitesse-dark"),VitesseLight:oe("vitesse-light")};var pA="Vencord/ShikiPluginAssets",dA="75d69df9fdf596a31eef8b7f6f891231a6feab44",mA=`https://cdn.jsdelivr.net/gh/${pA}@${dA}/grammars.json`,fA=e=>`https://cdn.jsdelivr.net/gh/${Vv}@${eb}/packages/tm-grammars/grammars/${e}.json`,ja={},N5=async()=>{let e=await fetch(mA).then(o=>o.ok?o.json():[]),t=Object.fromEntries(e.map(o=>{let{name:n,displayName:i,...s}=o;return[n,{...s,id:n,name:i,grammarUrl:fA(n)}]}));Object.assign(ja,t)},C5=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),gA=new Map;function As(e){if(Object.prototype.hasOwnProperty.call(ja,e))return ja[e];let t=Object.values(ja).find(o=>o.aliases?.includes(e));return t?(gA.set(e,t),t):null}var tb=Object.values(zn),k5,De={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:ja,themes:zn,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>k5=e),init:async e=>{let t=await fetch(b5).then(i=>i.blob()),o=De.client=new A5.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let n=e||tb[0];await N5(),await o.run("setOnigasm",{wasm:S5}),await o.run("setHighlighter",{theme:n,langs:[]}),De.loadedThemes.add(n),await De._setTheme(n),k5(o)},_setTheme:async e=>{De.currentThemeUrl=e;let{themeData:t}=await De.client.run("getTheme",{theme:e});De.currentTheme=JSON.parse(t),Hv({id:e,theme:De.currentTheme})},loadTheme:async e=>{let t=await De.clientPromise;De.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),De.loadedThemes.add(e))},setTheme:async e=>{await De.clientPromise,e||=tb[0],De.loadedThemes.has(e)||await De.loadTheme(e),await De._setTheme(e)},loadLang:async e=>{let t=await De.clientPromise,o=As(e);!o||De.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await C5(o)}}),De.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await De.clientPromise,n=As(t);return n?(De.loadedLangs.has(n.id)||await De.loadLang(n.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:De.currentThemeUrl??tb[0]})):[]},destroy(){De.currentTheme=null,De.currentThemeUrl=null,Hv({id:null,theme:null}),De.client?.destroy()}};a();a();a();re();ir();a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks.desktop/devicon.css",{name:"src/plugins/shikiCodeblocks.desktop/devicon.css",source:'@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.17.0/devicon.min.css");',classNames:{},dom:null});var vu="src/plugins/shikiCodeblocks.desktop/devicon.css";a();var yA=Object.keys(zn),Ci=x({theme:{type:4,description:"Default themes",options:yA.map(e=>({label:dn(Ch(e)),value:zn[e],default:zn[e]===zn.DarkPlus})),onChange:De.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:zn.MaterialCandy,onChange:e=>{De.setTheme(e||Ci.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?ko(vu):no(vu)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,stickToMarkers:!1,componentProps:{onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=mh(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}});v();function D5(e){let t=Ci.use([...e,"customTheme","theme"]),[o,n]=ye.useState(!1),i=t.customTheme||t.theme,s=De.currentThemeUrl&&i&&i!==De.currentThemeUrl;return o&&!s&&n(!1),!o&&s&&(n(!0),De.setTheme(i)),{...t,isThemeLoading:o}}a();function L5(e){return e=e.slice(1),e.length<6&&(e=e.split("").map(t=>t+t).join("")),e.length===6&&(e+="ff"),e.length>6&&(e=e.slice(0,6)),e.split(/(..)/).filter(Boolean).map(t=>parseInt(t,16))}a();we();v();var Oo=q("vc-shiki-"),O5=({lang:e,tryHljs:t})=>{let o=e?qi?.getLanguage?.(e):null,i=(e?As(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!o||e==="";case"SECONDARY":return!i&&!!o;case"NEVER":return!1;default:return!1}};dt();v();a();a();a();cn();v();function _5(e){let[t,o]=ye.useState(!1);function n(i){lo(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,n]}function B5({content:e,...t}){let[o,n]=_5(1e3);return r("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>n(e)},o?"Copied!":"Copy")}function U5({content:e,theme:t}){return r("div",{className:Oo("btns")},r(B5,{content:e,className:Oo("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}}))}a();v();var E5=({theme:e,useHljs:t,lang:o,content:n,tokens:i})=>{let s;if(t)try{let{value:c}=qi.highlight(n,{language:o,ignoreIllegals:!0});s=c.split(`
`).map((u,d)=>r("span",{key:d,dangerouslySetInnerHTML:{__html:u}}))}catch{s=n.split(`
`).map((c,u)=>r("span",{key:u},c))}else s=(i??n.split(`
`).map(u=>[{color:e.plainColor,content:u}])).map((u,d)=>u.length===0?r("span",{key:d},`
`):r(p,null,u.map(({content:f,color:g,fontStyle:y},b)=>r("span",{key:b,style:{color:g,fontStyle:(y??0)&1?"italic":void 0,fontWeight:(y??0)&2?"bold":void 0,textDecoration:(y??0)&4?"underline":void 0}},f))));let l=s.map((c,u)=>r("tr",{className:Oo("table-row"),key:u},r("td",{className:Oo("table-cell"),style:{color:e.plainColor}},u+1),r("td",{className:Oo("table-cell")},c)));return r("table",{className:Oo("table")},...l)};a();function F5({langName:e,useDevIcon:t,shikiLang:o}){return e?r("div",{className:Oo("lang")},t!=="DISABLED"&&o?.devicon&&r("i",{className:`${Oo("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):r(p,null)}var Xf=e=>r("pre",{className:Oo("container")},r(M,null,r(vA,{...e}))),vA=({lang:e,content:t,isPreview:o})=>{let{tryHljs:n,useDevIcon:i,bgOpacity:s}=D5(["tryHljs","useDevIcon","bgOpacity"]),{id:l,theme:c}=v5(),u=e?As(e):null,d=O5({lang:e,tryHljs:n}),[f,g]=_h(!0),[y]=pt(async()=>!u||d||!g?null:await De.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,l,g]}),b={plainColor:c?.fg||"var(--text-default)",accentBgColor:c?.colors?.["statusBar.background"]||(d?"#7289da":"#007BC8"),accentFgColor:c?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:c?.colors?.["editor.background"]||"var(--background-base-lower)"},I;return e&&(I=d?qi?.getLanguage?.(e)?.name:u?.name),r("div",{ref:f,className:Oo("root",{plain:!I,preview:o}),style:{backgroundColor:d?b.backgroundColor:`rgba(${L5(b.backgroundColor).concat(s/100).join(", ")})`,color:b.plainColor}},r("code",{className:Oo("code")},r(F5,{langName:I,useDevIcon:i,shikiLang:u}),r(E5,{theme:b,useHljs:d,lang:e,content:t,tokens:y}),!o&&r(U5,{content:t,theme:b})))};a();var $5=new Map;var G5=()=>{$5.forEach(e=>e.remove()),$5.clear()};var Vf=h({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[m.Vap],reporterTestable:8,settings:Ci,patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}},{find:"#{intl::PREVIEW_NUM_LINES}",replacement:{match:/(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,replace:"return $self.renderHighlighter({lang:$1.language,content:$1.text});"}}],start:async()=>{Ci.store.useDevIcon!=="DISABLED"&&no(vu),await De.init(Ci.store.customTheme||Ci.store.theme)},stop:()=>{De.destroy(),G5()},settingsAboutComponent:()=>Xf({lang:"tsx",content:y5,isPreview:!0}),shiki:De,createHighlighter:Xf,renderHighlighter:({lang:e,content:t})=>Xf({lang:e?.toLowerCase(),content:t,isPreview:!1})});a();S();var eg=h({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[m.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]});a();He();S();se();F();v();a();se();F();v();var ob=Ot(e=>e.colors?.INTERACTIVE_MUTED?.css),bA=he("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}");function H5(){let e=ql(ob.colors.INTERACTIVE_MUTED).hex(),t=ql(ob.colors.INTERACTIVE_ICON_ACTIVE??ob.colors.INTERACTIVE_ACTIVE).hex();return r(bA,{color:e,forcedIconColor:t,size:16,tooltipText:Le("CONNECTION_VERIFIED"),className:"vc-sc-tooltip-icon"})}var SA=fe(".TWITTER_LEGACY:"),xA=X("isSupported","getByUrl"),TA=fe(".getPreviewThemeColors","primaryColor:");var wA=e=>(e??0)*2+4,tg=x({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}]}}),IA=M.wrap(e=>r(PA,{...e,id:e.user.id,theme:TA(e).theme}),{noop:!0});function PA({id:e,theme:t}){let o=_t.getUserProfile(e);if(!o)return null;let n=o.connectedAccounts;return n?.length?r(Y,{gap:wA(tg.store.iconSpacing),flexWrap:"wrap"},n.map(i=>r(MA,{connection:i,theme:t,key:i.id}))):null}function MA({connection:e,theme:t}){let o=xA.get(SA(e.type)),n=o.getPlatformUserUrl?.(e),i=r("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:tg.store.iconSize,height:tg.store.iconSize}}),s=n?Ei:bn;return r(V,{text:r("span",{className:"vc-sc-tooltip"},r("span",{className:"vc-sc-connection-name"},e.name),e.verified&&r(H5,null),r(s,{height:16,width:16,className:"vc-sc-tooltip-icon"})),key:e.id},l=>n?r("a",{...l,className:"vc-user-connection",href:n,target:"_blank",rel:"noreferrer",onClick:c=>{ke(En.name)&&En.handleLink(c.currentTarget,c)}},i):r("button",{...l,className:"vc-user-connection",onClick:()=>it(e.name)},i))}var og=h({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[m.TheKodeToad],settings:tg,patches:[{find:/\.POPOUT,onClose:\i}\),nicknameIcons:.+?\.isProvisional/,replacement:{match:/userId:\i\.id,guild:\i\}\)(?=])/,replace:"$&,$self.profilePopoutComponent(arguments[0])"}}],profilePopoutComponent:IA});a();S();we();re();F();v();a();re();ir();F();v();var rb=Z("auto","managedReactiveScroller","customTheme"),NA=he("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"),CA=he("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"),kA=X("convertSurrogateToName"),AA=X("getURL","getEmojiColors"),RA={0:"text",5:"announcement",15:"forum",2:"voice",13:"stage"},DA={0:"Latest activity",1:"Creation date"},LA={0:"Not set",1:"List view",2:"Gallery view"},OA={1:"Automatic",2:"720p"},_A="/assets/433e3ec4319a9d11b0cbe39342614982.svg";function BA({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Wn.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,n]=A([]),{type:i,topic:s,lastMessageId:l,defaultForumLayout:c,lastPinTimestamp:u,defaultAutoArchiveDuration:d,availableTags:f,id:g,rateLimitPerUser:y,defaultThreadRateLimitPerUser:b,defaultSortOrder:I,defaultReactionEmoji:w,bitrate:D,rtcRegion:N,videoQualityMode:_,permissionOverwrites:W,guild_id:H}=e;return te(()=>{let K=[],pe=Ne.getGuild(H).ownerId;Te.getMember(H,pe)||K.push(pe),Object.values(W).forEach(({type:z,id:ne})=>{z===1&&!Te.getMember(H,ne)&&K.push(ne)}),K.length>0&&L.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[H],userIds:K}),$.plugins.PermissionsViewer.enabled&&n(uf(Object.values(W).map(z=>({type:z.type,id:z.id,overwriteAllow:z.allow,overwriteDeny:z.deny})),H))},[g]),r("div",{className:R(rb.auto,rb.customTheme,rb.managedReactiveScroller)},r("div",{className:zo("container")},r("img",{className:zo("logo"),src:_A}),r("div",{className:zo("heading-container")},r(G,{variant:"heading-xxl/bold"},"This is a ",Ie.can(me.VIEW_CHANNEL,e)?"locked":"hidden"," ",RA[i]," channel"),e.isNSFW()&&r(V,{text:"NSFW"},({onMouseLeave:K,onMouseEnter:pe})=>r("svg",{onMouseLeave:K,onMouseEnter:pe,className:zo("heading-nsfw-icon"),width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},r("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()&&r(G,{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&&r("div",{className:zo("topic-container")},Me.parseTopic(s,!1,{channelId:g})),l&&r(G,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",r(ro,{timestamp:new Date(No.extractTimestamp(l))})),u&&r(G,{variant:"text-md/normal"},"Last message pin: ",r(ro,{timestamp:new Date(u)})),(y??0)>0&&r(G,{variant:"text-md/normal"},"Slowmode: ",vl(y,"seconds")),(b??0)>0&&r(G,{variant:"text-md/normal"},"Default thread slowmode: ",vl(b,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&D!=null&&r(G,{variant:"text-md/normal"},"Bitrate: ",D," bits"),N!==void 0&&r(G,{variant:"text-md/normal"},"Region: ",N??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&r(G,{variant:"text-md/normal"},"Video quality mode: ",OA[_??1]),(d??0)>0&&r(G,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+vl(d,"minutes")),c!=null&&r(G,{variant:"text-md/normal"},"Default layout: ",LA[c]),I!=null&&r(G,{variant:"text-md/normal"},"Default sort order: ",DA[I]),w!=null&&r("div",{className:zo("default-emoji-container")},r(G,{variant:"text-md/normal"},"Default reaction emoji:"),Me.defaultRules[w.emojiName?"emoji":"customEmoji"].react({name:w.emojiName?kA.convertSurrogateToName(w.emojiName):lr.getCustomEmojiById(w.emojiId)?.name??"",emojiId:w.emojiId??void 0,surrogate:w.emojiName??void 0,src:w.emojiName?AA.getURL(w.emojiName):void 0},void 0,{key:0})),e.hasFlag(16)&&r(G,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),f&&f.length>0&&r("div",{className:zo("tags-container")},r(G,{variant:"text-lg/bold"},"Available tags:"),r("div",{className:zo("tags")},f.map(K=>r(CA,{tag:K,key:K.id})))),r("div",{className:zo("allowed-users-and-roles-container")},r("div",{className:zo("allowed-users-and-roles-container-title")},ke(Ba.name)&&r(V,{text:"Permission Details"},({onMouseLeave:K,onMouseEnter:pe})=>r("button",{onMouseLeave:K,onMouseEnter:pe,className:zo("allowed-users-and-roles-container-permdetails-btn"),onClick:()=>Ms(o,Ne.getGuild(e.guild_id),e.name)},r("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r("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"})))),r(G,{variant:"text-lg/bold"},"Allowed users and roles:"),r(V,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:K,onMouseEnter:pe})=>r("button",{onMouseLeave:K,onMouseEnter:pe,className:zo("allowed-users-and-roles-container-toggle-btn"),onClick:()=>Wn.store.defaultAllowedUsersAndRolesDropdownState=!t},r("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},r("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&r(NA,{channel:e}))))}var z5=M.wrap(BA);var zo=q("vc-shc-"),W5=Z("modeSelected","modeMuted","unread","icon");var UA=1n<<20n,Wn=x({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}});function EA(e){return e.channel.id==="null"&&e.channel.name==="Uncategorized"&&e.comparator===-1}var qa=h({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[m.BigDuck,m.AverageReactEnjoyer,m.D3SOX,m.Ven,m.Nuckyz,m.Nickyux,m.dzshn],settings:Wn,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)=>`||$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".AUDIENCE),{isSubscriptionGated",replacement:{match:/(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}||$self.isHiddenChannel(${t})`}},{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:()=>Wn.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:()=>Wn.store.showMode===1,replacement:[{match:/Children\.count.+?;(?=return\(0,\i\.jsxs?\)\(\i\.\i,{focusTarget:)(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.Children\.count.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\?\i\.\i:\i\.\i,)(.{0,150}?)if\((\i)(?:\)return |\?)(\i\.MUTED)/,replace:(e,t,o,n)=>`${o}?${n}:"",${t}if(${o})return ""`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Wn.store.hideUnreads===!1&&Wn.store.showMode===1,match:/(?<=\.LOCKED;if\()(?<={channel:(\i).+?)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{predicate:()=>Wn.store.hideUnreads===!0,match:/Children\.count.+?;(?=return\(0,\i\.jsxs?\)\(\i\.\i,{focusTarget:)(?<={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,n)=>`${e}if(!${n}&&$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,n)=>`${e}if(!${n}&&$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:/forceFetch:\i,isPreload:.+?}=\i;(?=.+?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:/(forceRoles:.+?)(\i\.\i\(\i\.\i\.ADMINISTRATOR,\i\.\i\.VIEW_CHANNEL\))(?<=context:(\i)}.+?)/,replace:(e,t,o,n)=>`${t}$self.swapViewChannelWithConnectPermission(${o},${n})`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${UA}n,${t})?${o}CONNECT):`},{match:/getSortedRoles.+?\.filter\(\i=>(?=!)/,replace:e=>`${e}$self.isHiddenChannel(arguments[0]?.channel)?true:`},{match:/forceRoles:.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/return\(0,\i\.jsxs?\)\(\i\.\i,{channelId:(\i)\.id(?=.+?(\(0,\i\.jsxs?\)\("div",{className:\i\.\i,children:\[.{0,100}\i\.length>0.+?\]}\)),)/,replace:(e,t,o)=>`if($self.isHiddenChannel(${t},true)){return${o};}${e}`},{match:/maxUsers:\d+?,users:\i(?<=channel:(\i).+?)/,replace:(e,t)=>`${e},shcChannel:${t}`},{match:/1!==\i\.length(?=\|\|)/,replace:"true"}]},{find:'="interactive-text-default",overflowCountClassName:',replacement:[{match:/let{users:\i,maxUsers:\i,/,replace:"let{shcChannel}=arguments[0];$&"},{match:/\i>0(?=&&!\i&&!\i)/,replace:e=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${e})`},{match:/(?<=`\+\$\{)\i(?=\})/,replace:e=>`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&(${e}-1)<=0?"":${e}`}]},{find:"#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",replacement:[{match:/(?<=&&)\i\.push\(.{0,120}"chat-spacer"/,replace:"(arguments[0]?.inCall||!$self.isHiddenChannel(arguments[0]?.channel,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:/(?=\i\|\|\i!==\i\.\i\.FULL_SCREEN.{0,100}?this\._callContainerRef)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/screenMessage:(\i)\?.+?children:(?=!\1)(?<=let \i,{channel:(\i).+?)/,replace:(e,t,o)=>`${e}$self.isHiddenChannel(${o})?$self.HiddenChannelLockScreen(${o}):`},{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:/(?<=numRequestToSpeak:\i\}\)\}\):null,!\i&&)\(0,\i\.jsxs?\).{0,280}?iconClassName:/,replace:"!$self.isHiddenChannel(arguments[0]?.channel,true)&&$&"}]},{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:'getConfig({location:"channel_mention"})',replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i)).{0,200}?return void (?=\i\.default\.selectVoiceChannel)/,replace:(e,t)=>`${e}!$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:"GuildTooltip - ",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'"NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],swapViewChannelWithConnectPermission(e,t){return Ie.can(me.CONNECT,t)||(e&=~me.VIEW_CHANNEL,e|=me.CONNECT),e},isHiddenChannel(e,t=!1){try{return e==null||Object.hasOwn(e,"channelId")&&e.channelId==null||(e.channelId!=null&&(e=Q.getChannel(e.channelId)),e==null||e.isDM()||e.isGroupDM()||e.isMultiUserDM())||["browse","customize","guide"].includes(e.id)?!1:!Ie.can(me.VIEW_CHANNEL,e)||t&&!Ie.can(me.CONNECT,e)}catch(o){return console.error("[ViewHiddenChannels#isHiddenChannel]: ",o),!1}},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[n,i]of Object.entries(e)){if(!Array.isArray(i)){o[n]=i;continue}o[n]??=[];for(let s of i)(EA(s)||s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[n].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,n,i)=>{if(n!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>r(z5,{channel:e}),LockIcon:M.wrap(()=>r("svg",{className:W5.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},r("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:M.wrap(()=>r(V,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>r("svg",{onMouseLeave:e,onMouseEnter:t,className:R(W5.icon,zo("hidden-channel-icon")),width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},r("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})});a();S();le();var nb=e=>({type:3,description:e,default:!0,restartNeeded:!0}),Ka=x({showTimeouts:nb("Show member timeout icons in chat."),showInvitesPaused:nb("Show the invites paused tooltip in the server list."),showModView:nb("Show the member mod view context menu item in all servers.")}),rg=h({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused","ShowModView","DisableDiscoveryFilters"],description:"Displays various hidden & moderator-only things regardless of permissions.",authors:[m.Dolfies],settings:Ka,patches:[{find:"showCommunicationDisabledStyles",predicate:()=>Ka.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"INVITES_DISABLED)||",predicate:()=>Ka.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,replace:"true"}},{find:/,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/,predicate:()=>Ka.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_HIGHEST_ROLE}),children:",predicate:()=>Ka.store.showModView,replacement:{match:/(#{intl::GUILD_MEMBER_MOD_VIEW_HIGHEST_ROLE}.{0,80})role:\i(?<=\[\i\.roles,\i\.highestRoleId,(\i)\].+?)/,replace:(e,t,o)=>`${t}role:$self.getHighestRole(arguments[0],${o})`}},{find:'action:"PRESS_MOD_VIEW",icon:',predicate:()=>Ka.store.showModView,replacement:{match:/\i(?=\?null)/,replace:"false"}}],getHighestRole({member:e},t){try{return t.find(o=>o.id===e.highestRoleId)}catch(o){new B("ShowHiddenThings").error("Failed to find highest role",o);return}}});a();S();v();var j5=x({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"}]},friendNicknames:{type:4,description:"How to prioritise friend nicknames over server nicknames",options:[{label:"Show friend nicknames only in direct messages",value:"dms",default:!0},{label:"Prefer friend nicknames over server nicknames",value:"always"},{label:"Prefer server nicknames over friend nicknames",value:"fallback"}]},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"}}),ng=h({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[m.Rini,m.TheKodeToad,m.rae],patches:[{find:'="SYSTEM_TAG"',replacement:{match:/(?<=onContextMenu:\i,children:)\i\?(?=.{0,100}?user[Nn]ame:)/,replace:"$self.renderUsername(arguments[0]),_oldChildren:$&"}}],settings:j5,renderUsername:M.wrap(({author:e,channel:t,message:o,isRepliedMessage:n,withMentionPrefix:i,userOverride:s})=>{try{let{mode:l,friendNicknames:c,displayNames:u,inReplies:d}=j5.store,f=s??o.author,g=Yl.enabled?f.username[0]+"\u2026":f.username;u&&(g=f.globalName||g);let{nick:y}=e,b=Pe.getNickname(e.authorId);b&&(c==="always"||c==="dms"&&t.isPrivate()||c==="fallback"&&!y)&&(y=b);let I=i?"@":"";return n&&!d||g.toLowerCase()===y.toLowerCase()?r(p,null,I,y):l==="user-nick"?r(p,null,I,g," ",r("span",{className:"vc-smyn-suffix"},y)):l==="nick-user"?r(p,null,I,y," ",r("span",{className:"vc-smyn-suffix"},g)):r(p,null,I,g)}catch{return r(p,null,e?.nick)}},{noop:!0})});a();zi();S();se();Sr();F();v();var FA=Lt(/#{intl::MAX_AGE_NEVER}/),$A=Hs(e=>e.prototype?.render&&FA.test(e.prototype.render.toString()));var q5=x({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}]}});function K5(e,t){let o=Q.getChannel(e.channel_id)?.guild_id;if(!o)return null;let n=Te.getMember(o,e.author.id);if(!n?.communicationDisabledUntil)return null;let i=()=>r($A,{deadline:new Date(n.communicationDisabledUntil),showUnits:!0,stopAtOneSec:!0});return Le("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i}),t?i():Le("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i})}var ig=h({name:"ShowTimeoutDuration",description:"Shows how much longer a user's timeout will last, either in the timeout icon tooltip or next to it",authors:[m.Ven,m.Sqaaakoi],settings:q5,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:M.wrap(({message:e,children:t,text:o})=>q5.store.displayStyle==="tooltip"?r(Vo,{text:K5(e,!1)},t):r("div",{className:"vc-std-wrapper"},r(Vo,{text:o},t),r(G,{variant:"text-md/normal",color:"status-danger"},K5(e,!0)," timeout remaining")),{noop:!0})});a();S();v();var ib=!1,sb=x({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(ib=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});function GA(){return r(ab,null,r("mask",{id:"vc-silent-msg-mask"},r("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),r("path",{stroke:"#000",strokeWidth:"5.99068",d:"M0 24 24 0"})),r("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"}))}var ab=({height:e=20,width:t=20,className:o,children:n})=>r("svg",{width:t,height:e,viewBox:"0 0 24 24",className:o,style:{scale:"1.2"}},r("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"}),n),HA=({isMainChat:e})=>{let[t,o]=A(ib);function n(i){sb.store.persistState&&(ib=i),o(i)}return te(()=>{let i=(s,l)=>{t&&(sb.store.autoDisable&&n(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return rs(i),()=>void ns(i)},[t]),e?r(kr,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>n(!t)},t?r(ab,null):r(GA,null)):null},sg=h({name:"SilentMessageToggle",authors:[m.Nuckyz,m.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",settings:sb,chatBarButton:{icon:ab,render:HA}});a();S();v();var Gr=x({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}});function zA(){return r(lb,null,r("mask",{id:"silent-typing-msg-mask"},r("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),r("path",{stroke:"#000",strokeWidth:"5.99068",d:"M0 24 24 0",transform:"translate(-2, -3)"})),r("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"}))}var lb=({height:e=20,width:t=20,className:o,children:n})=>r("svg",{width:t,height:e,className:o,viewBox:"0 0 24 24",style:{scale:"1.2"}},r("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)"}),n),WA=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=Gr.use(["isEnabled","showIcon"]),n=()=>Gr.store.isEnabled=!Gr.store.isEnabled;return!e||!o?null:r(kr,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:n},t?r(zA,null):r(lb,null))},jA=e=>{let{isEnabled:t,contextMenu:o}=Gr.use(["isEnabled","contextMenu"]);if(!o)return;let n=ze("submit-button",e);if(!n)return;let i=n.findIndex(s=>s?.props?.id==="submit-button");n.splice(i+1,0,r(P.MenuCheckboxItem,{id:"vc-silent-typing",label:"Enable Silent Typing",checked:t,action:()=>Gr.store.isEnabled=!Gr.store.isEnabled}))},ag=h({name:"SilentTyping",authors:[m.Ven,m.Rini,m.ImBanana],description:"Hide that you are typing",settings:Gr,contextMenus:{"textarea-context":jA},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)=>{Gr.store.isEnabled=!!or(e,"value",!Gr.store.isEnabled),Nt(t.channel.id,{content:Gr.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){Gr.store.isEnabled||L.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarButton:{icon:lb,render:WA}});a();zi();S();we();v();var qA=new Intl.DateTimeFormat(void 0,{month:"numeric",day:"numeric",year:"numeric"}),cb=q("vc-sortFriendRequests-");function Y5(e){return new Date(Pe.getSince(e.id))}var Z5=x({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),lg=h({name:"SortFriendRequests",authors:[m.Megu],description:"Sorts friend requests by date of receipt",settings:Z5,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:"#{intl::FRIEND_REQUEST_CANCEL}",replacement:{predicate:()=>Z5.store.showDates,match:/(?<=children:\[)\(0,.{0,100}user:\i,hovered:\i.+?(?=,\(0)(?<=user:(\i).+?)/,replace:(e,t)=>`$self.WrapperDateComponent({user:${t},children:${e}})`}}],wrapSort(e,t){return t.type===3||t.type===4?-Y5(t.user):e(t)},WrapperDateComponent:M.wrap(({user:e,children:t})=>{let o=Y5(e);return r("div",{className:cb("wrapper")},t,!isNaN(o.getTime())&&r(Vo,{text:ai.dateFormat(o,"LLLL"),tooltipClassName:cb("tooltip")},r(G,{variant:"text-xs/normal",className:cb("date")},qA.format(o))))},{noop:!0})});a();S();a();(window.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});var Q5="src/plugins/spotifyControls/hoverOnly.css";a();He();to();Qs();we();se();re();v();a();Ri();v();var J5=ut(()=>{let e=Vn.$$vencordGetWrappedComponent();return class extends e{static getDerivedStateFromProps(o,n){let i=super.getDerivedStateFromProps(o,n);return i&&(i.value=o.initialValue),i}}});a();F();v();var Qe=Bo(()=>{let{Store:e}=ea,t=Il("getActiveSocketAndDevice"),o=X("vcSpotifyMarker"),n="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(c){let u=$.plugins.SpotifyControls.useSpotifyUris||ke(En.name)?"spotify:"+c.replaceAll("/",(d,f)=>f===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this._start),c}set position(c){this.mPosition=c,this._start=Date.now()}prev(){this._req("post","/previous")}next(){this._req("post","/next")}setVolume(c){this._req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this._req("put",c?"/play":"/pause")}setRepeat(c){this._req("put","/repeat",{query:{state:c}})}setShuffle(c){this._req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this._req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}_req(c,u,d={}){this.device?.is_active&&((d.query??={}).device_id=this.device.id);let{socket:f}=t.getActiveSocketAndDevice();return o[c](f.accountId,f.accessToken,{url:n+u,...d})}}let s=new i(L,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.shuffle=l.shuffle??!1,s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(c=>c.is_active)??l[0]??null,s.emitChange()}});return s});var tt=q("vc-spotify-");function ub(e){let t=e/1e3/60,o=Math.floor(t),n=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`}function Ya(e,t){return()=>r("svg",{className:tt("button-icon",t),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},r("path",{d:e}))}var KA=Ya("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"),YA=Ya("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"),ZA=Ya("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"),QA=Ya("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"),JA=Ya("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"),XA=Ya("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");function bu(e){return r("button",{className:tt("button"),...e},e.children)}function VA({name:e,type:t,path:o}){return r(P.Menu,{navId:"vc-spotify-menu",onClose:ct.closeContextMenu,"aria-label":`Spotify ${t} Menu`},r(P.MenuItem,{id:"vc-spotify-copy-name",label:`Copy ${t} Name`,action:()=>it(e),icon:bn}),r(P.MenuItem,{id:"vc-spotify-copy-link",label:`Copy ${t} Link`,action:()=>it("https://open.spotify.com"+o),icon:Ei}),r(P.MenuItem,{id:"vc-spotify-open",label:`Open ${t} in Spotify`,action:()=>Qe.openExternal(o),icon:ar}))}function eR(){let[e,t,o]=ie([Qe],()=>[Qe.isPlaying,Qe.shuffle,Qe.repeat]),[n,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 r(Y,{className:tt("button-row"),gap:"0"},r(bu,{className:R(tt("button"),tt("shuffle"),tt(t?"shuffle-on":"shuffle-off")),onClick:()=>Qe.setShuffle(!t)},r(XA,null)),r(bu,{onClick:()=>{$.plugins.SpotifyControls.previousButtonRestartsTrack&&Qe.position>3e3?Qe.seek(0):Qe.prev()}},r(ZA,null)),r(bu,{onClick:()=>Qe.setPlaying(!e)},e?r(YA,null):r(KA,null)),r(bu,{onClick:()=>Qe.next()},r(QA,null)),r(bu,{className:R(tt("button"),tt("repeat"),tt(i)),onClick:()=>Qe.setRepeat(n),style:{position:"relative"}},o==="track"&&r("span",{className:tt("repeat-1")},"1"),r(JA,null)))}var tR=Zt(e=>{Qe.seek(e)});function oR(){let{duration:e}=Qe.track,[t,o,n]=ie([Qe],()=>[Qe.mPosition,Qe.isSettingPosition,Qe.isPlaying]),[i,s]=A(t);te(()=>{if(n&&!o){s(Qe.position);let c=setInterval(()=>{s(u=>u+1e3)},1e3);return()=>clearInterval(c)}},[t,o,n]);let l=c=>{o||(s(c),tR(c))};return r("div",{id:tt("progress-bar")},r(wr,{size:"xs",weight:"medium",className:tt("progress-time")+" "+tt("time-left"),"aria-label":"Progress"},ub(i)),r(J5,{initialValue:i,minValue:0,maxValue:e,onValueChange:l,asValueChanges:l,onValueRender:ub}),r(wr,{size:"xs",weight:"medium",className:tt("progress-time")+" "+tt("time-right"),"aria-label":"Total Duration"},ub(e)))}function rR({track:e}){let t=ie([Qe],()=>Qe.volume);return r(P.Menu,{navId:"spotify-album-menu",onClose:()=>L.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},r(P.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Qe.openExternal(`/album/${e.album.id}`),icon:ar}),r(P.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Zo(e.album.image),icon:Tr}),r(P.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,n)=>r(P.MenuSliderControl,{...o,ref:n,value:t,minValue:0,maxValue:100,onChange:Zt(i=>Qe.setVolume(i))})}))}function pb(e,t,o,n){return t?{role:"link",onClick:()=>Qe.openExternal(n),onContextMenu:i=>ct.openContextMenu(i,()=>r(VA,{type:e,name:o,path:n}))}:{}}function nR({track:e}){let t=e?.album?.image,[o,n]=A(!1),i=r(p,null,t&&r("img",{id:tt("album-image"),src:t.url,alt:"Album Image",onClick:()=>n(!o),onContextMenu:s=>{ct.openContextMenu(s,()=>r(rR,{track:e}))}}));return o&&t?r("div",{id:tt("album-expanded-wrapper")},i):r("div",{id:tt("info-wrapper")},i,r("div",{id:tt("titles")},r(ee,{weight:"semibold",id:tt("song-title"),className:tt("ellipoverflow"),title:e.name,...pb("Song",e.id,e.name,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&r(ee,{className:tt(["ellipoverflow","secondary-song-info"])},r("span",{className:tt("song-info-prefix")},"by\xA0"),e.artists.map((s,l)=>r(ye.Fragment,{key:s.name},r("span",{className:tt("artist"),style:{fontSize:"inherit"},title:s.name,...pb("Artist",s.id,s.name,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&r("span",{className:tt("comma")},", ")))),e.album.name&&r(ee,{className:tt(["ellipoverflow","secondary-song-info"])},r("span",{className:tt("song-info-prefix")},"on\xA0"),r("span",{id:tt("album-title"),className:tt("album"),style:{fontSize:"inherit"},title:e.album.name,...pb("Album",e.album.id,e.album.name,`/album/${e.album.id}`)},e.album.name))))}function X5(){let e=ie([Qe],()=>Qe.track,null,(l,c)=>l?.id?l.id===c?.id:l?.name===c?.name),t=ie([Qe],()=>Qe.device,null,(l,c)=>l?.id===c?.id),o=ie([Qe],()=>Qe.isPlaying),[n,i]=A(!1);if(ye.useEffect(()=>{if(i(!1),!o){let l=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(l)}},[o]),!e||!t?.is_active||n)return null;let s={"--vc-spotify-track-image":`url(${e?.album?.image?.url||""})`};return r("div",{id:tt("player"),style:s},r(nR,{track:e}),r(oR,null),r(eR,null))}function V5(e){(e?no:ko)(Q5)}var cg=h({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[m.Ven,m.afn,m.KraXen72,m.Av32000,m.nin0dev],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>V5(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:".DISPLAY_NAME_STYLES_COACHMARK)",replacement:{match:/(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,occluded:)/,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:()=>V5($.plugins.SpotifyControls.hoverControls),PanelWrapper({VencordOriginal:e,...t}){return r(p,null,r(M,{fallback:()=>r("div",{className:"vc-spotify-fallback"},r("p",null,"Failed to render Spotify Modal :("),r("p",null,"Check the console for errors"))},r(X5,null)),r(e,{...t}))}});a();S();var db=x({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}}),ug=h({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[m.Cyn,m.Nuckyz],settings:db,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:"}getPlayableComputerDevices(){",replacement:[{predicate:()=>db.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>db.store.keepSpotifyActivityOnIdle,match:/(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:"$1"}]}]});a();S();se();F();v();var iR=X("getPlayerState");function mb(e,t){return{name:e,description:`Share your current Spotify ${e} in chat`,inputType:0,options:[ac],execute(o,{channel:n}){let i=iR.getTrack();if(!i)return Nt(n.id,{content:"You're not listening to any music."});if(i.id==null)return Nt(n.id,{content:"Failed to find the track on spotify."});let s=t(i),l=or(o,"message");Jn(n.id,{content:l?`${l} ${s}`:s},!1,Xt.getSendMessageOptionsForReply(xn.getPendingReply(n.id))).then(()=>{L.dispatch({type:"DELETE_PENDING_REPLY",channelId:n.id})})}}}var pg=h({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[m.katlyn],commands:[mb("track",e=>`https://open.spotify.com/track/${e.id}`),mb("album",e=>`https://open.spotify.com/album/${e.album.id}`),mb("artist",e=>e.artists[0].external_urls.spotify)]});a();He();S();a();F();v();var Su=X("markWithDelta","markAndLog","markAt");function sR({emoji:e,prefix:t,log:o,delta:n,instance:i}){return r(ye.Fragment,null,r("span",null,i.sinceStart.toFixed(3),"s"),r("span",null,i.sinceLast.toFixed(3),"s"),r("span",null,n?.toFixed(0)??""),r("span",null,r("pre",null,e," ",t??" ",o)))}function aR({title:e,logs:t,traceEnd:o}){let n=t.find(l=>l.timestamp)?.timestamp??0,i=n,s=t.map(l=>{let c=l.timestamp??i,u=(c-n)/1e3,d=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:d}});return r("section",null,r(T.FormTitle,{tag:"h2"},e),r("code",null,o&&r("div",{style:{color:"var(--text-strong)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),r("div",{style:{color:"var(--text-strong)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},r("span",null,"Start"),r("span",null,"Interval"),r("span",null,"Delta"),r("span",{style:{marginBottom:5}},"Event"),Su.logs.map((l,c)=>r(sR,{key:c,...l,instance:s[c]})))))}function lR({trace:e}){let t=e.split(`
`);return r("section",null,r(T.FormTitle,{tag:"h3"},"Server Trace"),r("code",null,r(Y,{flexDirection:"column",gap:"5px",style:{color:"var(--text-strong)",userSelect:"text"}},t.map((o,n)=>r("span",{key:n},o)))))}function cR(){if(!Su?.logs)return r("div",null,"Loading...");let e=Su.logGroups.find(t=>t.serverTrace)?.serverTrace;return r(ye.Fragment,null,r(aR,{title:"Startup Timings",logs:Su.logs,traceEnd:Su.endTime_}),r("div",{style:{marginTop:5}},"\xA0"),e&&r(lR,{trace:e}))}var e3=M.wrap(cR);var dg=h({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[m.Megu],start(){_r.customEntries.push({key:"vencord_startup_timings",title:"Startup Timings",Component:e3,Icon:e1}),_r.settingsSectionMap.push(["VencordStartupTimings","vencord_startup_timings"])},stop(){function e(t,o){let n=t.findIndex(o);n!==-1&&t.splice(n,1)}e(_r.customEntries,t=>t.key==="vencord_startup_timings"),e(_r.settingsSectionMap,t=>t[1]==="vencord_startup_timings")}});a();S();var mg=h({name:"StickerPaste",description:"Makes picking a sticker in the sticker picker insert it into the chatbox instead of instantly sending",authors:[m.ImBanana],patches:[{find:".stickers,previewSticker:",replacement:{match:/if\(\i\.\i\.getUploadCount/,replace:"return true;$&"}}]});a();S();v();function t3({streamKey:e},t){e.endsWith(C.getCurrentUser().id)&&L.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var fg=h({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[m.IcedMarina],flux:{STREAM_CREATE:e=>t3(e,!0),STREAM_DELETE:e=>t3(e,!1)}});a();S();v();var gg=x({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}}}),hg=h({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[m.FieryFlames,m.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:[{match:/(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=5+?(?=\))/,replace:(e,t,o)=>`${t}!$self.shouldPlayBurstReaction(${o})`},{match:/((\i)=5.+?)if\((.{0,20}?)>=\2\)return;/,replace:(e,t,o)=>`${t}if(!$self.shouldPlayBurstReaction(${o}))return;`,noWarn:!0}]},{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,n)=>`${t}$self.shouldSuperReactByDefault&&${n})`}}],settings:gg,shouldPlayBurstReaction(e){return!!(gg.store.unlimitedSuperReactionPlaying||gg.store.superReactionPlayingLimit>e)},get shouldSuperReactByDefault(){return gg.store.superReactByDefault&&C.getCurrentUser().premiumType!=null}});a();Po();Xo();to();Qs();zi();S();we();le();v();var o3=q("vc-textReplace-"),s3=()=>({find:"",replace:"",onlyIfIncludes:"",id:crypto.randomUUID()}),r3=()=>[s3()],Za=x({replace:{type:6,component:()=>{let{stringRules:e,regexRules:t}=Za.use(["stringRules","regexRules"]);return r(p,null,r(dR,null),r(i3,{title:"Simple Replacements",description:"Simple find and replace rules. For example, find 'brb' and replace it with 'be right back'",rulesArray:e}),r(i3,{title:"Regex Replacements",description:"More powerful replacements using Regular Expressions. This section is for advanced users. If you don't understand it, just ignore it",rulesArray:t,isRegex:!0}))}},stringRules:{type:7,default:r3()},regexRules:{type:7,default:r3()}});function a3(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuyv]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,n,i)=>i.indexOf(o)===n).join("")??"g"):new RegExp(e)}function uR(e){try{return a3(e),null}catch(t){return r("span",{style:{color:"var(--text-feedback-critical)"}},String(t))}}function pR({initialValue:e,onChange:t,placeholder:o}){let[n,i]=A(e);return r(yt,{placeholder:o,value:n,onChange:i,spellCheck:!1,onBlur:()=>n!==e&&setTimeout(()=>t(n),0)})}function fb({label:e,description:t,value:o,onChange:n}){return r(p,null,r(Vo,{text:t},r(wr,{weight:"medium",size:"md"},e)),r(pR,{placeholder:t,initialValue:o,onChange:n}))}var n3=e=>!e.find;function i3({title:e,description:t,rulesArray:o,isRegex:n=!1}){function i(l){o.splice(l,1)}function s(l,c,u){o[c][u]=l,o[c].find===""&&o[c].replace===""&&o[c].onlyIfIncludes===""&&c!==o.length-1&&o.splice(c,1)}return r(p,null,r("div",null,r(Ir,null,e),r(ee,null,t)),r(Y,{flexDirection:"column",style:{gap:"0.5em"}},o.map((l,c)=>r(xd,{key:l.id,renderContent:()=>r(p,null,r("div",{className:o3("input-grid")},r(fb,{label:"Find",description:n?"The regex pattern":"The text to replace",value:l.find,onChange:u=>s(u,c,"find")}),r(fb,{label:"Replace",description:"The text to replace the found text with",value:l.replace,onChange:u=>s(u,c,"replace")}),r(fb,{label:"Only if includes",description:"This rule will only be applied if the message includes this text. This is optional",value:l.onlyIfIncludes,onChange:u=>s(u,c,"onlyIfIncludes")})),n&&uR(l.find),r(et,{className:o3("delete-button"),variant:"dangerPrimary",onClick:()=>i(c)},"Delete Rule"))},r(ee,{weight:"medium",size:"md"},n3(l)?`Empty Rule ${c+1}`:`Rule ${c+1} - ${l.find}`))),r(et,{onClick:()=>o.push(s3()),disabled:o.length>0&&n3(o[o.length-1])},"Add Rule")))}function dR(){let[e,t]=A("");return r("div",null,r(Ir,null,"Rule Tester"),r(Y,{flexDirection:"column",gap:6},r(yt,{placeholder:"Type a message to test rules on",onChange:t}),r(yt,{placeholder:"Message with rules applied",editable:!1,value:l3(e),style:{opacity:.7}})))}function l3(e){if(e.length===0)return e;for(let t of Za.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 Za.store.regexRules)if(t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=a3(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
`))}catch{new B("TextReplace").error(`Invalid regex: ${t.find}`)}return e=e.trim(),e}var mR="1102784112584040479",yg=h({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[m.AutumnVN,m.TheKodeToad],settings:Za,start(){Za.store.regexRules.forEach(e=>e.id??=crypto.randomUUID()),Za.store.stringRules.forEach(e=>e.id??=crypto.randomUUID())},onBeforeMessageSend(e,t){e!==mR&&(t.content=l3(t.content))}});a();S();le();v();var vg=h({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[m.Ven,m.Board],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:"Message must not be a thread starter message",replacement:{match:/"aria-setsize":-1,(?=.{0,150}?#{intl::MESSAGE_A11Y_ROLE_DESCRIPTION})/,replace:"...$self.getMessageProps(arguments[0]),$&"}},{find:"#{intl::LABEL_WITH_ONLINE_STATUS}",replacement:[{match:/src:(\i)\?\?void 0.{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){try{let t=e.message?.author,o=t?.id;return{"data-author-id":o,"data-author-username":t?.username,"data-is-self":o&&o===C.getCurrentUser()?.id}}catch(t){return new B("ThemeAttributes").error("Error in getMessageProps",t),{}}}});a();S();v();a();var Fe=x({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},service:{type:4,description:"Translation service",disabled:()=>!1,options:[{label:"Google Translate",value:"google",default:!0},{label:"DeepL Free",value:"deepl"},{label:"DeepL Pro",value:"deepl-pro"}],onChange:gb},deeplApiKey:{type:0,description:"DeepL API key",default:"",placeholder:"Get your API key from https://deepl.com/your-account",disabled:()=>!1},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();function gb(){Fe.store.service==="google"?(Fe.store.receivedInput="auto",Fe.store.receivedOutput="en",Fe.store.sentInput="auto",Fe.store.sentOutput="en"):(Fe.store.receivedInput="",Fe.store.receivedOutput="en-us",Fe.store.sentInput="",Fe.store.sentOutput="en-us")}a();re();$e();v();a();Vt();Xn();$e();v();a();we();v();a();var hb={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"},yb={"":"Detect language",ace:"Acehnese",af:"Afrikaans",sq:"Albanian",ar:"Arabic",an:"Aragonese",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",ba:"Bashkir",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano","zh-hans":"Chinese (Simplified)","zh-hant":"Chinese (Traditional)",hr:"Croatian",cs:"Czech",da:"Danish",prs:"Dari",nl:"Dutch","en-us":"English (American)","en-gb":"English (British)",eo:"Esperanto",et:"Estonian",fi:"Finnish",fr:"French",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",ig:"Igbo",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jv:"Javanese",ko:"Korean",pam:"Kapampangan",kk:"Kazakh",kmr:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mn:"Mongolian",ne:"Nepali",nb:"Norwegian (Bokm\xE5l)",oc:"Occitan",om:"Oromo",pag:"Pangasinan",ps:"Pashto",fa:"Persian",pl:"Polish","pt-br":"Portuguese (Brazilian)","pt-pt":"Portuguese (European)",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scottish Gaelic",sr:"Serbian",st:"Sesotho",sn:"Shona",scn:"Sicilian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish","es-419":"Spanish (Latin American)",su:"Sundanese",sw:"Swahili",sv:"Swedish",tl:"Tagalog",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",wo:"Wolof",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"};function vb(e){switch(e){case"":return"auto";case"nb":return"no";case"zh-hans":return"zh-CN";case"zh-hant":return"zh-TW";case"en-us":case"en-gb":return"en";case"pt-br":case"pt-pt":return"pt";default:return e}}var Hr=q("vc-trans-"),fR=VencordNative.pluginHelpers.Translate,u3=()=>Fe.store.service==="google"?hb:yb;async function xu(e,t){let o=Fe.store.service==="google"?p3:hR;try{return await o(t,Fe.store[`${e}Input`],Fe.store[`${e}Output`])}catch(n){let i=typeof n=="string"?n:"Something went wrong. If this issue persists, please check the console or ask for help in the support server.";throw _e(i,j.Type.FAILURE),n instanceof Error?n:new Error(i)}}async function p3(e,t,o){let n="https://translate-pa.googleapis.com/v1/translate?"+new URLSearchParams({"params.client":"gtx",dataTypes:"TRANSLATION",key:"AIzaSyDLEeFI5OtFBwYBIoK_jj5m32rZK5CkCXA","query.sourceLanguage":t,"query.targetLanguage":o,"query.text":e}),i=await fetch(n);if(!i.ok)throw new Error(`Failed to translate "${e}" (${t} -> ${o})
${i.status} ${i.statusText}`);let{sourceLanguage:s,translation:l}=await i.json();return{sourceLanguage:hb[s]??s,text:l}}function c3(e,t,o){return p3(e,vb(t),vb(o))}var gR=Mn(()=>_e("Deepl API quota exceeded. Falling back to Google Translate",j.Type.FAILURE));async function hR(e,t,o){if(!Fe.store.deeplApiKey)return _e("DeepL API key is not set. Resetting to Google",j.Type.FAILURE),Fe.store.service="google",gb(),c3(e,t,o);let{status:n,data:i}=await fR.makeDeeplTranslateRequest(Fe.store.service==="deepl-pro",Fe.store.deeplApiKey,JSON.stringify({text:[e],target_lang:o,source_lang:t.split("-")[0]}));switch(n){case 200:break;case-1:throw"Failed to connect to DeepL API: "+i;case 403:throw"Invalid DeepL API key or version";case 456:return gR(),c3(e,t,o);default:throw new Error(`Failed to translate "${e}" (${t} -> ${o})
${n} ${i}`)}let{translations:s}=JSON.parse(i),l=s[0].detected_source_language;return{sourceLanguage:yb[l]??l,text:s[0].text}}var yR=["receivedInput","receivedOutput","sentInput","sentOutput"];function vR({settingsKey:e,includeAuto:t}){let o=Fe.use([e])[e],n=ce(()=>{let i=Object.entries(u3()).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return r("section",{className:k.bottom16},r(T.FormTitle,{tag:"h3"},Fe.def[e].description),r(Xs,{options:n,value:n.find(i=>i.value===o)?.value,placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Fe.store[e]=i}))}function bR(){let e=Fe.use(["autoTranslate"]).autoTranslate;return r(Jo,{title:"Auto Translate",description:Fe.def.autoTranslate.description,value:e,onChange:t=>Fe.store.autoTranslate=t,hideBorder:!0})}function d3({rootProps:e}){return r(ge,{...e},r(Ce,{className:Hr("modal-header")},r(T.FormTitle,{tag:"h2",className:Hr("modal-title")},"Translate"),r(Ke,{onClick:e.onClose})),r(xe,{className:Hr("modal-content")},yR.map(t=>r(vR,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),r(Ue,{className:k.bottom16}),r(bR,null)))}var ki=({height:e=20,width:t=20,className:o})=>r("svg",{viewBox:"0 96 960 960",height:e,width:t,className:R(Hr("icon"),o)},r("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"})),Tu,m3=({isMainChat:e})=>{let{autoTranslate:t}=Fe.use(["autoTranslate"]),[o,n]=A(!1);if(te(()=>(Tu=n,()=>Tu=void 0),[]),!e)return null;let i=()=>{let l=!t;Fe.store.autoTranslate=l,l&&Fe.store.showAutoTranslateAlert!==!1&&Ee.show({title:"Vencord Auto-Translate Enabled",body:r(p,null,r(T.FormText,null,"You just enabled Auto Translate! Any message ",r("b",null,"will automatically be translated")," before being sent.")),confirmText:"Disable Auto-Translate",cancelText:"Got it",secondaryConfirmText:"Don't show again",onConfirmSecondary:()=>Fe.store.showAutoTranslateAlert=!1,onConfirm:()=>Fe.store.autoTranslate=!1,confirmColor:"vc-notification-log-danger-btn"})},s=r(kr,{tooltip:"Open Translate Modal",onClick:l=>{if(l.shiftKey)return i();ue(c=>r(d3,{rootProps:c}))},onContextMenu:i,buttonProps:{"aria-haspopup":"dialog"}},r(ki,{className:Hr({"auto-translate":t,"chat-button":!0})}));return o&&Fe.store.showAutoTranslateTooltip?r(V,{text:"Auto Translate Enabled",forceOpen:!0},()=>s):s};a();v();var bb=new Map;function Sb(e,t){bb.get(e)(t)}function SR({onDismiss:e}){return r("button",{onClick:e,className:Hr("dismiss")},"Dismiss")}function f3({message:e}){let[t,o]=A();return te(()=>{if(!e.vencordEmbeddedBy)return bb.set(e.id,o),()=>void bb.delete(e.id)},[]),t?r("span",{className:Hr("accessory")},r(ki,{width:16,height:16,className:Hr("accessory-icon")}),Me.parse(t.text),r("br",null),"(translated from ",t.sourceLanguage," - ",r(SR,{onDismiss:()=>o(void 0)}),")"):null}var xR=(e,{message:t})=>{let o=h3(t);if(!o)return;let n=ze("copy-text",e);n&&n.splice(n.findIndex(i=>i?.props?.id==="copy-text")+1,0,r(P.MenuItem,{id:"vc-trans",label:"Translate",icon:ki,action:async()=>{let i=await xu("received",o);Sb(t.id,i)}}))};function h3(e){return e.content||e.messageSnapshots?.[0]?.message.content||e.embeds?.find(t=>t.type==="auto_moderation_message")?.rawDescription||""}var g3,bg=h({name:"Translate",description:"Translate messages with Google Translate or DeepL",authors:[m.Ven,m.AshtonMemer],settings:Fe,contextMenus:{message:xR},translate:xu,renderMessageAccessory:e=>r(f3,{message:e.message}),chatBarButton:{icon:ki,render:m3},messagePopoverButton:{icon:ki,render(e){let t=h3(e);return t?{label:"Translate",icon:ki,message:e,channel:Q.getChannel(e.channel_id),onClick:async()=>{let o=await xu("received",t);Sb(e.id,o)}}:null}},async onBeforeMessageSend(e,t){if(!Fe.store.autoTranslate||!t.content)return;Tu?.(!0),clearTimeout(g3),g3=setTimeout(()=>Tu?.(!1),2e3);let o=await xu("sent",t.content);t.content=o.text}});a();a();S();se();le();v();a();(window.VencordStyles??=new Map).set("src/plugins/typingTweaks/style.css",{name:"src/plugins/typingTweaks/style.css",source:`.vc-typing-user {
cursor: pointer;
[class*="wrapper"] {
display: inline-block;
margin-right: 0.25em;
vertical-align: -4px;
}
}`,classNames:{},dom:null});var y3="src/plugins/typingTweaks/style.css";var Sg=x({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"}}),xb=M.wrap(function({users:t,count:o,guildId:n}){return r(p,null,t.slice(0,o).map(i=>r(ye.Fragment,{key:i.id},r(v3,{user:i,guildId:n}),", ")),"and ",o," others are typing...")},{noop:!0}),v3=M.wrap(function({user:t,guildId:o}){return r("strong",{className:"vc-typing-user",role:"button",onClick:()=>{Qo(t.id)},style:{color:Sg.store.showRoleColors?Te.getMember(o,t.id)?.colorString:void 0}},Sg.store.showAvatars&&r(Wl,{size:"SIZE_16",src:t.getAvatarURL(o,128)}),Te.getNick(o,t.id)||!o&&Pe.getNickname(t.id)||t.globalName||t.username)},{noop:!0}),xg=h({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[m.zt,m.sadan],settings:Sg,managedStyle:y3,patches:[{find:"#{intl::SEVERAL_USERS_TYPING_STRONG}",group:!0,replacement:[{match:/(?<="aria-atomic":!0,children:)\i/,replace:"$self.renderTypingUsers({ users: arguments[0]?.typingUserObjects, guildId: arguments[0]?.channel?.guild_id, children: $& })"},{match:/(?<=function \i\(\i\)\{)(?=[^}]+?\{channel:\i,isThreadCreation:\i=!1,\.\.\.\i\})/,replace:"let typingUserObjects = $self.useTypingUsers(arguments[0]?.channel);"},{match:/typingUsers:(\i)\?\[\]:\i,/,replace:"$&typingUserObjects: $1 || typeof typingUserObjects === 'undefined' ? [] : typingUserObjects,"},{match:/(&&\(\i=)\i\.\i\.format\(\i\.\i#{intl::SEVERAL_USERS_TYPING_STRONG},\{\}\)/,replace:"$1$self.buildSeveralUsers({ users: arguments[0]?.typingUserObjects, count: arguments[0]?.typingUserObjects?.length - 2, guildId: arguments[0]?.channel?.guild_id })",predicate:()=>Sg.store.alternativeFormatting}]}],useTypingUsers(e){try{if(!e)throw new Error("No channel");let t=ie([Tn],()=>Tn.getTypingUsers(e.id)),o=ie([Yt],()=>Yt.getId());return Object.keys(t).filter(n=>n&&n!==o&&!Pe.isBlockedOrIgnored(n)).map(n=>C.getUser(n)).filter(Rr)}catch(t){return new B("TypingTweaks").error("Failed to get typing users:",t),[]}},buildSeveralUsers:xb,renderTypingUsers:M.wrap(({guildId:e,users:t,children:o})=>{try{if(!Array.isArray(o))return o;let n=0;return o.map(i=>{if(i.type!=="strong"&&!(typeof i!="string"&&!ye.isValidElement(i)))return i;let s=t[n++];return r(v3,{key:s.id,guildId:e,user:s})})}catch(n){new B("TypingTweaks").error("Failed to render typing users:",n)}return o},{noop:!0})});S();se();F();v();var TR=he("Math.min(1,Math.max(","dotRadius:");function Qa(e,t){let o=C.getUser(t);return Te.getNick(e,t)??o.globalName??o.username}function wR({channelId:e,guildId:t}){let o=ie([Tn],()=>({...Tn.getTypingUsers(e)}),null,(f,g)=>{let y=Object.keys(f),b=Object.keys(g);return y.length===b.length&&b.every(I=>f[I]!=null)}),n=ie([Ge],()=>Ge.getChannelId());if(!Ja.store.includeMutedChannels&&Ql.isChannelMuted(t,e)||!Ja.store.includeCurrentChannel&&n===e)return null;let i=C.getCurrentUser()?.id,s=Object.keys(o).filter(f=>f!==i&&!(Pe.isBlocked(f)&&!Ja.store.includeBlockedUsers)),[l,c,u]=s,d;switch(s.length){case 0:break;case 1:{d=Le("ONE_USER_TYPING",{a:Qa(t,l)});break}case 2:{d=Le("TWO_USERS_TYPING",{a:Qa(t,l),b:Qa(t,c)});break}case 3:{d=Le("THREE_USERS_TYPING",{a:Qa(t,l),b:Qa(t,c),c:Qa(t,u)});break}default:{d=$.plugins.TypingTweaks.enabled?xb({users:[l,c].map(C.getUser),count:s.length-2,guildId:t}):Le("SEVERAL_USERS_TYPING");break}}return s.length>0?r(V,{text:d},f=>r("div",{className:"vc-typing-indicator",...f},(Ja.store.indicatorMode&2)===2&&r("div",{onClick:g=>{g.stopPropagation(),g.preventDefault()},onKeyPress:g=>g.stopPropagation()},r(Pr,{users:s.map(g=>C.getUser(g)),guildId:t,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"})),(Ja.store.indicatorMode&1)===1&&r("div",{className:"vc-typing-indicator-dots"},r(TR,{dotRadius:3,themed:!0})))):null}var Ja=x({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}]}}),Tg=h({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[m.Nuckyz,m.fawn,m.Sqaaakoi],settings:Ja,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/\.Children\.count.+?:null(?<=,channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id,$1.getGuildId())"}},{find:"M0 15H2c0 1.6569",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id,$1.getGuildId())"}}],TypingIndicator:(e,t)=>r(M,{noop:!0},r(wR,{channelId:e,guildId:t}))});a();S();var wg=h({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[m.Ven],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:$self.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,n)=>Math.min(o,n.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 n="";return o[o.length-1]==="```"&&(n=o.pop()),`${o[0]}
${this.unindent(o.slice(1).join(`
`))}
${n}`})},onBeforeMessageSend(e,t){return this.unindentMsg(t)},onBeforeMessageEdit(e,t,o){return this.unindentMsg(o)}});a();S();var IR=x({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:er(2,16),default:4}}),Ig=h({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[m.nakoyasha],settings:IR,patches:[{find:"#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]});a();He();S();v();var Tb=4,PR=(e,{channel:t,message:{author:o,messageSnapshots:n,embeds:i,flags:s,id:l}})=>{let c=(s&Tb)!==0,u=n.some(y=>y.message.embeds.length);if(!c&&!i.length&&!u)return;let d=t.isPrivate()||!!(Ie.getChannelPermissions({id:t.id})&me.EMBED_LINKS);if(o.id===C.getCurrentUser().id&&!d)return;let f=ze("delete",e),g=f?.findIndex(y=>y?.props?.id==="delete");!g||!f||f.splice(g-1,0,r(P.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:c?"Unsuppress Embeds":"Suppress Embeds",color:c?void 0:"danger",icon:c?_l:Ys,action:()=>Mt.patch({url:St.Endpoints.MESSAGE(t.id,l),body:{flags:c?s&~Tb:s|Tb}})}))},Pg=h({name:"UnsuppressEmbeds",authors:[m.rad,m.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:PR}});a();S();a();se();re();F();v();a();var Xa=x({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}});a();se();v();function MR(e,t=!1){let o=ie([_t],()=>_t.getUserProfile(e)?.pronouns),n=ie([_t],()=>_t.getGuildMemberProfile(e,Yo()?.getGuildId())?.pronouns);return t?o:n||o}function b3(e,t=!1){let o=MR(e,t)?.trim().replace(/\n+/g,"");return Xa.store.pronounsFormat==="LOWERCASE"?o?.toLowerCase():o}var S3=Z("timestampInline","timestamp"),NR=Ro("textAndImages","messageDisplayCompact"),CR=24;function x3(e){return!(e.author.bot||e.author.system||e.type===CR||!Xa.store.showSelf&&e.author.id===C.getCurrentUser().id)}function T3({message:e}){let t=b3(e.author.id);return t&&r(V,{text:Le("USER_PROFILE_PRONOUNS")},o=>r("span",{...o,className:R(S3.timestampInline,S3.timestamp)},"\u2022 ",t))}var w3=M.wrap(({message:e})=>x3(e)?r(T3,{message:e}):null,{noop:!0}),I3=M.wrap(({message:e})=>!NR.useSetting()||!x3(e)?null:r(T3,{message:e}),{noop:!0});tr("UserMessagesPronouns","PronounDB");var Mg=h({name:"UserMessagesPronouns",authors:[m.Tyman,m.TheKodeToad,m.Ven,m.Elvyra],description:"Adds pronouns to chat user messages",settings:Xa,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\.\i)?,\i\)\}\)(?:\))?,(?=\i)/g,replace:"$&$self.CompactPronounsChatComponentWrapper(arguments[0]),"}]}],PronounsChatComponentWrapper:w3,CompactPronounsChatComponentWrapper:I3});a();S();a();we();re();F();v();var Va=q("vc-uvs-"),{selectVoiceChannel:kR}=X("selectVoiceChannel","selectChannel"),P3=Z("actionButton","highlight");function Cg(e){let{size:t=16,className:o,...n}=e;return r("div",{...n,className:R(Va("speaker"),o)},r("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},e.children))}function M3(e){return r(Cg,{...e},r("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"}),r("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 N3(e){return r(Cg,{...e},r("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"}),r("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 AR(e){return r(Cg,{...e},r("path",{d:"m2.7 22.7 20-20a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4ZM10.8 17.32c-.21.21-.1.58.2.62V20H9a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-2v-2.06A8 8 0 0 0 20 10a1 1 0 0 0-2 0c0 1.45-.52 2.79-1.38 3.83l-.02.02A5.99 5.99 0 0 1 12.32 16a.52.52 0 0 0-.34.15l-1.18 1.18ZM15.36 4.52c.15-.15.19-.38.08-.56A4 4 0 0 0 8 6v4c0 .3.03.58.1.86.07.34.49.43.74.18l6.52-6.52ZM5.06 13.98c.16.28.53.31.75.09l.75-.75c.16-.16.19-.4.08-.61A5.97 5.97 0 0 1 6 10a1 1 0 0 0-2 0c0 1.45.39 2.81 1.06 3.98Z"}))}function RR(e){return r(Cg,{...e},r("path",{d:"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4l20-20ZM17.06 2.94a.48.48 0 0 0-.11-.77A11 11 0 0 0 2.18 16.94c.14.3.53.35.76.12l3.2-3.2c.25-.25.15-.68-.2-.76a5 5 0 0 0-1.02-.1H3.05a9 9 0 0 1 12.66-9.2c.2.09.44.05.59-.1l.76-.76ZM20.2 8.28a.52.52 0 0 1 .1-.58l.76-.76a.48.48 0 0 1 .77.11 11 11 0 0 1-4.5 14.57c-1.27.71-2.73.23-3.55-.74a3.1 3.1 0 0 1-.17-3.78l1.38-1.97a5 5 0 0 1 4.1-2.13h1.86a9.1 9.1 0 0 0-.75-4.72ZM10.1 17.9c.25-.25.65-.18.74.14a3.1 3.1 0 0 1-.62 2.84 2.85 2.85 0 0 1-3.55.74.16.16 0 0 1-.04-.25l3.48-3.48Z"}))}function DR({channel:e,isLocked:t}){let o=ie([go],()=>go.getVoiceStatesForChannel(e.id)),n=ce(()=>Object.values(o).map(s=>C.getUser(s.userId)).filter(s=>s!=null),[o]),i=t?N3:M3;return r(p,null,r(G,{variant:"text-sm/bold"},"In Voice Chat"),r(G,{variant:"text-sm/bold"},Me.parse(`<#${e.id}>`)),r("div",{className:Va("vc-members")},r(i,{size:18}),r(Pr,{users:n,renderIcon:!1,max:13,size:18})))}var Ng=new Map,kg=M.wrap(({userId:e,isProfile:t,isActionButton:o,shouldHighlight:n})=>{let i=ie([go],()=>go.getVoiceStateForUser(e)?.channelId),{isMuted:s,isDeaf:l}=ie([go],()=>{let y=go.getVoiceStateForUser(e);return{isMuted:y?.mute||y?.selfMute||!1,isDeaf:y?.deaf||y?.selfDeaf||!1}}),c=i==null?void 0:Q.getChannel(i);if(c==null)return null;let u=c.isDM()||c.isMultiUserDM();if(!u&&!Ie.can(me.VIEW_CHANNEL,c)&&!ke(qa.name))return null;let d=!u&&(!Ie.can(me.VIEW_CHANNEL,c)||!Ie.can(me.CONNECT,c));function f(y){if(y.preventDefault(),y.stopPropagation(),!(c==null||i==null))if(clearTimeout(Ng.get(i)),Ng.delete(i),y.detail>1){if(!u&&!Ie.can(me.CONNECT,c)){_e("You cannot join the user's Voice Channel",j.Type.FAILURE);return}kR(i)}else{let b=setTimeout(()=>{la.transitionToChannel(i),Ng.delete(i)},250);Ng.set(i,b)}}let g=d?N3:l?RR:s?AR:M3;return r(V,{text:r(DR,{channel:c,isLocked:d}),tooltipClassName:Va("tooltip-container"),tooltipContentClassName:Va("tooltip-content")},y=>r(g,{...y,role:"button",onClick:f,className:R(Va("clickable"),o&&P3.actionButton,o&&n&&P3.highlight,Va(t&&"profile-speaker")),size:o?20:16}))},{noop:!0});var wu=x({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}}),Ag=h({name:"UserVoiceShow",description:"Shows an indicator when a user is in a Voice Channel",authors:[m.Nuckyz,m.LordElias],dependencies:["MemberListDecoratorsAPI","MessageDecorationsAPI"],settings:wu,patches:[{find:"#{intl::USER_PROFILE_PRONOUNS}",replacement:{match:/(?<=children:\[\i," ",\i)(?=\])/,replace:",$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id,isProfile:true})"},predicate:()=>wu.store.showInUserProfileModal},{find:"null!=this.peopleListItemRef.current",replacement:{match:/\.isProvisional.{0,50}?className:\i\.\i,children:\[(?<=isFocused:(\i).+?)/,replace:"$&$self.VoiceChannelIndicator({userId:this?.props?.user?.id,isActionButton:true,shouldHighlight:$1}),"},predicate:()=>wu.store.showInMemberList}],start(){wu.store.showInMemberList&&Vi("UserVoiceShow",({user:e})=>e==null?null:r(kg,{userId:e.id})),wu.store.showInMessages&&ts("UserVoiceShow",({message:e})=>e?.author==null?null:r(kg,{userId:e.author.id}))},stop(){es("UserVoiceShow"),os("UserVoiceShow")},VoiceChannelIndicator:kg});a();Po();S();var LR="https://usrbg.is-hardly.online/users",Rg=x({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}}),Dg=h({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[m.AutumnVN,m.katlyn,m.pylix,m.TheKodeToad],settings:Rg,patches:[{find:':"SHOULD_LOAD");',replacement:{match:/\i(?:\?)?.getPreviewBanner\(\i,\i,\i\)(?=.{0,100}"COMPLETE")/,replace:"$self.patchBannerUrl(arguments[0])||$&"}},{find:'"data-selenium-video-tile":',predicate:()=>Rg.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.getVoiceBackgroundStyles($1);"}]},{find:'"VideoBackground-web"',predicate:()=>Rg.store.voiceBackground,replacement:{match:/backgroundColor:.{0,25},\{style:(?=\i\?)/,replace:"$&$self.userHasBackground(arguments[0]?.userId)?null:"}}],data:null,settingsAboutComponent:()=>r(Hl,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner",variant:"primary"},"Get your own USRBG 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&&Rg.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:n,users:{[e]:i}}=this.data;return`${t}/${o}/${n}${e}?${i}`},async start(){let e=await fetch(LR);e.ok&&(this.data=await e.json())}});a();S();F();v();var wb=new Map,Ib,OR=fe(".createFromServer(",".isBlockedForMessage","messageReference:"),Lg=h({name:"ValidReply",description:'Fixes "Message could not be loaded" upon hovering over the reply',authors:[m.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);",noWarn:!0},{match:/_channelCaches=new Map;/,replace:"$&_=$self.setReplyStore(this);"}]}],setReplyStore(e){Ib=e},async fetchReply(e){let{channel_id:t,message_id:o}=e.baseMessage.messageReference;wb.has(o)||(wb.set(o,t),Mt.get({url:`/channels/${t}/messages`,query:{limit:1,around:o},retries:2}).then(n=>{let i=n?.body?.[0];i&&(i.id!==o?(Ib.set(t,o,{state:2}),L.dispatch({type:"MESSAGE_DELETE",channelId:t,message:o})):(Ib.set(i.channel_id,i.id,{state:0,message:OR(i)}),L.dispatch({type:"MESSAGE_UPDATE",message:i})))}).catch(()=>{}).finally(()=>{wb.delete(o)}))}});a();S();re();v();var _R=St.UserFlags,C3={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"}},Og=new Set,k3=new Ao(5);async function BR(e){let t=C.getUser(e);if(t)return t;let o=await Mt.get({url:St.Endpoints.USER(e)}).then(s=>(L.dispatch({type:"USER_UPDATE",user:s.body}),s.body));await L.dispatch({type:"USER_PROFILE_FETCH_FAILURE",userId:e}),t=C.getUser(e);let n=Object.entries(_R).filter(([s,l])=>!isNaN(l)&&t.hasFlag(l)).map(([s])=>C3[s.toLowerCase()]).filter(Rr);(o.premium_type||!o.bot&&(o.banner||o.avatar?.startsWith?.("a_")))&&n.push(C3.premium);let i=_t.getUserProfile(e);return i&&(i.accentColor=o.accent_color,i.badges=n,i.banner=o.banner,i.premiumType=o.premium_type),t}function UR({data:e,UserMention:t,RoleMention:o,parse:n,props:i}){let[s,l]=A(e.userId);if(s)return r(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=n(e.content,i);return r(o,{...e,inlinePreview:i.formatInline},r("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let d=u.match(/<@!?(\d+)>/)?.[1];if(!d||Og.has(d))return;if(C.getUser(d))return l(d);let f=()=>{Og.add(d),k3.unshift(()=>BR(d).then(()=>{l(d),Og.delete(d)}).catch(g=>{g?.status===429&&(k3.unshift(()=>vr(g?.body?.retry_after??1e3).then(f)),Og.delete(d))}).finally(()=>vr(300)))};f()}},c))}var _g=h({name:"ValidUser",description:"Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",authors:[m.Ven,m.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,n,i){return r(M,{noop:!0},r(UR,{key:"mention"+o.userId,RoleMention:e,UserMention:t,data:o,parse:n,props:i}))}});a();S();v();var Pb={},Bg=h({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[m.Ven,m.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=Q.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Ge.getVoiceChannelId()===o){e();return}let n=Pb[o]??={timeout:void 0,i:0};clearTimeout(n.timeout),++n.i>=2?(e(),delete Pb[o]):n.timeout=setTimeout(()=>{delete Pb[o]},500)}});a();S();le();ir();v();a();le();a();v();function ER(e,t){return e.reduce((o,n)=>{let i=t(n);return o[i]??=[],o[i].push(n),o},{})}function Mb({voice:e,voices:t}){let o=t.map(n=>({label:n.name,value:n.voiceURI,default:n.default}));return r(Xs,{placeholder:"Select a voice",maxVisibleItems:5,options:o,value:o.find(n=>n.value===e)?.value,onChange:n=>so.store.voice=n,closeOnSelect:!0})}var FR=new Intl.DisplayNames(["en"],{type:"language"});function $R({voice:e,voices:t}){let o=ce(()=>ER(t,u=>u.lang),[t]),n=ce(()=>{let u=[];for(let d in o)try{let f=FR.of(d);f&&u.push({name:d,friendlyName:f})}catch{}return u},[o]),[i,s]=A(()=>Ug()?.lang??n[0].name);if(n.length===1)return r(Mb,{voice:e,voices:o[n[0].name]});let l=o[i],c=n.map(u=>({label:u.friendlyName,value:u.name}));return r(p,null,r(T.FormTitle,null,"Language"),r(Xs,{placeholder:"Select a language",options:c,value:c.find(u=>u.value===i)?.value,onChange:u=>s(u),maxVisibleItems:5,closeOnSelect:!0}),r(T.FormTitle,null,"Voice"),r(Mb,{voice:e,voices:l}))}function GR(){let e=ce(()=>window.speechSynthesis?.getVoices()??[],[]),{voice:t}=so.use(["voice"]);if(!e.length)return r(T.FormText,null,"No voices found.");let o=e.length>20?$R:Mb;return r(o,{voice:t,voices:e})}function A3(){return r("section",null,r(T.FormTitle,null,"Voice"),r(GR,null))}var HR=()=>window.speechSynthesis?.getVoices().find(e=>e.default);function Ug(e=window.speechSynthesis?.getVoices()){if(!e)return;if(so.store.voice){let o=e.find(n=>n.voiceURI===so.store.voice);if(o)return o;new B("VcNarrator").error(`Voice "${so.store.voice}" not found. Resetting to default.`)}let t=e.find(o=>o.default);return so.store.voice=t?.voiceURI,t}var so=x({voice:{type:6,component:A3,get default(){return HR()?.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 Fg(e){if(!e)return;let{volume:t,rate:o}=so.store,n=new SpeechSynthesisUtterance(e),i=Ug();n.voice=i,n.volume=t,n.rate=o,speechSynthesis.speak(n)}function Eg(e){let t=so.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 $g(e,t,o,n,i){return e.replaceAll("{{USER}}",Eg(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Eg(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Eg(n)||(n?"Someone":"")).replaceAll("{{NICKNAME}}",Eg(i)||(i?"Someone":""))}var Nb;function zR({channelId:e,oldChannelId:t},o){if(o&&e!==Nb&&(t=Nb,Nb=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function WR(e){let t=C.getCurrentUser(),o=uo.getGuildId();Fg($g(so.store[e+"Message"],t.username,"general",t.globalName??t.username,Te.getNick(o,t.id)??t.username))}var Gg=h({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[m.Ven],reporterTestable:2,settings:so,flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=uo.getGuildId(),o=Ge.getVoiceChannelId(),n=C.getCurrentUser().id;if(Q.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===n;if(u&&i.sessionId!==Yt.getSessionId()||!u&&(!o||l!==o&&c!==o))continue;let[d,f]=zR(i,u);if(!d)continue;let g=so.store[d+"Message"],y=u&&!so.store.sayOwnName?"":C.getUser(s).username,b=y&&(C.getUser(s).globalName??y),I=y&&(Te.getNick(t,s)??b),w=Q.getChannel(f).name;Fg($g(g,y,w,b,I))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ge.getVoiceChannelId(),t=go.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";Fg($g(so.store[o+"Message"],"",Q.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ge.getVoiceChannelId(),t=go.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";Fg($g(so.store[o+"Message"],"",Q.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new B("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},settingsAboutComponent(){let[e,t]=ce(()=>{let i=speechSynthesis.getVoices();return[i.length!==0,i.some(s=>s.lang.startsWith("en"))]},[]),o=ce(()=>Object.keys(so.def).filter(i=>i.endsWith("Message")).map(i=>i.slice(0,-7)),[]),n=null;if(e)t||(n=r(Rt,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let i="No narrator voices found. ";i+=dh?"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",n=r(Rt,null,i)}return r("section",null,r(T.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),r(T.FormText,null,"The special placeholders ",r("code",null,"{{USER}}"),", ",r("code",null,"{{DISPLAY_NAME}}"),", ",r("code",null,"{{NICKNAME}}")," and ",r("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"),t&&r(p,null,r(T.FormTitle,{className:k.top20,tag:"h3"},"Play Example Sounds"),r("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},o.map(i=>r(U,{key:i,onClick:()=>WR(i)},dn([i]))))),n)}});a();He();S();se();v();var Cb=x({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"}))}}),Iu=e=>D3(e,512,512),R3=e=>D3(e,1024);function D3(e,t,o){let n=new URL(e,window.location.href),i=e.startsWith("/")?"png":n.searchParams.get("animated")==="true"?"gif":Cb.store.format;n.searchParams.set("size",Cb.store.imgSize),n.pathname=n.pathname.replace(/\.(png|jpe?g|webp)$/,`.${i}`),e=n.toString(),n.searchParams.set("size","4096");let s=n.toString();Zo({url:e,original:s,width:t,height:o})}var jR=(e,{user:t,guildId:o})=>{if(!t)return;let n=Te.getMember(o,t.id)?.avatar||null;e.splice(-1,0,r(P.MenuGroup,null,r(P.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Iu(at.getUserAvatarURL(t,!0)),icon:Tr}),n&&r(P.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Iu(at.getGuildMemberAvatarURLSimple({userId:t.id,avatar:n,guildId:o,canAnimate:!0})),icon:Tr})))},qR=(e,{guild:t})=>{if(!t)return;let{id:o,icon:n,banner:i}=t;!i&&!n||e.splice(-1,0,r(P.MenuGroup,null,n?r(P.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Iu(at.getGuildIconURL({id:o,icon:n,canAnimate:!0})),icon:Tr}):null,i?r(P.MenuItem,{id:"view-banner",label:"View Banner",action:()=>R3(at.getGuildBannerURL(t,!0)),icon:Tr}):null))},KR=(e,{channel:t})=>{t&&e.splice(-1,0,r(P.MenuGroup,null,r(P.MenuItem,{id:"view-group-channel-icon",label:"View Icon",action:()=>Iu(at.getChannelIconURL(t)),icon:Tr})))},Hg=h({name:"ViewIcons",authors:[m.Ven,m.TheKodeToad,m.Nuckyz,m.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:Cb,openAvatar:Iu,openBanner:R3,contextMenus:{"user-context":jR,"guild-context":qR,"gdm-context":KR},patches:[{find:"imageClassName:null!=",replacement:{match:/avatarSrc:(\i),eventHandlers:(\i).+?"div",.{0,100}className:\i,/,replace:'$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},'}},{find:'backgroundColor:"COMPLETE"',replacement:{match:/(overflow:"visible",.{0,125}?!1\),)style:{(?=.+?backgroundImage:null!=(\i)\?`url\(\$\{\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:".channel.getRecipientId(),",replacement:{match:/(?=,src:(\i.getAvatarURL\(.+?[)]))/,replace:(e,t)=>`,onClick:()=>$self.openAvatar(${t})`}},{find:".EMPTY_GROUP_DM)",replacement:{match:/(?<=SIZE_80,)(?=src:(.+?\))[,}])/,replace:(e,t)=>`onClick:()=>$self.openAvatar(${t}),`}}]});a();Vt();S();se();$e();v();var Wg=({height:e=20,width:t=20,className:o})=>r("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:t,height:e,className:o},r("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"}),r("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"}));function YR(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function ZR(e){let t=YR(JSON.parse(JSON.stringify(e)));for(let n of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[n];let o=t;return delete o.editHistory,delete o.deleted,delete o.firstEditTimestamp,o.attachments?.forEach(n=>delete n.deleted),t}function kb(e,t,o){let n=ue(i=>r(M,null,r(ge,{...i,size:"large"},r(Ce,null,r(G,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),r(Ke,{onClick:()=>gn(n)})),r(xe,null,r("div",{style:{padding:"16px 0"}},!!o&&r(p,null,r(T.FormTitle,{tag:"h5"},"Content"),r(rc,{content:o,lang:""}),r(Ue,{className:k.bottom20})),r(T.FormTitle,{tag:"h5"},t," Data"),r(rc,{content:e,lang:"json"}))),r(ht,null,r(Y,null,r(U,{onClick:()=>it(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&r(U,{onClick:()=>it(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function L3(e){e=ZR(e);let t=JSON.stringify(e,null,4);return kb(t,"Message",e.content)}var zg=x({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"}]}});function el(e){return(t,o)=>{let n=o[e.toLowerCase()];if(!n||o.label===Le("CHANNEL_ACTIONS_MENU_LABEL"))return;let i=t.at(-1);if(i?.key==="developer-actions"){let l=i.props;Array.isArray(l.children)||(l.children=[l.children]),t=l.children}let s=`vc-view-${e.toLowerCase()}-raw`;t.splice(-1,0,r(P.MenuItem,{id:s,label:"View Raw",action:()=>kb(JSON.stringify(n,null,4),e),icon:Wg}))}}var QR=(e,{id:t})=>{let o=yn();if(!o)return;let n=xt.getRole(o.id,t);n&&e.push(r(P.MenuItem,{id:"vc-view-role-raw",label:"View Raw",action:()=>kb(JSON.stringify(n,null,4),"Role"),icon:Wg}))},jg=h({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[m.KingFish,m.Ven,m.rad,m.ImLvna],settings:zg,contextMenus:{"guild-context":el("Guild"),"guild-settings-role-context":el("Role"),"channel-context":el("Channel"),"thread-context":el("Channel"),"gdm-context":el("Channel"),"user-context":el("User"),"dev-context":QR},messagePopoverButton:{icon:Wg,render(e){let t=()=>{zg.store.clickMethod==="Right"?it(e.content):L3(e)},o=i=>{zg.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),it(e.content)):(i.preventDefault(),i.stopPropagation(),L3(e))};return{label:zg.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:Wg,message:e,channel:Q.getChannel(e.channel_id),onClick:t,onContextMenu:o}}}});a();S();var qg=h({name:"VoiceDownload",description:"Adds a download to voice messages. (Opens a new browser tab)",authors:[m.puv],patches:[{find:"#{intl::VOICE_MESSAGES_PLAYBACK_RATE_LABEL}",replacement:{match:/(?<=onVolumeHide:\i\}\))/,replace:",$self.renderDownload(arguments[0].src)"}}],renderDownload(e){return r("a",{className:"vc-voice-download",href:e,onClick:t=>t.stopPropagation(),"aria-label":"Download voice message",download:"voice-message.ogg"},r(this.Icon,null))},Icon:()=>r("svg",{height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},r("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"}))});a();He();qt();to();S();we();$e();dt();F();v();a();v();a();var tl=x({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}});var w6e=VencordNative.pluginHelpers.VoiceMessages;a();dt();F();var JR=he("waveform:","onVolumeChange"),O3=({src:e,waveform:t,recording:o})=>{let n=Cl({deps:[o]}),i=o?Math.floor(n/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?r(JR,{key:e,src:e,waveform:t}):r("div",{className:Ai("preview",o?"preview-recording":[])},r("div",{className:Ai("preview-indicator")}),r("div",{className:Ai("preview-time")},s),r("div",{className:Ai("preview-label")},o?"RECORDING":"----"))};a();v();var _3=({setAudioBlob:e,onRecordingChange:t})=>{let[o,n]=A(!1),[i,s]=A(!1),[l,c]=A(),[u,d]=A([]),f=y=>{n(y),t?.(y)};function g(){!o?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:tl.store.echoCancellation,noiseSuppression:tl.store.noiseSuppression,deviceId:na.getInputDeviceId()}}).then(b=>{let I=[];d(I);let w=new MediaRecorder(b);c(w),w.addEventListener("dataavailable",D=>{I.push(D.data)}),w.start(),f(!0)}):l&&(l.addEventListener("stop",()=>{e(new Blob(u,{type:"audio/ogg; codecs=opus"})),f(!1)}),l.stop())}return r(p,null,r(U,{onClick:g},o?"Stop":"Start"," recording"),r(U,{disabled:!o,onClick:()=>{s(!i),i?l?.resume():l?.pause()}},i?"Resume":"Pause"," recording"))};var XR=Ot(e=>e.prototype?.trackUploadFinished),Ai=q("vc-vmsg-"),VR=_3,e7=(e,t)=>{t.channel.guild_id&&!(Ie.can(me.SEND_VOICE_MESSAGES,t.channel)&&Ie.can(me.SEND_MESSAGES,t.channel))||e.push(r(P.MenuItem,{id:"vc-send-vmsg",iconLeft:zu,leadingAccessory:{type:"icon",icon:zu},label:"Send Voice Message",action:()=>ue(o=>r(r7,{modalProps:o}))}))},Kg=h({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:[m.Ven,m.Vap,m.Nickyux],settings:tl,contextMenus:{"channel-attach":e7}}),Ab={waveform:"AAAAAAAAAAAA",duration:1};function t7(e,t){let o=Ge.getChannelId(),n=xn.getPendingReply(o);n&&L.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new XR({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isThumbnail:!1,platform:1},o);i.on("complete",()=>{Mt.post({url:St.Endpoints.MESSAGES(o),body:{flags:8192,channel_id:o,content:"",nonce:No.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:n?Xt.getSendMessageOptionsForReply(n)?.messageReference:null}})}),i.on("error",()=>_e("Failed to upload voice message",j.Type.FAILURE)),i.upload()}function o7(){let[e,t]=A();return[e,n=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(n))}]}function r7({modalProps:e}){let[t,o]=A(!1),[n,i]=A(),[s,l]=o7();te(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c,u]=pt(async()=>{if(!n)return Ab;let g=await new AudioContext().decodeAudioData(await n.arrayBuffer()),y=g.getChannelData(0),b=new Uint8Array(Ki.clamp(Math.floor(g.duration*10),Math.min(32,y.length),256)),I=Math.floor(y.length/b.length);for(let N=0;N<b.length;N++){let _=0;for(let W=0;W<I;W++){let H=N*I+W;_+=y[H]**2}b[N]=~~(Math.sqrt(_/I)*255)}let w=Math.max(...b),D=1+(255/w-1)*Math.min(1,100*(w/255)**3);for(let N=0;N<b.length;N++)b[N]=Math.min(255,~~(b[N]*D));return{waveform:window.btoa(String.fromCharCode(...b)),duration:g.duration}},{deps:[n],fallbackValue:Ab}),d=n&&(!n.type.startsWith("audio/ogg")||n.type.includes("codecs")&&!n.type.includes("opus"));return r(ge,{...e},r(Ce,null,r(T.FormTitle,null,"Record Voice Message")),r(xe,{className:Ai("modal")},r("div",{className:Ai("buttons")},r(VR,{setAudioBlob:f=>{i(f),l(f)},onRecordingChange:o}),r(U,{onClick:async()=>{let f=await fp("audio/*");f&&(i(f),l(f))}},"Upload File")),r(T.FormTitle,null,"Preview"),u?r(ee,{className:Ai("error")},"Failed to parse selected audio file: ",u.message):r(O3,{src:s,waveform:c.waveform,recording:t}),d&&r(Ae,{variant:"warning",className:k.top16,defaultPadding:!0},r(T.FormText,null,"Voice Messages have to be OggOpus to be playable on iOS. This file is ",r("code",null,n.type)," so it will not be playable on iOS."),r(T.FormText,{className:k.top8},"To fix it, first convert it to OggOpus, for example using the ",r(Oe,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),r(ht,null,r(U,{disabled:!n,onClick:()=>{t7(n,c??Ab),e.onClose(),_e("Now sending voice message... Please be patient",j.Type.MESSAGE)}},"Send")))}a();S();var n7=x({multiplier:{description:"Volume Multiplier",type:5,markers:er(1,5,.5),default:2,stickToMarkers:!0}}),Yg=h({name:"VolumeBooster",authors:[m.Nuckyz,m.sadan],description:"Allows you to set the user and stream volume above the default maximum",settings:n7,patches:[{find:"#{intl::USER_VOLUME}",replacement:{match:/(?<=maxValue:)\i\.isPlatformEmbedded\?(\i\.\i):\i\.\i(?=,)/,replace:(e,t)=>`${t}*$self.settings.store.multiplier`}},{find:"currentVolume:",replacement:{match:/(?<=maxValue:)\i\.\i\?(\d+?):\d+?(?=,)/,replace:(e,t)=>`${t}*$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,n,i)=>t+`(${o}>200?void 0:${o}=${n})`+i+`${o}??${n})`}]}],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}}});a();cn();S();F();v();var Zg=Xe('closest("[contenteditable=true]")',{contextMenuCallbackWeb:O.byCode('"[contenteditable=true]"'),contextMenuCallbackNative:O.byCode('.getPropertyValue("-webkit-user-select")')});async function i7(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var s7=x({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0,hidden:!0}}),ol=()=>!0,a7="https://media.discordapp.net",B3="cdn.discordapp.com";function U3(e){let t=new URL(e);return t.host===B3?e:(t.searchParams.delete("width"),t.searchParams.delete("height"),t.origin===a7?(t.host=B3,t.searchParams.delete("size"),t.searchParams.delete("quality"),t.searchParams.delete("format")):t.searchParams.set("quality","lossless"),t.toString())}var Qg=h({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:[m.Ven],enabledByDefault:!0,required:!0,settings:s7,start(){ol()&&(window.removeEventListener("contextmenu",Zg.contextMenuCallbackWeb),window.addEventListener("contextmenu",Zg.contextMenuCallbackNative),this.changedListeners=!0)},stop(){this.changedListeners&&(window.removeEventListener("contextmenu",Zg.contextMenuCallbackNative),window.addEventListener("contextmenu",Zg.contextMenuCallbackWeb))},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\i\.\i\.copy/,replace:"Vencord.Util.copyToClipboard"}]},{find:"Copy image not supported",replacement:[{match:/(?<=(?:canSaveImage|canCopyImage)\(.{0,120}?)!\i\.isPlatformEmbedded/g,replace:"false"},{match:/(?<=canCopyImage\(.+?)typeof \i\.clipboard\.copyImage/,replace:'"function"'}]},{find:'id:"copy-image"',replacement:[{match:/!\i\.isPlatformEmbedded/,replace:"false"},{match:/(#{intl::COPY_IMAGE_MENU_ITEM}\),.{0,75}?)action:/,replace:"$1action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(#{intl::SAVE_IMAGE_MENU_ITEM}\),.{0,75}?)action:/,replace:"$1action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',all:!0,predicate:ol,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:ol,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:ol,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/,replace:"||true)"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:ol,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:ol,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.Util.copyToClipboard"}],all:!0,noWarn:!0},{find:'("interactionUsernameProfile',replacement:{match:/\i\.isPlatformEmbedded(?=.{0,50}\.tagName)/,replace:"true"}}],async copyImage(e){e=U3(e);let t=await fetch(e).then(o=>o.blob());if(t.type!=="image/png"){let o=await createImageBitmap(t),n=document.createElement("canvas");n.width=o.width,n.height=o.height,n.getContext("2d").drawImage(o,0,0),await new Promise(i=>{n.toBlob(s=>{t=s,i()},"image/png")})}if(VesktopNative.clipboard){VesktopNative.clipboard.copyImage(await t.arrayBuffer(),e);return}else navigator.clipboard.write([new ClipboardItem({"image/png":t})])},async saveImage(e){e=U3(e);let t=await i7(e);if(!t)return;let o=new URL(e).pathname.split("/").pop(),n=new File([t],o,{type:t.type});mp(n)},copy(){let e=document.getSelection();e&&lo(e.toString())},cut(){this.copy(),Uo.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 n=new File([await e.getType(o)],"unknown.png",{type:o});t.items.add(n)}else if(o==="text/plain"){let n=await e.getType(o);t.setData(o,await n.text())}document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}});a();S();F();v();var Rb=X("JUMP_TO_GUILD","SERVER_NEXT"),Jg=h({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:[m.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&wo)switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(uo.getGuildId()&&Mr.transitionToGuild("@me"),Uo.safeDispatch("TOGGLE_DM_CREATE")):L.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case"Tab":(e.shiftKey?Rb.SERVER_PREV:Rb.SERVER_NEXT).action(e);break;case",":e.preventDefault(),si.openUserSettings("my_account_panel");break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),Rb.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}});a();S();var Xg=h({name:"WebScreenShareFixes",authors:[m.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=\$\{\i\}`/,replace:'"x-google-max-bitrate=80_000"'},{match:";level-asymmetry-allowed=1",replace:";b=AS:800000;level-asymmetry-allowed=1"},{match:/;usedtx=\$\{(\i)\?"0":"1"\}/,replace:'$&${$1?";stereo=1;sprop-stereo=1":""}'}]}]});a();S();re();dt();v();var Db=null,l7=new Ao,F3;function c7(e,t,o){let n=t.name+(t.id?`:${t.id}`:"");return Mt.get({url:St.Endpoints.REACTIONS(e.channel_id,e.id,n),query:{limit:100,type:o},oldFormErrors:!0}).then(i=>{for(let s of i.body)L.dispatch({type:"USER_UPDATE",user:s});L.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})}).catch(console.error).finally(()=>vr(250))}function u7(e,t,o){let n=`${e.id}:${t.name}:${t.id??""}:${o}`,i=F3[n]??={fetched:!1,users:new Map};return i.fetched||(l7.unshift(()=>c7(e,t,o)),i.fetched=!0),i.users}function E3(e){e.stopPropagation()}var Vg=h({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[m.Ven,m.KannaDev,m.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|\.messages\.loadingMore))/,replace:"$&$self.setScrollObj(this);"}}],setScrollObj(e){Db=e},renderUsers(e){return e.message.reactions.length>10?null:r(M,{noop:!0},r(this.UsersComponent,{...e}))},UsersComponent({message:e,emoji:t,type:o}){let n=Ko();oi(()=>{Db?.scrollCounter>0&&Db.setAutomaticAnchor(null)}),te(()=>{let l=c=>{c?.messageId===e.id&&n()};return L.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>L.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id,n]);let i=u7(e,t,o),s=Array.from(i,([l])=>C.getUser(l)).filter(Boolean);return r("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},r("div",{onClick:E3,onKeyDown:E3},r(Pr,{users:s,guildId:Q.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0})))},set reactions(e){F3=e}});a();S();le();F();v();var eh=Ot(e=>e.ANNOUNCEMENT_THREAD===10),p7=fe(".SUPPRESS_NOTIFICATIONS))return!1"),qNe=new B("XSOverlay"),$t=x({webSocketPort:{type:1,description:"Websocket port",default:42070,async onChange(){await Lb()}},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:()=>!1},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:er(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:er(0,1,.1)}}),jn;async function Lb(){return jn&&jn.close(),jn=new WebSocket(`ws://127.0.0.1:${$t.store.webSocketPort??42070}/?client=Vencord`),new Promise((e,t)=>{jn.onopen=e,jn.onerror=t,setTimeout(t,3e3)})}var d7=VencordNative.pluginHelpers.XSOverlay,th=h({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[m.Nyako],tags:["vr","notify"],reporterTestable:2,settings:$t,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(C.getCurrentUser().id)&&$t.store.callNotifications){let t=Q.getChannel(e.channel_id);$3("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){if(t)return;let o=Q.getChannel(e.channel_id);if(!g7(e,e.channel_id))return;let n=$t.store.pingColor.replaceAll("#","").trim(),i=$t.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let f=Ne.getGuild(o.guild_id);l=`${e.author.username} (${f.name}, #${o.name})`}switch(o.type){case eh.DM:l=e.author.username.trim();break;case eh.GROUP_DM:let f=o.name.trim()??o.rawRecipients.map(g=>g.username).join(", ");l=`${e.author.username} (${f})`;break}if(e.referenced_message&&(l+=" (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(f=>typeof f?.content_type=="string"&&f?.content_type.startsWith("image")).forEach(f=>{s+=` [image: ${f.filename}] `}),e.attachments.filter(f=>f&&!f.content_type?.startsWith("image")).forEach(f=>{s+=` [attachment: ${f.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(f,g)=>`<color=#${n}><b>@${C.getUser(g)?.username||"unknown-user"}</color></b>`)),e.mention_roles.length>0)for(let f of e.mention_roles){let g=xt.getRole(o.guild_id,f);if(!g)continue;let y=g.colorString??`#${n}`;s=s.replace(`<@&${f}>`,`<b><color=${y}>@${g.name}</color></b>`)}let u=s.match(new RegExp("(<a?:\\w+:\\d+>)","g")),d=s.match(new RegExp("<(#\\d+)>","g"));if(u)for(let f of u)s=s.replace(new RegExp(`${f}`,"g"),`:${f.split(":")[1]}:`);if(d)for(let f of d){let g=f.split("<#")[1];g=g.substring(0,g.length-1),s=s.replace(new RegExp(`${f}`,"g"),`<b><color=#${i}>#${Q.getChannel(g).name}</color></b>`)}m7(o)||f7(l,s,e)}},start:Lb,stop(){jn.close()},settingsAboutComponent:()=>r(p,null,r(U,{onClick:()=>$3("This is a test notification! explode","Hello from Vendor!")},"Send test notification"))});function m7(e){return e.type===eh.DM&&$t.store.dmNotifications||e.type===eh.GROUP_DM&&$t.store.groupDmNotifications?!1:!$t.store.serverNotifications}function f7(e,t,o){fetch(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(n=>n.blob()).then(n=>new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result.split(",")[1]),s.readAsDataURL(n)})).then(n=>{let i={type:1,timeout:$t.store.lengthBasedTimeout?z3(t):$t.store.timeout,height:H3(t),opacity:$t.store.opacity,volume:$t.store.volume,audioPath:$t.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:n,sourceApp:"Vencord"};G3(i)})}function $3(e,t){let o={type:1,timeout:$t.store.lengthBasedTimeout?z3(e):$t.store.timeout,height:H3(e),opacity:$t.store.opacity,volume:$t.store.volume,audioPath:$t.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:"default",sourceApp:"Vencord"};G3(o)}async function G3(e){if($t.store.preferUDP){d7.sendToOverlay(e);return}let t={sender:"Vencord",target:"xsoverlay",command:"SendNotification",jsonData:JSON.stringify(e),rawData:null};jn.readyState!==jn.OPEN&&await Lb(),jn.send(JSON.stringify(t))}function g7(e,t){let o=C.getCurrentUser();return e.author.id===o.id||e.author.bot&&!$t.store.botNotifications?!1:p7(e,t)}function H3(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function z3(e){return e.length<=100?3:e.length<=200?4:e.length<=300?5:6}a();S();var oh=h({name:"YoutubeAdblock",description:"Block ads in YouTube embeds and the WatchTogether activity via AdGuard",authors:[m.ImLvna,m.Ven]});var je={[Kn.name]:Kn,[Pp.name]:Pp,[Mp.name]:Mp,[Np.name]:Np,[Cp.name]:Cp,[kp.name]:kp,[Ap.name]:Ap,[Rp.name]:Rp,[Dp.name]:Dp,[Lp.name]:Lp,[Op.name]:Op,[_p.name]:_p,[Bp.name]:Bp,[Up.name]:Up,[Ep.name]:Ep,[Fp.name]:Fp,[_r.name]:_r,[$p.name]:$p,[Hp.name]:Hp,[zp.name]:zp,[Wp.name]:Wp,[jp.name]:jp,[qp.name]:qp,[Yp.name]:Yp,[Zp.name]:Zp,[Jp.name]:Jp,[Xp.name]:Xp,[Vp.name]:Vp,[ed.name]:ed,[td.name]:td,[od.name]:od,[rd.name]:rd,[nd.name]:nd,[id.name]:id,[sd.name]:sd,[ad.name]:ad,[ld.name]:ld,[cd.name]:cd,[gs.name]:gs,[ud.name]:ud,[pd.name]:pd,[md.name]:md,[fd.name]:fd,[gd.name]:gd,[yd.name]:yd,[vd.name]:vd,[bd.name]:bd,[Sd.name]:Sd,[Id.name]:Id,[Pd.name]:Pd,[Na.name]:Na,[Rd.name]:Rd,[Da.name]:Da,[Bd.name]:Bd,[Ud.name]:Ud,[Fd.name]:Fd,[Pa.name]:Pa,[$d.name]:$d,[Zd.name]:Zd,[Qd.name]:Qd,[Jd.name]:Jd,[Xd.name]:Xd,[Vd.name]:Vd,[em.name]:em,[tm.name]:tm,[om.name]:om,[rm.name]:rm,[nm.name]:nm,[im.name]:im,[sm.name]:sm,[am.name]:am,[cm.name]:cm,[um.name]:um,[dm.name]:dm,[mm.name]:mm,[fm.name]:fm,[gm.name]:gm,[hm.name]:hm,[ym.name]:ym,[vm.name]:vm,[bm.name]:bm,[Sm.name]:Sm,[Tm.name]:Tm,[Im.name]:Im,[Pm.name]:Pm,[Nm.name]:Nm,[Cm.name]:Cm,[Am.name]:Am,[Rm.name]:Rm,[Lm.name]:Lm,[_m.name]:_m,[Bm.name]:Bm,[Fm.name]:Fm,[$m.name]:$m,[Ps.name]:Ps,[Hm.name]:Hm,[zm.name]:zm,[Wm.name]:Wm,[jm.name]:jm,[qm.name]:qm,[Km.name]:Km,[Ym.name]:Ym,[Zm.name]:Zm,[Qm.name]:Qm,[rn.name]:rn,[Jm.name]:Jm,[Xm.name]:Xm,[Vm.name]:Vm,[ef.name]:ef,[tf.name]:tf,[of.name]:of,[En.name]:En,[nf.name]:nf,[sf.name]:sf,[af.name]:af,[Ba.name]:Ba,[mf.name]:mf,[ff.name]:ff,[yf.name]:yf,[vf.name]:vf,[bf.name]:bf,[Sf.name]:Sf,[xf.name]:xf,[Tf.name]:Tf,[wf.name]:wf,[Pf.name]:Pf,[Cf.name]:Cf,[kf.name]:kf,[Af.name]:Af,[Rf.name]:Rf,[Lf.name]:Lf,[Hf.name]:Hf,[zf.name]:zf,[Wf.name]:Wf,[jf.name]:jf,[qf.name]:qf,[Kf.name]:Kf,[Yf.name]:Yf,[Vf.name]:Vf,[eg.name]:eg,[og.name]:og,[qa.name]:qa,[rg.name]:rg,[ng.name]:ng,[ig.name]:ig,[sg.name]:sg,[ag.name]:ag,[lg.name]:lg,[cg.name]:cg,[ug.name]:ug,[pg.name]:pg,[dg.name]:dg,[mg.name]:mg,[fg.name]:fg,[hg.name]:hg,[yg.name]:yg,[vg.name]:vg,[bg.name]:bg,[Tg.name]:Tg,[xg.name]:xg,[wg.name]:wg,[Ig.name]:Ig,[Pg.name]:Pg,[Mg.name]:Mg,[Ag.name]:Ag,[Dg.name]:Dg,[Lg.name]:Lg,[_g.name]:_g,[Bg.name]:Bg,[Gg.name]:Gg,[ys.name]:ys,[Hg.name]:Hg,[jg.name]:jg,[qg.name]:qg,[Kg.name]:Kg,[Yg.name]:Yg,[Qg.name]:Qg,[Jg.name]:Jg,[Xg.name]:Xg,[Vg.name]:Vg,[th.name]:th,[oh.name]:oh},gi={[Kn.name]:{folderName:"_api/badges",userPlugin:!1},[Pp.name]:{folderName:"_api/chatButtons.ts",userPlugin:!1},[Mp.name]:{folderName:"_api/commands.ts",userPlugin:!1},[Np.name]:{folderName:"_api/contextMenu.ts",userPlugin:!1},[Cp.name]:{folderName:"_api/dynamicImageModalApi.ts",userPlugin:!1},[kp.name]:{folderName:"_api/memberListDecorators",userPlugin:!1},[Ap.name]:{folderName:"_api/menuItemDemangler.ts",userPlugin:!1},[Rp.name]:{folderName:"_api/messageAccessories.ts",userPlugin:!1},[Dp.name]:{folderName:"_api/messageDecorations",userPlugin:!1},[Lp.name]:{folderName:"_api/messageEvents.ts",userPlugin:!1},[Op.name]:{folderName:"_api/messagePopover.ts",userPlugin:!1},[_p.name]:{folderName:"_api/messageUpdater.ts",userPlugin:!1},[Bp.name]:{folderName:"_api/notices.ts",userPlugin:!1},[Up.name]:{folderName:"_api/serverList.ts",userPlugin:!1},[Ep.name]:{folderName:"_api/userSettings.ts",userPlugin:!1},[Fp.name]:{folderName:"_core/noTrack.ts",userPlugin:!1},[_r.name]:{folderName:"_core/settings.tsx",userPlugin:!1},[$p.name]:{folderName:"_core/supportHelper.tsx",userPlugin:!1},[Hp.name]:{folderName:"accountPanelServerProfile",userPlugin:!1},[zp.name]:{folderName:"alwaysAnimate",userPlugin:!1},[Wp.name]:{folderName:"alwaysExpandRoles",userPlugin:!1},[jp.name]:{folderName:"alwaysTrust",userPlugin:!1},[qp.name]:{folderName:"anonymiseFileNames",userPlugin:!1},[Yp.name]:{folderName:"appleMusic.desktop",userPlugin:!1},[Zp.name]:{folderName:"arRPC.web",userPlugin:!1},[Jp.name]:{folderName:"betterFolders",userPlugin:!1},[Xp.name]:{folderName:"betterGifAltText",userPlugin:!1},[Vp.name]:{folderName:"betterGifPicker",userPlugin:!1},[ed.name]:{folderName:"betterNotes",userPlugin:!1},[td.name]:{folderName:"betterRoleContext",userPlugin:!1},[od.name]:{folderName:"betterRoleDot",userPlugin:!1},[rd.name]:{folderName:"betterSessions",userPlugin:!1},[nd.name]:{folderName:"betterSettings",userPlugin:!1},[id.name]:{folderName:"betterUploadButton",userPlugin:!1},[sd.name]:{folderName:"biggerStreamPreview",userPlugin:!1},[ad.name]:{folderName:"blurNsfw",userPlugin:!1},[ld.name]:{folderName:"callTimer",userPlugin:!1},[cd.name]:{folderName:"clearURLs",userPlugin:!1},[gs.name]:{folderName:"clientTheme",userPlugin:!1},[ud.name]:{folderName:"colorSighted",userPlugin:!1},[pd.name]:{folderName:"consoleJanitor",userPlugin:!1},[md.name]:{folderName:"consoleShortcuts",userPlugin:!1},[fd.name]:{folderName:"copyEmojiMarkdown",userPlugin:!1},[gd.name]:{folderName:"copyFileContents",userPlugin:!1},[yd.name]:{folderName:"copyStickerLinks",userPlugin:!1},[vd.name]:{folderName:"copyUserURLs",userPlugin:!1},[bd.name]:{folderName:"crashHandler",userPlugin:!1},[Sd.name]:{folderName:"ctrlEnterSend",userPlugin:!1},[Id.name]:{folderName:"customCommands",userPlugin:!1},[Pd.name]:{folderName:"customIdle",userPlugin:!1},[Na.name]:{folderName:"customRPC",userPlugin:!1},[Rd.name]:{folderName:"dearrow",userPlugin:!1},[Da.name]:{folderName:"decor",userPlugin:!1},[Bd.name]:{folderName:"disableCallIdle",userPlugin:!1},[Ud.name]:{folderName:"dontRoundMyTimestamps",userPlugin:!1},[Fd.name]:{folderName:"experiments",userPlugin:!1},[Pa.name]:{folderName:"expressionCloner",userPlugin:!1},[$d.name]:{folderName:"f8break",userPlugin:!1},[Zd.name]:{folderName:"fakeNitro",userPlugin:!1},[Qd.name]:{folderName:"fakeProfileThemes",userPlugin:!1},[Jd.name]:{folderName:"favEmojiFirst",userPlugin:!1},[Xd.name]:{folderName:"favGifSearch",userPlugin:!1},[Vd.name]:{folderName:"fixCodeblockGap",userPlugin:!1},[em.name]:{folderName:"fixImagesQuality",userPlugin:!1},[tm.name]:{folderName:"fixSpotifyEmbeds.desktop",userPlugin:!1},[om.name]:{folderName:"fixYoutubeEmbeds.desktop",userPlugin:!1},[rm.name]:{folderName:"forceOwnerCrown",userPlugin:!1},[nm.name]:{folderName:"friendInvites",userPlugin:!1},[im.name]:{folderName:"friendsSince",userPlugin:!1},[sm.name]:{folderName:"fullSearchContext",userPlugin:!1},[am.name]:{folderName:"fullUserInChatbox",userPlugin:!1},[cm.name]:{folderName:"gameActivityToggle",userPlugin:!1},[um.name]:{folderName:"gifPaste",userPlugin:!1},[dm.name]:{folderName:"greetStickerPicker",userPlugin:!1},[mm.name]:{folderName:"hideAttachments",userPlugin:!1},[fm.name]:{folderName:"iLoveSpam",userPlugin:!1},[gm.name]:{folderName:"ignoreActivities",userPlugin:!1},[hm.name]:{folderName:"imageFilename",userPlugin:!1},[ym.name]:{folderName:"imageLink",userPlugin:!1},[vm.name]:{folderName:"imageZoom",userPlugin:!1},[bm.name]:{folderName:"implicitRelationships",userPlugin:!1},[Sm.name]:{folderName:"ircColors",userPlugin:!1},[Tm.name]:{folderName:"keepCurrentChannel",userPlugin:!1},[Im.name]:{folderName:"lastfmRichPresence",userPlugin:!1},[Pm.name]:{folderName:"loadingQuotes",userPlugin:!1},[Nm.name]:{folderName:"memberCount",userPlugin:!1},[Cm.name]:{folderName:"mentionAvatars",userPlugin:!1},[Am.name]:{folderName:"messageClickActions",userPlugin:!1},[Rm.name]:{folderName:"messageLatency",userPlugin:!1},[Lm.name]:{folderName:"messageLinkEmbeds",userPlugin:!1},[_m.name]:{folderName:"messageLogger",userPlugin:!1},[Bm.name]:{folderName:"moreQuickReactions",userPlugin:!1},[Fm.name]:{folderName:"mutualGroupDMs",userPlugin:!1},[$m.name]:{folderName:"newGuildSettings",userPlugin:!1},[Ps.name]:{folderName:"noBlockedMessages",userPlugin:!1},[Hm.name]:{folderName:"noDeepLinks.web",userPlugin:!1},[zm.name]:{folderName:"noDefaultHangStatus",userPlugin:!1},[Wm.name]:{folderName:"noDevtoolsWarning",userPlugin:!1},[jm.name]:{folderName:"noF1",userPlugin:!1},[qm.name]:{folderName:"noMaskedUrlPaste",userPlugin:!1},[Km.name]:{folderName:"noMosaic",userPlugin:!1},[Ym.name]:{folderName:"noOnboardingDelay",userPlugin:!1},[Zm.name]:{folderName:"noPendingCount",userPlugin:!1},[Qm.name]:{folderName:"noProfileThemes",userPlugin:!1},[rn.name]:{folderName:"noReplyMention",userPlugin:!1},[Jm.name]:{folderName:"noServerEmojis",userPlugin:!1},[Xm.name]:{folderName:"noTypingAnimation",userPlugin:!1},[Vm.name]:{folderName:"noUnblockToJump",userPlugin:!1},[ef.name]:{folderName:"notificationVolume",userPlugin:!1},[tf.name]:{folderName:"onePingPerDM",userPlugin:!1},[of.name]:{folderName:"oneko",userPlugin:!1},[En.name]:{folderName:"openInApp",userPlugin:!1},[nf.name]:{folderName:"overrideForumDefaults",userPlugin:!1},[sf.name]:{folderName:"pauseInvitesForever",userPlugin:!1},[af.name]:{folderName:"permissionFreeWill",userPlugin:!1},[Ba.name]:{folderName:"permissionsViewer",userPlugin:!1},[mf.name]:{folderName:"petpet",userPlugin:!1},[ff.name]:{folderName:"pictureInPicture",userPlugin:!1},[yf.name]:{folderName:"pinDms",userPlugin:!1},[vf.name]:{folderName:"plainFolderIcon",userPlugin:!1},[bf.name]:{folderName:"platformIndicators",userPlugin:!1},[Sf.name]:{folderName:"previewMessage",userPlugin:!1},[xf.name]:{folderName:"quickMention",userPlugin:!1},[Tf.name]:{folderName:"quickReply",userPlugin:!1},[wf.name]:{folderName:"reactErrorDecoder",userPlugin:!1},[Pf.name]:{folderName:"readAllNotificationsButton",userPlugin:!1},[Cf.name]:{folderName:"relationshipNotifier",userPlugin:!1},[kf.name]:{folderName:"replaceGoogleSearch",userPlugin:!1},[Af.name]:{folderName:"replyTimestamp",userPlugin:!1},[Rf.name]:{folderName:"revealAllSpoilers",userPlugin:!1},[Lf.name]:{folderName:"reverseImageSearch",userPlugin:!1},[Hf.name]:{folderName:"reviewDB",userPlugin:!1},[zf.name]:{folderName:"roleColorEverywhere",userPlugin:!1},[Wf.name]:{folderName:"secretRingTone",userPlugin:!1},[jf.name]:{folderName:"seeSummaries",userPlugin:!1},[qf.name]:{folderName:"sendTimestamps",userPlugin:!1},[Kf.name]:{folderName:"serverInfo",userPlugin:!1},[Yf.name]:{folderName:"serverListIndicators",userPlugin:!1},[Vf.name]:{folderName:"shikiCodeblocks.desktop",userPlugin:!1},[eg.name]:{folderName:"showAllMessageButtons",userPlugin:!1},[og.name]:{folderName:"showConnections",userPlugin:!1},[qa.name]:{folderName:"showHiddenChannels",userPlugin:!1},[rg.name]:{folderName:"showHiddenThings",userPlugin:!1},[ng.name]:{folderName:"showMeYourName",userPlugin:!1},[ig.name]:{folderName:"showTimeoutDuration",userPlugin:!1},[sg.name]:{folderName:"silentMessageToggle",userPlugin:!1},[ag.name]:{folderName:"silentTyping",userPlugin:!1},[lg.name]:{folderName:"sortFriendRequests",userPlugin:!1},[cg.name]:{folderName:"spotifyControls",userPlugin:!1},[ug.name]:{folderName:"spotifyCrack",userPlugin:!1},[pg.name]:{folderName:"spotifyShareCommands",userPlugin:!1},[dg.name]:{folderName:"startupTimings",userPlugin:!1},[mg.name]:{folderName:"stickerPaste",userPlugin:!1},[fg.name]:{folderName:"streamerModeOnStream",userPlugin:!1},[hg.name]:{folderName:"superReactionTweaks",userPlugin:!1},[yg.name]:{folderName:"textReplace",userPlugin:!1},[vg.name]:{folderName:"themeAttributes",userPlugin:!1},[bg.name]:{folderName:"translate",userPlugin:!1},[Tg.name]:{folderName:"typingIndicator",userPlugin:!1},[xg.name]:{folderName:"typingTweaks",userPlugin:!1},[wg.name]:{folderName:"unindent",userPlugin:!1},[Ig.name]:{folderName:"unlockedAvatarZoom",userPlugin:!1},[Pg.name]:{folderName:"unsuppressEmbeds",userPlugin:!1},[Mg.name]:{folderName:"userMessagesPronouns",userPlugin:!1},[Ag.name]:{folderName:"userVoiceShow",userPlugin:!1},[Dg.name]:{folderName:"usrbg",userPlugin:!1},[Lg.name]:{folderName:"validReply",userPlugin:!1},[_g.name]:{folderName:"validUser",userPlugin:!1},[Bg.name]:{folderName:"vcDoubleClick",userPlugin:!1},[Gg.name]:{folderName:"vcNarrator",userPlugin:!1},[ys.name]:{folderName:"vencordToolbox",userPlugin:!1},[Hg.name]:{folderName:"viewIcons",userPlugin:!1},[jg.name]:{folderName:"viewRaw",userPlugin:!1},[qg.name]:{folderName:"voiceDownload",userPlugin:!1},[Kg.name]:{folderName:"voiceMessages",userPlugin:!1},[Yg.name]:{folderName:"volumeBooster",userPlugin:!1},[Qg.name]:{folderName:"webContextMenus.web",userPlugin:!1},[Jg.name]:{folderName:"webKeybinds.web",userPlugin:!1},[Xg.name]:{folderName:"webScreenShareFixes.web",userPlugin:!1},[Vg.name]:{folderName:"whoReacted",userPlugin:!1},[th.name]:{folderName:"xsOverlay",userPlugin:!1},[oh.name]:{folderName:"youtubeAdblock.desktop",userPlugin:!1}},tS={AutoDNDWhilePlaying:"discordDesktop",DevCompanion:"dev",NoSystemBadge:"discordDesktop"};var _b={};rt(_b,{Badges:()=>w7,ChatButtons:()=>R7,Commands:()=>b7,ContextMenu:()=>A7,DataStore:()=>S7,MemberListDecorators:()=>M7,MessageAccessories:()=>x7,MessageDecorations:()=>P7,MessageEvents:()=>y7,MessagePopover:()=>T7,MessageUpdater:()=>D7,Notices:()=>v7,Notifications:()=>k7,PluginManager:()=>hc,ServerList:()=>I7,Settings:()=>N7,Styles:()=>C7,Themes:()=>O7,UserSettings:()=>L7});a();var Ob={};rt(Ob,{initQuickCssThemeStore:()=>h7});a();we();v();var rl,W3;async function j3(e){rl?rl.disabled=!e:e&&(rl=_o("vencord-custom-css",dc),VencordNative.quickCss.addChangeListener(t=>{rl.textContent=t,rl.disabled=!$.useQuickCss,K3()}),rl.textContent=await VencordNative.quickCss.get())}async function nl(){W3??=_o("vencord-themes",dc);let{themeLinks:e,enabledThemes:t}=$,{ThemeStore:o}=(P1(),Cu(y2)),n=o==null?void 0:o.theme==="light"?"light":"dark",i=e.map(s=>{let l=/^@(light|dark) (.*)/.exec(s);if(!l)return s;let[,c,u]=l;return c===n?u:null}).filter(s=>s!==null);{let s=t.map(l=>`vencord:///themes/${l}?v=${Date.now()}`);i.push(...s)}W3.textContent=i.map(s=>`@import url("${s.trim()}");`).join(`
`),K3()}function q3(e,t){if(!e?.document||t==="DISCORD_OutOfProcessOverlay")return;let o=e.document;o.querySelector("vencord-root")?.remove(),o.documentElement.appendChild(ga.cloneNode(!0))}function K3(){if(ii)for(let e of ii.getWindowKeys())q3(ii.getWindow(e),e)}document.addEventListener("DOMContentLoaded",()=>{nl(),j3($.useQuickCss),bt.addChangeListener("useQuickCss",j3),bt.addChangeListener("themeLinks",nl),bt.addChangeListener("enabledThemes",nl),window.addEventListener("message",e=>{let{discordPopoutEvent:t}=e.data||{};t?.type==="loaded"&&q3(ii.getWindow(t.key),t.key)}),VencordNative.quickCss.addThemeChangeListener(nl)},{once:!0});function h7(e){nl();let t=e.theme;e.addChangeListener(()=>{t!==e.theme&&(t=e.theme,nl())})}var y7=r0,v7=b0,b7=K1,S7=ur,x7=Z1,T7=i0,w7=xh,I7=Nv,P7=Q1,M7=Y1,N7=G1,C7=c0,k7=C0,A7=U1,R7=z1,D7=Yy,L7=ey,O7=Ob;var Bb={};rt(Bb,{AddonBadge:()=>S0,AddonCard:()=>bc,BackupAndRestoreTab:()=>gp,BackupRestoreIcon:()=>Zh,BaseText:()=>ao,Button:()=>et,ButtonCompat:()=>Zs,Card:()=>Ae,CheckedTextInput:()=>kc,ClockIcon:()=>e1,CloudDownloadIcon:()=>Xh,CloudIcon:()=>Yh,CloudTab:()=>Tp,CloudUploadIcon:()=>Vh,CodeBlock:()=>rc,CogWheel:()=>Bl,CopyIcon:()=>bn,DeleteIcon:()=>Yr,Divider:()=>Ue,DownArrow:()=>t1,ErrorBoundary:()=>M,ErrorCard:()=>Rt,Flex:()=>Y,FolderIcon:()=>El,FormSwitch:()=>Jo,FormSwitchCompat:()=>n1,GithubIcon:()=>$l,Grid:()=>Ac,Heading:()=>eo,HeadingPrimary:()=>FI,HeadingSecondary:()=>Ir,HeadingTertiary:()=>Zr,Heart:()=>dl,ImageIcon:()=>Tr,ImageInvisible:()=>Ys,ImageVisible:()=>_l,InfoIcon:()=>Fi,InlineCode:()=>ui,Link:()=>Oe,LinkButton:()=>Hl,LinkIcon:()=>Ei,LogIcon:()=>Wh,MainSettingsIcon:()=>qh,Margins:()=>k,Microphone:()=>zu,NoEntrySignIcon:()=>Ul,NotesIcon:()=>OI,OpenExternalIcon:()=>ar,OwnerCrownIcon:()=>$h,PaintbrushIcon:()=>Gi,Paragraph:()=>ee,PatchHelperIcon:()=>_I,PatchHelperTab:()=>w2,PencilIcon:()=>Fl,PlaceholderIcon:()=>Gl,PluginsIcon:()=>Kh,PluginsTab:()=>ya,PlusIcon:()=>Hh,QuickAction:()=>hr,QuickActionCard:()=>Dc,ReplyIcon:()=>LI,RestartIcon:()=>$i,RightArrow:()=>o1,SafetyIcon:()=>zh,ScreenshareIcon:()=>Gh,SettingsTab:()=>Eo,Span:()=>wr,SpecialCard:()=>Lc,Switch:()=>Sn,TextButton:()=>ju,TextCompat:()=>Ih,ThemesTab:()=>hs,UpdaterIcon:()=>Qh,UpdaterTab:()=>Ln,VencordTab:()=>Ip,VesktopSettingsIcon:()=>Jh,WebsiteIcon:()=>jh,generateMarginCss:()=>sh,generateTextCss:()=>wh,handleSettingsTabError:()=>k1,openContributorModal:()=>fi,openPluginModal:()=>fr,openSettingsTabModal:()=>Nn,wrapTab:()=>Fo});a();br();Po();Vt();Xn();Xo();He();qt();to();Qs();Hi();var Ub={};rt(Ub,{CONTRIB_ROLE_ID:()=>ah,ChangeList:()=>yc,CspBlockedUrls:()=>Sa,DONOR_ROLE_ID:()=>ll,Devs:()=>m,DevsById:()=>Di,IS_LINUX:()=>dh,IS_MAC:()=>wo,IS_MOBILE:()=>sI,IS_WINDOWS:()=>ph,KNOWN_ISSUES_CHANNEL_ID:()=>ch,LazyComponent:()=>ut,Logger:()=>B,Margins:()=>k,ModalAPI:()=>kl,ModalCloseButton:()=>Ke,ModalContent:()=>xe,ModalFooter:()=>ht,ModalHeader:()=>Ce,ModalRoot:()=>ge,ModalSize:()=>co,Modals:()=>js,NoopComponent:()=>Lh,Queue:()=>Ao,REACT_GLOBAL:()=>iI,REGULAR_ROLE_ID:()=>lh,SUPPORT_CATEGORY_ID:()=>qn,SUPPORT_CHANNEL_ID:()=>Au,SYM_LAZY_CACHED:()=>an,SYM_LAZY_GET:()=>yr,Theme:()=>Hu,VENBOT_USER_ID:()=>Bs,VENCORD_GUILD_ID:()=>al,ZWSP:()=>hl,canonicalizeDescriptor:()=>Lu,canonicalizeFind:()=>Nh,canonicalizeMatch:()=>Lt,canonicalizeReplace:()=>fl,canonicalizeReplacement:()=>gl,checkIntersecting:()=>fh,classNameFactory:()=>q,classNameToSelector:()=>ih,classes:()=>R,closeAllModals:()=>qr,closeModal:()=>gn,copyToClipboard:()=>lo,copyWithToast:()=>it,createAndAppendStyle:()=>_o,debounce:()=>Zt,escapeRegExp:()=>kh,fetchUserProfile:()=>Rl,formatDuration:()=>vl,getCurrentChannel:()=>Yo,getCurrentGuild:()=>yn,getGuildAcronym:()=>Ks,getIntlMessage:()=>Le,getIntlMessageFromHash:()=>i2,getTheme:()=>qs,getUniqueUsername:()=>vn,hasGuildFeature:()=>Dl,humanFriendlyJoin:()=>II,identity:()=>Us,insertTextIntoChatInputBox:()=>Ui,interpolateIfDefined:()=>cl,isNonNullish:()=>Rr,isObject:()=>aI,isObjectEmpty:()=>Li,isPluginDev:()=>Wr,isPrimitiveReactNode:()=>Oh,isTruthy:()=>di,localStorage:()=>$o,makeCodeblock:()=>Oi,makeLazy:()=>ln,mergeDefaults:()=>pa,onceDefined:()=>_7,onlyOnce:()=>Mn,openImageModal:()=>Zo,openInviteModal:()=>hn,openMediaModal:()=>Uh,openModal:()=>ue,openModalLazy:()=>Al,openPrivateChannel:()=>DI,openUserProfile:()=>Qo,parseUrl:()=>mh,pluralise:()=>hh,proxyLazy:()=>It,runtimeHashMessageKey:()=>pn,sendMessage:()=>Jn,shouldShowContributorBadge:()=>gh,sleep:()=>vr,stripIndent:()=>Qb,toInlineCode:()=>PI,tryOrElse:()=>yh,useAwaiter:()=>pt,useCleanupEffect:()=>Bh,useCspErrors:()=>H0,useForceUpdater:()=>Ko,useIntersection:()=>_h,useTimer:()=>Cl,wordsFromCamel:()=>yl,wordsFromKebab:()=>yI,wordsFromPascal:()=>Ch,wordsFromSnake:()=>hI,wordsFromTitle:()=>vI,wordsToCamel:()=>bI,wordsToKebab:()=>xI,wordsToPascal:()=>TI,wordsToSnake:()=>SI,wordsToTitle:()=>dn});a();a();function _7(e,t,o){let n=t;if(t in e)return void o(e[n]);Object.defineProperty(e,t,{set(i){delete e[n],e[n]=i,o(i)},configurable:!0,enumerable:!1})}cn();S();we();se();Fs();qo();Ri();le();re();$e();Sr();dt();ir();var Eb={};rt(Eb,{ChunkIdsRegex:()=>$u,Common:()=>Yn,DefaultExtractAndLoadChunksRegex:()=>Fu,LazyComponentWebpack:()=>o2,_blacklistBadModules:()=>Uu,_initWebpack:()=>Tl,_resolveReady:()=>bl,cache:()=>sr,extract:()=>Nl,extractAndLoadChunks:()=>Dh,extractAndLoadChunksLazy:()=>Bi,factoryListeners:()=>xl,filters:()=>O,find:()=>Io,findAll:()=>Zn,findBulk:()=>Eu,findByCode:()=>Gs,findByCodeLazy:()=>fe,findByProps:()=>Il,findByPropsLazy:()=>X,findComponentByCode:()=>r2,findComponentByCodeLazy:()=>he,findComponentLazy:()=>Hs,findCssClasses:()=>Ah,findCssClassesLazy:()=>Z,findExportedComponentLazy:()=>n2,findLazy:()=>Ot,findModuleFactory:()=>wl,findModuleId:()=>Qn,findStore:()=>Pl,findStoreLazy:()=>gt,fluxStores:()=>jr,handleModuleNotFound:()=>xr,lazyWebpackSearchHistory:()=>t2,makeClassNameRegex:()=>_u,mapMangledCssClasses:()=>Ml,mapMangledModule:()=>Rh,mapMangledModuleLazy:()=>Xe,moduleListeners:()=>Bu,onceReady:()=>$s,proxyLazyWebpack:()=>Bo,search:()=>zs,stringMatches:()=>Sl,waitFor:()=>Ve,waitForSubscriptions:()=>_i,wreq:()=>ft});a();v();a();F();S();we();v();async function B7(){if($o.Vencord_cloudSyncDirection===void 0&&($o.Vencord_cloudSyncDirection="both"),$.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:()=>si.openUserSettings("vencord_cloud_panel")});return}$.cloud.settingsSync&&$.cloud.authenticated&&$o.Vencord_cloudSyncDirection!=="manual"&&($o.Vencord_settingsDirty&&Sp("push")?await Cc():Sp("pull")&&await xp(!1)&&qe({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Ut}));let e=Zt(async()=>{$.cloud.settingsSync&&$.cloud.authenticated&&Sp("push")&&await Cc()},6e4);bt.addGlobalChangeListener(()=>{$o.Vencord_settingsDirty=!0,e()})}var Y3=!1;async function Z3(){let e=t=>{Y3||(Y3=!0,setTimeout(()=>qe({permanent:!0,noPersist:!0,...t}),1e4))};try{if(!await Pn())return;if($.autoUpdate){await ci(),$.autoUpdateNotification&&e({title:"Vencord has been updated!",body:"Click here to restart",onClick:Ut});return}e({title:"A Vencord update is available!",body:"Click here to view the update",onClick:()=>Nn(Ln)})}catch(t){li.error("Failed to check for updates",t)}}async function U7(){await $s,fc("WebpackReady"),B7(),Z3(),$.autoUpdate&&!$.autoUpdateNotification&&setInterval(Z3,1e3*60*30)}y0();s0();fc("Init");U7();document.addEventListener("DOMContentLoaded",()=>{fc("DOMContentLoaded")},{once:!0});return Cu(E7);})();
//# sourceURL=file:///VencordDesktopRenderer
//# sourceMappingURL=vencord://vencordDesktopRenderer.js.map
/*! For license information please see vencordDesktopRenderer.js.LEGAL.txt */