280 lines
643 KiB
JavaScript
280 lines
643 KiB
JavaScript
// Vencord 6e11973
|
|
// Standalone: true
|
|
// Platform: Universal
|
|
// Updater Disabled: false
|
|
"use strict";var Vencord=(()=>{var j5=Object.create;var Vc=Object.defineProperty;var q5=Object.getOwnPropertyDescriptor;var K5=Object.getOwnPropertyNames;var Y5=Object.getPrototypeOf,Z5=Object.prototype.hasOwnProperty;var ye=(e,t)=>()=>(e&&(t=e(e=0)),t);var xs=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),et=(e,t)=>{for(var o in t)Vc(e,o,{get:t[o],enumerable:!0})},Gv=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K5(t))!Z5.call(e,i)&&i!==o&&Vc(e,i,{get:()=>t[i],enumerable:!(n=q5(t,i))||n.enumerable});return e};var kg=(e,t,o)=>(o=e!=null?j5(Y5(e)):{},Gv(t||!e||!e.__esModule?Vc(o,"default",{value:e,enumerable:!0}):o,e)),eu=e=>Gv(Vc({},"__esModule",{value:!0}),e);var p,r,a=ye(()=>{"use strict";p=Symbol.for("react.fragment"),r=(...e)=>(r=Vencord.Webpack.Common.React.createElement)(...e)});function Jr(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 Nt(e,t=5,o=!1){let n=!0;o||setTimeout(()=>n=!1,0);let i=0,s=Object.assign(function(){},{[Zr]:void 0,[cr](){return!s[Zr]&&t>i++&&(s[Zr]=e(),!s[Zr]&&t===i&&console.error("Lazy factory failed:",e)),s[Zr]}});return new Proxy(s,{...tu,get(l,c,u){if(c===Zr||c===cr)return Reflect.get(l,c,u);if(!o&&n)return Nt(()=>Reflect.get(l[cr](),c,u),t,!0);let m=l[cr]();if(typeof m=="object"||typeof m=="function")return Reflect.get(m,c,u);throw new Error("proxyLazy called on a primitive value")}})}var Hv,tu,cr,Zr,$o=ye(()=>{"use strict";a();Hv=["arguments","caller","prototype"],tu={},cr=Symbol.for("vencord.lazy.get"),Zr=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])tu[e]=(t,...o)=>Reflect[e](t[cr](),...o);tu.ownKeys=e=>{let t=e[cr](),o=Reflect.ownKeys(t);for(let n of Hv)o.includes(n)||o.push(n);return o};tu.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Hv.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[cr](),t);return o&&Object.defineProperty(e,t,o),o}});function Ke(e,t=5){let o=Jr(e,t),n=i=>{let s=o()??J5;return r(s,{...i})};return n.$$vencordGetWrappedComponent=o,n}var J5,vi=ye(()=>{"use strict";a();$o();J5=()=>null});var F,ae=ye(()=>{"use strict";a();F=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)}}});var Rg={};et(Rg,{classNameFactory:()=>Y,classNameToSelector:()=>Wv,compileStyle:()=>Ag,disableStyle:()=>go,enableStyle:()=>Yt,isStyleEnabled:()=>Cg,requireStyle:()=>$a,setStyleClassNames:()=>X5,styleMap:()=>zv,toggleStyle:()=>Q5});function $a(e){let t=zv.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Yt(e){let t=$a(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Ag(t),document.head.appendChild(t.dom),!0)}function go(e){let t=$a(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var zv,Q5,Cg,X5,Ag,Wv,Y,ve=ye(()=>{"use strict";a();zv=window.VencordStyles??=new Map;Q5=e=>Cg(e)?go(e):Yt(e),Cg=e=>$a(e).dom?.isConnected??!1,X5=(e,t,o=!0)=>{let n=$a(e);n.classNames=t,o&&Cg(n.name)&&Ag(n)},Ag=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?Wv(n):t})},Wv=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),Y=(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 o3,Ts,Ga,Ha,Lg,Og,ou,_n,_g,Bg,Eg,ho,Ug,r3,d,bi,T=ye(()=>{"use strict";a();o3="Vencord.Webpack.Common.React",Ts="1017176847865352332",Ga="1015060230222131221",Ha="1042507929485586532",Lg="1026534353167208489",Og="1026504932959977532",ou="1026515880080842772",_n="1108135649699180705",_g="1222936386626129920",Bg=navigator.platform.toLowerCase(),Eg=Bg.startsWith("win"),ho=Bg.startsWith("mac"),Ug=Bg.startsWith("linux"),r3=navigator.userAgent.includes("Mobi"),d=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:886685857560539176n},Elvyra:{name:"Elvyra",id:708275751816003615n},HappyEnderman:{name:"Happy enderman",id:1083437693347827764n},Vishnya:{name:"Vishnya",id:282541644484575233n},Inbestigator:{name:"Inbestigator",id:761777382041714690n},newwares:{name:"newwares",id:421405303951851520n},JohnyTheCarrot:{name:"JohnyTheCarrot",id:132819036282159104n},puv:{name:"puv",id:469441552251355137n},Kodarru:{name:"Kodarru",id:785227396218748949n},nakoyasha:{name:"nakoyasha",id:222069018507345921n},Sqaaakoi:{name:"Sqaaakoi",id:259558259491340288n},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}}),bi=Object.freeze(Object.fromEntries(Object.entries(d).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t])))});function L(...e){return e.filter(Boolean).join(" ")}function ur(e){return new Promise(t=>setTimeout(t,e))}function n3(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Si(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function Fg(e){try{return new URL(e)}catch{return null}}function ws(e){return e}function Hg(e,t,o=t+"s"){return e===1?`${e} ${t}`:`${e} ${o}`}function za(e,...t){return t.some(o=>o==null)?"":String.raw({raw:e},...t)}function zg(e,t){try{let o=e();return o instanceof Promise?o.catch(()=>t):o}catch{return t}}var $g,Or,Gg,te=ye(()=>{"use strict";a();T();$g=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};Or=e=>Object.hasOwn(bi,e),Gg=e=>Or(e)&&bi[e].badge!==!1});function Yv(e,t,o,n){return BigInt(e)|BigInt(t)<<16n|BigInt(o)<<32n|BigInt(n)<<48n}function Qr(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 At(e,t){return e<<t&a3|e>>Zv-t}function ge(e){return BigInt.asUintN(64,e)}function Ya(e,t=0){return new Yg(t).update(e).digest()}var Tt,Zt,qv,Ka,Kv,Zv,a3,l3,Yg,Zg=ye(()=>{a();Tt=11400714785074694791n,Zt=14029467366897019727n,qv=1609587929392839161n,Ka=9650029242287828579n,Kv=2870177450012600261n,Zv=64n,a3=2n**Zv-1n,l3=new TextEncoder;Yg=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=ge(this.#t+Tt+Zt),this.#r=ge(this.#t+Zt),this.#n=this.#t,this.#i=ge(this.#t-Tt),this.#s=null,this.#a=0,this.#e=0,this}update(t){typeof t=="string"&&(t=l3.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=Qr(this.#s,s),this.#o=ge(At(ge(this.#o+l*Zt),31n)*Tt),s+=8,l=Qr(this.memory,s),this.#r=ge(At(ge(this.#r+l*Zt),31n)*Tt),s+=8,l=Qr(this.memory,s),this.#n=ge(At(ge(this.#n+l*Zt),31n)*Tt),s+=8,l=Qr(this.memory,s),this.#i=ge(At(ge(this.#i+l*Zt),31n)*Tt),o+=32-this.#e,this.#e=0}if(o<=i-32){let s=i-32;do{let l;l=Qr(t,o),this.#o=ge(At(ge(this.#o+l*Zt),31n)*Tt),o+=8,l=Qr(t,o),this.#r=ge(At(ge(this.#r+l*Zt),31n)*Tt),o+=8,l=Qr(t,o),this.#n=ge(At(ge(this.#n+l*Zt),31n)*Tt),o+=8,l=Qr(t,o),this.#i=ge(At(ge(this.#i+l*Zt),31n)*Tt),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=At(this.#o,1n)+At(this.#r,7n)+At(this.#n,12n)+At(this.#i,18n),i=ge(i^At(ge(this.#o*Zt),31n)*Tt),i=ge(i*Tt+Ka),i=ge(i^At(ge(this.#r*Zt),31n)*Tt),i=ge(i*Tt+Ka),i=ge(i^At(ge(this.#n*Zt),31n)*Tt),i=ge(i*Tt+Ka),i=ge(i^At(ge(this.#i*Zt),31n)*Tt),i=ge(i*Tt+Ka)):i=ge(this.#t+Kv),i+=BigInt(this.#a);n<=o-8;)l=Qr(t,n),l=ge(At(ge(l*Zt),31n)*Tt),i=ge(At(i^l,27n)*Tt+Ka),n+=8;for(n+4<=o&&(l=Yv(t[n+1]<<8|t[n],t[n+3]<<8|t[n+2],0,0),i=ge(At(i^ge(l*Tt),23n)*Zt+qv),n+=4);n<o;)l=Yv(t[n++],0,0,0),i=ge(At(i^ge(l*Kv),11n)*Tt);return s=ge(i>>33n),i=ge((i^s)*Zt),s=ge(i>>29n),i=ge((i^s)*qv),s=ge(i>>32n),i=ge(i^s),i}}});function Jv(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 c3?n:n.reverse()}function Xr(e){let t=Ya(e,0),o=Jv(t);return[Yo[o[0]>>2],Yo[(o[0]&3)<<4|o[1]>>4],Yo[(o[1]&15)<<2|o[2]>>6],Yo[o[2]&63],Yo[o[3]>>2],Yo[(o[3]&3)<<4|o[4]>>4]].join("")}function xi(e){let t=Ya(e,0),o=Jv(t);return[Yo[o[0]>>2],Yo[(o[0]&3)<<4|o[1]>>4],Yo[(o[1]&15)<<2|o[2]>>6],Yo[o[2]&63],Yo[o[3]>>2],Yo[(o[3]&3)<<4|o[3]>>4]].join("")}var Yo,c3,Ps=ye(()=>{"use strict";a();Zg();Yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),c3=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})()});function nu(e,t){return!Number.isNaN(Number(t[0]))||t.includes("+")||t.includes("/")?e?`["${t}"]`:String.raw`(?:\["${t}"\])`.replaceAll("+","\\+"):e?`.${t}`:String.raw`(?:\.${t})`}function Xv(e){let t=nu(!1,Xr(e)),o=nu(!1,xi(e));return String.raw`(?:${t}|${o})`}function u3(e){let t="",o=0,n=/#{intl::([\w$+/]*)(?:::(\w+))?}/g;for(let i of e.matchAll(n))t+=Qv(e.slice(o,i.index)),t+=i[2]==="raw"?nu(!1,i[1]):Xv(i[1]),o=(i.index??0)+i[0].length;return t+=Qv(e.slice(o)),new RegExp(t)}function Rt(e){if(typeof e=="string")return u3(e);let t=typeof e=="string"?e:e.source;if(t=t.replaceAll(/#{intl::([\w$+/]*)(?:::(\w+))?}/g,(i,s,l)=>l==="raw"?nu(!1,s):Xv(s)),typeof e=="string")return t;let o=t.replaceAll("\\i",String.raw`(?:[A-Za-z_$][\w$]*)`),n=new RegExp(o,e.flags);return n.toString=e.toString.bind(e),n}function Za(e,t){return typeof e!="function"?e.replaceAll("$self",t):((...o)=>e(...o).replaceAll("$self",t))}function iu(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 Ti(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=iu(o.match,Rt),o.replace=iu(o.replace,n=>Za(n,t)),Object.defineProperties(e,o)}function Jg(e){let t=Object.getOwnPropertyDescriptors(e);t.find=iu(t.find,Rt),Object.defineProperties(e,t)}var Qv,Zo=ye(()=>{"use strict";a();Ps();Qv=RegExp.escape||(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))});function p3(e,t,o){return function(...n){return[t.apply(this,n),0]}}function d3(e,t,o){return t}var Vv,Vr,su=ye(()=>{"use strict";a();ae();Vv=p3,Vr=d3});var fu={};et(fu,{ChunkIdsRegex:()=>mu,DefaultExtractAndLoadChunksRegex:()=>du,LazyComponentWebpack:()=>cu,_blacklistBadModules:()=>lu,_initWebpack:()=>Va,_resolveReady:()=>Ja,cache:()=>Jo,extract:()=>rl,extractAndLoadChunks:()=>Xg,extractAndLoadChunksLazy:()=>Pi,factoryListeners:()=>Xa,filters:()=>O,find:()=>Qo,findAll:()=>En,findBulk:()=>Un,findByCode:()=>Ms,findByCodeLazy:()=>ue,findByProps:()=>tl,findByPropsLazy:()=>D,findComponentByCode:()=>uu,findComponentByCodeLazy:()=>pe,findComponentLazy:()=>pu,findExportedComponentLazy:()=>nb,findLazy:()=>Dt,findModuleFactory:()=>el,findModuleId:()=>Fn,findStore:()=>ol,findStoreLazy:()=>Ie,fluxStores:()=>_r,handleModuleNotFound:()=>Br,lazyWebpackSearchHistory:()=>rb,mapMangledModule:()=>Qg,mapMangledModuleLazy:()=>Ue,moduleListeners:()=>au,onceReady:()=>Is,proxyLazyWebpack:()=>ko,search:()=>Ns,stringMatches:()=>Qa,waitFor:()=>Ae,waitForSubscriptions:()=>wi,wreq:()=>pt});function Va(e){pt=e,Jo=e.c,Reflect.defineProperty(e.c,Symbol.toStringTag,{value:"ModuleCache",configurable:!0,writable:!0,enumerable:!1})}function tb(e){return e==null||e===window||e===document||e===document.documentElement||e[Symbol.toStringTag]==="DOMTokenList"||e[Symbol.toStringTag]==="IntlMessagesProxy"?!0:e[eb]!==void 0?(Reflect.deleteProperty(e,eb),!0):e instanceof m3}function ob(e,t){let o=Object.getOwnPropertyDescriptor(e,t);o!=null&&Reflect.defineProperty(e,t,{...o,enumerable:!1})}function lu(e,t,o){try{if(tb(t))return ob(e,o),!0}catch(s){en.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}tb(i)?ob(t,s):n=!1}catch(l){en.error(`Error while blacklistng module:
|
|
`,l,`
|
|
|
|
Module id:`,o,`
|
|
|
|
Export value:`,i)}return n}function Br(e,...t){let o=new Error(`webpack.${e} found no module`);en.error(o,"Filter:",t)}function En(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in Jo){let n=Jo[o];if(!(!n?.loaded||n.exports==null)&&(e(n.exports)&&t.push(n.exports),typeof n.exports=="object"))for(let i in n.exports){let s=n.exports[i];s&&e(s)&&t.push(s)}}return t}function el(...e){let t=Fn(...e);return t?pt.m[t]:null}function ko(e,t){return Nt(e,t)}function cu(e,t){return Ke(e,t)}function Dt(e){return Nt(()=>Qo(e))}function tl(...e){let t=Qo(O.byProps(...e),{isIndirect:!0});return t||Br("findByProps",...e),t}function D(...e){return Nt(()=>tl(...e))}function Ms(...e){let t=Qo(O.byCode(...e),{isIndirect:!0});return t||Br("findByCode",...e),t}function ue(...e){return Nt(()=>Ms(...e))}function f3(){let{Flux:e}=(v(),eu($n));e.Store.getAll?.().forEach(t=>_r.set(t.getName(),t));try{let o=Ms("libdiscoreWasm is not initialized")();for(let n in o){if(!n.endsWith("Store"))continue;let i=n,s=o[i];_r.set(i,s)}}catch{}}function ol(e){if(_r.has(e)||f3(),_r.has(e))return _r.get(e);let t=Qo(O.byStoreName(e),{isIndirect:!0});return t?(_r.set(e,t),t):(Br("findStore",e),null)}function Ie(e){return Nt(()=>ol(e))}function uu(...e){let t=Qo(O.componentByCode(...e),{isIndirect:!0});return t||Br("findComponentByCode",...e),t}function pu(e){return Ke(()=>{let t=Qo(e,{isIndirect:!0});return t||Br("findComponent",e),t})}function pe(...e){return Ke(()=>{let t=Qo(O.componentByCode(...e),{isIndirect:!0});return t||Br("findComponentByCode",...e),t})}function nb(...e){return Ke(()=>{let t=Qo(O.byProps(...e),{isIndirect:!0});return t||Br("findExportedComponent",...e),t[e[0]]})}function g3(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 Ue(e,t,o=!1){return Nt(()=>Qg(e,t,o))}async function Xg(e,t=du){let o=el(...e);if(!o){let u=new Error("extractAndLoadChunks: Couldn't find module factory");return en.warn(u,"Code:",e,"Matcher:",t),!1}let n=String(o).match(Rt(t));if(!n){let u=new Error("extractAndLoadChunks: Couldn't find chunk loading in module factory code");return en.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 en.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(mu)).map(m=>{let f=Number(m[1]);return Number.isNaN(f)?m[1]:f});await Promise.all(u.map(m=>pt.e(m)))}if(pt.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 en.warn(u,"Code:",e,"Matcher:",t),!1}return pt(c),!0}function Pi(e,t=du){return Jr(()=>Xg(e,t))}function Ae(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(Jo!=null){let[n,i]=Qo(e,{isIndirect:!0,isWaitFor:!0});if(n)return void t(n,i)}wi.set(e,t)}function Ns(...e){e=e.map(Rt);let t={},o=pt.m;for(let n in o){let i=o[n];Qa(i.toString(),e)&&(t[n]=i)}return t}function rl(e){let t=pt.m[e];if(!t)return null;let o=`
|
|
// [EXTRACTED] WebpackModule${e}
|
|
// WARNING: This module was extracted to be more easily readable.
|
|
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
|
|
|
|
0,${t.toString()}
|
|
//# sourceURL=file:///ExtractedWebpackModule${e}
|
|
`;return(0,eval)(o)}var en,Ja,Is,pt,Jo,_r,Qa,O,wi,au,Xa,m3,eb,Qo,Un,Fn,rb,Qg,du,mu,E=ye(()=>{"use strict";a();$o();vi();ae();Zo();su();en=new F("Webpack"),Is=new Promise(e=>Ja=e),_r=new Map,Qa=(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(Rt),o=n=>typeof n!="function"?!1:Qa(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}},wi=new Map,au=new Set,Xa=new Set;m3=Object.getPrototypeOf(Int8Array),eb="is this a proxy that returns values for any key?";Qo=Vr("find",function(t,{isIndirect:o=!1,isWaitFor:n=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Jo){let s=Jo[i];if(!(!s?.loaded||s.exports==null)){if(t(s.exports))return n?[s.exports,i]:s.exports;if(typeof s.exports=="object")for(let l in s.exports){let c=s.exports[l];if(c&&t(c))return n?[c,i]:c}}}return o||Br("find",t),n?[null,null]:null});Un=Vr("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return Qo(t[0]);let n=t,i=0,s=Array(o);e:for(let l in Jo){let c=Jo[l];if(!(!c?.loaded||c.exports==null))for(let u=0;u<o;u++){let m=n[u];if(m!==void 0){if(m(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&&m(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!`);en.warn(l)}return s}),Fn=Vr("findModuleId",function(...t){t=t.map(Rt);for(let n in pt.m)if(Qa(pt.m[n].toString(),t))return n;let o=new Error(`Didn't find module with code(s):
|
|
`+t.join(`
|
|
`));return en.warn(o),null});rb=[];Qg=Vr("mapMangledModule",function(t,o,n=!1){let i={},s=Fn(...Array.isArray(t)?t:[t]);if(s===null)return i;let l=pt(s),c=g3(l,n);e:for(let u of c){let m=l[u];for(let f in o)if(o[f](m)){i[f]=m;continue e}}return i});du=/(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/,mu=/\("([^"]+?)"\)/g});var gu,ib=ye(()=>{"use strict";a();E();gu=D("buttonWrapper","buttonContent")});var sb=ye(()=>{});function eh(){let e="";for(let[t,o]of Object.entries(h3))e+=`.${Vg(t)}{font-size:${o};}`;for(let[t,o]of Object.entries(y3))e+=`.${Vg(t)}{font-weight:${o};}`;return e}function Gn(e){let{size:t="md",weight:o="normal",tag:n="div",children:i,className:s,...l}=e;return r(n,{className:L(Vg("base",t,o),s),...l},i)}var Vg,h3,y3,th,Ii=ye(()=>{"use strict";a();sb();ve();te();Vg=Y("vc-text-"),h3={xxs:"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.25rem",xl:"1.5rem",xxl:"2rem"},y3={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800"};th=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(Gn,{...i})}});var ab=ye(()=>{});var lb=ye(()=>{});function to(e){return navigator.clipboard.writeText(e)}var tn=ye(()=>{"use strict";a()});function rh(e){let t=typeof e;return t==="string"||t==="number"||t==="bigint"||t==="boolean"||t==="undefined"}function ht(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[n,i]=C({value:o.fallbackValue,error:null,pending:!0});return X(()=>{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 Go(e){let t=ks(o=>o+1,0);return e?t:t[1]}function nl({interval:e=1e3,deps:t=[]}){let[o,n]=C(0),i=le(()=>Date.now(),t);return X(()=>{let s=setInterval(()=>n(Date.now()-i),e);return()=>{n(0),clearInterval(s)}},t),o}function ih(e,t){X(()=>e,t)}var oh,nh,ct=ye(()=>{"use strict";a();v();te();vi();oh=()=>null;nh=(e=!1)=>{let t=se.useRef(null),[o,n]=C(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&($g(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 yo,Cs,he,ke,Se,yt,tt,sh,il,sl,de,on,Er,Fe=ye(()=>{"use strict";a();E();ct();yo=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(yo||{}),Cs=Ue(':"thin")',{ModalRoot:O.componentByCode('.MODAL,"aria-labelledby":'),ModalHeader:O.componentByCode(",id:"),ModalContent:O.componentByCode(".content,"),ModalFooter:O.componentByCode(".footer,"),ModalCloseButton:O.componentByCode(".close]:")}),he=Ke(()=>Cs.ModalRoot),ke=Ke(()=>Cs.ModalHeader),Se=Ke(()=>Cs.ModalContent),yt=Ke(()=>Cs.ModalFooter),tt=Ke(()=>Cs.ModalCloseButton),sh=ue("hasMediaOptions","shouldHideMediaOptions"),il=Ue(".modalKey?",{openModalLazy:O.byCode(".modalKey?"),openModal:O.byCode(",instant:"),closeModal:O.byCode(".onCloseCallback()"),closeAllModals:O.byCode(".getState();for")}),{openModalLazy:sl,openModal:de,closeModal:on,closeAllModals:Er}=il});function xe(e,t){return ah(Xr(e),t,e)||ah(xi(e),t,e)}function ah(e,t,o){try{return t==null?pr.intl.string(pr.t[e]):pr.intl.format(pr.t[e],t)}catch(n){return v3.error(`Failed to get intl message for key: ${o??e}`,n),o??""}}async function Mi(e){let{invite:t}=await ch.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return B.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let n,i,s=!1;B.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),B.subscribe("INVITE_MODAL_CLOSE",n=()=>{B.unsubscribe("INVITE_MODAL_CLOSE",n),B.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function Ho(){return Z.getChannel(Be.getChannelId())}function rn(){return Me.getGuild(Ho()?.guild_id)}function b3(e){ul.openPrivateChannel(e)}function As(){try{return cl.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}catch{return 1}}function Ni(e){Co.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}async function rt(e,t="Copied to clipboard!"){await to(e),q.show({message:t,id:q.genId(),type:q.Type.SUCCESS})}function Rs(e,t,o=!0,n={}){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return vo.sendMessage(e,i,o,n)}function zo(e,t){return sh({items:[{type:"IMAGE",original:e.original??e.url,...e}],...t})}async function Wo(e){if(!await ro.getUser(e))throw new Error("No such user: "+e);let o=oo.getGuildId();lh.openUserProfileModal({userId:e,guildId:o,channelId:Be.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function al(e,t){let o=Lt.getUserProfile(e);if(o)return o;B.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:n}=await wt.get({url:vt.Endpoints.USER_PROFILE(e),query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return B.dispatch({type:"USER_UPDATE",user:n.user}),await B.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",userProfile:n}),t?.guild_id&&n.guild_member&&B.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:n.guild_member}),Lt.getUserProfile(e)}function nn(e){return e.discriminator==="0"?e.username:e.tag}function yu(e,t,o){let n=Pt.getEmojiURL({id:e,animated:t,size:o});return t?n.replace(".webp",".gif"):n}function Ds(e){return e.name.replaceAll("'s "," ").replace(/\w+/g,t=>t[0]).replace(/\s/g,"")}function ll(e,t){return e.features?.has(t)??!1}var v3,hu,ie=ye(()=>{"use strict";a();v();tn();Ps();ae();Fe();v3=new F("IntlManager");hu=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(hu||{})});function We({height:e=24,width:t=24,className:o,children:n,viewBox:i,...s}){return r("svg",{className:L(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},n)}function ki({height:e=24,width:t=24,className:o}){return r(We,{height:e,width:t,className:L(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 sn(e){return r(We,{...e,className:L(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 Xo(e){return r(We,{...e,className:L(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 dr(e){return r(We,{...e,className:L(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 pl(e){return r(We,{...e,className:L(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 uh(e){return r(We,{"aria-label":xe("GUILD_OWNER"),...e,className:L(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 ph(e){return r(We,{...e,className:L(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 dl(e){return r(We,{...e,className:L(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 Ls(e){return r(We,{...e,className:L(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 dh(e){return r(We,{...e,className:L(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 ml(e){return r(We,{...e,className:L(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 S3(e){return r(We,{...e,className:L(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 Ci(e){return r(We,{...e,className:L(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 mh(e){return r(We,{...e,className:L(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 fl(e){return r(We,{...e,className:L(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 fh(e){return r(We,{...e,className:L(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 gh(e){return r(We,{...e,className:L(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 gl(e){return r(We,{...e,className:L(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 hh(e){return r(We,{...e,className:L(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 hl(e){return r(We,{...e,className:L(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 Ai(e){return r(We,{...e,className:L(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 yh(e){return r(We,{...e,className:L(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 yl(e){return r(We,{...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 vh(e){return r(We,{...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 vl(e){return r(We,{...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 bh(e){return r(We,{...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 Sh(e){return r(We,{...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 xh(e){return r(We,{...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 Th(e){return r(We,{...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 wh(e){return r(We,{...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 x3(e){return r(We,{...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 Ph(e){return r(We,{...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"}))}var Qe=ye(()=>{"use strict";a();lb();ie();te()});function De(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 Wt=ye(()=>{"use strict";a()});function Ur({variant:e="primary",size:t="medium",children:o,className:n,...i}){return r("button",{"data-mana-component":"button",className:L(vu("base",e,t),n),...i},o,e==="link"&&r(Xo,{className:vu("link-icon")}))}function bl({variant:e="link",size:t="medium",className:o,children:n,...i}){return r(De,{"data-mana-component":"button",className:L(vu("base",e,t),o),...i},n,r(Xo,{className:vu("link-icon")}))}function bu({variant:e="primary",className:t,...o}){return r("button",{className:L(T3("base",e),t),...o})}var vu,T3,Os,w3,P3,an=ye(()=>{"use strict";a();ab();ve();te();Qe();Wt();vu=Y("vc-btn-"),T3=Y("vc-text-btn-");Os=function({look:t,color:o="BRAND",size:n="medium",...i}){return t==="LINK"?r(bu,{variant:P3[o],...i}):r(Ur,{variant:w3[o],size:n,...i})};Os.Looks={FILLED:"",LINK:"LINK"};Os.Colors={BRAND:"BRAND",PRIMARY:"PRIMARY",RED:"RED",TRANSPARENT:"TRANSPARENT",CUSTOM:"CUSTOM",GREEN:"GREEN",LINK:"LINK",WHITE:"WHITE"};w3={BRAND:"primary",PRIMARY:"secondary",RED:"dangerPrimary",TRANSPARENT:"secondary",CUSTOM:"none",GREEN:"positive",LINK:"link",WHITE:"overlayPrimary"},P3={BRAND:"primary",PRIMARY:"primary",RED:"danger",TRANSPARENT:"secondary",CUSTOM:"secondary",GREEN:"primary",LINK:"link",WHITE:"secondary"};Os.Sizes={SMALL:"small",MEDIUM:"medium",LARGE:"medium",XLARGE:"medium",NONE:"min",MIN:"min"}});var cb=ye(()=>{});function Ee({className:e,...t}){return r("hr",{className:L("vc-divider",e),...t})}var Jt=ye(()=>{"use strict";a();cb();te()});var ub=ye(()=>{});function Ri({children:e,...t}){return r(Gn,{tag:"span",size:"sm",weight:"normal",...t},e)}var Su=ye(()=>{"use strict";a();Ii()});var pb=ye(()=>{});function ln({checked:e,onChange:t,disabled:o}){let[n,i]=C(!1),s=l=>{let c=l.currentTarget;i(c.matches(":focus-visible"))};return r("div",null,r("div",{className:L(Ih("container",{checked:e,disabled:o,focusVisible:n}))},r("svg",{className:Ih("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:db,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),r("path",{fill:db,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):r(p,null,r("path",{fill:mb,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),r("path",{fill:mb,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:Ih("input"),tabIndex:0,checked:e,onChange:l=>t(l.currentTarget.checked)})))}var Ih,db,mb,Di=ye(()=>{"use strict";a();pb();ve();te();v();Ih=Y("vc-switch-"),db="var(--brand-500)",mb="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:L("vc-form-switch",s,i&&"vc-form-switch-disabled")},r("div",{className:"vc-form-switch-text"},r(Ri,{size:"md",weight:"medium"},t),n&&r(Ri,{size:"sm",weight:"normal"},n)),r(ln,{checked:o,onChange:e,disabled:i})),!l&&r(Ee,{className:"vc-form-switch-border"}))}function Mh({note:e,children:t,...o}){return r(jo,{title:t??"",description:e,...o})}var Hn=ye(()=>{"use strict";a();ub();te();Jt();Su();Di()});var fb=ye(()=>{});function Ao(e){let{tag:t="h5",children:o,className:n,...i}=e;return r(t,{className:L(`vc-${t}`,!n&&`vc-${t}-defaultMargin`,n),...i},o)}function I3({children:e,...t}){return r(Ao,{tag:"h2",...t},e)}function M3({children:e,...t}){return r(Ao,{tag:"h3",...t},e)}function Fr({children:e,...t}){return r(Ao,{tag:"h4",...t},e)}var cn=ye(()=>{"use strict";a();fb();te()});function $e({children:e,...t}){return r(Gn,{tag:"p",size:"sm",weight:"normal",...t},e)}var mr=ye(()=>{"use strict";a();Ii()});function Ot(e,t){let o=function(){let i=new Error(`Vencord could not find the ${e} Component`);return N3.error(i),null},n=Ke(()=>o);return Ae(t,i=>{o=i,Object.assign(n,i)},{isIndirect:!0}),n}function mt(e,t){Ae(O.byStoreName(e),t,{isIndirect:!0})}var N3,Nh=ye(()=>{"use strict";a();ae();ct();E();N3=new F("Webpack")});var x,H,R,k3,C3,kh,gb,Q,Vo,dt,xu,Ro,_s,Wn,Bs,Ch,bo,Ah,So,Sl,jn,gr,xl,Tl,fr,zn,A3,qn,R3,D3,Rh,L3,Tu,wl,Pl,Qt,Li,wu,hb=ye(()=>{"use strict";a();Ii();an();Jt();Hn();cn();mr();vi();E();Nh();x={FormTitle:Ao,FormText:$e,FormSection:"section",FormDivider:Ee},H=th,R=Os,k3=Mh,C3=Ot("Card",O.componentByCode(".editable),",".outline:")),kh=Ot("Checkbox",O.componentByCode(".checkboxWrapperDisabled:")),gb=Ue(".tooltipTop,bottom:",{Tooltip:O.componentByCode("this.renderTooltip()]"),TooltipContainer:O.componentByCode('="div"')}),Q=Ke(()=>gb.Tooltip),Vo=Ke(()=>gb.TooltipContainer),dt=Ot("TextInput",O.componentByCode("#{intl::MAXIMUM_LENGTH_ERROR}",'"input"')),xu=Ot("TextArea",O.componentByCode("this.getPaddingRight()},id:")),Ro=Ot("Select",O.componentByCode('"Select"',".newOptionLabel")),_s=Ot("SearchableSelect",O.componentByCode('"SearchableSelect"')),Wn=Ot("Slider",O.componentByCode('"markDash".concat(')),Bs=Ot("Popout",O.componentByCode("ref:this.ref,","renderPopout:this.renderPopout,")),Ch=Ot("Dialog",O.componentByCode('role:"dialog",tabIndex:-1')),bo=Ot("TabBar",O.componentByCode("ref:this.tabBarRef,className:")),Ah=Ot("Paginator",O.componentByCode('rel:"prev",children:')),So=Ot("Clickable",O.componentByCode("this.context?this.renderNonInteractive():")),Sl=Ot("Avatar",O.componentByCode(".size-1.375*")),jn=Ot("ColorPicker",O.componentByCode("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}","showEyeDropper")),gr=Ot("UserSummaryItem",O.componentByCode("defaultRenderUser","showDefaultAvatarsForNullUsers"));Ae(O.byCode('="ltr",orientation:',"customTheme:","forwardRef"),e=>xl=e);Ae(O.byCode("getScrollerNode:","resizeObserver:","sectionHeight:"),e=>Tl=e);Ae(["thin","auto","customTheme"],e=>fr=e);Ae(e=>e.thin&&e.auto&&!e.customTheme,e=>zn=e);A3=Ke(()=>xl(fr.none,fr.fade,fr.customTheme)),qn=Ke(()=>xl(fr.thin,fr.fade,fr.customTheme)),R3=Ke(()=>xl(fr.auto,fr.fade,fr.customTheme)),D3=Ke(()=>Tl(zn.none,zn.fade,"",ResizeObserver)),Rh=Ke(()=>Tl(zn.thin,zn.fade,"",ResizeObserver)),L3=Ke(()=>Tl(zn.auto,zn.fade,"",ResizeObserver)),Tu=Ot("FocusLock",O.componentByCode(".containerRef,{keyboardModeEnabled:"));Ae(e=>{if(typeof e!="function")return!1;let t=String(e);return t.includes(".resolve({theme:null")&&!t.includes("useMemo")},e=>wl=e);Pl=Ot("MaskedLink",O.componentByCode("MASKED_LINK)")),Qt=Ot("Timestamp",O.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}")),Li=Ot("OAuth2AuthorizeModal",O.componentByCode(".authorize,children:",".contentBackground")),wu=Ue(".assign({colorNames:",{Transition:O.componentByCode('["items","children"]',",null,"),animated:O.byProps("div","text")})});var I,st,yb=ye(()=>{"use strict";a();E();I={};Ae(e=>e.name==="MenuCheckboxItem",(e,t)=>{let o=pt(t);for(let i in o){try{var n=o[i]}catch{continue}typeof n=="function"&&n.name.startsWith("Menu")&&(I[n.name]=n)}});Ae(O.componentByCode('path:["empty"]'),e=>I.Menu=e);Ae(O.componentByCode("sliderContainer","slider","handleSize:16","=100"),e=>I.MenuSliderControl=e);Ae(O.componentByCode(".SEARCH)",".focus()","query:"),e=>I.MenuSearchControl=e);st=Ue('type:"CONTEXT_MENU_OPEN',{closeContextMenu:O.byCode("CONTEXT_MENU_CLOSE"),openContextMenu:O.byCode("renderLazy:"),openContextMenuLazy:e=>typeof e=="function"&&e.toString().length<100})});var se,C,X,un,le,nt,ks,Pu,O3,Oi,vb=ye(()=>{"use strict";a();E();O3=D("createPortal"),Oi=ue("(299));",".onRecoverableError");Ae("useState",e=>{se=e,{useEffect:X,useState:C,useLayoutEffect:un,useMemo:le,useRef:nt,useReducer:ks,useCallback:Pu}=se})});var bb={};et(bb,{AuthenticationStore:()=>io,ChannelStore:()=>Z,DraftStore:()=>Fs,DraftType:()=>$t,EmojiStore:()=>er,Flux:()=>Es,GuildChannelStore:()=>$r,GuildMemberStore:()=>be,GuildRoleStore:()=>bt,GuildStore:()=>Me,MessageStore:()=>jt,PermissionStore:()=>Te,PresenceStore:()=>no,ReadStateStore:()=>Kn,RelationshipStore:()=>we,SelectedChannelStore:()=>Be,SelectedGuildStore:()=>oo,StickersStore:()=>ao,StreamerModeStore:()=>Il,ThemeStore:()=>Us,TypingStore:()=>pn,UserProfileStore:()=>Lt,UserStore:()=>k,VoiceStateStore:()=>so,WindowStore:()=>Gr,useStateFromStores:()=>ne});var Es,$t,jt,Te,$r,Kn,no,Me,bt,be,k,io,Lt,Be,oo,Z,pn,we,so,er,ao,Us,Gr,Fs,Il,ne,Dh=ye(()=>{"use strict";a();E();Nh();Es=D("connectStores"),$t=D("ChannelMessage","SlashCommand"),ne=ue("useStateFromStores");mt("AuthenticationStore",e=>io=e);mt("DraftStore",e=>Fs=e);mt("UserStore",e=>k=e);mt("UserProfileStore",e=>Lt=e);mt("ChannelStore",e=>Z=e);mt("SelectedChannelStore",e=>Be=e);mt("SelectedGuildStore",e=>oo=e);mt("GuildStore",e=>Me=e);mt("GuildMemberStore",e=>be=e);mt("RelationshipStore",e=>we=e);mt("PermissionStore",e=>Te=e);mt("PresenceStore",e=>no=e);mt("ReadStateStore",e=>Kn=e);mt("GuildChannelStore",e=>$r=e);mt("GuildRoleStore",e=>bt=e);mt("MessageStore",e=>jt=e);mt("WindowStore",e=>Gr=e);mt("EmojiStore",e=>er=e);mt("StickersStore",e=>ao=e);mt("TypingStore",e=>pn=e);mt("VoiceStateStore",e=>so=e);mt("StreamerModeStore",e=>Il=e);mt("ThemeStore",e=>{Us=e,Vencord.Api.Themes.initQuickCssThemeStore(e)})});var cl,Sb=ye(()=>{"use strict";a();E();cl={FrecencyUserSettingsActionCreators:Dt(e=>e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")),PreloadedUserSettingsActionCreators:Dt(e=>e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings"))}});function Re(e,t=xb.MESSAGE,o){q.show(q.create(e,t,o))}var B,Co,vt,wt,$s,_i,Iu,_3,Bi,pr,xo,Pe,Le,xb,B3,q,ro,Ei,Ml,dn,hr,Gs,Hs,ce,Ui,Lh,vo,Mu,lh,ch,ul,Pt,Nl,E3,U3,F3,Yn,kl,Tb=ye(()=>{"use strict";a();E();Ae(["dispatch","subscribe"],e=>{B=e,Vencord.Api.PluginManager.subscribeAllPluginsFluxEvents(e);let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ja()};e.subscribe("CONNECTION_OPEN",t)});Ae(["dispatchToLastSubscribed"],e=>Co=e);vt=Ue('ME:"/users/@me"',{Endpoints:O.byProps("USER","ME"),UserFlags:O.byProps("STAFF","SPAMMER"),FriendsSections:e=>e.PENDING==="PENDING"&&e.ADD_FRIEND}),wt=Dt(e=>typeof e=="object"&&e.del&&e.put),$s=D("parseTwoDigitYear"),_i=D("highlight","registerLanguage"),{match:Iu,P:_3}=Ue("@ts-pattern/matcher",{match:O.byCode("return new"),P:O.byProps("when")}),Bi=D("debounce","cloneDeep"),pr=Ue('defaultLocale:"en-US"',{t:e=>e?.[Symbol.toStringTag]==="IntlMessagesProxy",intl:e=>e!=null&&Object.getPrototypeOf(e)?.withFormatters!=null},!0);Ae(["fromTimestamp","extractTimestamp"],e=>xo=e);Ae("parseTopic",e=>Pe=e);Ae(["show","close"],e=>Le=e);xb={MESSAGE:"message",SUCCESS:"success",FAILURE:"failure",CUSTOM:"custom",CLIP:"clip",LINK:"link",FORWARD:"forward",BOOKMARK:"bookmark",CLOCK:"clock"},B3={TOP:0,BOTTOM:1},q={Type:xb,Position:B3,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Ae("showToast",e=>{q.show=e.showToast,q.pop=e.popToast,q.create=e.createToast});ro={getUser:ue(".USER(")},Ei=D("clearAll","addFile"),Ml={promptToUpload:ue("=!0,showLargeMessageDialog:")},dn=Ue("getAssetImage: size must === [",{fetchAssetIds:O.byCode('.startsWith("http:")',".dispatch({"),getAssetFromImageURL:O.byCode("].serialize(",',":"'),getAssetImage:O.byCode("getAssetImage: size must === ["),getAssets:O.byCode(".assets")}),hr=Ue("Transitioning to ",{transitionTo:O.byCode("transitionTo -"),transitionToGuild:O.byCode("transitionToGuild -"),back:O.byCode("goBack()"),forward:O.byCode("goForward()")}),Gs=Ue('"Thread must have a parent ID."',{transitionToChannel:O.byCode(".preload"),transitionToThread:O.byCode('"Thread must have a parent ID."')});Ae(["open","saveAccountChanges"],e=>Hs=e);ce=Dt(e=>typeof e.ADMINISTRATOR=="bigint"),{zustandCreate:Ui}=Ue(["useSyncExternalStoreWithSelector:","Object.assign"],{zustandCreate:O.byCode(/=>(\i)\?\i\(\1/)}),{zustandPersist:Lh}=Ue(".onRehydrateStorage)?",{zustandPersist:O.byCode(/(\(\i,\i\))=>.+?\i\1/)}),vo=D("editMessage","sendMessage"),Mu=D("clearCache","_channelMessages"),lh=D("openUserProfileModal","closeUserProfileModal"),ch=D("resolveInvite"),ul=D("openPrivateChannel"),Pt=D("getGuildBannerURL","getUserAvatarURL"),Nl=Ue("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\)=>/)}),E3=Ue('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"')}),U3=D("useName","getGlobalName"),F3=Ue(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/,{getDisplayProfile:O.byCode(".getGuildMemberProfile("),useDisplayProfile:O.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)}),Yn=Ue("millisecondsInUnit:",{calendarFormat:O.byCode("sameElse"),dateFormat:O.byCode('":'),isSameDay:O.byCode(/Math\.abs\(\+?\i-\+?\i\)/),diffAsUnits:O.byCode("days:0","millisecondsInUnit")}),kl=D("REPLYABLE","FORWARDABLE")});var $n={};et($n,{Alerts:()=>Le,Animations:()=>wu,ApplicationAssetUtils:()=>dn,AuthenticationStore:()=>io,Avatar:()=>Sl,Button:()=>R,ButtonWrapperClasses:()=>gu,Card:()=>C3,ChannelActionCreators:()=>ul,ChannelRouter:()=>Gs,ChannelStore:()=>Z,Checkbox:()=>kh,Clickable:()=>So,ColorPicker:()=>jn,ComponentDispatch:()=>Co,Constants:()=>vt,ContextMenuApi:()=>st,DateUtils:()=>Yn,Dialog:()=>Ch,DisplayProfileUtils:()=>F3,DraftStore:()=>Fs,DraftType:()=>$t,EmojiStore:()=>er,ExpressionPickerStore:()=>Nl,Flux:()=>Es,FluxDispatcher:()=>B,FocusLock:()=>Tu,Forms:()=>x,GuildChannelStore:()=>$r,GuildMemberStore:()=>be,GuildRoleStore:()=>bt,GuildStore:()=>Me,IconUtils:()=>Pt,InviteActions:()=>ch,ListScrollerAuto:()=>L3,ListScrollerNone:()=>D3,ListScrollerThin:()=>Rh,MaskedLink:()=>Pl,Menu:()=>I,MessageActions:()=>vo,MessageCache:()=>Mu,MessageStore:()=>jt,MessageTypeSets:()=>kl,NavigationRouter:()=>hr,OAuth2AuthorizeModal:()=>Li,P:()=>_3,Paginator:()=>Ah,Parser:()=>Pe,PermissionStore:()=>Te,PermissionsBits:()=>ce,Popout:()=>Bs,PopoutActions:()=>E3,PresenceStore:()=>no,React:()=>se,ReactDOM:()=>O3,ReadStateStore:()=>Kn,RelationshipStore:()=>we,RestAPI:()=>wt,ScrollerAuto:()=>R3,ScrollerNone:()=>A3,ScrollerThin:()=>qn,SearchableSelect:()=>_s,Select:()=>Ro,SelectedChannelStore:()=>Be,SelectedGuildStore:()=>oo,SettingsRouter:()=>Hs,Slider:()=>Wn,SnowflakeUtils:()=>xo,StickersStore:()=>ao,StreamerModeStore:()=>Il,Switch:()=>k3,TabBar:()=>bo,Text:()=>H,TextArea:()=>xu,TextInput:()=>dt,ThemeStore:()=>Us,Timestamp:()=>Qt,Toasts:()=>q,Tooltip:()=>Q,TooltipContainer:()=>Vo,TypingStore:()=>pn,UploadHandler:()=>Ml,UploadManager:()=>Ei,UserProfileActions:()=>lh,UserProfileStore:()=>Lt,UserSettingsActionCreators:()=>cl,UserStore:()=>k,UserSummaryItem:()=>gr,UserUtils:()=>ro,UsernameUtils:()=>U3,VoiceStateStore:()=>so,WindowStore:()=>Gr,createListScroller:()=>Tl,createRoot:()=>Oi,createScroller:()=>xl,hljs:()=>_i,i18n:()=>pr,listScrollerClasses:()=>zn,lodash:()=>Bi,match:()=>Iu,moment:()=>$s,scrollerClasses:()=>fr,showToast:()=>Re,useCallback:()=>Pu,useEffect:()=>X,useLayoutEffect:()=>un,useMemo:()=>le,useReducer:()=>ks,useRef:()=>nt,useState:()=>C,useStateFromStores:()=>ne,useToken:()=>wl,zustandCreate:()=>Ui,zustandPersist:()=>Lh});var v=ye(()=>{"use strict";a();ib();hb();yb();vb();Dh();Sb();Tb()});var z0=xs(H0=>{a();var Nx=Object.defineProperty,C8=e=>Nx(e,"__esModule",{value:!0}),A8=(e,t)=>{for(var o in t)Nx(e,o,{get:t[o],enumerable:!0})};C8(H0);A8(H0,{GIFEncoder:()=>Ox,applyPalette:()=>F8,default:()=>Z8,nearestColor:()=>z8,nearestColorIndex:()=>Dx,nearestColorIndexWithDistance:()=>Lx,prequantize:()=>U8,quantize:()=>B8,snapColorsToPalette:()=>H8});var R8={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 kx(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 F0=12,Px=5003,D8=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function L8(e,t,o,n,i=kx(512),s=new Uint8Array(256),l=new Int32Array(Px),c=new Int32Array(Px)){let u=l.length,m=Math.max(2,n);s.fill(0),c.fill(0),l.fill(-1);let f=0,g=0,y=m+1,b=y,P=!1,S=b,_=(1<<S)-1,N=1<<y-1,U=N+1,j=N+2,z=0,J=o[0],me=0;for(let K=u;K<65536;K*=2)++me;me=8-me,i.writeByte(m),ee(N);let W=o.length;for(let K=1;K<W;K++)e:{let ze=o[K],re=(ze<<F0)+J,fe=ze<<me^J;if(l[fe]===re){J=c[fe];break e}let fo=fe===0?1:u-fe;for(;l[fe]>=0;)if(fe-=fo,fe<0&&(fe+=u),l[fe]===re){J=c[fe];break e}ee(J),J=ze,j<1<<F0?(c[fe]=j++,l[fe]=re):(l.fill(-1),j=N+2,P=!0,ee(N))}return ee(J),ee(U),i.writeByte(0),i.bytesView();function ee(K){for(f&=D8[g],g>0?f|=K<<g:f=K,g+=S;g>=8;)s[z++]=f&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),f>>=8,g-=8;if((j>_||P)&&(P?(S=b,_=(1<<S)-1,P=!1):(++S,_=S===F0?1<<S:(1<<S)-1)),K==U){for(;g>0;)s[z++]=f&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),f>>=8,g-=8;z>0&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0)}}}var O8=L8;function Cx(e,t,o){return e<<8&63488|t<<2&992|o>>3}function Ax(e,t,o,n){return e>>4|t&240|(o&240)<<4|(n&240)<<8}function Rx(e,t,o){return e>>4<<8|t&240|o>>4}function ud(e,t,o){return e<t?t:e>o?o:e}function Tc(e){return e*e}function Ix(e,t,o){var n=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,m=s.gc,f=s.bc;for(var g=s.fw;g!=0;g=e[g].fw){let b=e[g],P=b.cnt,S=l*P/(l+P);if(!(S>=i)){var y=0;o&&(y+=S*Tc(b.ac-c),y>=i)||(y+=S*Tc(b.rc-u),!(y>=i)&&(y+=S*Tc(b.gc-m),!(y>=i)&&(y+=S*Tc(b.bc-f),!(y>=i)&&(i=y,n=g))))}}s.err=i,s.nn=n}function $0(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function _8(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,m=l>>8&255,f=l&255,g=Ax(f,m,u,c),y=g in n?n[g]:n[g]=$0();y.rc+=f,y.gc+=m,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,m=l&255,f=Rx(m,u,c),g=f in n?n[f]:n[f]=$0();g.rc+=m,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,m=l&255,f=Cx(m,u,c),g=f in n?n[f]:n[f]=$0();g.rc+=m,g.gc+=u,g.bc+=c,g.cnt++}return n}function B8(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),m=o.useSqrt!==!1,f=n==="rgba4444",g=_8(u,n),y=g.length,b=y-1,P=new Uint32Array(y+1);for(var S=0,N=0;N<y;++N){let ot=g[N];if(ot!=null){var _=1/ot.cnt;f&&(ot.ac*=_),ot.rc*=_,ot.gc*=_,ot.bc*=_,g[S++]=ot}}Tc(t)/S<.022&&(m=!1);for(var N=0;N<S-1;++N)g[N].fw=N+1,g[N+1].bk=N,m&&(g[N].cnt=Math.sqrt(g[N].cnt));m&&(g[N].cnt=Math.sqrt(g[N].cnt));var U,j,z;for(N=0;N<S;++N){Ix(g,N,!1);var J=g[N].err;for(j=++P[0];j>1&&(z=j>>1,!(g[U=P[z]].err<=J));j=z)P[j]=U;P[j]=N}var me=S-t;for(N=0;N<me;){for(var W;;){var ee=P[1];if(W=g[ee],W.tm>=W.mtm&&g[W.nn].mtm<=W.tm)break;W.mtm==b?ee=P[1]=P[P[0]--]:(Ix(g,ee,!1),W.tm=N);var J=g[ee].err;for(j=1;(z=j+j)<=P[0]&&(z<P[0]&&g[P[z]].err>g[P[z+1]].err&&z++,!(J<=g[U=P[z]].err));j=z)P[j]=U;P[j]=ee}var K=g[W.nn],ze=W.cnt,re=K.cnt,_=1/(ze+re);f&&(W.ac=_*(ze*W.ac+re*K.ac)),W.rc=_*(ze*W.rc+re*K.rc),W.gc=_*(ze*W.gc+re*K.gc),W.bc=_*(ze*W.bc+re*K.bc),W.cnt+=K.cnt,W.mtm=++N,g[K.bk].fw=K.fw,g[K.fw].bk=K.bk,K.mtm=b}let fe=[];var fo=0;for(N=0;;++fo){let Ft=ud(Math.round(g[N].rc),0,255),ot=ud(Math.round(g[N].gc),0,255),Mt=ud(Math.round(g[N].bc),0,255),Ve=255;f&&(Ve=ud(Math.round(g[N].ac),0,255),c&&(Ve=Ve<=(typeof c=="number"?c:127)?0:255),i&&Ve<=l&&(Ft=ot=Mt=s,Ve=0));let Kt=f?[Ft,ot,Mt,Ve]:[Ft,ot,Mt];if(E8(fe,Kt)||fe.push(Kt),(N=g[N].fw)==0)break}return fe}function E8(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 dd(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 pd(e,t){return t>1?Math.round(e/t)*t:e}function U8(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,m=l>>8&255,f=l&255;c=pd(c,o),n&&(c=c<=(typeof n=="number"?n:127)?0:255),f=pd(f,t),m=pd(m,t),u=pd(u,t),i[s]=c<<24|u<<16|m<<8|f<<0}}function F8(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 m=0;m<i;m++){let f=n[m],g=f>>24&255,y=f>>16&255,b=f>>8&255,P=f&255,S=Ax(P,b,y,g),_=S in c?c[S]:c[S]=$8(P,b,y,g,t);l[m]=_}else{let m=o==="rgb444"?Rx:Cx;for(let f=0;f<i;f++){let g=n[f],y=g>>16&255,b=g>>8&255,P=g&255,S=m(P,b,y),_=S in c?c[S]:c[S]=G8(P,b,y,t);l[f]=_}}return l}function $8(e,t,o,n,i){let s=0,l=1e100;for(let c=0;c<i.length;c++){let u=i[c],m=u[3],f=ls(m-n);if(f>l)continue;let g=u[0];if(f+=ls(g-e),f>l)continue;let y=u[1];if(f+=ls(y-t),f>l)continue;let b=u[2];f+=ls(b-o),!(f>l)&&(l=f,s=c)}return s}function G8(e,t,o,n){let i=0,s=1e100;for(let l=0;l<n.length;l++){let c=n[l],u=c[0],m=ls(u-e);if(m>s)continue;let f=c[1];if(m+=ls(f-t),m>s)continue;let g=c[2];m+=ls(g-o),!(m>s)&&(s=m,i=l)}return i}function H8(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=Lx(n,c.slice(0,3),dd),m=u[0],f=u[1];f>0&&f<=i&&(e[m]=c)}}function ls(e){return e*e}function Dx(e,t,o=dd){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 Lx(e,t,o=dd){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 z8(e,t,o=dd){return e[Dx(e,t,o)]}function Ox(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,n=kx(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(R8.trailer)},bytes(){return n.bytes()},bytesView(){return n.bytesView()},get buffer(){return n.buffer},get stream(){return n},writeHeader:m,writeFrame(f,g,y,b={}){let{transparent:P=!1,transparentIndex:S=0,delay:_=0,palette:N=null,repeat:U=0,colorDepth:j=8,dispose:z=-1}=b,J=!1;if(o?u||(J=!0,m(),u=!0):J=!!b.first,g=Math.max(0,Math.floor(g)),y=Math.max(0,Math.floor(y)),J){if(!N)throw new Error("First frame must include a { palette } option");j8(n,g,y,N,j),Mx(n,N),U>=0&&q8(n,U)}let me=Math.round(_/10);W8(n,z,me,P,S);let W=!!N&&!J;K8(n,g,y,W?N:null),W&&Mx(n,N),Y8(n,f,g,y,j,s,l,c)}};function m(){_x(n,"GIF89a")}}function W8(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),ui(e,o),e.writeByte(i||0),e.writeByte(0)}function j8(e,t,o,n,i=8){let c=G0(n.length)-1,u=128|i-1<<4|0|c,m=0,f=0;ui(e,t),ui(e,o),e.writeBytes([u,m,f])}function q8(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),_x(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),ui(e,t),e.writeByte(0)}function Mx(e,t){let o=1<<G0(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 K8(e,t,o,n){if(e.writeByte(44),ui(e,0),ui(e,0),ui(e,t),ui(e,o),n){let l=G0(n.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function Y8(e,t,o,n,i=8,s,l,c){O8(o,n,t,i,e,s,l,c)}function ui(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function _x(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function G0(e){return Math.max(Math.ceil(Math.log2(e)),1)}var Z8=Ox});var Sw=xs((hbe,Hy)=>{"use strict";a();var Zk=Object.prototype.hasOwnProperty,Mo="~";function zc(){}Object.create&&(zc.prototype=Object.create(null),new zc().__proto__||(Mo=!1));function Jk(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function bw(e,t,o,n,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new Jk(o,n||e,i),l=Mo?Mo+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 Sf(e,t){--e._eventsCount===0?e._events=new zc:delete e._events[t]}function mo(){this._events=new zc,this._eventsCount=0}mo.prototype.eventNames=function(){var t=[],o,n;if(this._eventsCount===0)return t;for(n in o=this._events)Zk.call(o,n)&&t.push(Mo?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};mo.prototype.listeners=function(t){var o=Mo?Mo+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};mo.prototype.listenerCount=function(t){var o=Mo?Mo+t:t,n=this._events[o];return n?n.fn?1:n.length:0};mo.prototype.emit=function(t,o,n,i,s,l){var c=Mo?Mo+t:t;if(!this._events[c])return!1;var u=this._events[c],m=arguments.length,f,g;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),m){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(m-1);g<m;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),m){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(m-1);b<m;b++)f[b-1]=arguments[b];u[g].fn.apply(u[g].context,f)}}return!0};mo.prototype.on=function(t,o,n){return bw(this,t,o,n,!1)};mo.prototype.once=function(t,o,n){return bw(this,t,o,n,!0)};mo.prototype.removeListener=function(t,o,n,i){var s=Mo?Mo+t:t;if(!this._events[s])return this;if(!o)return Sf(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!n||l.context===n)&&Sf(this,s);else{for(var c=0,u=[],m=l.length;c<m;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:Sf(this,s)}return this};mo.prototype.removeAllListeners=function(t){var o;return t?(o=Mo?Mo+t:t,this._events[o]&&Sf(this,o)):(this._events=new zc,this._eventsCount=0),this};mo.prototype.off=mo.prototype.removeListener;mo.prototype.addListener=mo.prototype.on;mo.prefixed=Mo;mo.EventEmitter=mo;typeof Hy<"u"&&(Hy.exports=mo)});var qy=xs(xa=>{"use strict";a();Object.defineProperty(xa,"__esModule",{value:!0});xa.Channel=xa.ChannelPort=void 0;var Qk=Sw(),xf="vapIpc",zy=Symbol.for("vapIpc.edgeCreate"),Wy=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}};xa.ChannelPort=Wy;var jy=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new Qk.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${xf}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${xf}: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(zy,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(`${xf}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${xf}: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(zy,i),n(s.id))};this._emitter.on(zy,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}};xa.Channel=jy});var Zy=xs(Ta=>{"use strict";a();Object.defineProperty(Ta,"__esModule",{value:!0});Ta.RemoteClient=Ta.RemoteHost=void 0;var Ky=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()}};Ta.RemoteHost=Ky;var Yy=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})}};Ta.RemoteClient=Yy});var ww=xs(wa=>{"use strict";a();Object.defineProperty(wa,"__esModule",{value:!0});wa.WorkerClient=wa.createWorkerHost=void 0;var xw=qy(),Tw=Zy(),Xk=(e,t)=>{let o=new xw.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 Tw.RemoteHost(o,t)};wa.createWorkerHost=Xk;var Jy=class extends Tw.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,n,i={}){let s=new xw.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=Jy});var Pw=xs(An=>{"use strict";a();var Vk=An&&An.__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]})),Qy=An&&An.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&Vk(t,e,o)};Object.defineProperty(An,"__esModule",{value:!0});Qy(qy(),An);Qy(Zy(),An);Qy(ww(),An)});var AR={};et(AR,{Api:()=>Ev,Components:()=>Uv,PlainSettings:()=>vr,Plugins:()=>ql,Settings:()=>G,Updater:()=>_h,Util:()=>Fv,Webpack:()=>$v,WebpackPatcher:()=>v1});a();a();a();var Kg={};et(Kg,{BadgePosition:()=>ru,_getBadges:()=>qg,addProfileBadge:()=>Wa,removeProfileBadge:()=>ja});a();a();vi();ae();a();a();ve();var V5=Y("vc-margin-"),e3=["top","bottom","left","right"],t3=[8,16,20],A={};function Dg(){let e="";for(let t of e3)for(let o of t3){let n=V5(`${t}-${o}`);A[`${t}${o}`]=n,e+=`.${n}{margin-${t}:${o}px;}`}return e}a();te();function Ct(e){return r("div",{...e,className:L(e.className,"vc-error-card")},e.children)}var i3="#e78284",s3=new F("React ErrorBoundary",i3),jv={},Wg=Ke(()=>class extends Vencord.Webpack.Common.React.PureComponent{state={error:jv,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}),s3.error(`${this.props.message||"A component threw an Error"}
|
|
`,t,o.componentStack)}get isNoop(){return this.props.noop}render(){if(this.state.error===jv)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(Ct,{style:{overflow:"hidden"}},r("h1",null,"Oh no!"),r("p",null,t),r("code",null,this.state.message,!!this.state.stack&&r("pre",{className:A.top8},this.state.stack)))}});Wg.wrap=(e,t)=>{let o=n=>r(Wg,{...t,wrappedProps:n},r(e,{...n}));return t?.displayName&&(o.displayName=t.displayName),o};var M=Wg;var ru=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(ru||{}),jg=new Set;function Wa(e){e.component&&=M.wrap(e.component,{noop:!0}),jg.add(e)}function ja(e){return jg.delete(e)}function qg(e){let t=[];for(let n of jg){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=Bn.getDonorBadges(e.userId);return o&&t.unshift(...o.map(n=>({...e,...n}))),t}a();function oe({flexDirection:e,gap:t="1em",justifyContent:o,alignItems:n,flexWrap:i,children:s,style:l,...c}){return l??={},Object.assign(l,{display:"flex",flexDirection:e,gap:t,justifyContent:o,alignItems:n,flexWrap:i}),r("div",{style:l,...c},s)}a();te();function qa(e){return r("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",height:"16",width:"16",...e,className:L("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 Cl({look:e=R.Looks.LINK,color:t=R.Colors.TRANSPARENT,...o}){return r(R,{...o,look:e,color:t,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated"),className:"vc-donate-button"},r(qa,null),"Donate")}a();a();a();var _h={};et(_h,{UpdateLogger:()=>Zn,changes:()=>Fi,checkForUpdates:()=>fn,getRepo:()=>Oh,isNewer:()=>ku,isOutdated:()=>zs,maybePromptToUpdate:()=>Al,update:()=>Jn,updateError:()=>Ws});a();a();var mn="6e11973";ae();a();function _t(){window.VesktopNative.app.relaunch()}var Zn=new F("Updater","white"),zs=!1,ku=!1,Ws,Fi;async function Nu(e){let t=await e;if(t.ok)return t.value;throw Ws=t.error,t.error}async function fn(){return Fi=await Nu(VencordNative.updater.getUpdates()),zs=Fi.length>0}async function Jn(){if(!zs)return!0;let e=await Nu(VencordNative.updater.update());if(e&&(zs=!1,!await Nu(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}var Oh=()=>Nu(VencordNative.updater.getRepo());async function Al(e,t=!1){try{if(await fn()){let n=confirm(e);if(n&&ku)return alert("Your local copy has more recent commits. Please stash or reset them.");n&&(await Jn(),_t())}}catch(o){Zn.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}function wb(){Al("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?")}Fe();a();function gn(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}function Do({children:e}){return r("section",{className:"vc-settings-tab"},e)}var Bh=gn(wb);function Lo(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:Bh})}function hn(e){try{de(Lo(t=>r(he,{...t,size:"medium"},r(Se,{className:"vc-settings-modal"},r(tt,{onClick:t.onClose,className:"vc-settings-modal-close"}),r(e,null))),e.displayName||"Settings Tab"))}catch{Bh()}}a();a();E();v();var $3=D("markup","codeContainer");function Rl(e){return r("div",{className:$3.markup},Pe.defaultRules.codeBlock.react(e,null,{}))}Jt();cn();a();function qt(e,t=300){let o;return function(...n){clearTimeout(o),o=setTimeout(()=>{e(...n)},t)}}ie();a();var Ll=e=>e.split(/(?=[A-Z][a-z])|(?<=[a-z])(?=[A-Z])/).map(t=>/^[A-Z]{2,}$/.test(t)?t:t.toLowerCase()),G3=e=>e.toLowerCase().split("_"),H3=e=>e.toLowerCase().split("-"),Eh=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),z3=e=>e.toLowerCase().split(" "),W3=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),j3=e=>e.join("_").toUpperCase(),q3=e=>e.join("-").toLowerCase(),K3=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),yn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Y3=["years","months","weeks","days","hours","minutes","seconds"];function Pb(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ol(e,t,o=!1){let{moment:n}=(v(),eu($n)),i=n.duration(e,t),s=Y3.map(m=>({amount:i[m](),unit:m})),l=0;e:for(let m=0;m<s.length;m++)if(!(s[m].amount===0||!(m+1<s.length))){for(let f=m+1;f<s.length;f++)if(s[f].amount!==0)continue e;l=s.length-(m+1)}s=l===0?s:s.slice(0,-l);let c=s.findIndex(({unit:m})=>m==="days");if(c!==-1){let m=s[c],f=m.amount%7;f===0?s.splice(c,1):m.amount=f}let u="";for(;s.length;){let{amount:m,unit:f}=s.shift();u.length&&(u+=s.length?", ":" and "),(m>0||u.length)&&(u+=`${m} ${Pb(f,m===1,o)}`)}return u.length?u:`0 ${Pb(t,!1,o)}`}function Z3(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 $i(e,t){return`\`\`\`${t||""}
|
|
${e.replaceAll("```","\\`\\`\\`")}
|
|
\`\`\``}function Ib(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()}var Dl="\u200B";function J3(e){return"``"+Dl+e.replaceAll("`",Dl+"`"+Dl)+Dl+"``"}E();v();a();v();a();Zo();v();a();Hn();v();var vO=qt(function({find:e,setModule:t,setError:o}){let n=Ns(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 Mb=null;a();var or={};et(or,{clear:()=>X3,createStore:()=>Nb,del:()=>$h,delMany:()=>Gh,entries:()=>tP,get:()=>Gt,getMany:()=>Fh,keys:()=>V3,promisifyRequest:()=>To,set:()=>Ht,setMany:()=>Q3,update:()=>tr,values:()=>eP});a();function To(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Nb(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let n=To(o);return(i,s)=>n.then(l=>s(l.transaction(t,i).objectStore(t)))}var Uh;function yr(){return Uh||(Uh=Nb("VencordData","VencordStore")),Uh}function Gt(e,t=yr()){return t("readonly",o=>To(o.get(e)))}function Ht(e,t,o=yr()){return o("readwrite",n=>(n.put(t,e),To(n.transaction)))}function Q3(e,t=yr()){return t("readwrite",o=>(e.forEach(n=>o.put(n[1],n[0])),To(o.transaction)))}function Fh(e,t=yr()){return t("readonly",o=>Promise.all(e.map(n=>To(o.get(n)))))}function tr(e,t,o=yr()){return o("readwrite",n=>new Promise((i,s)=>{n.get(e).onsuccess=function(){try{n.put(t(this.result),e),i(To(n.transaction))}catch(l){s(l)}}}))}function $h(e,t=yr()){return t("readwrite",o=>(o.delete(e),To(o.transaction)))}function Gh(e,t=yr()){return t("readwrite",o=>(e.forEach(n=>o.delete(n)),To(o.transaction)))}function X3(e=yr()){return e("readwrite",t=>(t.clear(),To(t.transaction)))}function Hh(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},To(e.transaction)}function V3(e=yr()){return e("readonly",t=>{if(t.getAllKeys)return To(t.getAllKeys());let o=[];return Hh(t,n=>o.push(n.key)).then(()=>o)})}function eP(e=yr()){return e("readonly",t=>{if(t.getAll)return To(t.getAll());let o=[];return Hh(t,n=>o.push(n.value)).then(()=>o)})}function tP(e=yr()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([To(t.getAllKeys()),To(t.getAll())]).then(([n,i])=>n.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",n=>Hh(n,i=>o.push([i.key,i.value])).then(()=>o))})}var ql={};et(ql,{PMLogger:()=>AP,addPatch:()=>$b,initPluginManager:()=>T1,isPluginEnabled:()=>Ne,plugins:()=>je,startAllPlugins:()=>Wl,startDependenciesRecursive:()=>Uu,startPlugin:()=>jl,stopPlugin:()=>x1,subscribeAllPluginsFluxEvents:()=>RP,subscribePluginFluxEvents:()=>S1,unsubscribePluginFluxEvents:()=>Gb});a();var Xh={};et(Xh,{ChatBarButton:()=>Sr,ChatBarButtonMap:()=>Gi,_injectButtons:()=>cP,addChatBarButton:()=>Ru,removeChatBarButton:()=>Qh});a();ae();te();E();v();var jh={};et(jh,{_usePatchContextMenu:()=>nP,addContextMenuPatch:()=>Bl,addGlobalContextMenuPatch:()=>oP,findGroupChildrenByChildId:()=>Ge,globalPatches:()=>Cu,navPatches:()=>_l,removeContextMenuPatch:()=>Wh,removeGlobalContextMenuPatch:()=>rP});a();ae();v();var kb=new F("ContextMenu"),_l=new Map,Cu=new Set;function Bl(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let n=_l.get(o);n||(n=new Set,_l.set(o,n)),n.add(t)}}function oP(e){Cu.add(e)}function Wh(e,t){let n=(Array.isArray(e)?e:[e]).map(i=>_l.get(i)?.delete(t)??!1);return Array.isArray(e)?n:n[0]}function rP(e){return Cu.delete(e)}function Ge(e,t,o=!1){for(let n of t){if(n==null)continue;if(Array.isArray(n)){let s=Ge(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=Ge(e,i,o);if(s!==null)return s}}return null}function nP(e){e={...e,children:zh(e.children)},e.contextMenuAPIArguments??=[];let t=_l.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){kb.error(`Patch for ${e.navId} errored,`,n)}for(let o of Cu)try{o(e.navId,e.children,...e.contextMenuAPIArguments)}catch(n){kb.error("Global patch errored,",n)}return e}function zh(e){return Array.isArray(e)?e.map(zh):(se.isValidElement(e)&&(e=se.cloneElement(e),e?.props?.children&&(e.type!==I.MenuControlItem||e.type===I.MenuControlItem&&e.props.control!=null)&&(e.props.children=zh(e.props.children))),e)}var Zh={};et(Zh,{PlainSettings:()=>vr,Settings:()=>G,SettingsStore:()=>ft,definePluginSettings:()=>w,migratePluginSetting:()=>Yh,migratePluginSettings:()=>br,useSettings:()=>Oe});a();a();var qh=Symbol("SettingsStore.isProxy"),Cb=Symbol("SettingsStore.getRawTarget"),Au=class{pathListeners=new Map;prefixListeners=new Map;globalListeners=new Set;proxyContexts=new WeakMap;proxyHandler=(()=>{let t=this;return{get(o,n,i){if(n===qh)return!0;if(n===Cb)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[qh]){let m=`${u}${u&&"."}${n}`;return t.makeProxy(s,c,m)}return s},set(o,n,i){if(i?.[qh]&&(i=i[Cb]),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,m)=>u[m],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,""))}};ae();a();function js(e,t){for(let o in t){let n=t[o];typeof n=="object"&&!Array.isArray(n)?(e[o]??={},js(e[o],n)):e[o]??=n}return e}a();function h(e){return e}function Xt(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 iP=new F("Settings"),sP={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}},Kh=VencordNative.settings.get();js(Kh,sP);var ft=new Au(Kh,{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}});ft.addGlobalChangeListener((e,t)=>{ft.plain.cloud.settingsSyncVersion=Date.now(),VencordNative.settings.set(ft.plain,t)});var vr=Kh,G=ft.store;function Oe(e){let[,t]=se.useReducer(()=>({}),{});return X(()=>e?(e.forEach(o=>{o.endsWith(".*")?ft.addPrefixChangeListener(o.slice(0,-2),t):ft.addChangeListener(o,t)}),()=>e.forEach(o=>{o.endsWith(".*")?ft.removePrefixChangeListener(o.slice(0,-2),t):ft.removeChangeListener(o,t)})):(ft.addGlobalChangeListener(t),()=>ft.removeGlobalChangeListener(t)),[e]),ft.store}function br(e,...t){let{plugins:o}=ft.plain;if(!(e in o)){for(let n of t)if(n in o){iP.info(`Migrating settings from old name ${n} to ${e}`),o[e]=o[n],delete o[n],ft.markAsChanged();break}}}function Yh(e,t,o){let n=ft.plain.plugins[e];n&&(!Object.hasOwn(n,t)||Object.hasOwn(n,o)||(n[o]=n[t],delete n[t],ft.markAsChanged()))}function w(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return G.plugins[o.pluginName]},get plain(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return vr.plugins[o.pluginName]},use:n=>Oe(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 Jh;Ae(["buttonContainer","channelTextArea"],e=>Jh=e);var Gi=new Map,aP=new F("ChatButtons");function lP(e){let{chatBarButtons:t}=Oe(["uiElements.chatBarButtons.*"]).uiElements,{analyticsName:o}=e.type;return r(p,null,Array.from(Gi).filter(([n])=>t[n]?.enabled!==!1).map(([n,{render:i}])=>r(M,{noop:!0,key:n,onError:s=>aP.error(`Failed to render ${n}`,s.error)},r(i,{...e,isMainChat:o==="normal",isAnyChat:["normal","sidebar"].includes(o)}))))}function cP(e,t){if(!t.disabled)return e.unshift(r(lP,{key:"vencord-chat-buttons",...t})),e}var Ru=(e,t,o)=>Gi.set(e,{render:t,icon:o}),Qh=e=>Gi.delete(e),Sr=M.wrap(e=>r(Q,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>r("div",{className:`expression-picker-chat-input-button ${Jh?.buttonContainer??""} vc-chatbar-button`},r(So,{"aria-label":e.tooltip,onMouseEnter:t,onMouseLeave:o,className:L(gu?.button,Jh?.button),onClick:e.onClick,onContextMenu:e.onContextMenu,onAuxClick:e.onAuxClick,...e.buttonProps},r("div",{className:gu?.buttonWrapper},e.children)))),{noop:!0});Bl("textarea-context",(e,t)=>{let{chatBarButtons:o}=Oe(["uiElements.chatBarButtons.*"]).uiElements,n=Array.from(Gi.entries());if(!n.length)return;let i=Ge("submit-button",e);if(!i)return;let s=i.findIndex(l=>l?.props?.id==="submit-button");s!==-1&&i.splice(s,0,r(I.MenuItem,{id:"vc-chat-buttons",key:"vencord-chat-buttons",label:"Vencord Buttons"},n.map(([l])=>r(I.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 o1={};et(o1,{ApplicationCommandInputType:()=>vn,ApplicationCommandOptionType:()=>Hi,ApplicationCommandType:()=>Du,BUILT_IN:()=>Hr,OptionalMessageOption:()=>Ul,RequiredMessageOption:()=>e1,_handleCommand:()=>dP,_init:()=>pP,commands:()=>Vh,findOption:()=>Oo,generateId:()=>El,prepareOption:()=>t1,registerCommand:()=>qs,sendBotMessage:()=>at,unregisterCommand:()=>Fl});a();ae();a();E();v();var uP=ue('username:"Clyde"');function El(){return`-${xo.fromTimestamp(Date.now())}`}function at(e,t){let o=uP({channelId:e,content:"",embeds:[]});return vo.receiveMessage(e,js(t,o)),t}function Oo(e,t,o){return e.find(n=>n.name===t)?.value??o}a();a();a();a();a();var Hi=(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))(Hi||{}),vn=(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))(vn||{}),Du=(n=>(n[n.CHAT_INPUT=1]="CHAT_INPUT",n[n.USER=2]="USER",n[n.MESSAGE=3]="MESSAGE",n))(Du||{});a();a();var Hr,Vh={},Ab=Symbol("OptionalMessageOption"),Rb=Symbol("RequiredMessageOption"),Ul=Ab,e1=Rb,Db,pP=function(e){try{Hr=e,Ul=e.find(t=>(t.untranslatedName||t.displayName)==="shrug").options[0],e1=e.find(t=>(t.untranslatedName||t.displayName)==="me").options[0],Db=Math.abs(Hr.map(t=>Number(t.id)).sort((t,o)=>t-o)[0])-Hr.length}catch(t){new F("CommandsAPI").error("Failed to load CommandsApi",t," - cmds is",e)}return e},dP=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),at(o.channel.id,{content:`${s}:
|
|
${$i(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 t1(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,n)=>{t===Ab?n[o]=Ul:t===Rb&&(n[o]=e1),t.choices?.forEach(i=>i.displayName||=i.name),t1(n[o])}),e}function mP(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};qs(n,t)})}function qs(e,t){if(!Hr){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Hr.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??=`-${Hr.length+Db+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,t1(e),e.options?.[0]?.type===1){mP(e,t);return}Vh[e.name]=e,Hr.push(e)}function Fl(e){let t=Hr.findIndex(o=>o.name===e);return t===-1?!1:(Hr.splice(t,1),delete Vh[e],!0)}var r1={};et(r1,{__getDecorators:()=>fP,addMemberListDecorator:()=>zi,decoratorsFactories:()=>Lu,removeMemberListDecorator:()=>Wi});a();var Lu=new Map;function zi(e,t,o){Lu.set(e,{render:t,onlyIn:o})}function Wi(e){Lu.delete(e)}function fP(e,t){let o=Array.from(Lu.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 n1={};et(n1,{_modifyAccessories:()=>gP,accessories:()=>Ou,addMessageAccessory:()=>$l,removeMessageAccessory:()=>Gl});a();var Ou=new Map;function $l(e,t,o){Ou.set(e,{render:t,position:o})}function Gl(e){Ou.delete(e)}function gP(e,t){for(let[o,n]of Ou.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 i1={};et(i1,{__addDecorationsToMessage:()=>hP,addMessageDecoration:()=>ji,decorationsFactories:()=>_u,removeMessageDecoration:()=>qi});a();var _u=new Map;function ji(e,t){_u.set(e,t)}function qi(e){_u.delete(e)}function hP(e){let t=Array.from(_u.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 d1={};et(d1,{_handleClick:()=>bP,_handlePreEdit:()=>vP,_handlePreSend:()=>yP,addMessageClickListener:()=>u1,addMessagePreEditListener:()=>Hl,addMessagePreSendListener:()=>Ki,removeMessageClickListener:()=>p1,removeMessagePreEditListener:()=>zl,removeMessagePreSendListener:()=>Yi});a();ae();v();var s1=new F("MessageEvents","#e5c890"),a1=new Set,l1=new Set;async function yP(e,t,o,n){o.replyOptions=n;for(let i of a1)try{if((await i(e,t,o))?.cancel)return!0}catch(s){s1.error(`MessageSendHandler: Listener encountered an unknown error
|
|
`,s)}return!1}async function vP(e,t,o){for(let n of l1)try{if((await n(e,t,o))?.cancel)return!0}catch(i){s1.error(`MessageEditHandler: Listener encountered an unknown error
|
|
`,i)}return!1}function Ki(e){return a1.add(e),e}function Hl(e){return l1.add(e),e}function Yi(e){return a1.delete(e)}function zl(e){return l1.delete(e)}var c1=new Set;function bP(e,t,o){e=jt.getMessage(t.id,e.id)??e;for(let n of c1)try{n(e,t,o)}catch(i){s1.error(`MessageClickHandler: Listener encountered an unknown error
|
|
`,i)}}function u1(e){return c1.add(e),e}function p1(e){return c1.delete(e)}var f1={};et(f1,{MessagePopoverButtonMap:()=>Ks,_buildPopoverElements:()=>TP,addMessagePopoverButton:()=>Bu,removeMessagePopoverButton:()=>m1});a();ae();var SP=new F("MessagePopover"),Ks=new Map;function Bu(e,t,o){Ks.set(e,{render:t,icon:o})}function m1(e){Ks.delete(e)}function xP(e){let{Component:t,message:o}=e,{messagePopoverButtons:n}=Oe(["uiElements.messagePopoverButtons.*"]).uiElements,i=Array.from(Ks.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 SP.error(`[${s}]`,c),null}});return r(p,null,i)}function TP(e,t){return r(xP,{Component:e,message:t})}ve();ae();Zo();v();var v1={};et(v1,{SYM_IS_PROXIED_FACTORY:()=>g1,SYM_ORIGINAL_FACTORY:()=>Qn,SYM_PATCHED_BY:()=>y1,SYM_PATCHED_SOURCE:()=>h1,allWebpackInstances:()=>Eu,getBuildNumber:()=>_b,getFactoryPatchedBy:()=>IP,getFactoryPatchedSource:()=>PP,patchTimings:()=>wP,patches:()=>Zi});a();$o();ae();te();Zo();su();E();var Zi=[],g1=Symbol("WebpackPatcher.isProxiedFactory"),Qn=Symbol("WebpackPatcher.originalFactory"),h1=Symbol("WebpackPatcher.patchedSource"),y1=Symbol("WebpackPatcher.patchedBy"),Eu=new Set,wP=[],_b=Jr(()=>{try{let t=function(i){let s=i.match(/.concat\("(\d+?)"\)/);return s==null?-1:Number(s[1])};var e=t;let o=String(pt.m[128014]);if(o.includes("Trying to open a changelog for an invalid build number")){let i=t(o);if(i!==-1)return i}let n=el("Trying to open a changelog for an invalid build number");return t(String(n))}catch{return-1}});function PP(e,t=pt){return t.m[e]?.[h1]}function IP(e,t=pt){return t.m[e]?.[y1]}var rr=new F("WebpackPatcher","#8caaee"),Lb=!1,xr=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));xr(Function.prototype,"m",{enumerable:!1,set(e){xr(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;xr(this,"p",{enumerable:!1,set(l){xr(this,"p",{value:l}),clearTimeout(n),!(l!=="/assets/"||/(?:=>|{return)"[^"]/.exec(String(this.u)))&&(pt==null&&this.c!=null&&(rr.info("Main WebpackInstance found"+za` in ${o}`+", initializing internal references to WebpackRequire"),Va(this)),s())}}),xr(this,"O",{enumerable:!1,set(l){xr(this,"O",{value:l}),clearTimeout(i);let c=this;xr(l,"j",{enumerable:!1,set(u){xr(this,"j",{value:u}),c.p==null&&s()}})}});let n=setTimeout(()=>Reflect.deleteProperty(this,"p"),0),i=setTimeout(()=>Reflect.deleteProperty(this,"O"),0),s=()=>{rr.info("Found Webpack module factories"+za` in ${o}`),Eu.add(this);for(let c in e)Bb(e,c,e[c],e,!0);xr(e,Symbol.toStringTag,{value:"ModuleFactories",enumerable:!1});let l=new Proxy(e,MP);xr(this,"m",{value:l}),this.d=function(c,u){for(let m in u)Object.hasOwn(u,m)&&!Object.hasOwn(c,m)&&Object.defineProperty(c,m,{enumerable:!0,configurable:!0,get:u[m]})}}}});var MP={set:Bb},NP={apply(e,t,o){if(e[Qn]!=null)return Ob(e,t,o);let n=e.name,i=Ub(n,e);return Ob(i,t,o)},get(e,t,o){if(t===g1)return!0;let n=e[Qn]??e;if(t==="toString"||t===h1||t===y1){let i=Reflect.get(n,t,n);return t==="toString"?i.bind(n):i}return Reflect.get(e,t,o)}};function Bb(e,t,o,n,i=!1){if(kP(e,t,o,n,i))return!0;CP(t,o);let s=new Proxy(G.eagerPatches?Ub(t,o):o,NP);return Reflect.set(e,t,s,n)}function kP(e,t,o,n,i){let s,l;for(let c of Eu)if(!(i&&c.m===e)&&Object.hasOwn(c.m,t)){s=c.m[t],l=c.m;break}return s!=null?(l!==e&&s[g1]?Reflect.set(e,t,s,n):Eb(t,o),s[Qn]!=null&&(s[Qn]=o),!0):!1}function Eb(e,t){for(let o of Eu)xr(o.m,e,{value:t})}function CP(e,t){for(let o of Xa)try{o(t,e)}catch(n){rr.error(`Error in Webpack factory listener:
|
|
`,n,o)}}function Ob(e,t,o){let n=e[Qn];e===n&&delete e[Qn];let[i,s,l]=o;if(Eb(i.id,n),pt==null&&!Lb&&(Lb=!0,typeof l=="function"&&l.m!=null&&l.c!=null)){let{stack:m}=new Error,f=m?.match(/\/assets\/(.+?\.js)/)?.[1];rr.warn(`WebpackRequire was not initialized, falling back to WebpackRequire passed to the first called wrapped module factory (id: ${String(i.id)}`+za`, WebpackInstance origin: ${f}`+")"),Va(l)}let c;try{c=e.apply(t,o)}catch(m){if(e===n)throw m;return rr.error(`Error in patched module factory:
|
|
`,m),n.apply(t,o)}if(s=i.exports,typeof l=="function"&&l.c&&lu(l.c,s,i.id)||s==null)return c;for(let m of au)try{m(s,i.id)}catch(f){rr.error(`Error in Webpack module listener:
|
|
`,f,m)}for(let[m,f]of wi){try{if(m(s)){wi.delete(m),f(s,i.id);continue}}catch(g){rr.error(`Error while filtering or firing callback for Webpack waitFor subscription:
|
|
`,g,`
|
|
|
|
Module exports:`,s,`
|
|
|
|
Filter:`,m,`
|
|
|
|
Callback:`,f)}if(typeof s=="object")for(let g in s)try{try{var u=s[g]}catch{continue}if(u!=null&&m(u)){wi.delete(m),f(u,i.id);break}}catch(y){rr.error(`Error while filtering or firing callback for Webpack waitFor subscription:
|
|
`,y,`
|
|
|
|
Export value:`,s,`
|
|
|
|
Filter:`,m,`
|
|
|
|
Callback:`,f)}}return c}function Ub(e,t){let o="0,"+String(t),n=o,i=t,s=new Set;for(let l=0;l<Zi.length;l++){let c=Zi[l],u=_b(),m=u!==-1;if(m&&c.fromBuild!=null&&u<c.fromBuild||c.toBuild!=null&&u>c.toBuild){Zi.splice(l--,1);continue}if(!(typeof c.find=="string"?o.includes(c.find):(c.find.global&&(c.find.lastIndex=0),c.find.test(o))))continue;let g=Vv(`patch by ${c.plugin}`,(S,_)=>(typeof S!="string"&&S.global&&(S.lastIndex=0),o.replace(S,_))),y=o,b=t,P=!1;for(let S of c.replacement){if(m&&S.fromBuild!=null&&u<S.fromBuild||S.toBuild!=null&&u>S.toBuild)continue;c.plugin==="Vesktop"&&Ti(S,"VCDP");let _=o,N=t;try{let[U,j]=g(S.match,S.replace);if(U===o){if(c.noWarn||S.noWarn||rr.warn(`Patch by ${c.plugin} had no effect (Module id is ${String(e)}): ${S.match}`),c.group){rr.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${S.match} had no effect`),o=y,i=b,P&&s.delete(c.plugin);break}continue}let z=[...s];s.has(c.plugin)||z.push(c.plugin),o=U,n=`// Webpack Module ${String(e)} - Patched by ${z.join(", ")}
|
|
${U}
|
|
//# sourceURL=file:///WebpackModule${String(e)}`,i=(0,eval)(n),s.has(c.plugin)||(s.add(c.plugin),P=!0)}catch(U){if(rr.error(`Patch by ${c.plugin} errored (Module id is ${String(e)}): ${S.match}
|
|
`,U),P&&s.delete(c.plugin),c.group){rr.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${S.match} errored`),o=y,i=b;break}o=_,i=N}}c.all||Zi.splice(l--,1)}return i[Qn]=t,i}su();var Bt=new F("PluginManager","#a6d189"),AP=Bt,Fb=!1,b1=new Set;function Ne(e){return(je[e]?.required||je[e]?.isDependency||G.plugins[e]?.enabled)??!1}function $b(e,t,o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`){let n=e;if(n.plugin=t,!(n.predicate&&!n.predicate())){Jg(n),Array.isArray(n.replacement)||(n.replacement=[n.replacement]);for(let i of n.replacement)Ti(i,o);n.replacement=n.replacement.filter(({predicate:i})=>!i||i()),Zi.push(n)}}var Wl=Vr("startAllPlugins",function(t){Bt.info(`Starting plugins (stage ${t})`);for(let o in je)if(Ne(o)){if((je[o].startAt??"WebpackReady")!==t)continue;jl(je[o])}});function Uu(e){let t=G.plugins,o=!1,n=[];return e.dependencies?.forEach(i=>{if(!t[i].enabled){let s=je[i];if(Uu(s),t[i].enabled=!0,s.isDependency=!0,s.patches){Bt.warn(`Enabling dependency ${i} requires restart.`),o=!0;return}jl(s)||n.push(i)}}),{restartNeeded:o,failures:n}}function S1(e,t){if(e.flux&&!b1.has(e.name)){b1.add(e.name),Bt.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=>Bt.error(`${e.name}: Error while handling ${o}
|
|
`,l)):s}catch(s){Bt.error(`${e.name}: Error while handling ${o}
|
|
`,s)}};t.subscribe(o,i)}}}function Gb(e,t){if(e.flux){b1.delete(e.name),Bt.debug("Unsubscribing from flux events of plugin",e.name);for(let[o,n]of Object.entries(e.flux))t.unsubscribe(o,n)}}function RP(e){Fb=!0;for(let t in je)Ne(t)&&S1(je[t],e)}var jl=Vr("startPlugin",function(t){let{name:o,commands:n,contextMenus:i,managedStyle:s,userProfileBadge:l,onBeforeMessageEdit:c,onBeforeMessageSend:u,onMessageClick:m,renderChatBarButton:f,chatBarButton:g,renderMemberListDecorator:y,renderMessageAccessory:b,renderMessageDecoration:P,renderMessagePopoverButton:S,messagePopoverButton:_}=t;if(t.start){if(Bt.info("Starting plugin",o),t.started)return Bt.warn(`${o} already started`),!1;try{t.start()}catch(N){return Bt.error(`Failed to start ${o}
|
|
`,N),!1}}if(t.started=!0,n?.length){Bt.debug("Registering commands of plugin",o);for(let N of n)try{qs(N,o)}catch(U){return Bt.error(`Failed to register command ${N.name}
|
|
`,U),!1}}if(Fb&&S1(t,B),i){Bt.debug("Adding context menus patches of plugin",o);for(let N in i)Bl(N,i[N])}return s&&Yt(s),l&&Wa(l),c&&Hl(c),u&&Ki(u),m&&u1(m),g?Ru(o,g.render,g.icon):f&&Ru(o,f),y&&zi(o,y),P&&ji(o,P),b&&$l(o,b),_?Bu(o,_.render,_.icon):S&&Bu(o,S),!0},e=>`startPlugin ${e.name}`),x1=Vr("stopPlugin",function(t){let{name:o,commands:n,contextMenus:i,managedStyle:s,userProfileBadge:l,onBeforeMessageEdit:c,onBeforeMessageSend:u,onMessageClick:m,renderChatBarButton:f,chatBarButton:g,renderMemberListDecorator:y,renderMessageAccessory:b,renderMessageDecoration:P,renderMessagePopoverButton:S,messagePopoverButton:_}=t;if(t.stop){if(Bt.info("Stopping plugin",o),!t.started)return Bt.warn(`${o} already stopped`),!1;try{t.stop()}catch(N){return Bt.error(`Failed to stop ${o}
|
|
`,N),!1}}if(t.started=!1,n?.length){Bt.debug("Unregistering commands of plugin",o);for(let N of n)try{Fl(N.name)}catch(U){return Bt.error(`Failed to unregister command ${N.name}
|
|
`,U),!1}}if(Gb(t,B),i){Bt.debug("Removing context menus patches of plugin",o);for(let N in i)Wh(N,i[N])}return s&&go(s),l&&ja(l),c&&zl(c),u&&Yi(u),m&&p1(m),(g||f)&&Qh(o),y&&Wi(o),P&&qi(o),b&&Gl(o),(_||S)&&m1(o),!0},e=>`stopPlugin ${e.name}`),T1=gn(function(){let t=Object.values(je),o=G.plugins,n=["onBeforeMessageEdit","onBeforeMessageSend","onMessageClick","renderChatBarButton","renderMemberListDecorator","renderMessageAccessory","renderMessageDecoration","renderMessagePopoverButton"],i=new Set;for(let s of t)if(Ne(s.name)){s.dependencies?.forEach(l=>{let c=je[l];if(!c){let u=new Error(`Plugin ${s.name} has unresolved dependency ${l}`);Bt.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&&ft.addChangeListener(`plugins.${s.name}.${l}`,c.onChange)}if(s.patches&&Ne(s.name))for(let l of s.patches)$b(l,s.name)}});ve();a();ve();te();var DP=Y("vc-card-");function ut({variant:e="normal",defaultPadding:t,children:o,className:n,...i}){return r("div",{className:L(DP("base",e,(t??!n)&&"defaultPadding"),n),...i},o)}Jt();cn();mr();a();var Kl=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)}};a();function Xn(e){return!!e}function Tr(e){return e!=null}ae();te();ct();v();a();var P1={};et(P1,{currentNotice:()=>Qi,nextNotice:()=>Hb,noticesQueue:()=>Yl,popNotice:()=>Xi,showNotice:()=>bn});a();ct();E();var w1;Ae(e=>e.show&&e.dismiss&&!e.suppressAll,e=>w1=e);var Yl=[],Qi=null;function Xi(){w1.dismiss()}function Hb(){Qi=Yl.shift(),Qi&&w1.show(...Qi,"VencordNotice")}function bn(e,t,o){let n=rh(e)?e:r(M,{fallback:()=>"Error Showing Notice"},e);Yl.push(["GENERIC",n,t,o]),Qi||Hb()}Qe();a();ve();a();function I1({text:e,color:t}){return r("div",{className:"vc-addon-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}Di();v();var Vn=Y("vc-addon-");function Zl({disabled:e,isNew:t,name:o,infoButton:n,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:m,onMouseLeave:f}){let g=nt(null),y=nt(null);return r("div",{className:Vn("card",{"card-disabled":e}),onMouseEnter:m,onMouseLeave:f},r("div",{className:Vn("header")},r("div",{className:Vn("name-author")},r(H,{variant:"text-md/bold",className:Vn("name")},r("div",{ref:y,className:Vn("title-container")},r("div",{ref:g,className:Vn("title"),onMouseOver:()=>{let b=g.current,P=y.current;b.style.setProperty("--offset",`${P.clientWidth-b.scrollWidth}px`),b.style.setProperty("--duration",`${Math.max(.5,(b.scrollWidth-P.clientWidth)/7)}s`)}},o)),t&&r(I1,{text:"NEW",color:"#ED4245"})),!!s&&r(H,{variant:"text-md/normal",className:Vn("author")},s)),n,r(ln,{checked:l,onChange:c,disabled:e})),r(H,{className:Vn("note"),variant:"text-sm/normal"},u),i)}te();v();a();ve();a();a();var Vi="Vendicated/Vencord";var oE=`Vencord/${mn}${Vi?` (https://github.com/${Vi})`:""}`;$o();te();Fe();E();v();a();a();Di();v();a();ve();te();v();var es=Y("vc-plugins-setting-");function nr(e){return typeof e=="string"?e:e?null:"Invalid input provided"}function ir({tag:e="div",name:t,description:o,error:n,inlineSetting:i,children:s}){return r(e,{className:es("section")},r("div",{className:L(es("content"),i&&es("inline"))},r("div",{className:es("label")},t&&r(H,{className:es("title"),variant:"text-md/medium"},yn(Ll(t))),o&&r(H,{className:es("description"),variant:"text-sm/normal"},o)),s),n&&r(H,{className:es("error"),variant:"text-sm/normal"},n))}function zb({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){let s=t[n]??e.default,[l,c]=C(s??!1),[u,m]=C(null);function f(g){let y=e.isValid?.call(o,g)??!0;c(g),m(nr(y)),y===!0&&i(g)}return r(ir,{tag:"label",name:n,description:e.description,error:u,inlineSetting:!0},r(ln,{checked:l,onChange:f}))}a();function Wb({option:e,onChange:t}){return e.component({setValue:t,option:e})}a();v();var LP=BigInt(Number.MAX_SAFE_INTEGER);function M1({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){function s(g){return e.type===2?BigInt(g):Number(g)}let[l,c]=C(`${t[n]??e.default??0}`),[u,m]=C(null);function f(g){let y=e.isValid?.call(o,g)??!0;m(nr(y)),y===!0&&i(s(g)),e.type===1&&BigInt(g)>=LP?c(`${Number.MAX_SAFE_INTEGER}`):c(g)}return r(ir,{name:n,description:e.description,error:u},r(dt,{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 jb({option:e,pluginSettings:t,definedSettings:o,onChange:n,id:i}){let s=t[i]??e.options?.find(g=>g.default)?.value,[l,c]=C(s??null),[u,m]=C(null);function f(g){let y=e.isValid?.call(o,g)??!0;c(g),m(nr(y)),y===!0&&n(g)}return r(ir,{name:i,description:e.description,error:u},r(Ro,{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 qb({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){let s=t[n]??e.default,[l,c]=C(null);function u(m){let f=e.isValid?.call(o,m)??!0;c(nr(f)),f===!0&&i(m)}return r(ir,{name:n,description:e.description,error:l},r(Wn,{markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:s,onValueChange:u,onValueRender:m=>String(m.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,disabled:e.disabled?.call(o)??!1,...e.componentProps}))}a();v();function Kb({option:e,pluginSettings:t,definedSettings:o,id:n,onChange:i}){let[s,l]=C(t[n]??e.default??null),[c,u]=C(null);function m(f){let g=e.isValid?.call(o,f)??!0;l(f),u(nr(g)),g===!0&&i(f)}return r(ir,{name:n,description:e.description,error:c},r(dt,{type:"text",placeholder:e.placeholder??"Enter a value",value:s,onChange:m,maxLength:null,disabled:e.disabled?.call(o)??!1,...e.componentProps}))}var Yb={0:Kb,1:M1,2:M1,3:zb,4:jb,5:qb,6:Wb,7:()=>null};a();ve();Wt();T();ie();te();Fe();v();a();Qe();ie();v();function OP(){let e=As()===2?"#000000":"#FFFFFF";return r(yl,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function _P(){let e=As()===2?"#000000":"#FFFFFF";return r(vh,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function Zb({text:e,href:t,Icon:o}){return r(Q,{text:e},n=>r(Pl,{...n,href:t},r(o,null)))}var Fu=e=>r(Zb,{...e,Icon:_P}),$u=e=>r(Zb,{...e,Icon:OP});var Ys=Y("vc-author-modal-");function ei(e){de(t=>r(he,{...t},r(M,null,r(Se,{className:Ys("root")},r(BP,{user:e})))))}function BP({user:e}){Oe();let t=ne([Lt],()=>Lt.getUserProfile(e.id));X(()=>{!t&&!e.bot&&e.id&&al(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=le(()=>{let l=Object.values(je);return(bi[e.id]?l.filter(u=>u.authors.includes(bi[e.id])):l.filter(u=>u.authors.some(m=>m.name===e.username))).filter(u=>!u.name.endsWith("API")).sort((u,m)=>Number(u.required??!1)-Number(m.required??!1))},[e.id,e.username]),s=r(De,{href:"https://vencord.dev/source"},"contributed");return r(p,null,r("div",{className:Ys("header")},r("img",{className:Ys("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),r(x.FormTitle,{tag:"h2",className:Ys("name")},e.username),r("div",{className:L("vc-settings-modal-links",Ys("links"))},n&&r(Fu,{text:n,href:`https://${n}`}),o&&r($u,{text:o,href:`https://github.com/${o}`}))),i.length?r(x.FormText,null,"This person has ",s," to ",Hg(i.length,"plugin"),"!"):r(x.FormText,null,"This person has not made any plugins. They likely ",s," to Vencord in other ways!"),!!i.length&&r("div",{className:Ys("plugins")},i.map(l=>r(Jl,{key:l.name,plugin:l,disabled:l.required??!1,onRestartNeeded:()=>Re("Restart to apply changes!")}))))}var Jb=Y("vc-plugin-modal-"),N1=D("moreUsers","emptyUser","avatarContainer","clickableAvatar"),EP=Nt(()=>k.getCurrentUser().constructor);function Qb(e){let t=new EP({username:e.username,id:e.id??El(),avatar:e.avatar,bot:!0});return B.dispatch({type:"USER_UPDATE",user:t}),t}function Xb({plugin:e,onRestartNeeded:t,onClose:o,transitionState:n}){let i=Oe([`plugins.${e.name}.*`]).plugins[e.name],s=!!(i&&e.options&&!Si(e.options)),[l,c]=C([]);X(()=>{(async()=>{for(let g of e.authors.slice(0,6))try{let y=g.id?await ro.getUser(String(g.id)).catch(()=>Qb({username:g.name})):Qb({username:g.name});c(b=>[...b,y])}catch{continue}})()},[e.authors]);function u(){if(!s||!e.options)return r(x.FormText,null,"There are no settings for this plugin.");let g=Object.entries(e.options).map(([y,b])=>{if(b.type===7||b.hidden)return null;function P(_){let N=e.options?.[y];!N||N.type===7||(i[y]=_,N.restartNeeded&&t(y))}let S=Yb[b.type];return r(M,{noop:!0,key:y},r(S,{id:y,option:b,onChange:qt(P),pluginSettings:i,definedSettings:e.settings}))});return r("div",{className:"vc-plugins-settings"},g)}function m(g,y){let b=e.authors.length-y,P=e.authors.length-b,S=P+e.authors.length-y;return r(Q,{text:e.authors.slice(P,S).map(_=>_.name).join(", ")},({onMouseEnter:_,onMouseLeave:N})=>r("div",{className:N1.moreUsers,onMouseEnter:_,onMouseLeave:N},"+",b))}let f=ti[e.name];return r(he,{transitionState:n,size:"medium"},r(ke,{separator:!1,className:A.bottom8},r(H,{variant:"heading-xl/bold",style:{flexGrow:1}},e.name),r(tt,{onClick:o})),r(Se,{className:A.bottom16},r("section",null,r(oe,{className:Jb("info")},r(x.FormText,{className:Jb("description")},e.description),!f.userPlugin&&r("div",{className:"vc-settings-modal-links"},r(Fu,{text:"View more info",href:`https://vencord.dev/plugins/${e.name}`}),r($u,{text:"View source code",href:`https://github.com/${Vi}/tree/main/src/plugins/${f.folderName}`}))),r(H,{variant:"heading-lg/semibold",className:L(A.top8,A.bottom8)},"Authors"),r("div",{style:{width:"fit-content"}},r(M,{noop:!0},r(gr,{users:l,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,renderMoreUsers:m,renderUser:g=>r(So,{className:N1.clickableAvatar,onClick:()=>ei(g)},r("img",{className:N1.avatar,src:g.getAvatarURL(void 0,80,!0),alt:g.username,title:g.username}))})))),!!e.settingsAboutComponent&&r("div",{className:A.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(H,{variant:"heading-lg/semibold",className:L(A.top16,A.bottom8)},"Settings"),u())))}function sr(e,t){de(o=>r(Xb,{...o,plugin:e,onRestartNeeded:n=>t?.(e.name,n)}))}function Jl({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:n,onMouseLeave:i,isNew:s}){let l=G.plugins[e.name],c=()=>Ne(e.name);function u(){let m=c();if(!m){let{restartNeeded:g,failures:y}=Uu(e);if(y.length){Vb.error(`Failed to start dependencies for ${e.name}: ${y.join(", ")}`),bn("Failed to start dependencies: "+y.join(", "),"Close",()=>null);return}if(g){l.enabled=!0,o(e.name,"enabled");return}}if(e.patches?.length){l.enabled=!m,o(e.name,"enabled");return}if(m&&!e.started){l.enabled=!m;return}if(!(m?x1(e):jl(e))){l.enabled=!1;let g=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;Re(g,q.Type.FAILURE,{position:q.Position.BOTTOM});return}l.enabled=!m}return r(Zl,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:u,disabled:t,onMouseEnter:n,onMouseLeave:i,infoButton:r("button",{role:"switch",onClick:()=>sr(e,o),className:wr("info-button")},e.options&&!Si(e.options)?r(ml,{className:wr("info-icon")}):r(pl,{className:wr("info-icon")}))})}a();ve();Ii();Qe();mr();Di();te();Fe();v();var Zs=Y("vc-plugin-ui-elements-");function t2(){return r(So,{onClick:()=>de(e=>r(UP,{...e}))},r(ut,{className:Zs("button"),defaultPadding:!0},r("div",{className:Zs("button-description")},r($e,{size:"md",weight:"semibold"},"Manage plugin UI elements"),r($e,{size:"xs"},"Allows you to hide buttons you don't like")),r("svg",{className:Zs("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 e2(e){let{buttonMap:t,description:o,title:n,settings:i}=e;return r("section",null,r(Gn,{tag:"h3",size:"xl",weight:"bold"},n),r($e,{size:"sm",className:L(A.top8,A.bottom20)},o),r("div",{className:Zs("switches")},Array.from(t,([s,{icon:l}])=>{let c=l??vl;return r($e,{size:"md",weight:"semibold",key:s,className:Zs("switches-row")},r(c,{height:20,width:20}),s,r(ln,{checked:i[s]?.enabled??!0,onChange:u=>{i[s]??={},i[s].enabled=u}}))})))}function UP(e){let{uiElements:t}=Oe(["uiElements.*"]);return r(he,{...e,size:"medium"},r(Se,{className:Zs("modal-content")},r(e2,{title:"Chatbar Buttons",description:"These are the buttons on the right side of the chat input bar",buttonMap:Gi,settings:t.chatBarButtons}),r(e2,{title:"Message Popover Buttons",description:"These are the floating buttons on the right when you hover over a message",buttonMap:Ks,settings:t.messagePopoverButtons})))}var wr=Y("vc-plugins-"),Vb=new F("PluginSettings","#a6d189");function FP({required:e}){return r(ut,{variant:e?"warning":"normal",className:wr("info-card")},e?r(p,null,r(Fr,null,"Restart required!"),r($e,{className:wr("dep-text")},"Restart now to apply new plugins and their settings"),r(R,{onClick:()=>location.reload(),className:wr("restart-button")},"Restart")):r(p,null,r(Fr,null,"Plugin Management"),r($e,null,"Press the cog wheel or info icon to get more info on a plugin"),r($e,null,"Plugins with a cog wheel have settings you can modify!")))}function $P({search:e}){let t=e?Object.entries(o2).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($e,{className:A.top16},t.length?r(p,null,r($e,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 GP(){let e=Oe(),t=le(()=>new Kl,[]);ih(()=>{t.hasChanges&&Le.show({title:"Restart required",body:r(p,null,r("p",null,"The following plugins require a restart:"),r("div",null,t.map((S,_)=>r(p,null,_>0&&", ",Pe.parse("`"+S.split(".")[0]+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})},[]);let o=le(()=>{let S={};for(let _ in je){let N=je[_].dependencies;if(N)for(let U of N)S[U]??=[],S[U].push(_)}return S},[]),n=le(()=>Object.values(je).sort((S,_)=>S.name.localeCompare(_.name)),[]),i=le(()=>!1,[]),[s,l]=C({value:"",status:0}),c=s.value.toLowerCase(),u=S=>l(_=>({..._,value:S})),m=S=>l(_=>({..._,status:S})),f=S=>{let{status:_}=s,N=Ne(S.name);switch(_){case 2:if(N)return!1;break;case 1:if(!N)return!1;break;case 3:if(!g?.includes(S.name))return!1;break;case 4:if(!ti[S.name]?.userPlugin)return!1;break;case 5:if(!S.name.endsWith("API"))return!1;break}return c.length?S.name.toLowerCase().includes(c)||S.description.toLowerCase().includes(c)||S.tags?.some(U=>U.toLowerCase().includes(c)):!0},[g]=ht(()=>Gt("Vencord_existingPlugins").then(S=>{let _=Date.now()/1e3,N={},U=Object.values(n).map(z=>z.name),j=[];for(let{name:z}of n)(N[z]=S?.[z]??_)+3600*24*2>_&&j.push(z);return Ht("Vencord_existingPlugins",N),Bi.isEqual(j,U)?[]:j})),y=[],b=[],P=s.status===5;for(let S of n){if(S.hidden||!S.options&&S.name.endsWith("API")&&!P||!f(S))continue;if(S.required||S.isDependency||o[S.name]?.some(N=>e.plugins[N].enabled)){let N=S.required||!o[S.name]?"This plugin is required for Vencord to function.":HP(o[S.name]?.filter(U=>e.plugins[U].enabled));b.push(r(Q,{text:N,key:S.name},({onMouseLeave:U,onMouseEnter:j})=>r(Jl,{onMouseLeave:U,onMouseEnter:j,onRestartNeeded:(z,J)=>t.handleChange(`${z}.${J}`),disabled:!0,plugin:S,key:S.name})))}else y.push(r(Jl,{onRestartNeeded:(N,U)=>t.handleChange(`${N}.${U}`),disabled:!1,plugin:S,isNew:g?.includes(S.name),key:S.name}))}return r(Do,null,r(FP,{required:t.hasChanges}),r(t2,null),r(Fr,{className:L(A.top20,A.bottom8)},"Filters"),r("div",{className:L(A.bottom20,wr("filter-controls"))},r(M,{noop:!0},r(dt,{autoFocus:!0,value:s.value,placeholder:"Search for a plugin...",onChange:u})),r("div",null,r(M,{noop:!0},r(Ro,{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(Xn),serialize:String,select:m,isSelected:S=>S===s.status,closeOnSelect:!0})))),r(Fr,{className:A.top20},"Plugins"),y.length||b.length?r("div",{className:wr("grid")},y.length?y:r($e,null,"No plugins meet the search criteria.")):r($P,{search:c}),r(Ee,{className:A.top20}),r(Fr,{className:L(A.top20,A.bottom8)},"Required Plugins"),r("div",{className:wr("grid")},b.length?b:r($e,null,"No plugins meet the search criteria.")))}function HP(e){return r(p,null,r($e,null,"This plugin is required by:"),e.map(t=>r($e,{key:t,className:wr("dep-text")},t)))}var ts=Lo(GP,"Plugins");a();a();ae();a();function Gu(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 Hu(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 r2=(e,t)=>q.show({type:e,message:t,id:q.genId()}),zP=()=>r2(q.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),WP=e=>r2(q.Type.FAILURE,`Failed to import settings: ${String(e)}`),jP=new F("SettingsSync:Offline","#39b7e0");function n2(e){if(e==null||typeof e!="object")return!0;for(let t in e)if(["__proto__","constructor","prototype"].includes(t)||!n2(e[t]))return!1;return!0}async function k1(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if(!n2(t))throw new Error("Unsafe Settings");if("settings"in t&&"quickCss"in t)Object.assign(vr,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 C1({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 i2(){let e=`vencord-settings-backup-${$s().format("YYYY-MM-DD")}.json`,t=await C1(),o=new TextEncoder().encode(t);Gu(new File([o],e,{type:"application/json"}))}async function s2(e=!0){{let t=await Hu("application/json");if(!t)return;let o=new FileReader;o.onload=async()=>{try{await k1(o.result),e&&zP()}catch(n){jP.error(n),e&&WP(n)}},o.readAsText(t)}}cn();mr();v();function qP(){return r(Do,null,r(oe,{flexDirection:"column",gap:"0.5em"},r(ut,{variant:"warning"},r(Ao,{tag:"h4"},"Warning"),r($e,null,"Importing a settings file will overwrite your current settings.")),r(H,{variant:"text-md/normal",className:A.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(Ao,{tag:"h4"},"Settings Export contains:"),r(H,{variant:"text-md/normal",className:A.bottom8},r("ul",null,r("li",null,"\u2014 Custom QuickCSS"),r("li",null,"\u2014 Theme Links"),r("li",null,"\u2014 Plugin Settings"))),r(oe,null,r(R,{onClick:()=>s2()},"Import Settings"),r(R,{onClick:i2},"Export Settings"))))}var Ql=Lo(qP,"Backup & Restore");a();a();var D1={};et(D1,{requestPermission:()=>d2,showNotification:()=>qe});a();a();a();var wo=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();te();v();var zu=M.wrap(function({title:t,body:o,richBody:n,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:m,className:f,dismissOnClick:g}){let{timeout:y,position:b}=Oe(["notifications.timeout","notifications.position"]).notifications,P=ne([Gr],()=>Gr.isFocused()),[S,_]=C(!1),[N,U]=C(0),j=le(()=>Date.now(),[y,S,P]);X(()=>{if(S||!P||y===0||m)return void U(0);let J=setInterval(()=>{let me=Date.now()-j;me>=y?c():U(me)},10);return()=>clearInterval(J)},[y,S,P]);let z=N/y;return r("button",{className:L("vc-notification-root",f),style:b==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),g!==!1&&c()},onContextMenu:J=>{J.preventDefault(),J.stopPropagation(),c()},onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!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:J=>{J.preventDefault(),J.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&&!m&&r("div",{className:"vc-notification-progressbar",style:{width:`${(1-z)*100}%`,backgroundColor:i||"var(--brand-500)"}}))},{onError:({props:e})=>e.onClose()});a();ve();a();te();Fe();v();function a2(){return r("section",{className:A.top16},r(x.FormTitle,{tag:"h5"},"Notifications"),r(x.FormText,{className:A.bottom8},"Settings for Notifications sent by Vencord. This does NOT include Discord notifications (messages, etc)"),r(oe,null,r(R,{onClick:A1},"Notification Settings"),r(R,{onClick:Js},"View Notification Log")))}function A1(){de(e=>r(he,{...e,size:"medium"},r(ke,null,r(H,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Settings"),r(tt,{onClick:e.onClose})),r(Se,null,r(KP,null))))}function KP(){let e=Oe(["notifications.*"]).notifications;return r("div",{style:{padding:"1em 0"}},r(x.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&r(Ct,{style:{padding:"1em"},className:A.bottom8},r(x.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),r(x.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),r(x.FormText,{className:A.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(Ro,{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:ws}),r(x.FormTitle,{tag:"h5",className:A.top16+" "+A.bottom8},"Notification Position"),r(Ro,{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:ws}),r(x.FormTitle,{tag:"h5",className:A.top16+" "+A.bottom8},"Notification Timeout"),r(x.FormText,{className:A.bottom16},"Set to 0s to never automatically time out"),r(Wn,{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(x.FormTitle,{tag:"h5",className:A.top16+" "+A.bottom8},"Notification Log Limit"),r(x.FormText,{className:A.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(Wn,{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}))}Fe();ct();v();a();a();var l2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var c2=(e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=l2[o[e]&63];return t};var Wu="notification-log",u2=async()=>await Gt(Wu)??[],oi=Y("vc-notification-log-"),Xl=new Set;async function p2(e){if(e.noPersist)return;let t=G.notifications.logLimit;t!==0&&(await tr(Wu,o=>{let n=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:m,...f}=e;return n.unshift({...f,timestamp:Date.now(),id:c2()}),n.length>t&&t!==200&&(n.length=t),n}),Xl.forEach(o=>o()))}async function YP(e){let t=await u2(),o=t.findIndex(n=>n.timestamp===e);o!==-1&&(t.splice(o,1),await Ht(Wu,t),Xl.forEach(n=>n()))}function ZP(){let[e,t]=ks(s=>s+1,0);X(()=>(Xl.add(t),()=>void Xl.delete(t)),[]);let[o,n,i]=ht(u2,{fallbackValue:[],deps:[e]});return[o,i]}function JP({data:e}){let[t,o]=C(!1);return r("div",{className:oi("wrapper",{removing:t})},r(zu,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>YP(e.timestamp),200))},richBody:r("div",{className:oi("body-wrapper")},r("div",{className:oi("body")},e.body),r(Qt,{timestamp:new Date(e.timestamp),className:oi("timestamp")}))}))}function QP({log:e,pending:t}){return!e.length&&!t?r("div",{className:oi("container")},r("div",{className:oi("empty")}),r(x.FormText,{style:{textAlign:"center"}},"No notifications yet")):r(Rh,{className:oi("container"),sections:[e.length],sectionHeight:0,rowHeight:120,renderSection:()=>null,renderRow:o=>r(JP,{data:e[o.row],key:e[o.row].id})})}function XP({modalProps:e,close:t}){let[o,n]=ZP();return r(he,{...e,size:"large",className:oi("modal")},r(ke,null,r(H,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),r(tt,{onClick:t})),r("div",{style:{width:"100%"}},r(QP,{log:o,pending:n})),r(yt,null,r(oe,null,r(R,{onClick:A1},"Notification Settings"),r(R,{disabled:o.length===0,color:R.Colors.RED,onClick:()=>{Le.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await Ht(Wu,[]),Xl.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log"))))}function Js(){let e=de(t=>r(XP,{modalProps:t,close:()=>on(e)}))}var VP=new wo,R1,eI=42;function tI(){if(!R1){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),R1=Oi(e)}return R1}function oI(e,t){let o=tI();return new Promise(n=>{o.render(r(zu,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),n()}}))})}function rI(){if(typeof Notification>"u")return!1;let{useNative:e}=G.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function d2(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function qe(e){if(p2(e),rI()&&await d2()){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 VP.push(()=>oI(e,eI++))}ae();Fe();v();var m2=new F("SettingsSync:CloudSetup","#39b7e0"),ri=()=>new URL(G.cloud.url),L1=()=>ri().origin;async function Qs(){let{host:e}=ri();return e==="api.vencord.dev"||await VencordNative.csp.isDomainAllowed(G.cloud.url,["connect-src"])?!0:(await VencordNative.csp.requestAddOverride(G.cloud.url,["connect-src"],"Cloud Sync")==="ok"&&Le.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:_t}),!1)}var Vl=()=>{let e=k.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e};async function f2(){let e=await Gt("Vencord_cloudSecret")??{},t=L1();return e[t]?(await tr("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Vl()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Vl()}`]}async function nI(e){await tr("Vencord_cloudSecret",t=>(t??={},t[`${L1()}:${Vl()}`]=e,t))}async function ec(){await tr("Vencord_cloudSecret",e=>(e??={},delete e[`${L1()}:${Vl()}`],e))}async function O1(){if(await f2()!==void 0){G.cloud.authenticated=!0;return}if(await Qs()){try{let o=await fetch(new URL("/v1/oauth/settings",ri()));var{clientId:e,redirectUri:t}=await o.json()}catch{qe({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),G.cloud.authenticated=!1;return}de(o=>r(Li,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:n})=>{if(!n){G.cloud.authenticated=!1;return}try{let i=await fetch(n,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(m2.info("Authorized with secret"),await nI(s),qe({title:"Cloud Integration",body:"Cloud integrations enabled!"}),G.cloud.authenticated=!0):(qe({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),G.cloud.authenticated=!1)}catch(i){m2.error("Failed to authorize",i),qe({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),G.cloud.authenticated=!1}}}))}}async function tc(){let e=await f2();return window.btoa(`${e}:${Vl()}`)}a();ae();a();var lo=Uint8Array,qo=Uint16Array,H1=Int32Array,ju=new lo([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]),qu=new lo([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]),U1=new lo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v2=function(e,t){for(var o=new qo(31),n=0;n<31;++n)o[n]=t+=1<<e[n-1];for(var i=new H1(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}},b2=v2(ju,2),S2=b2.b,F1=b2.r;S2[28]=258,F1[258]=28;var x2=v2(qu,0),iI=x2.b,g2=x2.r,$1=new qo(32768);for(Ye=0;Ye<32768;++Ye)Sn=(Ye&43690)>>1|(Ye&21845)<<1,Sn=(Sn&52428)>>2|(Sn&13107)<<2,Sn=(Sn&61680)>>4|(Sn&3855)<<4,$1[Ye]=((Sn&65280)>>8|(Sn&255)<<8)>>1;var Sn,Ye,zr=(function(e,t,o){for(var n=e.length,i=0,s=new qo(t);i<n;++i)e[i]&&++s[e[i]-1];var l=new qo(t);for(i=1;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(o){c=new qo(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var m=i<<4|e[i],f=t-e[i],g=l[e[i]-1]++<<f,y=g|(1<<f)-1;g<=y;++g)c[$1[g]>>u]=m}else for(c=new qo(n),i=0;i<n;++i)e[i]&&(c[i]=$1[l[e[i]-1]++]>>15-e[i]);return c}),ni=new lo(288);for(Ye=0;Ye<144;++Ye)ni[Ye]=8;var Ye;for(Ye=144;Ye<256;++Ye)ni[Ye]=9;var Ye;for(Ye=256;Ye<280;++Ye)ni[Ye]=7;var Ye;for(Ye=280;Ye<288;++Ye)ni[Ye]=8;var Ye,nc=new lo(32);for(Ye=0;Ye<32;++Ye)nc[Ye]=5;var Ye,sI=zr(ni,9,0),aI=zr(ni,9,1),lI=zr(nc,5,0),cI=zr(nc,5,1),_1=function(e){for(var t=e[0],o=1;o<e.length;++o)e[o]>t&&(t=e[o]);return t},Pr=function(e,t,o){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&o},B1=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},z1=function(e){return(e+7)/8|0},T2=function(e,t,o){return(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length),new lo(e.subarray(t,o))};var uI=["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"],Tn=function(e,t,o){var n=new Error(t||uI[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,Tn),!o)throw n;return n},pI=function(e,t,o,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return o||new lo(0);var l=!o,c=l||t.i!=2,u=t.i;l&&(o=new lo(i*3));var m=function(Ua){var Fa=o.length;if(Ua>Fa){var Ss=new lo(Math.max(Fa*2,Ua));Ss.set(o),o=Ss}},f=t.f||0,g=t.p||0,y=t.b||0,b=t.l,P=t.d,S=t.m,_=t.n,N=i*8;do{if(!b){f=Pr(e,g,1);var U=Pr(e,g+1,3);if(g+=3,U)if(U==1)b=aI,P=cI,S=9,_=5;else if(U==2){var me=Pr(e,g,31)+257,W=Pr(e,g+10,15)+4,ee=me+Pr(e,g+5,31)+1;g+=14;for(var K=new lo(ee),ze=new lo(19),re=0;re<W;++re)ze[U1[re]]=Pr(e,g+re*3,7);g+=W*3;for(var fe=_1(ze),fo=(1<<fe)-1,Ft=zr(ze,fe,1),re=0;re<ee;){var ot=Ft[Pr(e,g,fo)];g+=ot&15;var j=ot>>4;if(j<16)K[re++]=j;else{var Mt=0,Ve=0;for(j==16?(Ve=3+Pr(e,g,3),g+=2,Mt=K[re-1]):j==17?(Ve=3+Pr(e,g,7),g+=3):j==18&&(Ve=11+Pr(e,g,127),g+=7);Ve--;)K[re++]=Mt}}var Kt=K.subarray(0,me),zt=K.subarray(me);S=_1(Kt),_=_1(zt),b=zr(Kt,S,1),P=zr(zt,_,1)}else Tn(1);else{var j=z1(g)+4,z=e[j-4]|e[j-3]<<8,J=j+z;if(J>i){u&&Tn(0);break}c&&m(y+z),o.set(e.subarray(j,J),y),t.b=y+=z,t.p=g=J*8,t.f=f;continue}if(g>N){u&&Tn(0);break}}c&&m(y+131072);for(var ys=(1<<S)-1,Ko=(1<<_)-1,Yr=g;;Yr=g){var Mt=b[B1(e,g)&ys],Uo=Mt>>4;if(g+=Mt&15,g>N){u&&Tn(0);break}if(Mt||Tn(2),Uo<256)o[y++]=Uo;else if(Uo==256){Yr=g,b=null;break}else{var Fo=Uo-254;if(Uo>264){var re=Uo-257,xt=ju[re];Fo=Pr(e,g,(1<<xt)-1)+S2[re],g+=xt}var Lr=P[B1(e,g)&Ko],vs=Lr>>4;Lr||Tn(3),g+=Lr&15;var zt=iI[vs];if(vs>3){var xt=qu[vs];zt+=B1(e,g)&(1<<xt)-1,g+=xt}if(g>N){u&&Tn(0);break}c&&m(y+131072);var bs=y+Fo;if(y<zt){var Qc=s-zt,Xc=Math.min(zt,bs);for(Qc+y<0&&Tn(3);y<Xc;++y)o[y]=n[Qc+y]}for(;y<bs;++y)o[y]=o[y-zt]}}t.l=b,t.p=Yr,t.b=y,t.f=f,b&&(f=1,t.m=S,t.d=P,t.n=_)}while(!f);return y!=o.length&&l?T2(o,0,y):o.subarray(0,y)},xn=function(e,t,o){o<<=t&7;var n=t/8|0;e[n]|=o,e[n+1]|=o>>8},oc=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},E1=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:P2,l:0};if(i==1){var l=new lo(o[0].s+1);return l[o[0].s]=1,{t:l,l:1}}o.sort(function(J,me){return J.f-me.f}),o.push({s:-1,f:25001});var c=o[0],u=o[1],m=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[m].f<o[g].f?m++:g++],u=o[m!=f&&o[m].f<o[g].f?m++: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 qo(y+1),P=G1(o[f-1],b,0);if(P>t){var n=0,S=0,_=P-t,N=1<<_;for(s.sort(function(me,W){return b[W.s]-b[me.s]||me.f-W.f});n<i;++n){var U=s[n].s;if(b[U]>t)S+=N-(1<<P-b[U]),b[U]=t;else break}for(S>>=_;S>0;){var j=s[n].s;b[j]<t?S-=1<<t-b[j]++-1:++n}for(;n>=0&&S;--n){var z=s[n].s;b[z]==t&&(--b[z],++S)}P=t}return{t:new lo(b),l:P}},G1=function(e,t,o){return e.s==-1?Math.max(G1(e.l,t,o+1),G1(e.r,t,o+1)):t[e.s]=o},h2=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new qo(++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}},rc=function(e,t){for(var o=0,n=0;n<t.length;++n)o+=e[n]*t[n];return o},w2=function(e,t,o){var n=o.length,i=z1(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},y2=function(e,t,o,n,i,s,l,c,u,m,f){xn(t,f++,o),++i[256];for(var g=E1(i,15),y=g.t,b=g.l,P=E1(s,15),S=P.t,_=P.l,N=h2(y),U=N.c,j=N.n,z=h2(S),J=z.c,me=z.n,W=new qo(19),ee=0;ee<U.length;++ee)++W[U[ee]&31];for(var ee=0;ee<J.length;++ee)++W[J[ee]&31];for(var K=E1(W,7),ze=K.t,re=K.l,fe=19;fe>4&&!ze[U1[fe-1]];--fe);var fo=m+5<<3,Ft=rc(i,ni)+rc(s,nc)+l,ot=rc(i,y)+rc(s,S)+l+14+3*fe+rc(W,ze)+2*W[16]+3*W[17]+7*W[18];if(u>=0&&fo<=Ft&&fo<=ot)return w2(t,f,e.subarray(u,u+m));var Mt,Ve,Kt,zt;if(xn(t,f,1+(ot<Ft)),f+=2,ot<Ft){Mt=zr(y,b,0),Ve=y,Kt=zr(S,_,0),zt=S;var ys=zr(ze,re,0);xn(t,f,j-257),xn(t,f+5,me-1),xn(t,f+10,fe-4),f+=14;for(var ee=0;ee<fe;++ee)xn(t,f+3*ee,ze[U1[ee]]);f+=3*fe;for(var Ko=[U,J],Yr=0;Yr<2;++Yr)for(var Uo=Ko[Yr],ee=0;ee<Uo.length;++ee){var Fo=Uo[ee]&31;xn(t,f,ys[Fo]),f+=ze[Fo],Fo>15&&(xn(t,f,Uo[ee]>>5&127),f+=Uo[ee]>>12)}}else Mt=sI,Ve=ni,Kt=lI,zt=nc;for(var ee=0;ee<c;++ee){var xt=n[ee];if(xt>255){var Fo=xt>>18&31;oc(t,f,Mt[Fo+257]),f+=Ve[Fo+257],Fo>7&&(xn(t,f,xt>>23&31),f+=ju[Fo]);var Lr=xt&31;oc(t,f,Kt[Lr]),f+=zt[Lr],Lr>3&&(oc(t,f,xt>>5&8191),f+=qu[Lr])}else oc(t,f,Mt[xt]),f+=Ve[xt]}return oc(t,f,Mt[256]),f+Ve[256]},dI=new H1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),P2=new lo(0),mI=function(e,t,o,n,i,s){var l=s.z||e.length,c=new lo(n+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(n,c.length-i),m=s.l,f=(s.r||0)&7;if(t){f&&(u[0]=s.r>>3);for(var g=dI[t-1],y=g>>13,b=g&8191,P=(1<<o)-1,S=s.p||new qo(32768),_=s.h||new qo(P+1),N=Math.ceil(o/3),U=2*N,j=function(Ng){return(e[Ng]^e[Ng+1]<<N^e[Ng+2]<<U)&P},z=new H1(25e3),J=new qo(288),me=new qo(32),W=0,ee=0,K=s.i||0,ze=0,re=s.w||0,fe=0;K+2<l;++K){var fo=j(K),Ft=K&32767,ot=_[fo];if(S[Ft]=ot,_[fo]=Ft,re<=K){var Mt=l-K;if((W>7e3||ze>24576)&&(Mt>423||!m)){f=y2(e,u,0,z,J,me,ee,ze,fe,K-fe,f),ze=W=ee=0,fe=K;for(var Ve=0;Ve<286;++Ve)J[Ve]=0;for(var Ve=0;Ve<30;++Ve)me[Ve]=0}var Kt=2,zt=0,ys=b,Ko=Ft-ot&32767;if(Mt>2&&fo==j(K-Ko))for(var Yr=Math.min(y,Mt)-1,Uo=Math.min(32767,K),Fo=Math.min(258,Mt);Ko<=Uo&&--ys&&Ft!=ot;){if(e[K+Kt]==e[K+Kt-Ko]){for(var xt=0;xt<Fo&&e[K+xt]==e[K+xt-Ko];++xt);if(xt>Kt){if(Kt=xt,zt=Ko,xt>Yr)break;for(var Lr=Math.min(Ko,xt-2),vs=0,Ve=0;Ve<Lr;++Ve){var bs=K-Ko+Ve&32767,Qc=S[bs],Xc=bs-Qc&32767;Xc>vs&&(vs=Xc,ot=bs)}}}Ft=ot,ot=S[Ft],Ko+=Ft-ot&32767}if(zt){z[ze++]=268435456|F1[Kt]<<18|g2[zt];var Ua=F1[Kt]&31,Fa=g2[zt]&31;ee+=ju[Ua]+qu[Fa],++J[257+Ua],++me[Fa],re=K+Kt,++W}else z[ze++]=e[K],++J[e[K]]}}for(K=Math.max(K,re);K<l;++K)z[ze++]=e[K],++J[e[K]];f=y2(e,u,m,z,J,me,ee,ze,fe,K-fe,f),m||(s.r=f&7|u[f/8|0]<<3,f-=7,s.h=_,s.p=S,s.i=K,s.w=re)}else{for(var K=s.w||0;K<l+m;K+=65535){var Ss=K+65535;Ss>=l&&(u[f/8|0]=m,Ss=l),f=w2(u,f+1,e.subarray(K,Ss))}s.i=l}return T2(c,0,n+z1(f)+i)};var fI=function(e,t,o,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),l=new lo(s.length+e.length);l.set(s),l.set(e,s.length),e=l,i.w=s.length}return mI(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 I2(e,t){return fI(e,t||{},0,0)}function M2(e,t){return pI(e,{i:2},t&&t.out,t&&t.dictionary)}var gI=typeof TextDecoder<"u"&&new TextDecoder,hI=0;try{gI.decode(P2,{stream:!0}),hI=1}catch{}var ar=new F("SettingsSync:Cloud","#39b7e0");async function ic(e){let t=await C1({minify:!0});if(await Qs())try{let o=await fetch(new URL("/v1/settings",ri()),{method:"PUT",headers:{Authorization:await tc(),"Content-Type":"application/octet-stream"},body:I2(new TextEncoder().encode(t))});if(!o.ok){ar.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();vr.cloud.settingsSyncVersion=n,VencordNative.settings.set(vr),ar.info("Settings uploaded to cloud successfully"),e&&qe({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){ar.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 Ku(e=!0,t=!1){if(await Qs())try{let o=await fetch(new URL("/v1/settings",ri()),{method:"GET",headers:{Authorization:await tc(),Accept:"application/octet-stream","If-None-Match":G.cloud.settingsSyncVersion.toString()}});if(o.status===404)return ar.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 ar.info("Settings up to date"),e&&qe({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return ar.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=G.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(M2(new Uint8Array(s)));return await k1(l),vr.cloud.settingsSyncVersion=n,VencordNative.settings.set(vr),ar.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:_t,noPersist:!0}),!0}catch(o){return ar.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 N2(){if(await Qs())try{let e=await fetch(new URL("/v1/settings",ri()),{method:"DELETE",headers:{Authorization:await tc()}});if(!e.ok){ar.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}ar.info("Settings deleted from cloud successfully"),qe({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){ar.error("Failed to delete",e),qe({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}async function k2(){if(!await Qs())return;let e=await fetch(new URL("/v1/",ri()),{method:"DELETE",headers:{Authorization:await tc()}});if(!e.ok){ar.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}G.cloud.authenticated=!1,await ec(),qe({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}a();v();function sc({value:e,onChange:t,validate:o}){let[n,i]=se.useState(e),[s,l]=se.useState();function c(u){i(u);let m=o(u);m===!0?(l(void 0),t(u)):l(m)}return r(p,null,r(dt,{type:"text",value:n,onChange:c,error:s}))}Jt();Hn();a();function W1(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)}Wt();mr();v();function yI(e){try{return new URL(e),!0}catch{return"Invalid URL"}}function vI(){let{cloud:e}=Oe(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return r("section",{className:A.top16},r(x.FormTitle,{tag:"h5"},"Settings Sync"),r($e,{size:"md",className:A.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),r(jo,{key:"cloud-sync",title:"Settings Sync",value:e.settingsSync,onChange:o=>{e.settingsSync=o},disabled:!e.authenticated}),r("div",{className:"vc-cloud-settings-sync-grid"},r(R,{size:R.Sizes.SMALL,disabled:!t,onClick:()=>ic(!0)},"Sync to Cloud"),r(Q,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:n})=>r(R,{onMouseLeave:o,onMouseEnter:n,size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>Ku(!0,!0)},"Sync from Cloud")),r(R,{size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>N2()},"Delete Cloud Settings")))}function bI(){let e=Oe(["cloud.authenticated","cloud.url"]);return r(Do,null,r("section",{className:A.top16},r($e,{size:"md",className:A.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",r(De,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",r(De,{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.cloud.authenticated,onChange:t=>{t?O1():e.cloud.authenticated=t}}),r(x.FormTitle,{tag:"h5",className:A.top16},"Backend URL"),r(x.FormText,{className:A.bottom8},"Which backend to use when using cloud integrations."),r(sc,{key:"backendUrl",value:e.cloud.url,onChange:async t=>{e.cloud.url=t,e.cloud.authenticated=!1,ec()},validate:yI}),r(W1,{columns:2,gap:"1em",className:A.top8},r(R,{size:R.Sizes.MEDIUM,disabled:!e.cloud.authenticated,onClick:async()=>{await ec(),e.cloud.authenticated=!1,await O1()}},"Reauthorise"),r(R,{size:R.Sizes.MEDIUM,color:R.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>Le.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:k2,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data")),r(Ee,{className:A.top16})),r(vI,null))}var ac=Lo(bI,"Cloud");a();Wt();v();a();Jt();Wt();a();v();ct();var SI=["style-src","style-src-elem","img-src","font-src"],Xs=new Set,j1=new Set;document.addEventListener("securitypolicyviolation",({effectiveDirective:e,blockedURI:t})=>{!t||!SI.includes(e)||(Xs.add(t),j1.forEach(o=>o()))});function q1(){let e=Go();return un(()=>(j1.add(e),()=>void j1.delete(e)),[e]),[...Xs]}te();ct();v();function C2(){let e=q1(),t=Go();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"&&(Xs.forEach(m=>{new URL(m).host===c&&Xs.delete(m)}),t(),Le.show({title:"Restart Required",body:"A restart is required to apply this change",confirmText:"Restart now",cancelText:"Later!",onConfirm:_t}))},i=e.some(o);return r(Ct,{className:A.bottom16},r(x.FormTitle,{tag:"h5"},"Blocked Resources"),r(x.FormText,null,"Some images, styles, or fonts were blocked because they come from disallowed domains."),r(x.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(x.FormText,null,"After allowing a domain, you have to fully close (from tray / task manager) and restart ","Vesktop"," to apply the change."),r(x.FormTitle,{tag:"h5",className:L(A.top16,A.bottom8)},"Blocked URLs"),r("div",{className:"vc-settings-csp-list"},e.map((s,l)=>r("div",{key:s},l!==0&&r(Ee,{className:A.bottom8}),r("div",{className:"vc-settings-csp-row"},r(De,{href:s},s),r(R,{color:R.Colors.PRIMARY,onClick:()=>n(s),disabled:o(s)},"Allow"))))),i&&r(p,null,r(Ee,{className:L(A.top8,A.bottom16)}),r(x.FormText,null,"Imgur links should be direct links in the form of ",r("code",null,"https://i.imgur.com/...")),r(x.FormText,null,'To obtain a direct link, right-click the image and select "Copy image address".')))}a();ve();Qe();Wt();a();ve();var K1=Y("vc-settings-quickActions-");function lr(e){let{Icon:t,action:o,text:n,disabled:i}=e;return r("button",{className:K1("pill"),onClick:o,disabled:i},r(t,{className:K1("img")}),n)}function lc(e){return r(ut,{className:K1("card")},e.children)}a();T();a();ve();a();function A2(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,m;return m=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*m-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,m*=100,{hue:c,saturation:u,lightness:m}}function R2(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();var L2="vc-clientTheme-vars",O2="vc-clientTheme-overrides";function Y1(e){let{hue:t,saturation:o,lightness:n}=A2(e);E2(L2,`:root {
|
|
--theme-h: ${t};
|
|
--theme-s: ${o}%;
|
|
--theme-l: ${n}%;
|
|
}`)}async function _2(e){Y1(e),PI(await TI())}function B2(){document.getElementById(L2)?.remove(),document.getElementById(O2)?.remove()}function xI(e){let t=document.getElementById(e);if(t)return t;let o=document.createElement("style");return o.id=e,document.head.appendChild(o)}function E2(e,t){let o=xI(e);o.textContent=t}async function TI(){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 wI=/(--neutral-\d{1,3}?-hsl):.+?([\d.]+?)%;/g;function PI(e){let t={};for(let[,i,s]of e.matchAll(wI))t[i]=parseFloat(s);let o=t["--neutral-2-hsl"],n=t["--neutral-69-hsl"];E2(O2,[`.theme-light {
|
|
${D2(t,o)}
|
|
}`,`.theme-dark {
|
|
${D2(t,n)}
|
|
}`].join(`
|
|
|
|
`))}function D2(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(`
|
|
`)}E();v();var II=ue('type:"UNSYNCED_USER_SETTINGS_UPDATE','"system"==='),U2=Ie("ClientThemesBackgroundStore"),Yu=Y("vc-clientTheme-"),MI=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];function $2(e){let t=e.toString(16).padStart(6,"0");Vs.store.color=t,Y1(t)}function F2(e){II({theme:e})}function G2(){let e=ne([Us],()=>Us.theme),t=e==="light",o=t?"Dark":"Light",n=ne([U2],()=>U2.gradientPreset!=null),i=R2(Vs.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:Yu("settings")},r("div",{className:Yu("container")},r("div",{className:Yu("settings-labels")},r(x.FormTitle,{tag:"h3"},"Theme Color"),r(x.FormText,null,"Add a color to your Discord client theme")),r(jn,{color:parseInt(Vs.store.color,16),onChange:$2,showEyeDropper:!1,suggestedColors:MI})),(s||n)&&r(p,null,r(Ct,{className:A.top8},r(x.FormTitle,{tag:"h2"},"Your theme won't look good!"),s&&r(x.FormText,null,">"," Selected color won't contrast well with text"),n&&r(x.FormText,null,">"," Nitro themes aren't supported"),r("div",{className:Yu("buttons-container")},s&&l&&r(R,{onClick:()=>F2(o),color:R.Colors.RED},"Switch to ",o," mode"),n&&r(R,{onClick:()=>F2(e),color:R.Colors.RED},"Disable Nitro Theme")))))}function H2(){return r(R,{onClick:()=>$2(3224376)},"Reset Theme Color")}var Vs=w({color:{type:6,default:"313338",component:G2},resetColor:{type:6,component:H2}}),os=h({name:"ClientTheme",authors:[d.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:Vs,startAt:"DOMContentLoaded",start:()=>_2(Vs.store.color),stop:B2});E();v();a();Qe();Wt();ie();v();function z2({theme:e,enabled:t,onChange:o,onDelete:n}){return r(Zl,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:r(oe,{flexDirection:"row",gap:"0.2em"},!!e.website&&r(De,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&r(De,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&Mi(e.invite).catch(()=>Re("Invalid or expired invite"))}},"Discord Server"))})}var NI=Y("vc-settings-theme-"),gz=Dt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef);function W2(e,t){if(t){if(G.enabledThemes.includes(e))return;G.enabledThemes=[...G.enabledThemes,e]}else G.enabledThemes=G.enabledThemes.filter(o=>o!==e)}function j2(){let e=Oe(["enabledThemes"]),t=nt(null),[o,n]=C(null);X(()=>{i()},[]);async function i(){let s=await VencordNative.themes.getThemesList();n(s)}return r(oe,{flexDirection:"column",gap:"1em"},r(ut,null,r(x.FormTitle,{tag:"h5"},"Find Themes:"),r("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},r(De,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),r(De,{href:"https://github.com/search?q=discord+theme"},"GitHub")),r(x.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),r(ut,null,r(x.FormTitle,{tag:"h5"},"External Resources"),r(x.FormText,null,"For security reasons, loading resources (styles, fonts, images, ...) from most sites is blocked."),r(x.FormText,null,"Make sure all your assets are hosted on GitHub, GitLab, Codeberg, Imgur, Discord or Google Fonts.")),r("section",null,r(x.FormTitle,{tag:"h5"},"Local Themes"),r(lc,null,r(p,null,r(lr,{text:"Open Themes Folder",action:()=>VencordNative.themes.openFolder(),Icon:gl}),r(lr,{text:"Load missing Themes",action:i,Icon:hl}),r(lr,{text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor(),Icon:Ai}),Ne(os.name)&&r(lr,{text:"Edit ClientTheme",action:()=>sr(os),Icon:yh}))),r("div",{className:NI("grid")},o?.map(s=>r(z2,{key:s.fileName,enabled:e.enabledThemes.includes(s.fileName),onChange:l=>W2(s.fileName,l),onDelete:async()=>{W2(s.fileName,!1),await VencordNative.themes.deleteTheme(s.fileName),i()},theme:s})))))}a();v();function q2(){let e=Oe(["themeLinks"]),[t,o]=C(e.themeLinks.join(`
|
|
`));function n(){e.themeLinks=[...new Set(t.trim().split(/\n+/).map(i=>i.trim()).filter(Boolean))]}return r(oe,{flexDirection:"column",gap:"1em"},r(ut,{variant:"warning",defaultPadding:!0},r(x.FormText,{size:"md"},"This section is for advanced users. If you are having difficulties using it, use the Local Themes tab instead.")),r(ut,null,r(x.FormTitle,{tag:"h5"},"Paste links to css files here"),r(x.FormText,null,"One link per line"),r(x.FormText,null,"You can prefix lines with @light or @dark to toggle them based on your Discord theme"),r(x.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),r("section",null,r(x.FormTitle,{tag:"h5"},"Online Themes"),r(xu,{value:t,onChange:o,className:"vc-settings-theme-links",placeholder:"Enter Theme Links...",spellCheck:!1,onBlur:n,rows:10})))}function kI(){let[e,t]=C(0);return r(Do,null,r(bo,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:e,onItemSelect:t},r(bo.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),r(bo.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),r(C2,null),e===0&&r(j2,null),e===1&&r(q2,null))}var ii=Lo(kI,"Themes");a();Jt();Hn();Wt();ct();v();a();Wt();te();v();a();v();function CI(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 Z1(e,t){return async()=>{e(!0);try{await t()}catch(o){Zn.error(o);let n=CI(o);Le.show({title:"Oops!",body:r(Ct,null,n.split(`
|
|
`).map((i,s)=>r("div",{key:s},Pe.parse(i))))})}finally{e(!1)}}}function J1({repo:e,hash:t,disabled:o=!1}){return r(De,{href:`${e}/commit/${t}`,disabled:o},t)}function K2({updates:e,repo:t,repoPending:o}){return r(ut,{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(J1,{repo:t,hash:n,disabled:o})),r("span",{style:{marginLeft:"0.5em",color:"var(--text-default)"}},s," - ",i))))}function Y2(e){return r(p,null,r(x.FormText,{className:A.bottom8},"Your local copy has more recent commits. Please stash or reset them."),r(K2,{...e,updates:Fi}))}function Z2(e){let[t,o]=C(Fi),[n,i]=C(!1),[s,l]=C(!1),c=(t?.length??0)>0;return r(p,null,!t&&Ws?r(p,null,r(x.FormText,null,"Failed to check updates. Check the console for more info"),r(Ct,{style:{padding:"1em"}},r("p",null,Ws.stderr||Ws.stdout||"An unknown error occurred"))):r(x.FormText,{className:A.bottom8},c?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),c&&r(K2,{updates:t,...e}),r(oe,{className:L(A.bottom8,A.top8)},c&&r(R,{size:R.Sizes.SMALL,disabled:s||n,onClick:Z1(l,async()=>{await Jn()&&(o([]),await new Promise(u=>{Le.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){_t(),u()},onCancel:u})}))})},"Update Now"),r(R,{size:R.Sizes.SMALL,disabled:s||n,onClick:Z1(i,async()=>{await fn()?o(Fi):(o([]),q.show({message:"No updates found!",id:q.genId(),type:q.Type.MESSAGE,options:{position:q.Position.BOTTOM}}))})},"Check for Updates")))}function AI(){let e=Oe(["autoUpdate","autoUpdateNotification"]),[t,o,n]=ht(Oh,{fallbackValue:"Loading...",onError:s=>Zn.error("Failed to retrieve repo",o)}),i={repo:t,repoPending:n};return r(Do,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(x.FormTitle,{tag:"h5"},"Repo"),r(x.FormText,null,n?t:o?"Failed to retrieve - check console":r(De,{href:t},t.split("/").slice(-2).join("/"))," ","(",r(J1,{hash:mn,repo:t,disabled:n}),")"),r(Ee,{className:A.top8+" "+A.bottom8}),r(x.FormTitle,{tag:"h5"},"Updates"),ku?r(Y2,{...i}):r(Z2,{...i}))}var Wr=Lo(AI,"Updater");a();Jt();Hn();Qe();a();ve();Jt();v();var Ir=Y("vc-special-");function cc({title:e,subtitle:t,description:o,cardImage:n,backgroundImage:i,backgroundColor:s,buttonTitle:l,buttonOnClick:c,children:u}){let m={backgroundColor:s||"#9c85ef",backgroundImage:`url(${i||""})`};return r(ut,{className:Ir("card","card-special"),style:m},r("div",{className:Ir("card-flex")},r("div",{className:Ir("card-flex-main")},r(x.FormTitle,{className:Ir("title"),tag:"h5"},e),r(x.FormText,{className:Ir("subtitle")},t),r(x.FormText,{className:Ir("text")},o),u),n&&r("div",{className:Ir("image-container")},r("img",{role:"presentation",src:n,alt:"",className:Ir("image")}))),l&&r(p,null,r(Ee,{className:Ir("seperator")}),r(So,{onClick:c,className:Ir("hyperlink")},r(x.FormText,{className:Ir("hyperlink-text")},l))))}T();te();v();a();T();v();var J2=e=>!!(Bn.getDonorBadges(e)?.length>0||be?.getMember(Ga,e)?.roles.includes(Ha));function Q1(){return r(Cl,{look:R.Looks.FILLED,color:R.Colors.WHITE,style:{marginTop:"1em"}})}a();te();v();function Q2(){let e=Oe(["macosVibrancyStyle"]);return r(p,null,r(x.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),r(M,{noop:!0},r(Ro,{className:A.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:ws})))}var RI="https://cdn.discordapp.com/emojis/1026533090627174460.png",DI="https://media.discordapp.net/stickers/1039992459209490513.png",LI="https://cdn.discordapp.com/emojis/1238120638020063377.png",OI="https://cdn.discordapp.com/emojis/1026533070955872337.png",X2="https://media.discordapp.net/stickers/1311070116305436712.png?size=2048",_I="https://media.discordapp.net/stickers/1311070166481895484.png?size=2048";function BI(){let e=Oe(["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,Eg&&{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&&Le.show({title:"Restart Required",body:"A restart is required to apply this change",confirmText:"Restart now",cancelText:"Later!",onConfirm:_t})}})})}function EI(){let e=le(()=>Math.random()>.5?RI:DI,[]),t=!1,o=k?.getCurrentUser();return r(Do,null,J2(o?.id)?r(cc,{title:"Donations",subtitle:"Thank you for donating!",description:"You can manage your perks at any time by messaging @vending.machine.",cardImage:LI,backgroundImage:X2,backgroundColor:"#ED87A9"},r(Q1,null)):r(cc,{title:"Support the Project",description:"Please consider supporting the development of Vencord by donating!",cardImage:e,backgroundImage:X2,backgroundColor:"#c3a3ce"},r(Q1,null)),Or(o?.id)&&r(cc,{title:"Contributions",subtitle:"Thank you for contributing!",description:"Since you've contributed to Vencord you now have a cool new badge!",cardImage:OI,backgroundImage:_I,backgroundColor:"#EDCC87",buttonTitle:"See what you've contributed to",buttonOnClick:()=>ei(o)}),r("section",null,r(x.FormTitle,{tag:"h5"},"Quick Actions"),r(lc,null,r(lr,{Icon:hh,text:"Notification Log",action:Js}),r(lr,{Icon:Ai,text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),r(p,null,r(lr,{Icon:hl,text:"Relaunch Discord",action:_t}),r(lr,{Icon:gl,text:"Open Settings Folder",action:()=>VencordNative.settings.openFolder()})),r(lr,{Icon:yl,text:"View Source Code",action:()=>VencordNative.native.openExternal("https://github.com/"+Vi)}))),r(Ee,null),r("section",{className:A.top16},r(x.FormTitle,{tag:"h5"},"Settings"),r(x.FormText,{className:A.bottom20,style:{color:"var(--text-muted)"}},"Hint: You can change the position of this settings section in the"," ",r("a",{onClick:()=>sr(Vencord.Plugins.plugins.Settings)},"settings of the Settings plugin"),"!"),r(BI,null)),t&&r(Q2,null),r(a2,null))}var uc=Lo(EI,"Vencord Settings");T();ie();ae();te();Fe();v();var UI="https://cdn.discordapp.com/emojis/1092089799109775453.png?size=64",FI={description:"Vencord Contributor",iconSrc:UI,position:0,shouldShow:({userId:e})=>Gg(e),onClick:(e,{userId:t})=>ei(k.getUser(t))},e0={};async function X1(e=!1){let t={};e&&(t.cache="no-cache"),e0=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var V1;function $I({badge:e}){return r(I.Menu,{navId:"vc-badge-context",onClose:st.closeContextMenu,"aria-label":"Badge Options"},e.description&&r(I.MenuItem,{id:"vc-badge-copy-name",label:"Copy Badge Name",action:()=>rt(e.description)}),e.iconSrc&&r(I.MenuItem,{id:"vc-badge-copy-link",label:"Copy Badge Image Link",action:()=>rt(e.iconSrc)}))}var Bn=h({name:"BadgeAPI",description:"API to add badges to users",authors:[d.Megu,d.Ven,d.TheSun],required:!0,patches:[{find:".MODAL]:26",replacement:{match:/(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/,replace:";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])"}},{find:"#{intl::PROFILE_USER_BADGES}",replacement:[{match:/alt:" ","aria-hidden":!0,src:.{0,50}(\i).iconSrc/,replace:"...$1.props,$&"},{match:/(?<="aria-label":(\i)\.description,.{0,200}?)children:/g,replace:"children:$1.component?$self.renderBadgeComponent({...$1}) :"},{match:/href:(\i)\.link/,replace:"...$self.getBadgeMouseEventHandlers($1),$&"}]},{find:"profileCardUsernameRow,children:",replacement:{match:/badges:(\i)(?<=displayProfile:(\i).+?)/,replace:"badges:[...$self.getBadges($2),...$1]"}}],get DonorBadges(){return e0},toolboxActions:{async"Refetch Badges"(){await X1(!0),q.show({id:q.genId(),message:"Successfully refetched badges!",type:q.Type.SUCCESS})}},userProfileBadge:FI,async start(){await X1(),clearInterval(V1),V1=setInterval(X1,1e3*60*30)},async stop(){clearInterval(V1)},getBadges(e){if(!e)return[];try{return e.userId??=e.user?.id,qg(e)}catch(t){return new F("BadgeAPI#hasBadges").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 e0[e]?.map(t=>({iconSrc:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onContextMenu(o,n){st.openContextMenu(o,()=>r($I,{badge:n}))},onClick(){let o=de(n=>r(M,{noop:!0,onError:()=>{on(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},r(he,{...n},r(ke,null,r(x.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},r(oe,{justifyContent:"center",alignItems:"center",gap:"0.5em"},r(qa,null),"Vencord Donor"))),r(Se,null,r(oe,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(x.FormText,null,"This Badge is a special perk for Vencord Donors"),r(x.FormText,{className:A.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),r(yt,null,r(oe,{justifyContent:"center",style:{width:"100%"}},r(Cl,null))))))}}))}});a();T();var Zu=h({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[d.Ven],patches:[{find:'"sticker")',replacement:{match:/(?<=className:.{0,20}\.buttons.{0,50}children:)(\i)/,replace:"Vencord.Api.ChatButtons._injectButtons($1,arguments[0])"}}]});a();T();var Ju=h({name:"CommandsAPI",authors:[d.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,n)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${n})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]});a();T();var Qu=h({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[d.Nuckyz,d.Ven,d.Kyuuhachi],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?=let{navId:)(?<=function \i\((\i)\).+?)/,replace:"$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);"}},{find:"navId:",all:!0,noWarn:!0,replacement:[{match:/navId:(?=.+?([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?`contextMenuAPIArguments:typeof arguments!=='undefined'?arguments:[],${e}`:e}]}]});a();T();var Xu=h({name:"DynamicImageModalAPI",authors:[d.sadan,d.Nuckyz],description:"Allows you to omit either width or height when opening an image modal",patches:[{find:".dimensionlessImage,",replacement:{match:/(?<=\i=)(null!=\i&&0!==\i)&&(null!=\i&&0!==\i)/,replace:"($1)||($2)"}}]});a();T();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 V2="src/plugins/_api/memberListDecorators/style.css";var Vu=h({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[d.TheSun,d.Ven],managedStyle:V2,patches:[{find:".lostPermission)",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();T();Zo();var eS={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"},ep=h({name:"MenuItemDemanglerAPI",description:"Demangles Discord's Menu Item module",authors:[d.Ven],required:!0,patches:[{find:'"Menu API',replacement:{match:/function.{0,80}type===(\i\.\i)\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let o=[],n=Rt(/\(\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 eS){let u=eS[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();T();var tp=h({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[d.Cyn],patches:[{find:"#{intl::REMOVE_ATTACHMENT_BODY}",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]});a();T();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 tS="src/plugins/_api/messageDecorations/style.css";var op=h({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[d.TheSun],managedStyle:tS,patches:[{find:'"Message Username"',replacement:{match:/#{intl::GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE}.+?renderPopout:.+?(?=\])/,replace:"$&,Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]});a();T();var rp=h({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[d.Arjix,d.hunt,d.Ven],patches:[{find:"#{intl::EDIT_TEXTAREA_HELP}",replacement:{match:/(?<=,channel:\i\}\)\.then\().+?\i\.content!==this\.props\.message\.content&&\i\((.+?)\)\}(?=return)/,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();T();var np=h({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[d.KingFish,d.Ven,d.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/(?<=\]\}\)),(.{0,40}togglePopout:.+?}\)),(.+?)\]}\):null,(?<=\((\i\.\i),{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,replace:(e,t,o,n,i,s)=>`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${n},${s}),${i}?${t}:null,${i}&&${o},`}}]});a();T();var ip=h({name:"MessageUpdaterAPI",description:"API for updating and re-rendering messages.",authors:[d.Nuckyz],patches:[{find:"}renderEmbeds(",replacement:{match:/(?<=this.props,\i,\[)"message",/,replace:""}}]});a();T();var sp=h({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[d.Ven],required:!0,patches:[{find:'"NoticeStore"',replacement:[{match:/(?<=!1;)\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:(e,t)=>`if(${t}?.id=="VencordNotice")return(${t}=null,Vencord.Api.Notices.nextNotice(),true);${e}`,noWarn:!0},{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}`}]}]});a();T();var ap=h({name:"ServerListAPI",authors:[d.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"#{intl::DISCODO_DISABLED}",replacement:{match:/(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:".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();T();var lp=h({name:"UserSettingsAPI",description:"Patches Discord's UserSettings to expose their group and name.",authors:[d.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();T();ae();var oS=w({disableAnalytics:{type:3,description:"Disable Discord's tracking (analytics/'science')",default:!0,restartNeeded:!0}}),cp=h({name:"NoTrack",description:"Disable Discord's tracking (analytics/'science'), metrics and Sentry crash reporting",authors:[d.Cyn,d.Ven,d.Nuckyz,d.Arrow],required:!0,settings:oS,patches:[{find:"AnalyticsActionHandlers.handle",predicate:()=>oS.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 F("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 F("NoTrack","#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(window,"DiscordSentry")}})}});a();Qe();T();ie();E();var ea={SECTION:1,SIDEBAR_ITEM:2,PANEL:3,PANE:4};Ae(["SECTION","SIDEBAR_ITEM","PANEL"],e=>ea=e);var t0={HEADER:"HEADER",DIVIDER:"DIVIDER",CUSTOM:"CUSTOM"},o0=w({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"}]}}),ta=h({name:"Settings",description:"Adds Settings UI and debug info",authors:[d.Ven,d.Megu],required:!0,settings:o0,patches:[{find:".versionHash",replacement:[{match:/\.compactInfo.+?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.versionHash,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:/\.info.+?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},$self.makeInfoElements(${t},${o})`)},{match:/copyValue:\i\.join\(" "\)/g,replace:"$& + $self.getInfoString()"}]},{find:".SEARCH_NO_RESULTS&&0===",replacement:[{match:/(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/,replace:(e,t,o,n,i)=>`${o} $self.addSettings(${n}, ${i}, ${t}) ${o}`},{match:/({(?=.+?function (\i).{0,160}(\i)=\i\.useMemo.{0,140}return \i\.useMemo\(\(\)=>\i\(\3).+?\(\)=>)\2/,replace:(e,t,o)=>`${t}$self.wrapSettingsHook(${o})`}]},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",replacement:{match:/(?<=function\((\i),(\i),\i\)\{)(?=let \i=Object.values\(\i\.\i\).+?(\(0,\i\.openUserSettings\))\()/,replace:(e,t,o,n)=>`${n}(${t},{section:${o}});return;`}},{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:ea.PANEL,useTitle:()=>n},c={StronglyDiscouragedCustomComponent:()=>r(i,null),render:()=>r(i,null)};return ea.PANE?l.buildLayout=()=>[{key:t+"_pane",type:ea.PANE,useTitle:()=>n,buildLayout:()=>[],...c}]:(Object.assign(l,c),l.buildLayout=()=>[]),{key:t,type:ea.SIDEBAR_ITEM,legacySearchKey:o.toUpperCase(),getLegacySearchKey:()=>o.toUpperCase(),useTitle:()=>o,icon:()=>r(s,{width:20,height:20}),buildLayout:()=>[l]}},getSettingsSectionMappings(){return[["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"]]},buildLayout(e){let t=e.buildLayout();if(e.key!=="$Root"||!Array.isArray(t)||t.some(m=>m?.key==="vencord_section"))return t;let{buildEntry:o}=this,n=[o({key:"vencord_main",title:"Vencord",panelTitle:"Vencord Settings",Component:uc,Icon:bh}),o({key:"vencord_plugins",title:"Plugins",Component:ts,Icon:Sh}),o({key:"vencord_themes",title:"Themes",Component:ii,Icon:Ai}),Wr&&o({key:"vencord_updater",title:"Updater",panelTitle:"Vencord Updater",Component:Wr,Icon:wh}),o({key:"vencord_cloud",title:"Cloud",panelTitle:"Vencord Cloud",Component:ac,Icon:xh}),o({key:"vencord_backup_restore",title:"Backup & Restore",Component:Ql,Icon:Th}),!1,...this.customEntries.map(o),...this.customSections.map((m,f)=>{let{section:g,element:y,label:b}=m(t0);return Object.values(t0).includes(g)?null:o({key:`vencord_deprecated_custom_${g}`,title:b,Component:y,Icon:g==="Vesktop"?Ph:vl})})].filter(Xn),i={key:"vencord_section",type:ea.SECTION,useLabel:()=>"Vencord",buildLayout:()=>n},{settingsLocation:s}=o0.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(m=>typeof m?.key=="string"&&m.key===c);return u===-1?u=2:s.startsWith("below")&&(u+=1),t.splice(u,0,i),t},customSections:[],customEntries:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:uc,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:ts,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:ii,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:Wr,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:ac,className:"vc-cloud"},{section:"VencordBackupAndRestore",label:"Backup & Restore",element:Ql,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},isRightSpot({header:e,settings:t}){let o=t?.[0];if(o==="LOGOUT"||o==="SOCIAL_LINKS")return!0;let{settingsLocation:n}=o0.store;if(n==="bottom")return o==="LOGOUT";if(n==="belowActivity")return o==="CHANGELOG";if(e)try{let i={top:xe("USER_SETTINGS"),aboveNitro:xe("BILLING_SETTINGS"),belowNitro:xe("APP_SETTINGS"),aboveActivity:xe("ACTIVITY_SETTINGS")};return!i[n]||i[n].endsWith("_SETTINGS")?o==="PREMIUM":e===i[n]}catch{return o==="PREMIUM"}},patchedSettings:new WeakSet,addSettings(e,t,o){this.patchedSettings.has(e)||!this.isRightSpot(t)||(this.patchedSettings.add(e),e.push(...this.makeSettingsCategories(o)))},wrapSettingsHook(e){return(...t)=>{let o=e(...t);return this.patchedSettings.has(o)||o.unshift(...this.makeSettingsCategories(t0)),o}},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 ${mn}${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 n0={};et(n0,{UserSettings:()=>r0,getUserSetting:()=>rS,getUserSettingLazy:()=>Po});a();$o();ae();E();var r0=ko(()=>{let e=Fn('"textAndImages","renderSpoilers"');return e==null?new F("UserSettingsAPI").error("Didn't find settings module."):pt(e)});function rS(e,t){if(!Ne("UserSettingsAPI"))throw new Error("Cannot use UserSettingsAPI without setting it as a dependency.");for(let o in r0){let n=r0[o];if(n.userSettingsAPIGroup===e&&n.userSettingsAPIName===t)return n}}function Po(e,t){return Nt(()=>rS(e,t))}Wt();a();Di();T();ie();ae();te();v();var GI=/```js\n(.+?)```/s,HI=["1024286218801926184"],zI=[Lg,Og,Ha],WI=async function(){}.constructor,jI=Po("status","showCurrentGame"),nS=e=>e.parent_id===_n||HI.includes(e.id);async function iS(){let e=await fn();return e&&(await Jn(),_t()),e}async function sS(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=`Vesktop v${VesktopNative.app.getVersion()}`,o={Vencord:`v1.13.8 \u2022 [${mn}](<https://github.com/Vendicated/Vencord/commit/${mn}>)${ta.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1765410918386)}`,Client:`${e} ~ ${t}`,Platform:navigator.platform},n={"Activity Sharing disabled":zg(()=>!jI.getSetting(),!1),"Vencord DevBuild":!1,"Has UserPlugins":Object.values(ti).some(s=>s.userPlugin),"More than two weeks out of date":1765410918386<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 aS(){let e=s=>s.endsWith("API")||je[s].required,t=Object.keys(je).filter(s=>Ne(s)&&!e(s)),o=t.filter(s=>!ti[s].userPlugin),n=t.filter(s=>ti[s].userPlugin),i=`**Enabled Plugins (${o.length}):**
|
|
${$i(o.join(", "))}`;return n.length&&(i+=`**Enabled UserPlugins (${n.length}):**
|
|
${$i(n.join(", "))}`),i}var qI=gn(fn),KI=w({}).withPrivateSettings(),up=h({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[d.Ven],dependencies:["UserSettingsAPI"],settings:KI,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=>Or(k.getCurrentUser()?.id)||nS(e.channel),execute:async()=>({content:await sS()})},{name:"vencord-plugins",description:"Send Vencord plugin list",predicate:e=>Or(k.getCurrentUser()?.id)||nS(e.channel),execute:()=>({content:aS()})}],flux:{async CHANNEL_SELECT({channelId:e}){if(!(e===ou||Z.getChannel(e)?.parent_id===_n))return;let o=k.getCurrentUser()?.id;if(!o||Or(o))return;if(await qI().catch(()=>{}),zs)return Le.show({title:"Hold on!",body:r("div",null,r(x.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),r(x.FormText,{className:A.top8},"Please first update before asking for support!")),onCancel:()=>hn(Wr),cancelText:"View Updates",confirmText:"Update & Restart Now",onConfirm:iS,secondaryConfirmText:"I know what I'm doing or I can't update"});let n=be.getSelfMember(Ga)?.roles;!n||zI.some(i=>n.includes(i))}},renderMessageAccessory(e){let t=[];if((e.channel.id===_g||e.channel.parent_id===_n&&e.message.author.id===Ts)&&e.message.content?.includes("update")&&t.push(r(R,{key:"vc-update",color:R.Colors.GREEN,onClick:async()=>{try{await iS()?Re("Success! Restarting...",q.Type.SUCCESS):Re("Already up to date!",q.Type.MESSAGE)}catch(n){new F(this.name).error("Error while updating:",n),Re("Failed to update :(",q.Type.FAILURE)}}},"Update Now")),e.channel.parent_id===_n&&Te.can(ce.SEND_MESSAGES,e.channel)&&((e.message.content.includes("/vencord-debug")||e.message.content.includes("/vencord-plugins"))&&t.push(r(R,{key:"vc-dbg",color:R.Colors.PRIMARY,onClick:async()=>Rs(e.channel.id,{content:await sS()})},"Run /vencord-debug"),r(R,{key:"vc-plg-list",color:R.Colors.PRIMARY,onClick:async()=>Rs(e.channel.id,{content:aS()})},"Run /vencord-plugins")),e.message.author.id===Ts)){let n=GI.exec(e.message.content||e.message.embeds[0]?.rawDescription||"");n&&t.push(r(R,{key:"vc-run-snippet",onClick:async()=>{try{await WI(n[1])(),Re("Success!",q.Type.SUCCESS)}catch(i){new F(this.name).error("Error while running snippet:",i),Re("Failed to run snippet :(",q.Type.FAILURE)}}},"Run Snippet"))}return t.length?r(oe,null,t):null},renderContributorDmWarningCard:M.wrap(({channel:e})=>{let t=e.getRecipientId();return!Or(t)||we.isFriend(t)||Or(k.getCurrentUser()?.id)?null:r(ut,{variant:"warning",className:A.top8,defaultPadding:!0},"Please do not private message Vencord plugin developers for support!",r("br",null),"Instead, use the Vencord support channel: ",Pe.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),!Z.getChannel(ou)&&" (Click the link to join)")},{noop:!0})});a();T();ie();E();v();var lS=pe(".POPOUT,user"),pp=!1,i0={current:null},YI=M.wrap(()=>{let{prioritizeServerProfile:e}=pc.use(["prioritizeServerProfile"]);return r(I.Menu,{navId:"vc-ap-server-profile",onClose:st.closeContextMenu},r(I.MenuItem,{id:"vc-ap-view-alternate-popout",label:e?"View Account Profile":"View Server Profile",disabled:Ho()?.getGuildId()==null,action:t=>{pp=!0,i0.current?.click()}}),r(I.MenuCheckboxItem,{id:"vc-ap-prioritize-server-profile",label:"Prioritize Server Profile",checked:e,action:()=>pc.store.prioritizeServerProfile=!e}))},{noop:!0}),pc=w({prioritizeServerProfile:{type:3,description:"Prioritize Server Profile when left clicking your account panel",default:!1}}),dp=h({name:"AccountPanelServerProfile",description:"Right click your account panel in the bottom left to view your profile in the current server",authors:[d.Nuckyz,d.relitrix],settings:pc,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",group:!0,replacement:[{match:/(\.AVATAR,children:.+?renderPopout:\((\i),\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:/#{intl::SET_STATUS}\)(?<=innerRef:(\i),style:.+?)/,replace:"$&,onContextMenu:($self.grabRef($1),$self.openAccountPanelContextMenu)"}]}],get accountPanelRef(){return i0},grabRef(e){return i0=e,e},openAccountPanelContextMenu(e){st.openContextMenu(e,YI)},onPopoutClose(){pp=!1},UserProfile:M.wrap(({popoutProps:e,currentUser:t,originalRenderPopout:o})=>{if(pc.store.prioritizeServerProfile&&pp||!pc.store.prioritizeServerProfile&&!pp)return o();let n=Ho();return n?.getGuildId()==null||!lS.$$vencordGetWrappedComponent()?o():r(lS,{...e,user:t,currentUser:t,guildId:n.getGuildId(),channelId:n.id})},{noop:!0})});a();T();var mp=h({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[d.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?([,}].*?\))/g,replace:(e,t)=>t.match(/}=.+/)==null?`canAnimate:!0${t}`:e}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(\.CUSTOM_STATUS.+?animateEmoji:)\i/,replace:"$1!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(\.headerContent.+?guildBanner:\i,animate:)\i/,replace:"$1!0"}},{find:".MINI_PREVIEW,[",replacement:{match:/animate:\i,loop:/,replace:"animate:true,loop:true,_loop:"}}]});a();T();br("AlwaysExpandRoles","ShowAllRoles");var fp=h({name:"AlwaysExpandRoles",description:"Always expands the role list in profile popouts",authors:[d.surgedevs],patches:[{find:'action:"EXPAND_ROLES"',replacement:[{match:/(roles:\i(?=.+?(\i)\(!0\)[,;]\i\({action:"EXPAND_ROLES"}\)).+?\[\i,\2\]=\i\.useState\()!1\)/,replace:(e,t,o)=>`${t}!0)`},{match:/(?<=useLayoutEffect\(\(\)=>{if\()\i/,replace:e=>"false"}]}]});a();T();var s0=w({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}}),gp=h({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[d.zt,d.Trwy],patches:[{find:'="MaskedLinkStore",',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>s0.store.domain},{find:"bitbucket.org",replacement:{match:/function \i\(\i\){(?=.{0,30}pathname:\i)/,replace:"$&return null;"},predicate:()=>s0.store.file}],settings:s0});a();T();E();v();var ZI=ue(".actionBarIcon)");var a0=Symbol("vcAnonymise"),JI=/\.tar\.\w+$/,si=w({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:()=>si.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>si.store.method!==1}}),hp=h({name:"AnonymiseFileNames",authors:[d.fawn],description:"Anonymise uploaded file names",settings:si,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]=C(e[a0]??si.store.anonymiseByDefault);function n(){e[a0]=!t,o(!t)}return r(ZI,{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[a0]??si.store.anonymiseByDefault)===!1)return;let t=e.filename,n=JI.exec(t)?.index??t.lastIndexOf("."),i=n!==-1?t.slice(n):"",s=(()=>{switch(si.store.method){case 0:let l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:si.store.randomisedLength},()=>l[Math.floor(Math.random()*l.length)]).join("")+i;case 1:return si.store.consistent+i;case 2:return Date.now()+i}})();e.filename=s}});a();T();v();var VI=VencordNative.pluginHelpers.AppleMusicRichPresence;var uS="1239490006054207550";function eM(e){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"AppleMusic"})}var Io=w({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 dc(e,t){return e.replaceAll("{name}",t.name).replaceAll("{album}",t.album??"").replaceAll("{artist}",t.artist??"")}function cS(e,t){let o=e==="Album"?t.albumArtwork:t.artistArtwork;if(o)return dn.fetchAssetIds(uS,[o]).then(n=>n[0])}var vp=h({name:"AppleMusicRichPresence",description:"Discord rich presence for your Apple Music!",authors:[d.RyanCaoDev],hidden:!ho,reporterTestable:2,settingsAboutComponent(){return r(p,null,r(x.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:Io,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},Io.store.refreshInterval*1e3)},stop(){clearInterval(this.updateInterval),B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null})},updatePresence(){this.getActivity().then(e=>{eM(e)})},async getActivity(){let e=await VI.fetchTrackData();if(!e)return null;let[t,o]=await Promise.all([cS(Io.store.largeImageType,e),cS(Io.store.smallImageType,e)]),n={},i=Number.isNaN(e.duration)&&e.playerPosition===0;Io.store.largeImageType!=="Disabled"&&(n.large_image=t,i||(n.large_text=dc(Io.store.largeTextString,e))),Io.store.smallImageType!=="Disabled"&&(n.small_image=o,i||(n.small_text=dc(Io.store.smallTextString,e)));let s=[];return Io.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:uS,name:dc(Io.store.nameString,e),details:dc(Io.store.detailsString,e),state:i?void 0:dc(Io.store.stateString,e),timestamps:e.playerPosition&&e.duration&&Io.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:Io.store.activityType,status_display_type:{off:0,artist:1,track:2}[Io.store.statusDisplayType],flags:1}}});a();Wt();T();E();v();var tM=ue('"Invalid Origin"',".application");async function pS(e,t){return(await dn.fetchAssetIds(e,[t]))[0]}var dS={};async function oM(e){let t={};return await tM(t,e),t.application}var oa,bp=h({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[d.Ducko],reporterTestable:2,hidden:!0,settingsAboutComponent:()=>r(p,null,r(x.FormTitle,{tag:"h3"},"How to use arRPC"),r(x.FormText,null,r(De,{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 pS(o.application_id,n.large_image)),n?.small_image&&(n.small_image=await pS(o.application_id,n.small_image)),o){let i=o.application_id;dS[i]||=await oM(i);let s=dS[i];o.name||=s.name}B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if(oa&&oa.close(),oa=new WebSocket("ws://127.0.0.1:1337"),oa.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(oa.readyState===WebSocket.OPEN),5e3))){bn("Failed to connect to arRPC, is it running?","Retry",()=>{Xi(),this.start()});return}q.show({message:"Connected to arRPC",type:q.Type.SUCCESS,id:q.genId(),options:{duration:1e3,position:q.Position.BOTTOM}})},stop(){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),oa?.close()}});a();T();ie();E();v();a();E();v();var mS=Ie("ChannelRTCStore"),rM=pe('("guildsnav")');function nM(){let e=ra.getExpandedFolders(),t=Sp.getGuildFolders(),o=new Set;for(let n of t)e.has(n.folderId)&&n.guildIds?.length&&o.add(n.folderId);return o}var fS=M.wrap(e=>{let t=ne([ra,Sp],()=>nM()),o=ne([mS],()=>mS.isFullscreenInContext()),n=r(rM,{...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||!Et.store.sidebarAnim?i?r("div",{className:"vc-betterFolders-sidebar",style:l},n):null:r(wu.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&r(wu.animated.div,{className:"vc-betterFolders-sidebar",style:{...c,...l}},n))},{noop:!0});var ra=Ie("ExpandedGuildFolderStore"),Sp=Ie("SortedGuildStore"),p0=D("move","toggleGuildFolderExpand"),gS=null,c0=!1;function iM(e){return Sp.getGuildFolders().find(t=>t.guildIds.includes(e))}function u0(){for(let e of ra.getExpandedFolders())p0.toggleGuildFolderExpand(e)}function d0(e,t){if(e==null)return!1;if(!Array.isArray(e))return t(e)?!0:d0(e.props?.children,t);let o=!1;for(let n=0;n<e.length;n++){if(d0(e[n],t)){o=!0;continue}e.splice(n--,1)}return o}var Et=w({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}}),hS="typeof isBetterFolders!=='undefined'?isBetterFolders:arguments[0]?.isBetterFolders",sM="typeof betterFoldersExpandedIds!=='undefined'?betterFoldersExpandedIds:arguments[0]?.betterFoldersExpandedIds",aM="vc-betterFolders-sidebar-grid",xp=h({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[d.juby,d.AutumnVN,d.Nuckyz],settings:Et,patches:[{find:'("guildsnav")',predicate:()=>Et.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,()=>{$&},${hS},${sM});`},{match:/switch\(\i\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,/,replace:`$&isBetterFolders:${hS},`},{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:/unreadMentionsFixedFooter\].+?\}\)\]/,replace:"$&.filter($self.makeGuildsBarSidebarFilter(!!arguments[0]?.isBetterFolders))"}]},{find:".toggleGuildFolderExpand(",predicate:()=>Et.store.sidebar&&Et.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:()=>Et.store.sidebar,replacement:[{predicate:()=>Et.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0]?.isBetterFolders&&${t};`},{predicate:()=>!Et.store.keepIcons,match:/(?=,\{from:\{height)/,replace:"&&$self.shouldShowTransition(arguments[0])"},{predicate:()=>!Et.store.keepIcons,match:/folderGroupBackground.+?,(?=\i\(\(\i,\i,\i\)=>{let{key:.{0,70}"ul")(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}$self.shouldRenderContents(arguments[0],${t})?null:`},{predicate:()=>Et.store.showFolderIcon!==1,match:/\.isExpanded\].{0,110}children:\[/,replace:"$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&"},{predicate:()=>Et.store.showFolderIcon!==1,match:/(?<=\.folderGroupBackground.*?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render:",predicate:()=>Et.store.sidebar,group:!0,replacement:[{match:/(?<=[[,])((?:!?\i&&)+)\(.{0,50}({className:\i\.guilds,themeOverride:\i})\)/g,replace:(e,t,o)=>`${e},${t}$self.FolderSideBar(${o})`},{match:/(?<=className:)\i\.base(?=,)/,replace:`"${aM} "+$&`}]},{find:"#{intl::DISCODO_DISABLED}",predicate:()=>Et.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!Et.store.closeAllFolders&&!Et.store.forceOpen)&&gS!==e.guildId){gS=e.guildId;let t=iM(e.guildId);t?.folderId?Et.store.forceOpen&&!ra.isFolderExpanded(t.folderId)&&p0.toggleGuildFolderExpand(t.folderId):Et.store.closeAllFolders&&u0()}},TOGGLE_GUILD_FOLDER_EXPAND(e){Et.store.closeOthers&&!c0&&(c0=!0,B.wait(()=>{let t=ra.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&p0.toggleGuildFolderExpand(o);c0=!1}))},LOGOUT(){u0()}},FolderSideBar:fS,closeFolders:u0,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{return t?.props?.["aria-label"]===xe("SERVERS")}catch(o){return console.error(o),!0}}},makeGuildsBarSidebarFilter(e){return t=>{if(!e)return!0;try{return d0(t,o=>o?.props?.renderTreeNode!=null)}catch(o){return console.error(o),!0}}},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(Et.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();T();var Tp=h({name:"BetterGifAltText",authors:[d.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:'"onCloseImage",',replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:"#{intl::GIF}",replacement:{match:/alt:(\i)=(\i\.\i\.string\(\i\.\i#{intl::GIF}\))(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}});a();T();var wp=h({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[d.Samwich],patches:[{find:'"state",{resultType:',replacement:[{match:/(?<="state",{resultType:)null/,replace:'"Favorites"'}]}]});a();T();Zo();var m0=w({hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>G.plugins.BetterNotesBox.hide,default:!1}}),Pp=h({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[d.Ven],settings:m0,patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>m0.store.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>{if(t.match(/}=.+/)){let n=e.match(Rt(/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 m0.store.noSpellCheck}});a();Qe();tn();T();ie();E();v();var yS=D("open","selectRole","updateGuild"),lM=Po("appearance","developerMode");function cM(){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 uM(){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 vS=w({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"}]}}),Ip=h({name:"BetterRoleContext",description:"Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile",authors:[d.Ven,d.goodbee],dependencies:["UserSettingsAPI"],settings:vS,start(){lM.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=rn();if(!o)return;let n=bt.getRole(o.id,t);n&&(n.colorString&&e.unshift(r(I.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>to(n.colorString),icon:uM})),Te.getGuildPermissionProps(o).canManageRoles&&e.unshift(r(I.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await yS.open(o.id,"ROLES"),yS.selectRole(t)},icon:cM})),n.icon&&e.push(r(I.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}.${vS.store.roleIconFileFormat}`,height:128,width:128})},icon:dr})))}}});a();T();ie();var Mp=h({name:"BetterRoleDot",authors:[d.Ven,d.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>G.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:"#{intl::ADD_ROLE_A11Y_LABEL}",all:!0,predicate:()=>G.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!G.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",all:!0,predicate:()=>G.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!G.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){rt(e)}});a();T();E();v();a();an();Fe();a();a();v();a();ct();E();var bS=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"})),SS=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"})),xS=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"})),TS=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"})),wS=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"})),PS=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"})),IS=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"})),MS=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"})),NS=Ke(()=>Ms("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"));var kS=()=>`BetterSessions_savedSessions_${k.getCurrentUser().id}`,_o=new Map;function mc(e){return`${e.os} \xB7 ${e.platform}`}function fc(){return Ht(kS(),_o)}async function CS(){(await Gt(kS())||new Map).forEach((t,o)=>{_o.set(o,t)})}function AS(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 RS(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return bS;case"Android Chrome":case"Chrome iOS":case"Chrome":return SS;case"Edge":return xS;case"Firefox":return TS;case"Internet Explorer":return wS;case"Opera Mini":case"Opera":return PS;case"Mobile Safari":case"Safari":return IS;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return NS;default:return MS}}Fe();v();function DS({props:e,session:t,state:o}){let[n,i]=o,[s,l]=se.useState(_o.get(t.id_hash)?.name??"");function c(){_o.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:mc(t.client_info)),fc(),e.onClose()}return r(he,{...e},r(ke,null,r(x.FormTitle,{tag:"h4"},"Rename")),r(Se,null,r(x.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),r(dt,{style:{marginBottom:"10px"},placeholder:mc(t.client_info),value:s,onChange:l,onKeyDown:u=>{u.key==="Enter"&&c()}}),r(R,{style:{marginBottom:"20px",paddingLeft:"1px",paddingRight:"1px",opacity:.6},look:R.Looks.LINK,color:R.Colors.LINK,size:R.Sizes.NONE,onClick:()=>l("")},"Reset Name")),r(yt,null,r("div",{className:"vc-betterSessions-footer-buttons"},r(R,{color:R.Colors.PRIMARY,onClick:()=>e.onClose()},"Cancel"),r(R,{color:R.Colors.BRAND,onClick:c},"Save"))))}function LS({session:e,state:t}){return r(Ur,{variant:"secondary",size:"xs",className:"vc-betterSessions-rename-btn",onClick:()=>de(o=>r(DS,{props:o,session:e,state:t}))},"Rename")}var pM=Ie("AuthSessionsStore"),dM=D("saveAccountChanges","open"),mM=D("timestamp","blockquoteContainer"),fM=D("sessionIcon"),gM=pe("!1,lowerBadgeSize:"),f0=w({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}}),Np=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:[d.amia],settings:f0,patches:[{find:"#{intl::AUTH_SESSIONS_SESSION_LOG_OUT}",replacement:[{match:/({variant:"eyebrow",className:\i\.sessionInfoRow,children:).{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:\i\[\d+\]}\)\]}\)\]/,replace:"$1$self.renderName(arguments[0])"},{match:/({variant:"text-sm\/medium",className:\i\.sessionInfoRow,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/,replace:"$1$self.renderTimestamp({ ...arguments[0], timeLabel: $2 })}"},{match:/\.currentSession:null\),children:\[(?<=,icon:(\i)\}.+?)/,replace:"$& $self.renderIcon({ ...arguments[0], DeviceIcon: $1 }), false &&"}]}],renderName:M.wrap(({session:e})=>{let t=_o.get(e.id_hash),o=se.useState(t?.name?`${t.name}*`:mc(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(LS,{session:e,state:o}))},{noop:!0}),renderTimestamp:M.wrap(({session:e,timeLabel:t})=>r(Q,{text:e.approx_last_used_time.toLocaleString()},o=>r("span",{...o,className:mM.timestamp},t)),{noop:!0}),renderIcon:M.wrap(({session:e,DeviceIcon:t})=>{let o=RS(e.client_info.platform);return r(gM,{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, var(--interactive-normal))",color:"var(--background-base-lower)"}},r(o,{width:14,height:14})),lowerBadgeSize:{width:20,height:20}},r("div",{className:fM.sessionIcon,style:{backgroundColor:AS(e.client_info.os)}},r(t,{size:"md",color:"currentColor"})))},{noop:!0}),async checkNewSessions(){let e=await wt.get({url:vt.Endpoints.AUTH_SESSIONS});for(let t of e.body.user_sessions)_o.has(t.id_hash)||(_o.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:()=>dM.open("Sessions")}));fc()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=pM.getSessions().map(t=>t.id_hash);e.forEach(t=>{_o.has(t)||_o.set(t,{name:"",isNew:!1})}),e.length>0&&_o.forEach((t,o)=>{e.includes(o)||_o.delete(o)}),_o.forEach(t=>{t.isNew=!1}),fc()}},async start(){await CS(),this.checkNewSessions(),f0.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,f0.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}});a();ve();a();ct();v();a();T();E();v();var hM=pe(".HEADER_BAR_BADGE_TOP:",'.iconBadge,"top"'),g0=w({showPluginMenu:{type:3,default:!0,description:"Show the plugins menu in the toolbox"}});function yM({isShown:e}){return r("svg",{viewBox:"0 0 27 27",width:24,height:24,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 vM({buttonClass:e}){let t=nt(null),[o,n]=C(!1);return r(Bs,{position:"bottom",align:"right",animation:Bs.Animation.NONE,shouldShow:o,onRequestClose:()=>n(!1),targetElementRef:t,renderPopout:()=>OS(()=>n(!1))},(i,{isShown:s})=>r(hM,{ref:t,className:`vc-toolbox-btn ${e}`,onClick:()=>n(l=>!l),tooltip:s?null:"Vencord Toolbox",icon:()=>r(yM,{isShown:s}),selected:s}))}var rs=h({name:"VencordToolbox",description:"Adds a button to the titlebar that houses Vencord quick actions",authors:[d.Ven,d.AutumnVN],settings:g0,patches:[{find:'?"BACK_FORWARD_NAVIGATION":',replacement:{match:/(?<=trailing:.{0,50})\i\.Fragment,\{(?=.+?className:(\i))/,replace:"$self.TrailingWrapper,{className:$1,"}}],TrailingWrapper({children:e,className:t}){return r(p,null,e,r(M,{noop:!0},r(vM,{buttonClass:t})))}});function bM(){let{showPluginMenu:e}=g0.use(["showPluginMenu"]),t=h0();return e?r(I.MenuItem,{id:"plugins",label:"Plugins",action:()=>hn(ts)},t):null}function h0(e=!1){let t=Oe().plugins,[o,n]=C(""),i=o.toLowerCase(),s=le(()=>Object.values(je).sort((c,u)=>c.name.localeCompare(u.name)),[]),l=le(()=>s.filter(c=>!Ne(c.name)||c.name.endsWith("API")?!1:c.name.toLowerCase().includes(i)),[i]);return r(p,null,r(I.MenuControlItem,{id:"plugins-search",control:(c,u)=>r(I.MenuSearchControl,{...c,query:o,onChange:n,ref:u})}),r(I.MenuSeparator,null),l.map(c=>{let u=[],m=!1;if(c.options)for(let[y,b]of Object.entries(c.options)){if("hidden"in b&&b.hidden)continue;m=!0;let P=t[c.name],S={id:`${c.name}-${y}`,key:y,label:yn(Ll(y)),disabled:"disabled"in b?b.disabled?.call(c.settings):!1};switch(b.type){case 3:u.push(r(I.MenuCheckboxItem,{...S,checked:P[y],action:()=>{P[y]=!P[y],b.restartNeeded&&Re("Restart to apply the change")}}));break;case 4:u.push(r(I.MenuItem,{...S},b.options.map(_=>r(I.MenuRadioItem,{group:`${c.name}-${y}`,id:`${c.name}-${y}-${_.value}`,key:_.label,label:_.label,checked:P[y]===_.value,action:()=>{P[y]=_.value,b.restartNeeded&&Re("Restart to apply the change")}}))));break;case 5:if(b.stickToMarkers||b.componentProps)continue;u.push(r(I.MenuControlItem,{...S,control:(_,N)=>r(I.MenuSliderControl,{ref:N,..._,minValue:b.markers[0],maxValue:b.markers.at(-1),value:P[y],onChange:U=>P[y]=U})}));break}}let f=u.length>0;return!f&&!(e&&m)?null:r(I.MenuItem,{id:`${c.name}-menu`,key:c.name,label:c.name,action:()=>sr(c)},f&&r(p,null,r(I.MenuGroup,{label:c.name},u),r(I.MenuSeparator,null),r(I.MenuItem,{id:`${c.name}-open`,label:"Open Settings",action:()=>sr(c)})))}))}function SM(){return r(I.MenuItem,{id:"themes",label:"Themes",action:()=>hn(ii)},y0())}function y0(){let{useQuickCss:e,enabledThemes:t}=Oe(["useQuickCss","enabledThemes"]),[o]=ht(VencordNative.themes.getThemesList);return r(p,null,r(I.MenuCheckboxItem,{id:"toggle-quickcss",checked:e,label:"Enable QuickCSS",action:()=>{G.useQuickCss=!e}}),r(I.MenuItem,{id:"edit-quickcss",label:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),r(I.MenuItem,{id:"manage-themes",label:"Manage Themes",action:()=>hn(ii)}),!!o?.length&&r(I.MenuGroup,null,o.map(n=>r(I.MenuCheckboxItem,{id:`theme-${n.fileName}`,key:n.fileName,label:n.name,checked:t.includes(n.fileName),action:()=>{t.includes(n.fileName)?G.enabledThemes=t.filter(i=>i!==n.fileName):G.enabledThemes=[...t,n.fileName]}}))))}function xM(){let e=[];for(let o of Object.values(je))if(o.toolboxActions&&Ne(o.name)){let n=typeof o.toolboxActions=="function"?o.toolboxActions():Object.entries(o.toolboxActions).map(([i,s])=>{let l=`${o.name}-${i}`;return r(I.MenuItem,{id:l,key:l,label:i,action:s})});if(!n||Array.isArray(n)&&n.length===0)continue;e.push({plugin:o,node:r(I.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(I.MenuItem,{id:`${n.name}-menu`,key:`${n.name}-menu`,label:n.name,action:()=>sr(n)},o));return r(I.MenuGroup,null,t)}function OS(e){return r(I.Menu,{navId:"vc-toolbox",onClose:e},r(I.MenuItem,{id:"notifications",label:"Open Notification Log",action:Js}),SM(),bM(),xM())}T();ae();E();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 v0="src/plugins/betterSettings/fullHeightContext.css";var TM=Y(""),kp;Ae(["animating","baseLayer","bg","layer","layers"],e=>kp=e);var ns=w({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 wM({mode:e,baseLayer:t=!1,...o}){let n=e==="HIDDEN",i=nt(null);X(()=>()=>{Co.dispatch("LAYER_POP_START"),Co.dispatch("LAYER_POP_COMPLETE")},[]);let s=r("div",{ref:i,"aria-hidden":n,className:TM({[kp.layer]:!0,[kp.baseLayer]:t,"stop-animations":n}),style:{opacity:n?0:void 0},...o});return t?s:r(Tu,{containerRef:i},s)}var Cp=h({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[d.Kyuuhachi],settings:ns,start(){ns.store.organizeMenu&&Yt(v0)},stop(){go(v0)},patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=\((\i),"contextType",\i\.\i\);)/,replace:"$1=$self.Layer;",predicate:()=>ns.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>ns.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:()=>ns.store.disableFade},{find:"#{intl::USER_SETTINGS_WITH_BUILD_OVERRIDE}",replacement:{match:/(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await [^};]*?\)\)).*?,(?=\1\(this)/,replace:"$&(async ()=>$2)(),"},predicate:()=>ns.store.eagerLoad},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",replacement:[{match:/=\[\];if\((\i)(?=\.forEach.{0,100}"logout"!==\i.{0,30}(\i)\.get\(\i\))/,replace:"=$self.wrapMap([]);if($self.transformSettingsEntries($1,$2)",predicate:()=>ns.store.organizeMenu},{match:/case \i\.\i\.DEVELOPER_OPTIONS:return \i;/,replace:"$&case 'VencordPlugins':return $self.buildPluginMenuEntries(true);$&case 'VencordThemes':return $self.buildThemeMenuEntries();"}]}],buildPluginMenuEntries:h0,buildThemeMenuEntries:y0,Layer(e){try{[Tu.$$vencordGetWrappedComponent(),Co,kp].forEach(t=>t.test)}catch{return new F("BetterSettings").error("Failed to find some components"),e.children}return r(wM,{...e})},transformSettingsEntries(e,t){let o=[];for(let n of e)n.section==="HEADER"?(t.set(n.label,n.label),o.push({section:n.label,items:[]})):n.section!=="DIVIDER"&&t.has(n.section)&&o.at(-1)?.items.push(n);return o},wrapMap(e){return e.map=function(t){return this.filter(o=>o.items.length>0).map(({section:o,items:n})=>{let i=n.map(t);return o?r(I.MenuItem,{key:o,id:o.replace(/\W/,"_"),label:o},i):i})},e}});a();T();var Ap=h({name:"BetterUploadButton",authors:[d.fawn,d.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();Qe();T();ie();v();a();E();var _S=Ie("ApplicationStreamPreviewStore"),BS=Ie("ApplicationStreamingStore");var PM=async({guildId:e,channelId:t,ownerId:o})=>{let n=await _S.getPreviewURL(e,t,o);n&&zo({url:n,height:720,width:1280})},ES=(e,{userId:t})=>{let o=BS.getAnyStreamForUser(t);if(!o)return;let n=r(I.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:ph,action:()=>o&&PM(o),disabled:!o});e.push(r(I.MenuSeparator,null),n)},IM=(e,{stream:t})=>ES(e,{userId:t.ownerId}),MM=(e,{user:t})=>{if(t)return ES(e,{userId:t.id})},Rp=h({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[d.phil],contextMenus:{"user-context":MM,"stream-context":IM}});a();T();var gc;function US(){gc.textContent=`
|
|
.vc-nsfw-img [class^=imageContainer],
|
|
.vc-nsfw-img [class^=wrapperPaused] {
|
|
filter: blur(${G.plugins.BlurNSFW.blurAmount}px);
|
|
transition: filter 0.2s;
|
|
|
|
&:hover {
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
`}var Dp=h({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[d.Ven],patches:[{find:"}renderEmbeds(",replacement:[{match:/\.container/,replace:"$&+(this.props.channel.nsfw? ' vc-nsfw-img': '')"}]}],options:{blurAmount:{type:1,description:"Blur Amount (in pixels)",default:10,onChange:US}},start(){gc=document.createElement("style"),gc.id="VcBlurNsfw",document.head.appendChild(gc),US()},stop(){gc?.remove()}});a();T();ct();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 FS="src/plugins/callTimer/alignedChatInputFix.css";function NM(e){let t=G.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),m="";return s&&(m+=`${s}d `),(l||m)&&(m+=`${o(l)}${n("h")}${i}`),(c||m||!t)&&(m+=`${o(c)}${n("m")}${i}`),m+=`${o(u)}${n("s")}`,m}var Lp=h({name:"CallTimer",description:"Adds a timer to vcs",authors:[d.Ven],managedStyle:FS,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=nl({deps:[e]});return r("p",{style:{margin:0,fontFamily:"var(--font-code)"}},NM(t))}});a();T();var kM="https://raw.githubusercontent.com/ClearURLs/Rules/master/data.min.json",Op=h({name:"ClearURLs",description:"Automatically removes tracking elements from URLs you send",authors:[d.adryd,d.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(kM).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,m)=>{s.some(f=>f.test(m))&&l.push(m)}),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();T();var _p=h({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[d.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'$1status_$:$2="online"'}}]});a();T();v();var Mr=()=>{},CM={logDangerously:Mr,log:Mr,verboseDangerously:Mr,verbose:Mr,info:Mr,warn:Mr,error:Mr,trace:Mr,time:Mr,fileOnly:Mr},is=new Set;function AM({settingKey:e}){let{allowLevel:t}=ss.use(["allowLevel"]),o=t[e];return r(kh,{value:o,onChange:(n,i)=>ss.store.allowLevel[e]=i,size:20},r(H,{variant:"text-sm/normal"},e[0].toUpperCase()+e.slice(1)))}var RM=M.wrap(()=>r(ir,{name:"Filter List",description:"Always allow loggers of these types"},r("div",{style:{display:"flex",flexDirection:"row"}},Object.keys(ss.store.allowLevel).map(e=>r(AM,{key:e,settingKey:e}))))),ss=w({disableLoggers:{type:3,description:"Disables Discords loggers",default:!1,restartNeeded:!0},disableSpotifyLogger:{type:3,description:"Disable the Spotify logger, which leaks account information and access token",default:!0,restartNeeded:!0},whitelistedLoggers:{type:0,description:"Semi colon separated list of loggers to allow even if others are hidden",default:"GatewaySocket; Routing/Utils",onChange(e){is.clear(),e.split(";").map(t=>t.trim()).forEach(is.add.bind(is))}},allowLevel:{type:6,component:RM,default:{error:!0,warn:!1,trace:!1,log:!1,info:!1,debug:!1}}}),Bp=h({name:"ConsoleJanitor",description:"Disables annoying console messages/errors",authors:[d.Nuckyz,d.sadan],settings:ss,startAt:"Init",start(){is.clear(),this.settings.store.whitelistedLoggers?.split(";").map(e=>e.trim()).forEach(is.add.bind(is))},Noop:Mr,NoopLogger:()=>CM,shouldLog(e,t){return is.has(e)||ss.store.allowLevel[t]===!0},patches:[{find:"https://github.com/highlightjs/highlight.js/issues/2277",replacement:{match:/\(console.log\(`Deprecated.+?`\),/,replace:"("}},{find:'The "interpolate" function is deprecated in v10 (use "to" instead)',replacement:{match:/,console.warn\(\i\+'The "interpolate" function is deprecated in v10 \(use "to" instead\)'\)/,replace:""}},{find:'console.warn("Window state not initialized"',replacement:{match:/console\.warn\("Window state not initialized",\i\),/,replace:""}},{find:"is not a valid locale.",replacement:{match:/\i\.error(?=\(""\.concat\(\i," is not a valid locale."\)\))/,replace:"$self.Noop"}},{find:'"AppCrashedFatalReport: getLastCrash not supported."',replacement:{match:/console\.log(?=\("AppCrashedFatalReport: getLastCrash not supported\."\))/,replace:"$self.Noop"}},{find:"RPCServer:WSS",replacement:{match:/\i\.error\("Error: "\.concat\((\i)\.message/,replace:'!$1.message.includes("EADDRINUSE")&&$&'}},{find:"Tried getting Dispatch instance before instantiated",replacement:{match:/null==\i&&\i\.warn\("Tried getting Dispatch instance before instantiated"\),/,replace:""}},{find:"Unable to determine render window for element",replacement:{match:/console\.warn\("Unable to determine render window for element",\i\),/,replace:""}},{find:"failed to send analytics events",replacement:{match:/console\.error\("\[analytics\] failed to send analytics events query: "\.concat\(\i\)\)/,replace:""}},{find:"Slow dispatch on",replacement:{match:/\i\.totalTime>\i&&\i\.verbose\("Slow dispatch on ".+?\)\);/,replace:""}},{find:'"file-only"!==',predicate:()=>ss.store.disableLoggers,replacement:{match:/(?<=&&)(?=console)/,replace:"$self.shouldLog(arguments[0],arguments[1])&&"}},{find:'("Spotify")',predicate:()=>ss.store.disableSpotifyLogger,replacement:{match:/new \i\.\i\("Spotify"\)/,replace:"$self.NoopLogger()"}}]});a();T();ie();Ps();$o();te();Fe();Zo();E();E();v();a();ae();Zo();E();E();var Ep=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));function b0(){function e(s){let l=new Map;return function(...c){let u=String(c);if(l.has(u))return l.get(u);let m=En(s(...c)),f=(()=>{switch(m.length){case 0:return null;case 1:return m[0];default:let g=[...new Set(m)];return g.length>1&&console.warn(`Warning: This filter matches ${g.length} exports. Make it more specific!
|
|
`,g),m[0]}})();return f&&u&&l.set(u,f),f}}function t(s){let l=new Map;return function(c){let u=String(c);if(l.has(u))return l.get(u);let m;try{m=s(c)}catch{}return m&&l.set(u,m),m}}let o,n=e(s=>s),i=e(O.byProps);return{...Object.fromEntries(Object.keys($n).map(s=>[s,{getter:()=>$n[s]}])),wp:fu,wpc:{getter:()=>Jo},wreq:{getter:()=>pt},wpPatcher:{getter:()=>Vencord.WebpackPatcher},wpInstances:{getter:()=>Vencord.WebpackPatcher.allWebpackInstances},wpsearch:Ns,wpex:rl,wpexs:s=>rl(Fn(s)),loadLazyChunks:()=>{throw new Error("loadLazyChunks is dev only.")},find:n,findAll:En,findByProps:i,findAllByProps:(...s)=>En(O.byProps(...s)),findByCode:e(O.byCode),findAllByCode:s=>En(O.byCode(s)),findComponentByCode:e(O.componentByCode),findAllComponentsByCode:(...s)=>En(O.componentByCode(...s)),findExportedComponent:(...s)=>i(...s)[s[0]],findStore:t(ol),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:_t,canonicalizeMatch:Rt,canonicalizeReplace:Za,canonicalizeReplacement:Ti,runtimeHashMessageKey:Xr,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 m=u.document;m.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"?m.head.append(y):y.id?.startsWith("vencord-")||y.id?.startsWith("vcd-")?m.documentElement.append(y):m.body.append(y)}));let f=Oi(m.body.appendChild(document.createElement("div")));f.render(se.createElement(s,l)),m.addEventListener("close",()=>f.unmount(),{once:!0})},preEnable:s=>(Vencord.Settings.plugins[s]??={enabled:!0}).enabled=!0,channel:{getter:()=>Ho(),preload:!1},channelId:{getter:()=>Be.getChannelId(),preload:!1},guild:{getter:()=>rn(),preload:!1},guildId:{getter:()=>oo.getGuildId(),preload:!1},me:{getter:()=>k.getCurrentUser(),preload:!1},meId:{getter:()=>k.getCurrentUser().id,preload:!1},messages:{getter:()=>jt.getMessages(Be.getChannelId()),preload:!1},openModal:{getter:()=>il.openModal},openModalLazy:{getter:()=>il.openModalLazy},Stores:{getter:()=>Object.fromEntries(_r)},setExperiment:(s,l)=>{B.dispatch({type:"EXPERIMENT_OVERRIDE_BUCKET",experimentId:s,experimentBucket:l})}}}function $S(e,t,o){let n=t.getter();if(!n||t.preload===!1)return n;function i(l){if(l[cr])o?n[cr]():n[Zr];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 m=s[c],f=i(m);f!=null&&m!==f&&(s[c]=f)}}}return s!=null&&(Ep(window.shortcutList,e,{value:s}),Ep(window,e,{value:s})),s}var DM=Is.then(()=>ur(1e3)),Up=h({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[d.Ven],startAt:"Init",patches:[{find:'this,"_changeCallbacks",',replacement:{match:/\i\(this,"_changeCallbacks",/,replace:"Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&"}}],start(){let e=b0();window.shortcutList={};for(let[t,o]of Object.entries(e))"getter"in o?(Ep(window.shortcutList,t,{get:()=>$S(t,o,!0)}),Ep(window,t,{get:()=>window.shortcutList[t]})):(window.shortcutList[t]=o,window[t]=o);this.eagerLoad(!1),VencordNative.pluginHelpers.ConsoleShortcuts.initDevtoolsOpenEagerLoad()},async eagerLoad(e){await DM;let t=b0();for(let[o,n]of Object.entries(t))if(!(!Object.hasOwn(n,"getter")||n.preload===!1))try{$S(o,n,e)}catch{}},stop(){delete window.shortcutList;for(let e in b0())delete window[e]}});a();T();ie();E();v();var{convertNameToSurrogate:LM}=D("convertNameToSurrogate");function OM(e,t){let{id:o,name:n}=e.dataset;if(!o)return t?LM(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 GS=w({copyUnicode:{type:3,description:"Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",default:!0}}),Fp=h({name:"CopyEmojiMarkdown",description:"Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",authors:[d.HappyEnderman,d.Vishnya],settings:GS,contextMenus:{"expression-picker"(e,{target:t}){t.dataset.type==="emoji"&&e.push(r(I.MenuItem,{id:"vc-copy-emoji-markdown",label:"Copy Emoji Markdown",action:()=>{rt(OM(t,GS.store.copyUnicode),"Success! Copied emoji markdown.")}}))}}});a();Qe();T();ie();v();var _M=()=>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"})),$p=h({name:"CopyFileContents",description:"Adds a button to text file attachments to copy their contents",authors:[d.Obsidian,d.Nuckyz],patches:[{find:"#{intl::PREVIEW_BYTES_LEFT}",replacement:{match:/\.footerGap.+?url:\i,fileName:\i,fileSize:\i}\),(?<=fileContents:(\i),bytesLeft:(\i).+?)/g,replace:"$&$self.addCopyButton({fileContents:$1,bytesLeft:$2}),"}}],addCopyButton:M.wrap(({fileContents:e,bytesLeft:t})=>{let[o,n]=C(!1);return r(Q,{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&&(rt(e),n(!0),setTimeout(()=>n(!1),2e3))}},o?r(_M,null):t>0?r(fl,{color:"var(--channel-icon)"}):r(sn,null)))},{noop:!0})});a();a();T();ie();ae();Fe();E();v();var EM=ue(".GUILD_EMOJIS(","EMOJI_UPLOAD_START"),UM=ue(".additionalEmojiSlots"),FM={1:"png",2:"png",3:"json",4:"gif"},HS={0:5,1:15,2:30,3:60};function $M(e){return e.features.has("MORE_STICKERS")&&e.premiumTier===3?120:HS[e.premiumTier]??HS[0]}function S0(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}?size=4096&lossless=true`:`${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${FM[e.format_type]}?size=4096&lossless=true`}async function zS(e){let t=ao.getStickerById(e);if(t)return t;let{body:o}=await wt.get({url:vt.Endpoints.STICKER(e)});return B.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function GM(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await WS(S0(t)));let{body:n}=await wt.post({url:vt.Endpoints.GUILD_STICKER_PACKS(e),body:o});B.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...n,user:k.getCurrentUser()}})}async function HM(e,t){let o=await WS(S0(t)),n=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return EM({guildId:e,name:t.name.split("~")[0],image:n})}function zM(e){let t=k.getCurrentUser().id;return Object.values(Me.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Te.getGuildPermissions({id:o.id})&ce.CREATE_GUILD_EXPRESSIONS)===ce.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker"){let u=$M(o),m=ao.getStickersByGuildId(o.id);return!m||m.length<u}let{isAnimated:i}=e,s=UM(o),l=er.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 WS(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function WM(e,t){try{t.t==="Sticker"?await GM(e,t):await HM(e,t),q.show({message:`Successfully cloned ${t.name} to ${Me.getGuild(e)?.name??"your server"}!`,type:q.Type.SUCCESS,id:q.genId()})}catch(o){let n="Something went wrong (check console!)";try{n=JSON.parse(o.text).message}catch{}new F("ExpressionCloner").error("Failed to clone",t.name,"to",e,o),q.show({message:"Failed to clone: "+n,type:q.Type.FAILURE,id:q.genId()})}}var jM=e=>[20,20,18,18,16,14,12][e.length]??4,qM=/^\w+$/i;function KM({data:e}){let[t,o]=se.useState(!1),[n,i]=se.useState(e.name),[s,l]=se.useReducer(u=>u+1,0),c=se.useMemo(()=>zM(e),[e.id,s]);return r(p,null,r(x.FormTitle,{className:A.top20},"Custom Name"),r(sc,{value:n,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&qM.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(Q,{key:u.id,text:u.name},({onMouseLeave:m,onMouseEnter:f})=>r("div",{onMouseLeave:m,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),WM(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?r("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:Pt.getGuildIconURL({id:u.id,icon:u.icon,canAnimate:!0,size:512}),alt:u.name}):r(x.FormText,{style:{fontSize:jM(Ds(u)),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},Ds(u)))))))}function Gp(e,t){return r(I.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>sl(async()=>{let o=await t(),n={t:e,...o},i=S0(n);return s=>r(he,{...s},r(ke,null,r("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),r(x.FormText,null,"Clone ",n.name)),r(Se,null,r(KM,{data:n})))})})}function jS(e){let t=new URL(e);return t.pathname.endsWith(".gif")||t.searchParams.get("animated")==="true"}var YM=(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 m=(c&&c[1])??u?.emoji.name??"FakeNitroEmoji";return Gp("Emoji",()=>({id:o,name:m,isAnimated:jS(n??i)}));case"sticker":return t.message.stickerItems.find(g=>g.id===o)?.format_type===3?void 0:Gp("Sticker",()=>zS(o))}})();l&&Ge("copy-link",e)?.push(l)},ZM=(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(Gp("Emoji",()=>({id:o,name:n,isAnimated:s&&jS(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(Gp("Sticker",()=>zS(o)))};br("ExpressionCloner","EmoteCloner");var na=h({name:"ExpressionCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner","EmoteCloner","EmojiCloner"],authors:[d.Ven,d.Nuckyz],contextMenus:{message:YM,"expression-picker":ZM}});T();ie();v();var JM=[,"png","png","json","gif"];function qS(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}.${JM[e.format_type]}?size=512&lossless=true`}function KS(e,t){return r(p,null,r(I.MenuGroup,null,r(I.MenuItem,{id:"vc-copy-sticker-link",key:"vc-copy-sticker-link",label:"Copy Link",action:()=>rt(qS(e),"Link copied!")}),r(I.MenuItem,{id:"vc-open-sticker-link",key:"vc-open-sticker-link",label:"Open Link",action:()=>VencordNative.native.openExternal(qS(e))})),t&&r(I.MenuSeparator,null))}var QM=(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)&&Ge("vc-copy-sticker-url",l)!=null);e.splice(s,0,KS(i,s!==-1))},XM=(e,t)=>{let o=t?.target?.dataset?.id;if(!o||t.target.className?.includes("lottieCanvas"))return;let n=ao.getStickerById(o);n&&e.push(KS(n,Ne(na.name)))},Hp=h({name:"CopyStickerLinks",description:"Adds the ability to copy & open Sticker links",authors:[d.Ven,d.Byeoon],contextMenus:{message:QM,"expression-picker":XM}});a();Qe();tn();T();v();var VM=(e,{user:t})=>{t&&e.push(r(I.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>to(`<https://discord.com/users/${t.id}>`),icon:ki}))},zp=h({name:"CopyUserURLs",authors:[d.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":VM}});a();T();ae();Fe();E();v();var Nr=new F("CrashHandler"),{ModalStack:e8,DraftManager:t8}=ko(()=>{let[e,t]=Un(O.byProps("pushLazy","popAll"),O.byProps("clearDraft","saveDraft"));return{ModalStack:e,DraftManager:t}}),x0=w({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}}),YS=!1,T0=!1,w0=!0,Wp=h({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[d.Nuckyz],enabledByDefault:!0,settings:x0,patches:[{find:"#{intl::ERRORS_UNEXPECTED_CRASH}",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!T0&&(T0=!0,setTimeout(()=>{try{if(!w0){try{qe({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}w0=!1,setTimeout(()=>w0=!0,1e3)}catch{}try{YS||(YS=!0,Al("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{x0.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){Nr.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=Be.getChannelId();for(let o in $t)Number.isNaN(Number(o))&&t8.clearDraft(t,$t[o])}catch(t){Nr.debug("Failed to clear drafts.",t)}try{Nl.closeExpressionPicker()}catch(t){Nr.debug("Failed to close expression picker.",t)}try{B.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){Nr.debug("Failed to close open context menu.",t)}try{e8.popAll()}catch(t){Nr.debug("Failed to close old modals.",t)}try{Er()}catch(t){Nr.debug("Failed to close all open modals.",t)}try{B.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){Nr.debug("Failed to close user popout.",t)}try{B.dispatch({type:"LAYER_POP_ALL"})}catch(t){Nr.debug("Failed to pop all layers.",t)}try{B.dispatch({type:"DEV_TOOLS_SETTINGS_UPDATE",settings:{displayTools:!1,lastOpenTabId:"analytics"}})}catch(t){Nr.debug("Failed to close DevTools.",t)}if(x0.store.attemptToNavigateToHome)try{hr.transitionToGuild("@me")}catch(t){Nr.debug("Failed to navigate to home",t)}setImmediate(()=>T0=!1);try{e.setState({error:null,info:null})}catch(t){Nr.debug("Failed to update crash handler component.",t)}}});a();T();var jp=h({name:"CtrlEnterSend",authors:[d.UlyssesZhan],description:"Use Ctrl+Enter to send messages (customizable)",settings:w({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=ho?e.metaKey:e.ctrlKey;break;case"enter":o=!e.shiftKey&&!e.ctrlKey;break}return this.settings.store.sendMessageInTheMiddleOfACodeBlock||(o&&=!t),o}});a();T();v();var P0=w({idleTimeout:{description:"Minutes before Discord goes idle (0 to disable auto-idle)",type:5,markers:Xt(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}}),qp=h({name:"CustomIdle",description:"Allows you to set the time before Discord goes idle (or disable auto-idle)",authors:[d.newwares],settings:P0,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(!P0.store.remainInIdle){B.dispatch({type:"IDLE",idle:!1});return}let e="Welcome back! Click the button to go online. Click the X to stay idle until reload.";Qi?.[1]===e||Yl.some(([,t])=>t===e)||bn(e,"Exit idle",()=>{Xi(),B.dispatch({type:"IDLE",idle:!1})})},getIdleTimeout(){let{idleTimeout:e}=P0.store;return e===0?1/0:e*6e4}});a();Jt();Wt();T();te();ct();E();v();a();ve();Jt();cn();v();var yc=Y("vc-customRPC-settings-"),Jp=(e,t=!1)=>o=>t&&!o?"This field is required.":o.length>e?`Must be not longer than ${e} characters.`:!0,Kp=Jp(128);function o8(e){return/^\d{16,21}$/.test(e)?!0:"Must be a valid Discord ID."}var r8=qt(()=>{vc(!0),Ne(sa.name)&&vc()});function n8(){return kr.store.type!==1}function i8(e){return!n8()&&!/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 Yp(e){return e?parseInt(e,10):0}function Zp(e){return isNaN(e)?"Must be a number.":e<0?"Must be a positive number.":!0}function ia(e){return e&&!/^https?:\/\/.+/.test(e)?"Must be a valid URL.":!0}function ZS(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 wn(e){let[t,o]=e.data;return r("div",{className:yc("pair")},r(hc,{...t}),r(hc,{...o}))}function hc({settingsKey:e,label:t,disabled:o,isValid:n,transform:i}){let[s,l]=C(kr.store[e]??""),[c,u]=C(null);function m(f){i&&(f=i(f));let g=n?.(f)??!0;l(f),u(nr(g)),g===!0&&(kr.store[e]=f,r8())}return r("div",{className:yc("single",{disabled:o})},r(Ao,{tag:"h5"},t),r(dt,{type:"text",placeholder:"Enter a value",value:s,onChange:m,disabled:o}),c&&r(H,{className:yc("error"),variant:"text-sm/normal"},c))}function JS({settingsKey:e,label:t,options:o,disabled:n}){return r("div",{className:yc("single",{disabled:n})},r(Ao,{tag:"h5"},t),r(Ro,{placeholder:"Select an option",options:o,maxVisibleItems:5,closeOnSelect:!0,select:i=>kr.store[e]=i,isSelected:i=>i===kr.store[e],serialize:i=>String(i),isDisabled:n}))}function QS(){let e=kr.use();return r("div",{className:yc("root")},r(JS,{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(wn,{data:[{settingsKey:"appID",label:"Application ID",isValid:o8},{settingsKey:"appName",label:"Application Name",isValid:Jp(128,!0)}]}),r(wn,{data:[{settingsKey:"details",label:"Detail (line 1)",isValid:Kp},{settingsKey:"detailsURL",label:"Detail URL",isValid:ia}]}),r(wn,{data:[{settingsKey:"state",label:"State (line 2)",isValid:Kp},{settingsKey:"stateURL",label:"State URL",isValid:ia}]}),r(hc,{settingsKey:"streamLink",label:"Stream Link (Twitch or YouTube, only if activity type is Streaming)",disabled:e.type!==1,isValid:i8}),r(wn,{data:[{settingsKey:"partySize",label:"Party Size",transform:Yp,isValid:Zp,disabled:e.type!==0},{settingsKey:"partyMaxSize",label:"Maximum Party Size",transform:Yp,isValid:Zp,disabled:e.type!==0}]}),r(Ee,null),r(wn,{data:[{settingsKey:"imageBig",label:"Large Image URL/Key",isValid:ZS},{settingsKey:"imageBigTooltip",label:"Large Image Text",isValid:Kp}]}),r(hc,{settingsKey:"imageBigURL",label:"Large Image clickable URL",isValid:ia}),r(wn,{data:[{settingsKey:"imageSmall",label:"Small Image URL/Key",isValid:ZS},{settingsKey:"imageSmallTooltip",label:"Small Image Text",isValid:Kp}]}),r(hc,{settingsKey:"imageSmallURL",label:"Small Image clickable URL",isValid:ia}),r(Ee,null),r(wn,{data:[{settingsKey:"buttonOneText",label:"Button1 Text",isValid:Jp(31)},{settingsKey:"buttonOneURL",label:"Button1 URL",isValid:ia}]}),r(wn,{data:[{settingsKey:"buttonTwoText",label:"Button2 Text",isValid:Jp(31)},{settingsKey:"buttonTwoURL",label:"Button2 URL",isValid:ia}]}),r(Ee,null),r(JS,{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(wn,{data:[{settingsKey:"startTime",label:"Start Timestamp (in milliseconds)",transform:Yp,isValid:Zp,disabled:e.timestampMode!==3},{settingsKey:"endTime",label:"End Timestamp (in milliseconds)",transform:Yp,isValid:Zp,disabled:e.timestampMode!==3}]}))}var s8=ue("profileThemeStyle:","--profile-gradient-primary-color"),a8=pe(".party?(0",".card"),XS=Po("status","showCurrentGame");async function VS(e){return(await dn.fetchAssetIds(kr.store.appID,[e]))[0]}var kr=w({config:{type:6,component:QS}}).withPrivateSettings();async function ex(){let{appID:e,appName:t,details:o,detailsURL:n,state:i,stateURL:s,type:l,streamLink:c,startTime:u,endTime:m,imageBig:f,imageBigURL:g,imageBigTooltip:y,imageSmall:b,imageSmallURL:P,imageSmallTooltip:S,buttonOneText:_,buttonOneURL:N,buttonTwoText:U,buttonTwoURL:j,partyMaxSize:z,partySize:J,timestampMode:me}=kr.store;if(!t)return;let W={application_id:e||"0",name:t,state:i,details:o,type:l??0,flags:1};switch(l===1&&(W.url=c),me){case 1:W.timestamps={start:Date.now()};break;case 2:W.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(u||m)&&(W.timestamps={},u&&(W.timestamps.start=u),m&&(W.timestamps.end=m));break;case 0:default:break}n&&(W.details_url=n),s&&(W.state_url=s),_&&(W.buttons=[_,U].filter(Xn),W.metadata={button_urls:[N,j].filter(Xn)}),f&&(W.assets={large_image:await VS(f),large_text:y||void 0,large_url:g||void 0}),b&&(W.assets={...W.assets,small_image:await VS(b),small_text:S||void 0,small_url:P||void 0}),z&&J&&(W.party={size:[J,z]});for(let ee in W){if(ee==="type")continue;let K=W[ee];(!K||K.length===0)&&delete W[ee]}return W}async function vc(e){let t=await ex();B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var sa=h({name:"CustomRPC",description:"Add a fully customisable Rich Presence (Game status) to your Discord profile",authors:[d.captain,d.AutumnVN,d.nin0dev],dependencies:["UserSettingsAPI"],start:vc,stop:()=>vc(!0),settings:kr,patches:[{find:".party?(0",all:!0,replacement:{match:/\i\.id===\i\.id\?null:/,replace:""}}],settingsAboutComponent:()=>{let[e]=ht(ex,{fallbackValue:void 0,deps:Object.values(kr.store)}),t=XS.useSetting(),{profileThemeStyle:o}=s8({});return r(p,null,!t&&r(Ct,{className:L(A.top16,A.bottom16),style:{padding:"1em"}},r(x.FormTitle,null,"Notice"),r(x.FormText,null,"Activity Sharing isn't enabled, people won't be able to see your custom rich presence!"),r(R,{color:R.Colors.TRANSPARENT,className:A.top8,onClick:()=>XS.updateSetting(!0)},"Enable")),r(oe,{flexDirection:"column",gap:".5em",className:A.top16},r(x.FormText,null,"Go to the ",r(De,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),r(x.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),r(x.FormText,null,"If you want to use an image link, download your image and reupload the image to ",r(De,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and selecting "Copy image address".'),r(x.FormText,null,"You can't see your own buttons on your profile, but everyone else can see it fine."),r(x.FormText,null,'Some weird unicode text ("fonts" \u{1D591}\u{1D58E}\u{1D590}\u{1D58A} \u{1D599}\u{1D58D}\u{1D58E}\u{1D598}) may cause the rich presence to not show up, try using normal letters instead.')),r(Ee,{className:A.top8}),r("div",{style:{width:"284px",...o,marginTop:8,borderRadius:8,background:"var(--background-mod-muted, var(--background-mod-faint))"}},e&&r(a8,{activity:e,user:k.getCurrentUser(),currentUser:k.getCurrentUser()})))}});a();T();ae();v();var l8=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;async function c8(){try{let{embed:e}=this.props,{replaceElements:t,dearrowByDefault:o}=Qp.store;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let n=l8.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 m=s[0].title.replace(/(^|\s)>(\S)/g,"$1$2");e.dearrow.oldTitle=o?e.rawTitle:m,o&&(e.rawTitle=m)}if(u&&t!==1){let m=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${n}&time=${l[0].timestamp}`;e.dearrow.oldThumb=o?e.thumbnail.proxyURL:m,o&&(e.thumbnail.proxyURL=m)}this.forceUpdate()}catch(e){new F("Dearrow").error("Failed to dearrow embed",e)}}function u8({component:e}){let{embed:t}=e.props;return t?.dearrow?r(Q,{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;Qp.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 Qp=w({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}}),Xp=h({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[d.Ven],settings:Qp,embedDidMount:c8,renderButton(e){return r(M,{noop:!0},r(u8,{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:()=>!Qp.store.hideButton}]}]});a();T();v();a();var p8="https://decor.fieryflames.dev",ai=p8+"/api",tx=ai+"/authorize",ox="https://ugc.decor.fieryflames.dev",rx="1096966363416899624",as="100101099111114",Vp="11497119",aa="1096357702931841148",bc="dXp2SdxDcP",I0=1e3*60*60*4;a();$o();ae();Fe();v();var d8={async getItem(e){return Gt(e).then(t=>t??null)},async setItem(e,t){await Ht(e,t)},async removeItem(e){await $h(e)}},li=Nt(()=>Ui(Lh((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[k.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[k.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)=>de(i=>r(Li,{...i,scopes:["identify"],responseType:"code",redirectUri:tx,permissions:0n,clientId:rx,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&&(Re(`Failed to authorize: ${l.message}`,q.Type.FAILURE),new F("Decor").error("Failed to authorize",l),n(l))}}}),{onCloseCallback(){n(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",storage:d8,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})));a();a();async function ed(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${li.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var nx=async e=>{if(e?.length===0)return{};let t=new URL(ai+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},ix=async(e="@me")=>ed(ai+`/users/${e}/decorations`).then(t=>t.json()),sx=async(e="@me")=>ed(ai+`/users/${e}/decoration`).then(t=>t.json()),M0=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"),ed(ai+`/users/${t}/decoration`,{method:"PUT",body:o}).then(n=>e&&"file"in e?n.json():n.text())};var ax=async e=>{await ed(ai+`/decorations/${e}`,{method:"DELETE"})},lx=async()=>fetch(ai+"/decorations/presets").then(e=>e.json());a();function N0(e){return`${e.animated?"a_":""}${e.hash}`}function td(e){return{asset:N0(e),skuId:as}}$o();v();a();$o();v();var Pn=Nt(()=>Ui((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:qt(async()=>{let{fetchQueue:o,usersDecorations:n}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=[...o],s=await nx(i),l=new Map(n),c=new Date;for(let u of i){let m=s[u]??null;l.set(u,{asset:m,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()<I0||(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:m}=n.get(u)??{};m&&c-m.getTime()<I0||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 cx(e){try{let[t,o]=C(e?Pn.getState().getAsset(e.id)??null:null);return X(()=>{let n=(()=>{try{return Pn.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);s&&t!==s&&o(s)})}catch{return()=>{}}})();try{if(e){let{fetch:i}=Pn.getState();i(e.id)}}catch{}return n},[]),t?{asset:t,skuId:as}:null}catch(t){console.error(t)}return null}var jr=Nt(()=>Ui((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await ix(),n=await sx();e({decorations:o,selectedDecoration:n})},async create(o){let n=await M0(o);e({decorations:[...t().decorations,n]})},async delete(o){let n=typeof o=="object"?o.hash:o;await ax(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}),M0(o),Pn.getState().set(k.getCurrentUser().id,o?N0(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})));a();Wt();te();Fe();v();a();an();a();ve();E();var He=Y("vc-decor-"),la=D("modalPreview","modalCloseButton","spinner","modal"),ca=Pi(["initialSelectedDecoration:",/initialSelectedDecoration:\i,.{0,300}\i\.e\(/]),ux=Pi(["stickerInspected]:"]);a();an();a();E();v();var Sc,px=e=>Sc=e,od=cu(()=>{let e=uu(".shopPreviewBanner");return se.memo(e)}),k0,dx=e=>k0=e;a();Qe();ie();v();function C0(e){return r(Sc,{...e,isSelected:!1},r(mh,null),r(H,{variant:"text-xs/normal",color:"header-primary"},xe("CREATE")))}a();Qe();ie();v();function A0(e){return r(Sc,{...e},r(fl,null),r(H,{variant:"text-xs/normal",color:"header-primary"},xe("NONE")))}a();v();a();Qe();tn();v();function R0({decoration:e}){let{delete:t}=jr();return r(I.Menu,{navId:He("decoration-context-menu"),onClose:st.closeContextMenu,"aria-label":"Decoration Options"},r(I.MenuItem,{id:He("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:sn,action:()=>to(e.hash)}),e.authorId===k.getCurrentUser().id&&r(I.MenuItem,{id:He("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Ci,action:()=>Le.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:He("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}function D0(e){let{decoration:t}=e;return r(k0,{...e,onContextMenu:o=>{st.openContextMenu(o,()=>r(R0,{decoration:t}))},avatarDecoration:td(t)})}a();te();E();a();v();function L0({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:n}){return r("div",{className:He("sectioned-grid-list-grid")},n.map(i=>r(se.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var m8=D("managedReactiveScroller");function O0(e){return r("div",{className:L(He("sectioned-grid-list-container"),m8.thin)},e.sections.map(t=>r("div",{key:e.getSectionKey(t),className:He("sectioned-grid-list-section")},e.renderSectionHeader(t),r(L0,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}ie();Fe();v();a();Wt();ie();Fe();E();v();var f8=pe(".fileUpload),"),{HelpMessage:mx,HelpMessageTypes:fx}=Ue('POSITIVE="positive',{HelpMessageTypes:O.byProps("POSITIVE","WARNING","INFO"),HelpMessage:O.byCode(".iconDiv")});function g8(e){let[t,o]=C(null);return X(()=>{if(!e)return;let n=URL.createObjectURL(e);return o(n),()=>{URL.revokeObjectURL(n),o(null)}},[e]),t}function h8(e){let[t,o]=C(""),[n,i]=C(null),[s,l]=C(!1),[c,u]=C(null);X(()=>{c&&u(null)},[n]);let{create:m}=jr(),f=g8(n),g=le(()=>f?{asset:f,skuId:Vp}:null,[f]);return r(he,{...e,size:"medium",className:la.modal},r(ke,{separator:!1,className:He("modal-header")},r(H,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),r(tt,{onClick:e.onClose})),r(Se,{className:He("create-decoration-modal-content"),scrollbarType:"none"},r(M,null,r(mx,{messageType:fx.WARNING},"Make sure your decoration does not violate ",r(De,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),r("div",{className:He("create-decoration-modal-form-preview-container")},r("div",{className:He("create-decoration-modal-form")},c!==null&&r(H,{color:"text-danger",variant:"text-xs/normal"},c.message),r("section",null,r(x.FormTitle,{tag:"h5"},"File"),r(f8,{filename:n?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),r(x.FormText,{className:A.top8},"File should be APNG or PNG.")),r("section",null,r(x.FormTitle,{tag:"h5"},"Name"),r(dt,{placeholder:"Companion Cube",value:t,onChange:o}),r(x.FormText,{className:A.top8},"This name will be used when referring to this decoration."))),r("div",null,r(od,{avatarDecoration:g,user:k.getCurrentUser()}))),r(mx,{messageType:fx.INFO,className:A.bottom8},"To receive updates on your decoration's review, join ",r(De,{href:`https://discord.gg/${bc}`,onClick:async y=>{y.preventDefault(),Me.getGuild(aa)?(Er(),B.dispatch({type:"LAYER_POP_ALL"}),hr.transitionToGuild(aa)):await Mi(bc)&&(Er(),B.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server")," and allow direct messages."))),r(yt,{className:He("modal-footer")},r("div",{className:He("modal-footer-btn-container")},r(R,{onClick:e.onClose,color:R.Colors.PRIMARY},"Cancel"),r(R,{onClick:()=>{l(!0),m({alt:t,file:n}).then(e.onClose).catch(y=>{l(!1),u(y)})},disabled:!n||!t||s},"Submit for Review"))))}var rd=()=>Promise.all([ca(),ux()]).then(()=>de(e=>r(h8,{...e})));a();Wt();Fe();v();function y8(e){return r(he,{...e,size:"small",className:la.modal},r(ke,{separator:!1,className:He("modal-header")},r(H,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),r(tt,{onClick:e.onClose})),r(Se,{scrollbarType:"none"},r(x.FormText,null,"By submitting a decoration, you agree to ",r(De,{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(yt,{className:He("modal-footer")},r(oe,{gap:"4px"},r(R,{onClick:()=>{ua.store.agreedToGuidelines=!0,e.onClose(),rd()}},"Continue"),r(R,{onClick:e.onClose,color:R.Colors.PRIMARY,look:R.Looks.LINK},"Go Back"))))}var gx=()=>ca().then(()=>de(e=>r(y8,{...e})));function v8(){let[e,t]=C([]);return X(()=>{lx().then(t)},[]),e}var b8=new wo;function S8({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[n,i]=C([]);return X(()=>{b8.push(async()=>{if(e.authorIds)for(let s of e.authorIds){let l=k.getUser(s)??await ro.getUser(s).catch(()=>null);l!=null&&i(c=>[...c,l])}})},[e.authorIds]),r("div",null,r(oe,null,r(x.FormTitle,{style:{flexGrow:1}},e.title),o&&r(gr,{users:n,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:A.bottom8})),t&&r(x.FormText,{className:A.bottom8},e.subtitle))}function x8(e){let[t,o]=C(void 0),n=typeof t<"u",i=t!=null?td(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=jr();X(()=>{c()},[]);let m=n?t:l,f=typeof m?.authorId<"u",g=s.some(U=>U.reviewed===!1),y=v8(),b=y.flatMap(U=>U.decorations),P=y.find(U=>U.id===m?.presetId),S=typeof P<"u",N=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(U=>!b.some(j=>j.hash===U.hash)),"create"]},...y.map(U=>({title:U.name,subtitle:U.description||void 0,sectionKey:`preset-${U.id}`,items:U.decorations,authorIds:U.authorIds}))];return r(he,{...e,size:"dynamic",className:la.modal},r(ke,{separator:!1,className:He("modal-header")},r(H,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),r(tt,{onClick:e.onClose})),r(Se,{className:He("change-decoration-modal-content"),scrollbarType:"none"},r(M,null,r(O0,{renderItem:U=>{if(typeof U=="string")switch(U){case"none":return r(A0,{className:He("change-decoration-modal-decoration"),isSelected:m===null,onSelect:()=>o(null)});case"create":return r(Q,{text:"You already have a decoration pending review",shouldShow:g},j=>r(C0,{className:He("change-decoration-modal-decoration"),...j,onSelect:g?()=>{}:ua.store.agreedToGuidelines?rd:gx}))}else return r(Q,{text:"Pending review",shouldShow:U.reviewed===!1},j=>r(D0,{...j,className:He("change-decoration-modal-decoration"),onSelect:U.reviewed!==!1?()=>o(U):()=>{},isSelected:m?.hash===U.hash,decoration:U}))},getItemKey:U=>typeof U=="string"?U:U.hash,getSectionKey:U=>U.sectionKey,renderSectionHeader:U=>r(S8,{section:U}),sections:N}),r("div",{className:He("change-decoration-modal-preview")},r(od,{avatarDecoration:i,user:k.getCurrentUser()}),S&&r(x.FormTitle,{className:""},"Part of the ",P.name," Preset"),typeof m=="object"&&r(H,{variant:"text-sm/semibold",color:"header-primary"},m?.alt),f&&r(H,{key:`createdBy-${m.authorId}`},"Created by ",Pe.parse(`<@${m.authorId}>`)),S&&r(R,{onClick:()=>rt(P.id)},"Copy Preset ID")))),r(yt,{className:He("change-decoration-modal-footer","modal-footer")},r("div",{className:He("modal-footer-btn-container")},r(R,{onClick:e.onClose,color:R.Colors.PRIMARY},"Cancel"),r(R,{onClick:()=>{u(t).then(e.onClose)},disabled:!n},"Apply")),r("div",{className:He("modal-footer-btn-container")},r(Q,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},U=>r(Ur,{...U,onClick:async()=>{Me.getGuild(aa)?(e.onClose(),B.dispatch({type:"LAYER_POP_ALL"}),hr.transitionToGuild(aa)):await Mi(bc)&&(Er(),B.dispatch({type:"LAYER_POP_ALL"}))},variant:"link"},"Discord Server")),r(Ur,{onClick:()=>Le.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:He("danger-btn"),cancelText:"Cancel",onConfirm(){li.getState().remove(k.getCurrentUser().id),e.onClose()}}),variant:"dangerSecondary"},"Log Out"))))}var _0=()=>ca().then(()=>de(e=>r(x8,{...e})));E();v();var T8=pe(".customizationSectionBackground");function xc({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let n=li(),{selectedDecoration:i,select:s,fetch:l}=jr();return X(()=>{n.isAuthorized()&&l()},[n.token]),r(T8,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&He("section-remove-margin")},r(oe,{gap:"4px"},r(Ur,{onClick:()=>{n.isAuthorized()?_0():n.authorize().then(_0).catch(()=>{})},variant:"primary",size:"small"},"Change Decoration"),i&&n.isAuthorized()&&r(Ur,{onClick:()=>s(null),variant:"secondary",size:"small"},"Remove Decoration")))}var ua=w({changeDecoration:{type:6,component(){return pa.started?r("div",null,r(xc,{hideTitle:!0,hideDivider:!0,noMargin:!0}),r(x.FormText,{className:L(A.top8,A.bottom8)},"You can also access Decor decorations from the ",r(De,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),Er(),B.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):r(x.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}});var pa=h({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[d.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}\)},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem,",replacement:[{match:/(?<==)\i=>{var{children.{20,200}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{var{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:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:[{match:/(?<=\i\)\({avatarDecoration:)\i(?=,)(?<=currentUser:(\i).+?)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]},...['"Message Username"',".nameplatePreview,{","#{intl::ayozFl::raw}"].map(e=>({find:e,replacement:[{match:/(?<=userValue.{0,25}void 0:)((\i)\.avatarDecoration)/,replace:"$self.useUserDecorAvatarDecoration($2)??$1"}]}))],settings:ua,flux:{CONNECTION_OPEN:()=>{li.getState().init(),jr.getState().clear(),Pn.getState().fetch(k.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Pn.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){px(e)},set DecorationGridDecoration(e){dx(e)},SKU_ID:as,useUserDecorAvatarDecoration:cx,async start(){Pn.getState().fetch(k.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===as){let o=e.asset.split("_");return e.asset.startsWith("a_")&&!t&&o.shift(),`${ox}/${o.join("_")}.png`}else if(e?.skuId===Vp)return e.asset},DecorSection:M.wrap(xc,{noop:!0})});a();T();var nd=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:[d.Nuckyz],patches:[{find:"#{intl::BOT_CALL_IDLE_DISCONNECT_2}",replacement:{match:/,?(?=\i\(this,"idleTimeout",new \i\.\i\))/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]});a();T();v();var id=h({name:"DontRoundMyTimestamps",authors:[d.Lexi],description:"Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",start(){$s.relativeTimeRounding(Math.floor)},stop(){$s.relativeTimeRounding(Math.round)}});a();ve();mr();T();E();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 B0="src/plugins/experiments/hideBugReport.css";var sd=D("key","combo"),w8=Dt(e=>e?.definition?.id==="2024-09_bug_reporter"),P8=ho?"cmd":"ctrl",I8=ho?"opt":"alt",hx=w({toolbarDevMenu:{type:3,description:"Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",default:!1,restartNeeded:!0}}),ad=h({name:"Experiments",description:"Enable Access to Experiments & other dev-only features in Discord!",authors:[d.Megu,d.Ven,d.Nickyux,d.BanTheNons,d.Nuckyz],settings:hx,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:()=>hx.store.toolbarDevMenu},{find:'navId:"staff-help-popout"',replacement:{match:/(isShown.+?)onClick:\i/,replace:(e,t)=>`${t}onClick:()=>{}`}},{find:"useCanFavoriteChannel",replacement:{match:/\i\.isDM\(\)\|\|\i\.isThread\(\)/,replace:"false"}},{find:".experimentOverride,children:",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:()=>!w8.getCurrentConfig().hasBugReporterAccess&&Yt(B0),stop:()=>go(B0),settingsAboutComponent:()=>r(se.Fragment,null,r(x.FormTitle,{tag:"h3"},"More Information"),r($e,{size:"md"},"You can open Discord's DevTools via "," ",r("div",{className:sd.combo,style:{display:"inline-flex"}},r("kbd",{className:sd.key},P8)," +"," ",r("kbd",{className:sd.key},I8)," +"," ",r("kbd",{className:sd.key},"O")," "))),WarningCard:M.wrap(()=>r(Ct,{id:"vc-experiments-warning-card",className:A.bottom16},r(x.FormTitle,{tag:"h2"},"Hold on!!"),r(x.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),r(x.FormText,{className:A.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(x.FormText,{className:A.top8},'No, you cannot use server-side features like checking the "Send to Client" box.')),{noop:!0})});a();T();var ld=h({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[d.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}});a();a();var U0=class{width=0;height=0;numPlays=0;playTime=0;frames=[]},Tx=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;Tx[e]=t}function M8(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^Tx[(n^e[i])&255];return n^-1}var E0=new Uint8Array([137,80,78,71,13,10,26,10]);function wx(e){let t=new Uint8Array(e);return new Promise(function(o,n){for(let b=0;b<E0.length;b++)if(E0[b]!=t[b]){n("Not a PNG file (invalid file signature)");return}let i=!1;if(yx(t,function(b){return b=="acTL"?(i=!0,!1):!0}),!i){n("Not an animated PNG");return}let s=[],l=[],c=null,u=null,m=new U0;if(yx(t,function(b,P,S,_){switch(b){case"IHDR":c=P.subarray(S+8,S+8+_),m.width=ci(P,S+8),m.height=ci(P,S+12);break;case"acTL":m.numPlays=ci(P,S+8+4);break;case"fcTL":u&&m.frames.push(u),u={},u.width=ci(P,S+8+4),u.height=ci(P,S+8+8),u.left=ci(P,S+8+12),u.top=ci(P,S+8+16);let N=vx(P,S+8+20),U=vx(P,S+8+22);U==0&&(U=100),u.delay=1e3*N/U,u.delay<=10&&(u.delay=100),m.playTime+=u.delay,u.disposeOp=bx(P,S+8+24),u.blendOp=bx(P,S+8+25),u.dataParts=[];break;case"fdAT":u&&u.dataParts.push(P.subarray(S+8+4,S+8+_));break;case"IDAT":u&&u.dataParts.push(P.subarray(S+8,S+8+_));break;case"IEND":l.push(Sx(P,S,12+_));break;default:s.push(Sx(P,S,12+_))}}),u&&m.frames.push(u),m.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<m.frames.length;b++){u=m.frames[b];let P=[];P.push(E0),c.set(cd(u.width),0),c.set(cd(u.height),4),P.push(xx("IHDR",c)),P.push(g);for(let N=0;N<u.dataParts.length;N++)P.push(xx("IDAT",u.dataParts[N]));P.push(y);let S=URL.createObjectURL(new Blob(P,{type:"image/png"}));delete u.dataParts;let _=u.img=new Image;_.onload=function(){URL.revokeObjectURL(_.src),f++,f==m.frames.length&&o(m)},_.onerror=function(){n("Image creation error")},_.src=S}})}function yx(e,t){let o=8,n,i;do{let s=ci(e,o);i=N8(e,o+4,4),n=t(i,e,o,s),o+=12+s}while(n!==!1&&i!="IEND"&&o<e.length)}function ci(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 vx(e,t){let o=0;for(let n=0;n<2;n++)o+=e[n+t]<<(1-n)*8;return o}function bx(e,t){return e[t]}function Sx(e,t,o){let n=new Uint8Array(o);return n.set(e.subarray(t,t+o)),n}function N8(e,t,o){let n=Array.prototype.slice.call(e.subarray(t,t+o));return String.fromCharCode.apply(String,n)}function cd(e){return[e>>>24&255,e>>>16&255,e>>>8&255,e&255]}function k8(e){let t=[];for(let o=0;o<e.length;o++)t.push(e.charCodeAt(o));return t}function xx(e,t){let o=e.length+t.length,n=new Uint8Array(new ArrayBuffer(o+8));n.set(cd(t.length),0),n.set(k8(e),4),n.set(t,8);let i=M8(n,4,o);return n.set(cd(i),o+4),n}T();ie();ae();E();v();var da=kg(z0()),J8=Ie("UserSettingsProtoStore"),Bx=D("readerFactory");function $x(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}var gd=ko(()=>cl.PreloadedUserSettingsActionCreators),cs=ko(()=>$x("appearance",gd.ProtoClass)),Ex=ko(()=>$x("clientThemeSettings",cs)),Q8=ue(".getUserIsAdmin(");var md="[3,4].includes(fakeNitroIntention)";var W0=/\/emojis\/(\d+?)\.(png|webp|gif)/,j0=/\/stickers\/(\d+?)\./,fd=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Ux=/\[.+?\]\((https?:\/\/.+?)\)/,Ze=w({enableEmojiBypass:{description:"Allows sending fake emojis (also bypasses missing permission to use custom emojis)",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,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 hd(e,t){let o=Z.getChannel(e);return!o||o.isPrivate()?!0:Te.can(t,o)}var X8=e=>hd(e,ce.USE_EXTERNAL_EMOJIS),V8=e=>hd(e,ce.USE_EXTERNAL_STICKERS),Fx=e=>hd(e,ce.EMBED_LINKS),e6=e=>hd(e,ce.ATTACH_FILES);function t6(){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 yd=h({name:"FakeNitro",authors:[d.Arjix,d.D3SOX,d.Ven,d.fawn,d.captain,d.Nuckyz,d.AutumnVN,d.sadan],description:"Allows you to send fake emojis/stickers, use nitro themes, and stream in nitro quality",dependencies:["MessageEventsAPI"],settings:Ze,patches:[t6(),{find:"emojiItemDisabled]",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}&&!${md}`},{match:/!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,replace:e=>`${e}&&!${md}`},{match:/!(\i\.\i\.canUseEmojisEverywhere\(\i\))/,replace:e=>`(${e}&&!${md})`},{match:/(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/,replace:e=>`(${e}||${md})`}]},{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,content:(\i))/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"}renderEmbeds(",replacement:[{predicate:()=>Ze.store.transformEmojis||Ze.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\(\((\i),\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 rn()?.id},get canUseEmotes(){return(k.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(k.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){try{if(e==null||typeof e=="string")return;if((t?.premium_type??k?.getCurrentUser()?.premiumType??0)!==2){e.appearance??=cs.create();let n=J8.settings.appearance,i=cs.create({...e.appearance,theme:n?.theme,clientThemeSettings:n?.clientThemeSettings});e.appearance=i}}catch(o){new F("FakeNitro").error(o)}},handleGradientThemeSelect(e,t,o){if((k?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!gd||!cs||!Ex||!Bx)return;let i=gd.getCurrentValue().appearance,s=i!=null?cs.fromBinary(cs.toBinary(i),Bx):cs.create();s.theme=t;let l=Ex.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=gd.ProtoClass.create();c.appearance=s,B.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"?(e[0]=t.trimStart(),e[0]||e.shift()):typeof t?.props?.children=="string"&&(t.props.children=t.props.children.trimStart(),t.props.children||e.shift());let o=e.length-1,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(W0);if(u){let m=null;try{m=new URL(c.props.href)}catch{}let f=er.getCustomEmojiById(u[1])?.name??m?.searchParams.get("name")??"FakeNitroEmoji";return Pe.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:f,fake:!0},void 0,{key:String(o++)})}}if(Ze.store.transformStickers){if(j0.test(c.props.href))return null;let u=c.props.href.match(fd);if(u&&ao.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 m=!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?m=!0:delete u.props.children[f]}if(!m)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,m]of c.entries())c[u]=s(m);return c=this.clearEmptyArrayItems(c),c};try{let c=l(Bi.cloneDeep(e));return this.trimContent(c),c}catch(c){return new F("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")&&!Ux.test(i))continue;let s=i.match(j0);if(s){let c=null;try{c=new URL(i)}catch{}let u=ao.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(fd);if(l){if(!ao.getStickerById(l[1]))continue;let c=ao.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(Ux)?.[1]===n))return!1;if(Ze.store.transformEmojis&&W0.test(n))return!0;if(Ze.store.transformStickers){if(j0.test(n))return!0;let i=n.match(fd);if(i&&ao.getStickerById(i[1]))return!0}break}}}catch(o){new F("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(fd);return!(o&&ao.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&W0.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${Ze.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{frames:n,width:i,height:s}=await fetch(e).then(b=>b.arrayBuffer()).then(wx),l=(0,da.GIFEncoder)(),c=Ze.store.stickerSize,u=document.createElement("canvas");u.width=c,u.height=c;let m=u.getContext("2d",{willReadFrequently:!0}),f=c/Math.max(i,s);m.scale(f,f);let g;for(let b of n){let{left:P,top:S,width:_,height:N,img:U,delay:j,blendOp:z,disposeOp:J}=b;g=m.getImageData(P,S,_,N),z===0&&m.clearRect(P,S,_,N),m.drawImage(U,P,S,_,N);let{data:me}=m.getImageData(0,0,c,c),W=(0,da.quantize)(me,256),ee=(0,da.applyPalette)(me,W);l.writeFrame(ee,c,c,{transparent:!0,palette:W,delay:j}),J===1?m.clearRect(P,S,_,N):J===2&&m.putImageData(g,P,S)}l.finish();let y=new File([l.bytesView()],`${t}.gif`,{type:"image/gif"});Ml.promptToUpload([y],Z.getChannel(o),$t.ChannelMessage)},canUseEmote(e,t){if(e.type===0)return!0;if(e.available===!1||Q8(e,this.guildId,!0))return!1;let o=!1;if(e.managed&&e.guildId){let n=be.getSelfMember(e.guildId)?.roles??[];o=e.roles.some(i=>n.includes(i))}return this.canUseEmotes||o?e.guildId===this.guildId||X8(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=>{Le.show({title:"Hold on!",body:r("div",null,r(x.FormText,null,"You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."),r(x.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=Ki(async(n,i,s)=>{let{guildId:l}=this,c=!1;e:{if(!e.enableStickerBypass)break e;let u=ao.getStickerById(s.stickers?.[0]);if(!u||"pack_id"in u)break e;let m=this.canUseStickers&&V8(n);if(u.available!==!1&&(m||u.guild_id===l))break e;let f=this.getStickerLink(u.id);if(u.format_type===4&&f.includes(".png")&&(f=f.replace(".png",".gif")),u.format_type===2)return e6(n)?this.sendAnimatedSticker(f,u.id,n):Le.show({title:"Hold on!",body:r("div",null,r(x.FormText,null,"You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."))}),{cancel:!0};{c=!0;let g=new URL(f);g.searchParams.set("name",u.name);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 m=`<${u.animated?"a":""}:${u.originalName||u.name}:${u.id}>`,f=new URL(yu(u.id,u.animated,e.emojiSize));f.searchParams.set("size",e.emojiSize.toString()),f.searchParams.set("name",u.name);let g=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content=i.content.replace(m,(y,b,P)=>`${t(P,b-1)}${e.useHyperLinks?`[${g}](${f})`:f}${t(P,b+y.length)}`)}return c&&!e.disableEmbedPermissionCheck&&!Fx(n)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=Hl(async(n,i,s)=>{if(!e.enableEmojiBypass)return;let l=!1;return s.content=s.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,m,f)=>{let g=er.getCustomEmojiById(u);if(g==null||this.canUseEmote(g,n))return c;l=!0;let y=new URL(yu(g.id,g.animated,e.emojiSize));y.searchParams.set("size",e.emojiSize.toString()),y.searchParams.set("name",g.name);let b=e.hyperLinkText.replaceAll("{{NAME}}",g.name);return`${t(f,m-1)}${e.useHyperLinks?`[${b}](${y})`:y}${t(f,m+c.length)}`}),l&&!e.disableEmbedPermissionCheck&&!Fx(n)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){Yi(this.preSend),zl(this.preEdit)}});a();Jt();T();ie();te();ct();E();v();a();function o6(...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 Gx=o6;function zx(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 Wx(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 Hx=w({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),r6=pe("isTryItOut:","pendingThemeColors:","pendingAvatarDecoration:","EDIT_PROFILE_BANNER");function n6(){let[,,e]=ht(()=>al(k.getCurrentUser().id));return!e&&r(i6,null)}function i6(){let e=Wx(Lt.getUserProfile(k.getCurrentUser().id)?.bio??"")??[0,0],[t,o]=C(e[0]),[n,i]=C(e[1]);return r("section",null,r(x.FormTitle,{tag:"h3"},"Usage"),r(x.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins."," "),r(x.FormText,{className:A.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(Ee,{className:L(A.top8,A.bottom8)}),r(x.FormTitle,{tag:"h3"},"Color pickers"),r(oe,{gap:"1em"},r(jn,{color:t,label:r(H,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Primary"),onChange:s=>{o(s)}}),r(jn,{color:n,label:r(H,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Accent"),onChange:s=>{i(s)}}),r(R,{onClick:()=>{let s=zx(t,n);rt(s)},color:R.Colors.PRIMARY,size:R.Sizes.XLARGE,style:{marginBottom:"auto"}},"Copy 3y3")),r(Ee,{className:L(A.top8,A.bottom8)}),r(x.FormTitle,{tag:"h3"},"Preview"),r("div",{className:"vc-fpt-preview"},r(r6,{user:k.getCurrentUser(),pendingThemeColors:[t,n],onAvatarChange:()=>{},onBannerChange:()=>{},canUsePremiumCustomization:!0,hideExampleButton:!0,hideFakeActivity:!0,isTryItOut:!0}))))}var vd=h({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[d.Alyxia,d.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(.+?)(?=})/,replace:"$self.colorDecodeHook($1)"}},{find:"#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",replacement:{match:/#{intl::USER_SETTINGS_RESET_PROFILE_THEME}\).+?}\)(?=\])(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:n6,settings:Hx,colorDecodeHook(e){if(e?.bio){if(Hx.store.nitroFirst&&e.themeColors)return e;let t=Wx(e.bio);if(t)return Gx(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:M.wrap(function({primary:e,accent:t}){return r(R,{onClick:()=>{let o=zx(e,t);rt(o)},color:R.Colors.PRIMARY,size:R.Sizes.XLARGE,className:A.left16},"Copy 3y3")},{noop:!0})});a();T();v();var bd=h({name:"FavoriteEmojiFirst",authors:[d.Aria,d.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"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=er.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();T();v();var jx=w({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}]}}),Sd=h({name:"FavoriteGifSearch",authors:[d.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<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:jx,getTargetString:qx,instance:null,renderSearchBar(e,t){return this.instance=e,r(M,{noop:!0},r(s6,{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 s6({instance:e,SearchBarComponent:t}){let[o,n]=C(""),i=nt(null),s=Pu(l=>{n(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current?.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(m=>({score:a6(l.toLowerCase(),qx(m.url??m.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:m})).filter(m=>m.score!=null);u.sort((m,f)=>f.score-m.score),c.favorites=u.map(m=>m.gif),e.forceUpdate()},[e.state]);return X(()=>()=>{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 qx(e){let t;try{t=new URL(e)}catch{return e}switch(jx.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 a6(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();T();var xd=h({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[d.Grzesiek11],patches:[{find:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]});a();T();var Td=h({name:"FixImagesQuality",description:"Improves quality of images in chat by forcing png format",authors:[d.Nuckyz],patches:[{find:".handleImageLoad)",replacement:{match:/(?<=\i=)"webp"/,replace:'"png"'}}]});a();T();var l6=w({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:Xt(0,100,10),stickToMarkers:!1,default:10}}),wd=h({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[d.Ven],settings:l6});a();T();var Pd=h({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[d.coolelectronics]});a();T();v();var Id=h({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[d.D3SOX,d.Nickyux],patches:[{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(?<=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 Me.getGuild(t)?.ownerId===o}});a();T();E();var q0=D("createFriendInvite"),Md=h({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[d.afn,d.Dziurwa],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:0,execute:async(e,t)=>{let o=await q0.createFriendInvite();at(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 q0.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," "));at(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 q0.revokeFriendInvites(),at(t.channel.id,{content:"All friend invites have been revoked."})}}]});a();T();ie();E();v();var c6=D("memberSinceWrapper"),u6=D("memberSince"),Kx=ue('month:"short",day:"numeric"'),Yx=D("getLocale"),p6=pe('"auto":"smooth"',".section"),Nd=h({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[d.Elvyra,d.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:".connections,userId:",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(!we.isFriend(e))return null;let o=we.getSince(e);return o?r(p6,{heading:"Friends Since"},t?r(H,{variant:"text-sm/normal"},Kx(o,Yx.getLocale())):r("div",{className:c6.memberSinceWrapper},r("div",{className:u6.memberSince},!!Ho()?.guild_id&&r("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--interactive-icon-default, var(--interactive-normal))"},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(H,{variant:"text-sm/normal"},Kx(o,Yx.getLocale()))))):null},{noop:!0})});a();T();ie();ct();E();v();var d6=ue(".MESSAGE,commandTargetId:"),Zx=oh;Ae(O.componentByCode('"devmode-copy-id-".concat'),e=>Zx=e);function m6({message:e,channel:t,onHeightUpdate:o}){let n=e.author&&!(e.author.id===k.getCurrentUser().id||e.author.system);return d6({navId:"message-actions",ariaLabel:xe("MESSAGE_UTILITIES_A11Y_LABEL"),message:e,channel:t,canReport:n,onHeightUpdate:o,onClose:()=>st.closeContextMenu(),textSelection:"",favoriteableType:null,favoriteableId:null,favoriteableName:null,itemHref:void 0,itemSrc:void 0,itemSafeSrc:void 0,itemTextContent:void 0,isFullSearchContextMenu:!0})}var f6=(e,t)=>{if(t?.isFullSearchContextMenu==null)return;Ge("devmode-copy-id",e,!0)?.push(Zx({id:t.message.author.id,label:xe("COPY_ID_AUTHOR")}))};br("FullSearchContext","SearchReply");var kd=h({name:"FullSearchContext",description:"Makes the message context menu in message search results have all options you'd expect",authors:[d.Ven,d.Aria],patches:[{find:"onClick:this.handleMessageClick,",replacement:{match:/this(?=\.handleContextMenu\(\i,\i\))/,replace:"$self"}}],handleContextMenu(e,t){let o=Z.getChannel(t.channel_id);o&&(e.stopPropagation(),st.openContextMenu(e,n=>r(m6,{message:t,channel:o,onHeightUpdate:n.onHeightUpdate})))},contextMenus:{"message-actions":f6}});a();T();E();v();var g6=pe(".USER_MENTION)"),Cd=h({name:"FullUserInChatbox",description:"Makes the user mention in the chatbox have more functionalities, like left/right clicking",authors:[d.sadan],patches:[{find:':"text":',replacement:{match:/(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/,replace:"$1return $self.UserMentionComponent({...arguments[0],originalComponent:()=>{$2}});"}}],UserMentionComponent:M.wrap(e=>ne([k],()=>k.getUser(e.id))==null?e.originalComponent():r(g6,{className:"mention",userId:e.id,channelId:e.channelId}),{fallback:({wrappedProps:{originalComponent:e}})=>e()})});a();T();E();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 Jx="src/plugins/gameActivityToggle/style.css";var h6=pe(".NONE,disabled:",".PANEL_BUTTON"),wc=Po("status","showCurrentGame"),Ad=w({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!Ne(rs.name)}}});function y6(){let{oldIcon:e}=Ad.use(["oldIcon"]),t=wc.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 v6(e){let{location:t}=Ad.use(["location"]),o=wc.useSetting();return t!=="PANEL"&&Ne(rs.name)?null:r(h6,{tooltipText:o?"Disable Game Activity":"Enable Game Activity",icon:y6,role:"switch","aria-checked":!o,redGlow:!o,plated:e?.nameplate!=null,onClick:()=>wc.updateSetting(n=>!n)})}var Rd=h({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[d.Nuckyz,d.RuukuLada],dependencies:["UserSettingsAPI"],settings:Ad,managedStyle:Jx,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:{match:/className:\i\.buttons,.{0,50}children:\[/,replace:"$&$self.GameActivityToggleButton(arguments[0]),"}}],toolboxActions(){let{location:e}=Ad.use(["location"]),t=wc.useSetting();return e!=="TOOLBOX"?null:r(I.MenuCheckboxItem,{id:"game-activity-toggle-toolbox",label:"Enable Game Activity",checked:t,action:()=>wc.updateSetting(o=>!o)})},GameActivityToggleButton:M.wrap(v6,{noop:!0})});a();T();ie();v();var Dd=h({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[d.Ven],patches:[{find:'"handleSelectGIF",',replacement:{match:/"handleSelectGIF",(\i)=>\{/,replace:'"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);'}}],handleSelect(e){e&&(Ni(e.url+" "),Nl.closeExpressionPicker())}});a();T();E();v();var Vx=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(Vx||{}),Ld=w({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(),Qx=Dt(e=>Array.isArray(e)&&e[0]?.name==="Wave");function Xx(e,t,o){let n=vo.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Ld.store.greetMode==="Message"||o.length>1){n.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};vo._sendMessage(e.id,i,n)}else vo.sendGreetMessage(e.id,o[0],n)}function b6({channel:e,message:t}){let o=Ld.use(["greetMode","multiGreetChoices"]),{greetMode:n,multiGreetChoices:i=[]}=o;return r(I.Menu,{navId:"greet-sticker-picker",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},r(I.MenuGroup,{label:"Greet Mode"},Object.values(Vx).map(s=>r(I.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===n,action:()=>o.greetMode=s}))),r(I.MenuSeparator,null),r(I.MenuGroup,{label:"Greet Stickers"},Qx.map(s=>r(I.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>Xx(e,t,[s.id])}))),Ld.store.unholyMultiGreetEnabled?r(p,null,r(I.MenuSeparator,null),r(I.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},Qx.map(s=>{let l=i.some(c=>c===s.id);return r(I.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(I.MenuSeparator,null),r(I.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>Xx(e,t,i),disabled:i.length===0}))):null)}var Od=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:[d.Ven],settings:Ld,patches:[{find:"#{intl::WELCOME_CTA_LABEL}",replacement:{match:/className:\i\.welcomeCTA,(?<={channel:\i,message:\i}=(\i).+?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||st.openContextMenu(e,()=>r(b6,{...t}))}});a();var K0={};et(K0,{updateMessage:()=>us});a();v();function us(e,t,o){let n=Mu.getOrCreate(e);if(!n.has(t))return;let i=n.update(t,s=>o?s.merge(o):new s.constructor(s));Mu.commit(i),jt.emitChange()}Qe();T();te();v();var tT="HideAttachments_HiddenIds",Pc=new Set;async function oT(){return Pc=await Gt(tT)??new Set,Pc}var S6=e=>Ht(tT,e);br("HideMedia","HideAttachments");var eT=e=>e.attachments.length>0||e.embeds.length>0||e.stickerItems.length>0;async function x6(e,t){let o=await oT();o.delete(t)||o.add(t),await S6(o),us(e,t)}var _d=h({name:"HideMedia",description:"Hide attachments and embeds for individual messages via hover button",authors:[d.Ven],dependencies:["MessageUpdaterAPI"],patches:[{find:"this.renderAttachments(",replacement:{match:/(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories)\((\i)\)/g,replace:"$self.shouldHide($1?.id)?null:$&"}}],messagePopoverButton:{icon:Ls,render(e){if(!eT(e)&&!e.messageSnapshots.some(o=>eT(o.message)))return null;let t=Pc.has(e.id);return{label:t?"Show Media":"Hide Media",icon:t?dl:Ls,message:e,channel:Z.getChannel(e.channel_id),onClick:()=>x6(e.channel_id,e.id)}}},renderMessageAccessory({message:e}){return this.shouldHide(e.id)?r("span",{className:L("vc-hideAttachments-accessory",!e.content&&"vc-hideAttachments-no-content")},"Media Hidden"):null},async start(){await oT()},stop(){Pc.clear()},shouldHide(e){return Pc.has(e)}});a();T();var Bd=h({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[d.botato,d.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:0x40000000|(?:1<<30|1073741824))\)return/,replace:"if($1===(1<<20))return false;$&"}}]});a();T();E();v();var rT=Ie("RunningGameStore"),T6=Po("status","showCurrentGame");function iT(e,t,o,n){return r(Q,{text:t},i=>r("button",{...i,onClick:s=>I6(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 w6=(e,t)=>iT(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),P6=(e,t)=>iT(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 nT(e,t=!1){let o=kt.use(["ignoredActivities"]),{ignoredActivities:n}=o;return n.some(i=>i.id===e.id)?P6(e,"var(--status-danger)"):w6(e,t?"var(--green-300)":"var(--interactive-icon-default, var(--interactive-normal))")}function I6(e,t){e.stopPropagation();let o=kt.store.ignoredActivities.findIndex(n=>n.id===t.id);o===-1?kt.store.ignoredActivities.push(t):kt.store.ignoredActivities.splice(o,1)}function pi(){T6.updateSetting(e=>e)}function M6(){return r(oe,{flexDirection:"column"},r(x.FormText,null,"Import the application id of the CustomRPC plugin to the filter list"),r("div",null,r(R,{onClick:()=>{let e=G.plugins.CustomRPC?.appID;if(!e)return Re("CustomRPC application ID is not set.",q.Type.FAILURE);Y0?.(e)&&Re("CustomRPC application ID is already added.",q.Type.FAILURE)}},"Import CustomRPC ID")))}var Y0=null;function N6(e){let[t,o]=C(kt.store.idsList??"");Y0=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},X(()=>()=>{Y0=null},[]);function n(i){o(i),e.setValue(i)}return r("section",null,r(x.FormTitle,{tag:"h3"},"Filter List"),r(x.FormText,{className:A.bottom8},"Comma separated list of activity IDs to filter (Useful for filtering specific RPC activities and CustomRPC"),r(dt,{type:"text",value:t,onChange:n,placeholder:"235834946571337729, 343383572805058560"}))}var kt=w({importCustomRPC:{type:6,component:M6},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));kt.store.idsList=Array.from(t).join(", "),pi()},component:e=>r(N6,{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 k6(e,t){if(t&&kt.store.idsList.includes(t))return kt.store.listMode===1;switch(e){case 0:return kt.store.ignorePlaying;case 1:return kt.store.ignoreStreaming;case 2:return kt.store.ignoreListening;case 3:return kt.store.ignoreWatching;case 5:return kt.store.ignoreCompeting}return!1}var Ed=h({name:"IgnoreActivities",authors:[d.Nuckyz,d.Kylie],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are specifically ignored from the Registered Games and Activities tabs, or use the general settings below",dependencies:["UserSettingsAPI"],settings:kt,patches:[{find:'"LocalActivityStore"',replacement:[{match:/\.LISTENING.+?(?=!?\i\(\)\(\i,\i\))(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:'"ActivityTrackingStore"',replacement:{match:/getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`}},{find:"#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",replacement:{match:/#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}.+?}\(\),(?<=nowPlaying:(\i)=!1,.+?overlay:\i,[^}]+?\}=(\i).+?)/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${o},${t}),`,noWarn:!0}},{find:"#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",replacement:{match:/\.gameNameLastPlayed.+?,\i\(\),(?<=nowPlaying:(\i)=!1,.+?overlay:\i,[^}]+?\}=(\i).+?)(?=\1&&)/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${o},${t}),`}},{find:".promotedLabelWrapperNonBanner,children",replacement:{match:/\.appDetailsHeaderContainer.+?children:\i.*?}\),(?<=application:(\i).+?)/,replace:(e,t)=>`${e}$self.renderToggleActivityButton(${t}),`}}],async start(){if(kt.store.ignoredActivities.length!==0){let e=rT.getGamesSeen();for(let[t,o]of kt.store.ignoredActivities.entries())o.type===0&&(e.some(n=>n.id===o.id||n.exePath===o.id)||kt.store.ignoredActivities.splice(t,1))}},isActivityNotIgnored(e){if(k6(e.type,e.application_id))return!1;if(e.application_id!=null)return!kt.store.ignoredActivities.some(t=>t.id===e.application_id)||kt.store.listMode===0&&kt.store.idsList.includes(e.application_id);{let t=rT.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!kt.store.ignoredActivities.some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return r(M,{noop:!0},r("div",{style:{marginLeft:12,zIndex:0}},nT({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return r(M,{noop:!0},nT({id:e.id,name:e.name,type:1}))}});a();T();var C6=/\.(png|jpg|jpeg|gif|webp|avif)$/i,A6=/^(.+?\.)?(tenor|giphy|imgur)\.com$/i,sT=w({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}}),Ud=h({name:"ImageFilename",authors:[d.Ven],description:"Display the file name of images & GIFs as a tooltip when hovering over them",settings:sT,patches:[{find:".clickableWrapper",replacement:{match:/\.originalLink,href:(\i)/,replace:"$&,title:$self.getTitle($1)"}}],getTitle(e){try{let t=new URL(e),o=A6.test(t.hostname);return!o&&!C6.test(t.pathname)?void 0:o||sT.store.showFullUrl?e:t.pathname.split("/").pop()}catch{return}}});a();T();var Fd=h({name:"ImageLink",description:"Never hide image links in messages, even if it's the only content",authors:[d.Kyuuhachi,d.Sqaaakoi],patches:[{find:"unknownUserMentionPlaceholder:",replacement:{match:/\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/,replace:"false"}}]});a();T();ae();v();a();ve();a();var Ic="vc-imgzoom-magnify-modal";a();function Z0(e,t){e()?t():requestAnimationFrame(()=>Z0(e,t))}v();var aT=Y("vc-imgzoom-"),J0=M.wrap(({instance:e,size:t,zoom:o})=>{let[n,i]=C(!1),[s,l]=C({x:0,y:0}),[c,u]=C({x:0,y:0}),[m,f]=C(0),g=nt(!1),y=nt(o),b=nt(t),P=nt(null),S=nt(null),_=nt(null),N=nt(null);un(()=>{let z=re=>{re.key==="Shift"&&(g.current=!0)},J=re=>{re.key==="Shift"&&(g.current=!1)},me=()=>{S.current&&_.current&&(S.current.currentTime=_.current.currentTime)},W=re=>{if(P.current)if(e.state.mouseOver&&e.state.mouseDown){let fe=b.current/2,fo={x:re.pageX,y:re.pageY},Ft=-((fo.x-P.current.getBoundingClientRect().left)*y.current-fe),ot=-((fo.y-P.current.getBoundingClientRect().top)*y.current-fe);l({x:re.x-fe,y:re.y-fe}),u({x:Ft,y:ot}),f(1)}else f(0)},ee=re=>{e.state.mouseOver&&re.button===0&&(y.current=lt.store.zoom,b.current=lt.store.size,document.getElementById("image-context")&&B.dispatch({type:"CONTEXT_MENU_CLOSE"}),W(re),f(1))},K=()=>{f(0),lt.store.saveZoomValues&&(lt.store.zoom=y.current,lt.store.size=b.current)},ze=async re=>{if(e.state.mouseOver&&e.state.mouseDown&&!g.current){let fe=y.current+re.deltaY/100*(lt.store.invertScroll?-1:1)*lt.store.zoomSpeed;y.current=fe<=1?1:fe,W(re)}if(e.state.mouseOver&&e.state.mouseDown&&g.current){let fe=b.current+re.deltaY*(lt.store.invertScroll?-1:1)*lt.store.zoomSpeed;b.current=fe<=50?50:fe,W(re)}};return Z0(()=>e.state.readyState==="READY",()=>{let re=document.getElementById(Ic);P.current=re,re.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(_.current=re.querySelector("video"),_.current.addEventListener("timeupdate",me)),i(!0)}),document.addEventListener("keydown",z),document.addEventListener("keyup",J),document.addEventListener("mousemove",W),document.addEventListener("mousedown",ee),document.addEventListener("mouseup",K),document.addEventListener("wheel",ze),()=>{document.removeEventListener("keydown",z),document.removeEventListener("keyup",J),document.removeEventListener("mousemove",W),document.removeEventListener("mousedown",ee),document.removeEventListener("mouseup",K),document.removeEventListener("wheel",ze)}},[]),un(()=>()=>{lt.store.saveZoomValues&&(lt.store.zoom=y.current,lt.store.size=b.current)});let U=le(()=>{try{let z=new URL(e.props.src);return z.searchParams.set("animated","true"),z.toString()}catch{return e.props.src}},[e.props.src]);if(!n)return null;let j=P.current?.getBoundingClientRect();return j?r("div",{className:aT("lens",{"nearest-neighbor":lt.store.nearestNeighbour,square:lt.store.square}),style:{opacity:m,width:b.current+"px",height:b.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?r("video",{ref:S,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${j.width*y.current}px`,height:`${j.height*y.current}px`,poster:e.props.src,src:_.current?.src??e.props.src,autoPlay:!0,loop:!0,muted:!0}):r("img",{className:aT("image"),ref:N,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${j.width*y.current}px`,height:`${j.height*y.current}px`,src:U,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 lT="src/plugins/imageZoom/styles.css";var lt=w({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:Xt(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Xt(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Xt(.1,5,.2),default:.5,stickToMarkers:!1}}),R6=(e,t)=>{if("href"in t||t.target?.classList?.contains("emoji"))return;let{square:o,nearestNeighbour:n}=lt.use(["square","nearestNeighbour"]);e.push(r(I.MenuGroup,{id:"image-zoom"},r(I.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:o,action:()=>{lt.store.square=!o}}),r(I.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:n,action:()=>{lt.store.nearestNeighbour=!n}}),r(I.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(i,s)=>r(I.MenuSliderControl,{ref:s,...i,minValue:1,maxValue:50,value:lt.store.zoom,onChange:qt(l=>lt.store.zoom=l,100)})}),r(I.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(i,s)=>r(I.MenuSliderControl,{ref:s,...i,minValue:50,maxValue:1e3,value:lt.store.size,onChange:qt(l=>lt.store.size=l,100)})}),r(I.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(i,s)=>r(I.MenuSliderControl,{ref:s,...i,minValue:.1,maxValue:5,value:lt.store.zoomSpeed,onChange:qt(l=>lt.store.zoomSpeed=l,100),renderValue:l=>`${l.toFixed(3)}x`})})))},$d=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:[d.Aria],tags:["ImageUtilities"],managedStyle:lT,patches:[{find:".dimensionlessImage,",replacement:[{match:/className:\i\.media,/,replace:`id:"${Ic}",$&`},{match:/(?<=null!=(\i)\?.{0,20})\i\.\i,{children:\1/,replace:"'div',{onClick:e=>e.stopPropagation(),children:$1"}]},{find:'="FOCUS_SENSITIVE",',replacement:{match:/(?<=\.hidden]:)\i/,replace:"false"}},{find:".handleImageLoad)",replacement:[{match:/placeholderVersion:\i,(?=.{0,50}children:)/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"},{match:/componentDidUpdate\(\i\){/,replace:"$&$self.updateMagnifier(this);"}]}],settings:lt,contextMenus:{"image-context":R6},currentMagnifierElement:null,element:null,Magnifier:J0,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===Ic&&(this.currentMagnifierElement||(this.currentMagnifierElement=r(J0,{size:lt.store.size,zoom:lt.store.zoom,instance:e}),this.root=Oi(this.element),this.root.render(this.currentMagnifierElement)))}catch(t){new F("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();T();ae();E();v();var cT=Ie("UserAffinitiesV2Store"),Gd=h({name:"ImplicitRelationships",description:"Shows your implicit relationships in the Friends tab.",authors:[d.Dolfies],patches:[{find:"#{intl::FRIENDS_ALL_HEADER}",replacement:{match:/toString\(\)\}\);case (\i\.\i)\.PENDING/,replace:'toString()});case $1.IMPLICIT:return "Implicit \u2014 "+arguments[1];case $1.BLOCKED'}},{find:"FriendsEmptyState: Invalid empty state",replacement:{match:/case (\i\.\i)\.ONLINE:(?=return (\i)\.SECTION_ONLINE)/,replace:"case $1.ONLINE:case $1.IMPLICIT:"}},{find:"#{intl::FRIENDS_SECTION_ONLINE}),className:",replacement:{match:/,{id:(\i\.\i)\.PENDING,show:.+?className:(\i\.item)/,replace:(e,t,o)=>`,{id:${t}.IMPLICIT,show:true,className:${o},content:"Implicit"}${e}`}},{find:'"FriendsStore"',replacement:{match:/(?<=case (\i\.\i)\.SUGGESTIONS:return \d+===(\i)\.type)/,replace:";case $1.IMPLICIT:return $2.type===5"}},{find:'"FriendsStore',replacement:{match:/(\i\.\i)\.fetchRelationships\(\)/,replace:"$1.fetchRelationships(),$self.fetchImplicitRelationships()"}},{find:"getRelationshipCounts(){",replacement:{predicate:()=>G.plugins.ImplicitRelationships.sortByAffinity,match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:".REQUEST_GUILD_MEMBERS",replacement:{match:/\.send\(8,{/,replace:"$&nonce:arguments[1].nonce,"}},{find:"GUILD_MEMBERS_REQUEST:",replacement:{match:/presences:!!(\i)\.presences/,replace:"$&,nonce:$1.nonce"}},{find:".not_found",replacement:{match:/notFound:(\i)\.not_found/,replace:"$&,nonce:$1.nonce"}}],settings:w({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?cT.getUserAffinity(t.user.id)?.communicationRank??0:e(t)},async fetchImplicitRelationships(){let e=cT.getUserAffinities(),t=we.getMutableRelationships(),o=e.filter(u=>!we.getRelationshipType(u.otherUserId));o.forEach(u=>{t.set(u.otherUserId,5)}),we.emitChange();let n=o.filter(u=>!k.getUser(u.otherUserId)),i=Object.keys(Me.getGuilds()),s=xo.fromTimestamp(Date.now()),l=i.length*Math.ceil(n.length/100),c=({chunks:u})=>{try{let m=u.filter(f=>f.nonce===s).length;if(m===0)return;l-=m,we.emitChange(),l<=0&&B.unsubscribe("GUILD_MEMBERS_CHUNK_BATCH",c)}catch(m){new F("ImplicitRelationships").error("Error in GUILD_MEMBERS_CHUNK_BATCH handler",m)}};B.subscribe("GUILD_MEMBERS_CHUNK_BATCH",c);for(let u=0;u<n.length;u+=100)B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:i,userIds:n.slice(u,u+100),presences:!0,nonce:s})},start(){vt.FriendsSections.IMPLICIT="IMPLICIT"}});a();Zg();T();v();function uT(e){let{lightness:t}=ps.use(["lightness"]),o=le(()=>e?Ya(e):null,[e]);return o&&`hsl(${o%360n}, 100%, ${t}%)`}var ps=w({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}}),Hd=h({name:"IrcColors",description:"Makes username colors in chat unique, like in IRC clients",authors:[d.Grzesiek11,d.jamesbt365],settings:ps,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:()=>ps.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=uT(t);return e?.message?.channel_id==="1337"&&t==="313337"||ps.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!ps.store.applyColorOnlyToUsersWithoutColor||!o?n:o},calculateNameColorForListContext(e){try{let t=e?.user?.id,o=e?.colorString,n=uT(t);return ps.store.applyColorOnlyInDms&&e?.guildId!==void 0?o:!ps.store.applyColorOnlyToUsersWithoutColor||!o?n:o}catch(t){console.error("Failed to calculate name color for list context:",t)}}});a();T();v();var zd=!1,Cr,Wd=h({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[d.Nuckyz],patches:[{find:'"Switching accounts"',replacement:{match:/goHomeAfterSwitching:\i/,replace:"goHomeAfterSwitching:!1"}}],flux:{LOGOUT(e){({isSwitchingAccount:zd}=e)},CONNECTION_OPEN(){zd&&(zd=!1,Cr?.channelId&&(Z.hasChannel(Cr.channelId)?Gs.transitionToChannel(Cr.channelId):hr.transitionToGuild("@me")))},async CHANNEL_SELECT({guildId:e,channelId:t}){zd||(Cr={guildId:e,channelId:t},await Ht("KeepCurrentChannel_previousData",Cr))}},async start(){Cr=await Gt("KeepCurrentChannel_previousData"),Cr?Cr.channelId&&Gs.transitionToChannel(Cr.channelId):(Cr={guildId:oo.getGuildId(),channelId:Be.getChannelId()??null},await Ht("KeepCurrentChannel_previousData",Cr))}});a();an();cn();mr();T();ae();v();var D6="790c37d90400163a5a5fe00d6ca32ef0",jd="1108588077900898414",L6="2a96cbd8b46e442fc41c2b86b821562f",pT=new F("LastFMRichPresence");async function Q0(e){return(await dn.fetchAssetIds(jd,[e]))[0]}function O6(e){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var co=w({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}}),qd=h({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[d.dzshn,d.RuiNtD,d.blahajZip,d.archeruwu],settings:co,settingsAboutComponent(){return r(ut,null,r(Ao,{tag:"h5"},"How to create an API key"),r($e,null,"Set ",r("strong",null,"Application name")," and ",r("strong",null,"Application description")," to anything and leave the rest blank."),r(bl,{size:"small",href:"https://www.last.fm/api/account/create",className:A.top8},"Create API Key"))},start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!co.store.username)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:co.store.apiKey||D6,user:co.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 pT.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 pT.error("Failed to query Last.fm API",e),null}},async updatePresence(){O6(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(L6))return e.imageUrl;if(co.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(co.store.hideWithActivity&&no.getActivities(io.getId()).some(l=>l.application_id!==jd&&l.type!==4)||co.store.hideWithSpotify&&no.getActivities(io.getId()).some(l=>l.type===2&&l.application_id!==jd))return null;let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await Q0(t),large_text:e.album||void 0,...co.store.showLastFmLogo&&{small_image:await Q0("lastfm-small"),small_text:"Last.fm"}}:{large_image:await Q0("lastfm-large"),large_text:e.album||void 0},n=[];co.store.shareUsername&&n.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${co.store.username}`});let i=(()=>{switch(co.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||co.store.statusName;default:return co.store.statusName}})(),s={application_id:jd,name:i,details:e.name,state:e.artist,status_display_type:{off:0,artist:1,track:2}[co.store.statusDisplayType],assets:o,buttons:n.length?n.map(l=>l.label):void 0,metadata:{button_urls:n.map(l=>l.url)},type:co.store.useListeningStatus?2:0,flags:1};return co.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();T();ae();a();var dT=`# 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 _6=dT.split(`
|
|
`).map(e=>/^\s*[^#\s]/.test(e)&&e.trim()).filter(Boolean),B6="Did you really disable all loading quotes? What a buffoon you are...",X0=w({replaceEvents:{description:"Should this plugin also apply during events with special event themed quotes? (e.g. Halloween)",type:3,default:!0},enablePluginPresetQuotes:{description:"Enable the quotes preset by this plugin",type:3,default:!0},enableDiscordPresetQuotes:{description:"Enable Discord's preset quotes (including event quotes, during events)",type:3,default:!1},additionalQuotes:{description:"Additional custom quotes to possibly appear, separated by the below delimiter",type:0,default:""},additionalQuotesDelimiter:{description:"Delimiter for additional quotes",type:0,default:"|"}}),Kd=h({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[d.Ven,d.KraXen72,d.UlyssesZhan],settings:X0,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:()=>X0.store.replaceEvents}]}],mutateQuotes(e){try{let{enableDiscordPresetQuotes:t,additionalQuotes:o,additionalQuotesDelimiter:n,enablePluginPresetQuotes:i}=X0.store;t||(e.length=0),i&&e.push(..._6),e.push(...o.split(n).filter(Boolean)),e.length||e.push(B6)}catch(t){new F("LoadingQuotes").error("Failed to mutate quotes",t)}}});a();ve();T();E();a();ie();te();v();a();function V0({className:e}){return r("svg",{viewBox:"0 0 24 24",className:e},r("circle",{cx:"12",cy:"12",r:"8"}))}a();$o();te();v();var Yd=Nt(()=>{let e=new wo,t=new Map;class o extends Es.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await ul.preload(i,$r.getDefaultChannel(i).id)}ensureCount(i){!i||t.has(i)||e.push(()=>this._ensureCount(i).then(()=>ur(200),()=>ur(200)))}}return new o(B,{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 mT({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 ry({isTooltip:e,tooltipGuildId:t}){let{voiceActivity:o}=Nc.use(["voiceActivity"]),n=o&&!e,i=ne([Be],()=>Ho()),s=e?t:i?.guild_id,l=ne([so],()=>{if(!n)return 0;let b=so.getVoiceStates(s);return b?Object.values(b).filter(({channelId:P})=>{if(!P)return!1;let S=Z.getChannel(P);return S&&Te.can(ce.VIEW_CHANNEL,S)}).length:0}),c=ne([ey],()=>ey.getMemberCount(s)),u=ne([Yd],()=>Yd.getCount(s)),{groups:m}=ne([ty],()=>ty.getProps(s,i?.id)),f=ne([oy],()=>oy.getMemberListSections(i?.id));if(!e&&(m.length>=1||m[0].id!=="unknown")&&(u=m.reduce((b,P)=>b+(P.id==="offline"?0:P.count),0)),!e&&f&&!Si(f)&&(u=Object.values(f).reduce((b,P)=>b+(P.sectionId==="offline"?0:P.userIds.length),0)),X(()=>{Yd.ensureCount(s)},[s]),c==null)return null;let g=Mc(l??0),y=u!=null?Mc(u):"?";return r("div",{className:Ar("widget",{tooltip:e,"member-list":!e})},r(Q,{text:`${y} online in this channel`,position:"bottom"},b=>r("div",{...b,className:Ar("container")},r(V0,{className:Ar("online-count")}),r("span",{className:Ar("online")},y))),r(Q,{text:`${Mc(c)} total server members`,position:"bottom"},b=>r("div",{...b,className:Ar("container")},r(V0,{className:Ar("total-count")}),r("span",{className:Ar("total")},Mc(c)))),n&&l>0&&r(Q,{text:`${g} members in voice`,position:"bottom"},b=>r("div",{...b,className:Ar("container")},r(mT,{className:Ar("voice-icon")}),r("span",{className:Ar("voice")},g))))}var ey=Ie("GuildMemberCountStore"),ty=Ie("ChannelMemberStore"),oy=Ie("ThreadMemberListStore"),Nc=w({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}}),E6=new Intl.NumberFormat,Mc=e=>E6.format(e),Ar=Y("vc-membercount-"),Zd=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:[d.Ven,d.Commandtechno,d.Apexo],settings:Nc,patches:[{find:"{isSidebarVisible:",replacement:[{match:/(?<=var\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}],predicate:()=>Nc.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/#{intl::VIEW_AS_ROLES_MENTIONS_WARNING}.{0,100}(?=])/,replace:"$&,$self.renderTooltip(arguments[0].guild)"},predicate:()=>Nc.store.toolTip}],render:M.wrap(()=>r(ry,null),{noop:!0}),renderTooltip:M.wrap(e=>r(ry,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})});a();T();v();var gT=w({showAtSymbol:{type:3,description:"Whether the the @ symbol should be displayed on user mentions",default:!0}});function U6(){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 Jd=h({name:"MentionAvatars",description:"Shows user avatars and role icons inside mentions",authors:[d.Ven,d.SerStars],patches:[{find:".USER_MENTION)",replacement:{match:/children:"@"\.concat\((null!=\i\?\i:\i)\)(?<=\.useName\((\i)\).+?)/,replace:"children:$self.renderUsername({username:$1,user:$2})"}},{find:".ROLE_MENTION)",replacement:{match:/children:\[\i&&.{0,100}className:\i.roleDot,.{0,200},\i(?=\])/,replace:"$&,$self.renderRoleIcon(arguments[0])"}}],settings:gT,renderUsername:M.wrap(e=>{let{user:t,username:o}=e,[n,i]=C(!1);return t?r("span",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},r("img",{src:t.getAvatarURL(oo.getGuildId(),16,n),className:"vc-mentionAvatars-icon",style:{borderRadius:"50%"}}),fT(o)):r(p,null,fT(o))},{noop:!0}),renderRoleIcon:M.wrap(({roleId:e,guildId:t})=>{if(!e)return null;let o=bt.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(U6,null)},{noop:!0})});function fT(e){return gT.store.showAtSymbol?`@${e}`:e}a();a();T();v();var kc=w({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},roleList:{description:"List of roles to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users / 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}}),qr=h({name:"NoReplyMention",description:"Disables reply pings by default",authors:[d.DustyAngel47,d.rae,d.pylix,d.outfoxxed],settings:kc,shouldMention(e,t){let o=kc.store.userList.includes(e.author.id),n=Z.getChannel(e.channel_id);if(n?.guild_id&&!o){let s=be.getMember(n.guild_id,e.author.id)?.roles;o=!!s&&s.some(l=>kc.store.roleList.includes(l))}let i=kc.store.shouldPingListed?o:!o;return kc.store.inverseShiftReply?t!==i:!t&&i},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]});T();E();v();var hT=D("deleteMessage","startEditMessage"),$6=D("isEditing","isEditingAny"),Qd=!1,yT=e=>e.key==="Backspace"&&(Qd=!0),vT=e=>e.key==="Backspace"&&(Qd=!1),bT=()=>!Gr.isFocused()&&(Qd=!1),ma=w({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}}),Xd=h({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[d.Ven],settings:ma,start(){document.addEventListener("keydown",yT),document.addEventListener("keyup",vT),Gr.addChangeListener(bT)},stop(){document.removeEventListener("keydown",yT),document.removeEventListener("keyup",vT),Gr.removeChangeListener(bT)},onMessageClick(e,t,o){let n=io.getId(),i=e.author.id===n,s=e.interactionMetadata?.authorizing_integration_owners[1]===n;if(Qd)ma.store.enableDeleteOnClick&&(i||Te.can(ce.MANAGE_MESSAGES,t)||s)&&(e.deleted?B.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:e.id,mlDeleted:!0}):hT.deleteMessage(t.id,e.id),o.preventDefault());else{if(o.detail<2||ma.store.requireModifier&&!o.ctrlKey&&!o.shiftKey||t.guild_id&&!Te.can(ce.SEND_MESSAGES,t)||e.deleted===!0)return;if(i){if(!ma.store.enableDoubleClickToEdit||$6.isEditing(t.id,e.id)||e.state!=="SENT")return;hT.startEditMessage(t.id,e.id,e.content),o.preventDefault()}else{if(!ma.store.enableDoubleClickToReply||!kl.REPLYABLE.has(e.type)||e.hasFlag(64))return;let l=o.shiftKey&&!ma.store.requireModifier,c=Ne(qr.name)?qr.shouldMention(e,l):!l;B.dispatch({type:"CREATE_PENDING_REPLY",channel:t,message:e,shouldMention:c,showMentionToggle:t.guild_id!==null})}}}});a();T();E();v();var ST=1471228928,G6=pe(".hiddenVisually]:"),Vd=h({name:"MessageLatency",description:"Displays an indicator for messages that took \u2265n seconds to send",authors:[d.arHSM],settings:w({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+(Tr(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(!Tr(l)||e.author.bot||i&&e.author.id===io.getId())return null;let c=!1,u=xo.extractTimestamp(s)-xo.extractTimestamp(l);n||(u=Math.round(u/1e3)*1e3),-u>=ST-864e5&&(c=o,u+=ST);let m=Math.abs(u),f=m!==u,g=t*1e3,y=m>=g?this.stringDelta(m,n):null,b=120*1e3,P=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 m>=g||c?{delta:y,ahead:f,fill:P,isDiscordKotlin:c}:null},Tooltip(){return M.wrap(({message:e})=>{let t=this.latencyTooltipData(e);if(!Tr(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(Q,{text:o,position:"top"},n=>r(p,null,r(this.Icon,{delta:t.delta,fill:t.fill,props:n}),r(G6,null,"Delayed Message")))},{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();T();te();E();v();var fa=new Map,H6=pe(".inlineMediaEmbed"),z6=pe(".withFooter]:","childrenMessageContent:"),W6=pe("childrenExecutedCommand:",".hideAccessories"),xT=D("message","searchResult"),ny=D("embedAuthorIcon","embedAuthor","embedAuthor"),TT=Po("textAndImages","messageDisplayCompact"),iy=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(?:\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,wT=/^https:\/\/(?:www\.)?tenor\.com\//,j6=new wo,em=w({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:""},clearMessageCache:{type:6,component:()=>r(R,{onClick:()=>fa.clear()},"Clear the linked message cache")}});async function q6(e,t){let o=fa.get(t);if(o)return o.message;fa.set(t,{fetched:!1});let i=(await wt.get({url:vt.Endpoints.MESSAGES(e),query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=jt.getMessages(i.channel_id).receiveMessage(i).get(i.id);if(s)return fa.set(s.id,{message:s,fetched:!0}),s}function K6(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"&&!wT.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function Y6(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 Z6(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||wT.test(t.url))))}function J6(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 Q6(e,t){return new Proxy(e,{get(o,n){return n==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function X6({message:e}){let t=e.vencordEmbeddedBy??[],o=[];for(let[n,i,s]of e.content.matchAll(iy)){if(t.includes(s)||t.length>2)continue;let l=Z.getChannel(i);if(!l||!l.isPrivate()&&!Te.can(ce.VIEW_CHANNEL,l))continue;let{listMode:c,idList:u}=em.store,m=[l.guild_id,i,e.author.id].some(b=>b&&u.includes(b));if(c==="blacklist"&&m||c==="whitelist"&&!m)continue;let f=fa.get(s)?.message;if(!f)if(f??=jt.getMessage(i,s),f)fa.set(s,{message:f,fetched:!0});else{j6.unshift(()=>q6(i,s).then(b=>b&&us(e.channel_id,e.id)));continue}let g={message:Q6(f,[...t,e.id]),channel:l},y=em.store.automodEmbeds;o.push(y==="always"||y==="prefer"&&!Z6(f)?r(eN,{...g}):r(V6,{...g}))}return o.length?r(p,null,o):null}function PT(e){return e.isDM()?["Direct Message",Pt.getUserAvatarURL(k.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",Pt.getChannelIconURL(e)]:["Server",Pt.getGuildIconURL(Me.getGuild(e.guild_id))]}function V6({message:e,channel:t}){let o=TT.useSetting(),n=k.getUser(Z.getChannel(t.id).recipients?.[0]),[i,s]=PT(t);return r(H6,{embed:{rawDescription:"",color:"var(--background-base-lower)",author:{name:r(H,{variant:"text-xs/medium",tag:"span"},r("span",null,i," - "),Pe.parse(t.isDM()?`<@${n.id}>`:`<#${t.id}>`)),iconProxyURL:s}},renderDescription:()=>r("div",{key:e.id,className:L(xT.message,em.store.messageBackgroundColor&&xT.searchResult)},r(W6,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1,compact:o}))})}function eN(e){let{message:t,channel:o}=e,n=TT.useSetting(),i=K6(t),{parse:s}=Pe,[l,c]=PT(o);return r(z6,{channel:o,childrenAccessories:r(H,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${ny.embedAuthor} ${ny.embedMargin}`},c&&r("img",{src:c,className:ny.embedAuthorIcon,alt:""}),r("span",null,r("span",null,l," - "),o.isDM()?Pe.parse(`<@${Z.getChannel(o.id).recipients[0]}>`):Pe.parse(`<#${o.id}>`))),compact:n,content:r(p,null,t.content||t.attachments.length<=i.length?s(t.content):[Y6(t.attachments.length,t.embeds.length)],i.map((u,m)=>{let{width:f,height:g}=J6(u.width,u.height);return r("div",{key:m},r("img",{src:u.url,width:f,height:g}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var tm=h({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[d.TheSun,d.Ven,d.RyanCaoDev],dependencies:["MessageAccessoriesAPI","MessageUpdaterAPI","UserSettingsAPI"],settings:em,start(){$l("MessageLinkEmbeds",e=>iy.test(e.message.content)?(iy.lastIndex=0,r(X6,{message:e.message})):null,4)},stop(){Gl("MessageLinkEmbeds")}});a();ve();T();ie();ae();te();E();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 sy="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(--interactive-normal, var(--status-danger, #f04747));
|
|
--text-muted: var(--status-danger, #f04747);
|
|
--embed-title: var(--red-460, #be3535);
|
|
--text-link: var(--red-460, #be3535);
|
|
--header-primary: var(--red-460, #be3535);
|
|
}`,classNames:{},dom:null});var ay="src/plugins/messageLogger/deleteStyleText.css";a();ve();te();Fe();E();v();var tN=D("markup","codeContainer"),oN=D("messageContent","markupRtl"),Cc=Y("vc-ml-modal-");function IT(e){de(t=>r(M,null,r(rN,{modalProps:t,message:e})))}function rN({modalProps:e,message:t}){let[o,n]=C(t.editHistory.length),i=[t.firstEditTimestamp,...t.editHistory.map(l=>l.timestamp)],s=[...t.editHistory.map(l=>l.content),t.content];return r(he,{...e,size:"large"},r(ke,{className:Cc("head")},r(H,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Message Edit History"),r(tt,{onClick:e.onClose})),r(Se,{className:Cc("contents")},r(bo,{type:"top",look:"brand",className:L("vc-settings-tab-bar",Cc("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(bo.Item,{className:"vc-settings-tab-bar-item",id:-1,disabled:!0},r(Qt,{className:Cc("timestamp"),timestamp:t.timestamp,isEdited:!0,isInline:!1}))),i.map((l,c)=>r(bo.Item,{key:c,className:"vc-settings-tab-bar-item",id:c},r(Qt,{className:Cc("timestamp"),timestamp:l,isEdited:!0,isInline:!1})))),r("div",{className:L(tN.markup,oN.messageContent,A.top20)},ly(s[o],t))))}var nN=D("edited","communicationDisabled","isSystemMessage");function MT(){G.plugins.MessageLogger.deleteStyle==="text"?(Yt(ay),go(sy)):(go(ay),Yt(sy))}var NT="ml-remove-history",kT="ml-toggle-style",iN=(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(I.MenuItem,{id:kT,key:kT,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(r(I.MenuItem,{id:NT,key:NT,label:"Remove Message History",color:"danger",action:()=>{n?B.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))}},om=(e,{channel:t})=>{let o=jt.getMessages(t?.id);if(!o?.some(i=>i.deleted||i.editHistory?.length))return;(Ge("mark-channel-read",e)??e).push(r(I.MenuItem,{id:"vc-ml-clear-channel",label:"Clear Message Log",color:"danger",action:()=>{o.forEach(i=>{i.deleted?B.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:i.id,mlDeleted:!0}):us(t.id,i.id,{editHistory:[]})})}}))};function ly(e,t){return Pe.parse(e,!0,{channelId:t.channel_id,messageId:t.id,allowLinks:!0,allowHeading:!0,allowList:!0,allowEmojiLinks:!0,viewingChannelId:Be.getChannelId()})}var rm=h({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[d.rushii,d.Ven,d.AutumnVN,d.Nickyux,d.Kyuuhachi],dependencies:["MessageUpdaterAPI"],contextMenus:{message:iN,"channel-context":om,"thread-context":om,"user-context":om,"gdm-context":om},start(){MT()},renderEdits:M.wrap(({message:{id:e,channel_id:t}})=>{let o=ne([jt],()=>jt.getMessage(t,e),null,(n,i)=>n?.editHistory===i?.editHistory);return G.plugins.MessageLogger.inlineEdits&&r(p,null,o.editHistory?.map((n,i)=>r("div",{key:i,className:"messagelogger-edited"},ly(n.content,o),r(Qt,{timestamp:n.timestamp,isEdited:!0,isInline:!1},r("span",{className:nN.edited}," ","(",xe("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:()=>MT()},logDeletes:{type:3,description:"Whether to log deleted messages",default:!0},collapseDeleted:{type:3,description:"Whether to collapse deleted messages, similar to blocked messages",default:!1,restartNeeded:!0},logEdits:{type:3,description:"Whether to log edited messages",default:!0},inlineEdits:{type:3,description:"Whether to display edit history as part of message content",default:!0},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let 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(m=>(m.deleted=!0,m))))};o?t.ids.forEach(n):n(t.id)}catch(n){new F("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}=G.plugins.MessageLogger,m=k.getCurrentUser().id;return o&&e.author?.bot||n&&e.author?.id===m||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(Z.getChannel(e.channel_id)?.parent_id)||(t?!c:!u)||l.includes(Z.getChannel(e.channel_id)?.guild_id)||e.author?.id===Ts&&Z.getChannel(e.channel_id)?.parent_id===_n}catch{return!1}},EditMarker({message:e,className:t,children:o,...n}){return r("span",{...n,className:L("messagelogger-edit-marker",t),onClick:()=>IT(e),role:"button"},o)},DELETED_MESSAGE_COUNT:()=>({ast:[[6,"count",{"=0":["No deleted messages"],one:[[1,"count"]," deleted message"],other:[[1,"count"]," deleted messages"]},0,"cardinal"]]}),patches:[{find:'"MessageStore"',replacement:[{match:/function (?=.+?MESSAGE_DELETE:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,replace:"function $1($2){ var cache = $3getOrCreate($2.channelId); cache = $self.handleDelete(cache, $2, false); $3commit(cache);}"},{match:/function (?=.+?MESSAGE_DELETE_BULK:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,replace:"function $1($2){ var cache = $3getOrCreate($2.channelId); cache = $self.handleDelete(cache, $2, true); $3commit(cache);}"},{match:/(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/,replace:"$1.update($4,m => (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m : $3.message.edited_timestamp && $3.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) : m).update($4"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],this.firstEditTimestamp = $1.firstEditTimestamp || this.editedTimestamp || this.timestamp,"}]},{find:"THREAD_STARTER_MESSAGE?null==",replacement:[{match:/(?<=null!=\i\.edited_timestamp\)return )\i\(\i,\{reactions:(\i)\.reactions.{0,50}\}\)/,replace:"Object.assign($&,{ deleted:$1.deleted, editHistory:$1.editHistory, firstEditTimestamp:$1.firstEditTimestamp })"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory,firstEditTimestamp: new Date(arguments[1]?.firstEditTimestamp ?? $2.editedTimestamp ?? $2.timestamp)"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeMosaicItemHoverButton",replacement:[{match:/\[\i\.obscured\]:.+?,(?<=item:(\i).+?)/,replace:'$&"messagelogger-deleted-attachment":$1.originalItem?.deleted,'}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:".SEND_FAILED,",replacement:{match:/\.isFailed]:.+?children:\[/,replace:"$&arguments[0]?.message?.editHistory?.length>0&&$self.renderEdits(arguments[0]),"}},{find:"#{intl::MESSAGE_EDITED}",replacement:{match:/"span",\{(?=className:\i\.edited,)/,replace:"$self.EditMarker,{message:arguments[0].message,"}},{find:'"ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:\i,/,replace:"MESSAGE_DELETE:()=>{},"},{match:/MESSAGE_DELETE_BULK:\i,/,replace:"MESSAGE_DELETE_BULK:()=>{},"}]},{find:".MESSAGE,commandTargetId:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]},{find:"NON_COLLAPSIBLE.has(",replacement:{match:/if\((\i)\.blocked\)return \i\.\i\.MESSAGE_GROUP_BLOCKED;/,replace:'$&else if($1.deleted) return"MESSAGE_GROUP_DELETED";'},predicate:()=>G.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:()=>G.plugins.MessageLogger.collapseDeleted}]});a();T();var di="<:luna:1035316192220553236>";var sN=Symbol("MessageTags");function CT(){return ga.store.tagsList}function nm(e){return ga.store.tagsList[e]??null}function aN(e){ga.store.tagsList[e.name]=e}function lN(e){delete ga.store.tagsList[e]}function AT(e){qs({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>nm(e.name)?(ga.store.clyde&&at(o.channel.id,{content:`${di} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
|
|
`)}):(at(o.channel.id,{content:`${di} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[sN]:!0},"CustomTags")}var ga=w({clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0},tagsList:{type:7,default:{}}}),im=h({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[d.Luna],settings:ga,async start(){let e=CT();for(let t in e)AT(e[t])},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=Oo(e[0].options,"tag-name",""),n=Oo(e[0].options,"message","");if(nm(o))return at(t.channel.id,{content:`${di} A Tag with the name **${o}** already exists!`});let i={name:o,message:n};AT(i),aN(i),at(t.channel.id,{content:`${di} Successfully created the tag **${o}**!`});break}case"delete":{let o=Oo(e[0].options,"tag-name","");if(!nm(o))return at(t.channel.id,{content:`${di} A Tag with the name **${o}** does not exist!`});Fl(o),lN(o),at(t.channel.id,{content:`${di} Successfully deleted the tag **${o}**!`});break}case"list":{at(t.channel.id,{embeds:[{title:"All Tags:",description:Object.values(CT()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
|
|
`)||`${di} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=Oo(e[0].options,"tag-name",""),n=nm(o);if(!n)return at(t.channel.id,{content:`${di} A Tag with the name **${o}** does not exist!`});at(t.channel.id,{content:n.message.replaceAll("\\n",`
|
|
`)});break}default:{at(t.channel.id,{content:"Invalid sub-command"});break}}}}]});a();T();ae();E();v();var cN=D("selectPrivateChannel"),uN=D("getGlobalName"),sm=D("emptyIconFriends","emptyIconGuilds"),am=D("row","icon","name","nick"),pN=pe('"PRESS_SECTION"',".header");function dN(e){return e.name||e.recipients.map(k.getUser).filter(Tr).map(t=>we.getNickname(t.id)||uN.getName(t)).join(", ")}var lm=e=>Z.getSortedPrivateChannels().filter(t=>t.isGroupDM()&&t.recipients.includes(e)),mN=e=>e.bot||e.id===k.getCurrentUser().id;function fN(e){let t=lm(e.id).length;return`${t===0?"No":t} Mutual Group${t!==1?"s":""}`}function RT(e,t){return e.map(o=>r(So,{key:o.id,className:am.row,onClick:()=>{t(),cN.selectPrivateChannel(o.id)}},r(Sl,{src:Pt.getChannelIconURL({id:o.id,icon:o.icon,size:32}),size:"SIZE_40",className:am.icon}),r("div",{className:am.details},r("div",{className:am.name},dN(o)),r(H,{variant:"text-xs/medium"},o.recipients.length+1," Members"))))}var DT=Symbol("MutualGroupDMs.Patched"),cm=h({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[d.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\.tabBar/,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:/\.tabBarPanel,.*?children:(?=.+?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)\.divider}\)).+?)/,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 lm(e)}catch(t){new F("MutualGroupDMs").error("Failed to get mutual group dms:",t)}return[]},pushSection(e,t){try{if(mN(t)||e[DT])return;e[DT]=!0,e.push({text:fN(t),section:"MUTUAL_GDMS"})}catch(o){new F("MutualGroupDMs").error("Failed to push mutual group dms section:",o)}},renderMutualGDMs:M.wrap(({user:e,onClose:t})=>{let o=le(()=>lm(e.id),[e.id]),n=RT(o,t);return r(qn,{className:sm.listScroller,fade:!0,onClose:t},n.length>0?n:r("div",{className:sm.empty},r("div",{className:sm.emptyIconFriends}),r("div",{className:sm.emptyText},"No group dms in common")))}),renderDMPageList:M.wrap(({user:e,hasDivider:t,Divider:o,listStyle:n})=>{let i=lm(e.id);return i.length===0?null:r(p,null,t&&o,r(pN,{listClassName:n,header:"Mutual Groups",isLoading:!1,items:RT(i,()=>{})}))},{noop:!0})});a();Qe();T();E();v();var{updateGuildNotificationSettings:LT}=D("updateGuildNotificationSettings"),{toggleShowAllChannels:gN}=Ue(".onboardExistingMember(",{toggleShowAllChannels:e=>{let t=String(e);return t.length<100&&!t.includes("onboardExistingMember")&&!t.includes("getOptedInChannels")}}),hN=ue(".COMMUNITY)||",".isOptInEnabled("),In=w({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}}),OT=e=>(t,{guild:o})=>{if(!o)return;Ge("privacy",t)?.push(r(I.MenuItem,{label:"Apply NewGuildSettings",id:"vc-newguildsettings-apply",icon:e?ml:void 0,action:()=>_T(o.id)}))};function _T(e){e==="@me"||e==="null"||e==null||(LT(e,{muted:In.store.guild,suppress_everyone:In.store.everyone,suppress_roles:In.store.role,mute_scheduled_events:In.store.events,notify_highlights:In.store.highlights?1:0}),In.store.messages!==3&<(e,{message_notifications:In.store.messages}),In.store.showAllChannels&&hN(e)&&gN(e))}var um=h({name:"NewGuildSettings",description:"Automatically mute new servers and change various other settings upon joining",tags:["MuteNewGuild","mute","server"],authors:[d.Glitch,d.Nuckyz,d.carince,d.Mopi,d.GabiRP],contextMenus:{"guild-context":OT(!1),"guild-header-popout":OT(!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:In,applyDefaultSettings:_T});a();T();Ps();ae();v();Yh("NoBlockedMessages","ignoreBlockedMessages","ignoreMessages");var pm=w({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}}),ds=h({name:"NoBlockedMessages",description:"Hides all blocked/ignored messages from chat completely",authors:[d.rushii,d.Samu,d.jamesbt365],settings:pm,patches:[{find:".__invalid_blocked,",replacement:[{match:/let{expanded:\i,[^}]*?collapsedReason[^}]*}/,replace:"if($self.shouldHide(arguments[0]))return null;$&"}]},...['"MessageStore"','"ReadStateStore"'].map(e=>({find:e,predicate:()=>pm.store.ignoreMessages,replacement:[{match:/(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,replace:(t,o,n)=>`if($self.shouldIgnoreMessage(${n}.message))return;`}]}))],shouldIgnoreMessage(e){try{return we.isBlocked(e.author.id)?!0:pm.store.applyToIgnoredUsers&&we.isIgnored(e.author.id)}catch(t){return new F("NoBlockedMessages").error("Failed to check if user is blocked or ignored:",t),!1}},shouldHide(e){try{let t=e.collapsedReason(),o=n=>t===pr.t[Xr(n)]()||t===pr.t[xi(n)]();return o("BLOCKED_MESSAGE_COUNT")||pm.store.applyToIgnoredUsers&&o("IGNORED_MESSAGE_COUNT")}catch(t){return new F("NoBlockedMessages").error("Failed to check if message should be hidden:",t),!1}}});a();T();var dm=h({name:"DisableDeepLinks",description:"Disables Discord's stupid deep linking feature which tries to force you to use their Desktop App",authors:[d.Ven],required:!0,noop:()=>{},patches:[{find:/\.openNativeAppModal\(.{0,50}?\.DEEP_LINK/,replacement:{match:/\i\.\i\.openNativeAppModal/,replace:"$self.noop"}}]});a();T();var mm=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:[d.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]});a();T();var fm=h({name:"NoF1",description:"Disables F1 help bind.",authors:[d.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]});a();T();var gm=h({name:"NoMaskedUrlPaste",authors:[d.CatNoir],description:"Pasting a link while having text selected will not paste as masked URL",patches:[{find:".selection,preventEmojiSurrogates:",replacement:{match:/if\(null!=\i.selection&&\i.\i.isExpanded\(\i.selection\)\)/,replace:"if(false)"}}]});a();T();var BT=w({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),hm=h({name:"NoMosaic",authors:[d.AutumnVN],description:"Removes Discord image mosaic",tags:["image","mosaic","media"],settings:BT,patches:[{find:'=>"IMAGE"===',replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/,replace:(e,t)=>t!=null?`=>${t};`:"=>false;"}},{find:"renderAttachments(",predicate:()=>BT.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]});a();T();var ym=h({name:"NoOnboardingDelay",description:"Skips the slow and annoying onboarding delay",authors:[d.nekohaxx],patches:[{find:"#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}",replacement:{match:"3e3",replace:"0"}}]});a();T();E();var yN=D("getMessageRequestsCount"),Ac=w({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}}),vm=h({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[d.amia],settings:Ac,patches:[{find:"getPendingCount(){",predicate:()=>Ac.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Ac.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount();return",predicate:()=>Ac.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Ac.store.hidePremiumOffersCount,replacement:{match:/(\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.+?)\2\+\3/,replace:(e,t)=>`${t}0`}}],getRealMessageRequestCount(){return yN.getMessageRequestChannelIds().size}});a();T();v();var bm=h({name:"NoProfileThemes",description:"Completely removes Nitro profile themes from everyone but yourself",authors:[d.TheKodeToad],patches:[{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&$self.isCurrentUser(this.userId)&&"}}],isCurrentUser:e=>e===k.getCurrentUser()?.id});a();T();var cy=w({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"}]}}),Sm=h({name:"NoServerEmojis",authors:[d.UlyssesZhan],description:"Do not show server emojis in the autocomplete menu.",settings:cy,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:cy.store.shownEmojis==="onlyUnicode"?!0:cy.store.shownEmojis==="currentServer"?t.guildId!==(e!=null?e.getGuildId():null):!1}});a();T();var xm=h({name:"NoTypingAnimation",authors:[d.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/focused:(\i)/g,replace:(e,t)=>`_focused:${t}=false`}}]});a();T();var Tm=h({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked or ignored users and likely spammers without unblocking them",authors:[d.dzshn],patches:[{find:"#{intl::UNIGNORE_TO_JUMP_BODY}",replacement:{match:/if\(\i\.\i\.isBlockedForMessage\(/,replace:"return true;$&"}}]});a();T();var wm=h({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[d.bb010g],patches:[{find:"#{intl::COPY_MESSAGE_LINK}",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}});a();T();var vN=w({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),Pm=h({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[d.philipbry],settings:vN,patches:[{find:"ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,replace:"$self.settings.store.notificationVolume/100*"}}]});a();T();v();var Rc=w({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}}),Im=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:[d.ProffDea],settings:Rc,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=Z.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&Rc.store.channelToAffect==="group_dm"||t===3&&Rc.store.channelToAffect==="user_dm"||Rc.store.allowMentions&&e.mentions.some(o=>o.id===k.getCurrentUser().id)||Rc.store.allowEveryone&&e.mention_everyone?!0:Kn.getOldestUnreadMessageId(e.channel_id)===e.id}});a();T();var Mm=h({name:"oneko",description:"cat follow mouse (real)",authors:[d.Ven,d.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();T();v();var uy={spotify:{match:/^https:\/\/open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|artist|playlist|user|episode|prerelease)\/(.+)(?:\?.+?)?$/,replace:(e,t,o)=>`spotify://${t}/${o}`,description:"Open Spotify links in the Spotify app",shortlinkMatch:/^https:\/\/spotify\.link\/.+$/,accountViewReplace:e=>`spotify:user:${e}`},steam:{match:/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,replace:e=>`steam://openurl/${e}`,description:"Open Steam links in the Steam app",shortlinkMatch:/^https:\/\/s.team\/.+$/,accountViewReplace:e=>`steam://openurl/https://steamcommunity.com/profiles/${e}`},epic:{match:/^https:\/\/store\.epicgames\.com\/(.+)$/,replace:(e,t)=>`com.epicgames.launcher://store/${t}`,description:"Open Epic Games links in the Epic Games Launcher"},tidal:{match:/^https:\/\/tidal\.com\/(?:browse\/)?(track|album|artist|playlist|user|video|mix)\/(.+)(?:\?.+?)?$/,replace:(e,t,o)=>`tidal://${t}/${o}`,description:"Open Tidal links in the Tidal app"},itunes:{match:/^https:\/\/(?:geo\.)?music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/,replace:(e,t,o,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"}},Nm=w(Object.entries(uy).reduce((e,[t,o])=>(e[t]={type:3,description:o.description,default:!0},e),{})),bN=VencordNative.pluginHelpers.OpenInApp,Mn=h({name:"OpenInApp",description:"Open links in their respective apps instead of your browser",authors:[d.Ven,d.surgedevs],settings:Nm,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:()=>Nm.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(uy))if(Nm.store[n]&&(i.shortlinkMatch?.test(o)&&(t?.preventDefault(),o=await bN.resolveRedirect(o)),i.match.test(o))){Re("Opened link in native app",q.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=uy[t];if(n?.accountViewReplace&&Nm.store[t])return VencordNative.native.openExternal(n.accountViewReplace(o)),e.preventDefault(),!0}});a();T();var py=w({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"}}),km=h({name:"OverrideForumDefaults",description:"Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",authors:[d.Inbestigator],patches:[{find:"getDefaultLayout(){",replacement:[{match:/}getDefaultLayout\(\){/,replace:"$&return $self.getLayout();"},{match:/}getDefaultSortOrder\(\){/,replace:"$&return $self.getSortOrder();"}]}],getLayout:()=>py.store.defaultLayout,getSortOrder:()=>py.store.defaultSortOrder,settings:py});a();T();ie();v();function SN(e){let t=Me.getGuild(e);return t?!ll(t,"INVITES_DISABLED")&&Te.getGuildPermissionProps(t).canManageRoles:!1}function xN(e){let o=[...Me.getGuild(e).features,"INVITES_DISABLED"];wt.patch({url:vt.Endpoints.GUILD(e),body:{features:o}})}var Cm=h({name:"PauseInvitesForever",tags:["DisableInvitesForever"],description:"Brings back the option to pause invites indefinitely that stupit Discord removed.",authors:[d.Dolfies,d.amia],patches:[{find:"#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}",group:!0,replacement:[{match:/children:\i\.\i\.string\(\i\.\i#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}\)/,replace:"children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})"},{match:/\.INVITES_DISABLED\)(?=.+?#{intl::INVITES_PERMANENTLY_DISABLED_TIP}.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,replace:"$&,setChecked=$2"}]}],renderInvitesLabel:M.wrap(({guildId:e,setChecked:t})=>r("div",null,xe("GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION"),SN(e)&&r("a",{role:"button",onClick:()=>{t(!0),xN(e)}}," Pause Indefinitely.")),{noop:!0})});a();T();Zo();var dy=w({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}}),Am=h({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[d.lewisakura],patches:[{find:"#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>dy.store.lockout},{find:"#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}",replacement:[{match:/{(?:\i:\(\)=>\i,?){2}}/,replace:e=>e.replaceAll(Rt(/\(\)=>\i/g),"()=>()=>Promise.resolve(true)")}],predicate:()=>dy.store.onboarding}],settings:dy});a();Qe();T();te();E();v();a();Qe();a();ve();E();v();var{getGuildPermissionSpecMap:Rm}=D("getGuildPermissionSpecMap"),it=Y("vc-permviewer-");function Dm({id:e},t){return bt.getSortedRoles(e).filter(o=>o.id===e||t.roles.includes(o.id))}function UT(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 Lm(e,t){let o=bt.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})}tn();ie();Fe();E();v();a();function my(){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 fy(){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 $T(){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 wN=ue("convertSurrogateToName","customIconSrc","unicodeEmoji");function PN(e){let t=wN(e,20);if(!t)return;let{customIconSrc:o,unicodeEmoji:n}=t;return o??n?.url}function IN({permissions:e,guild:t,modalProps:o,header:n}){let i=le(()=>Rm(t),[t.id]);ne([be],()=>be.getMemberIds(t.id),null,(m,f)=>m.length===f.length),X(()=>{e.sort((m,f)=>m.type-f.type)},[e]),X(()=>{let m=e.filter(f=>f.type===1&&!be.isMember(t.id,f.id)).map(({id:f})=>f);B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:m})},[]);let[s,l]=C(0),c=e[s],u=bt.getRolesSnapshot(t.id);return r(he,{...o,size:"large"},r(ke,null,r(H,{className:it("modal-title"),variant:"heading-lg/semibold"},n," Permissions"),r(tt,{onClick:o.onClose})),r(Se,{className:it("modal-content")},!c&&r("div",{className:it("modal-no-perms")},r(H,{variant:"heading-lg/normal"},"No permissions to display!")),c&&r("div",{className:it("modal-container")},r(qn,{className:it("modal-list"),orientation:"auto"},e.map((m,f)=>{let g=k.getUser(m.id??""),y=u[m.id??""],b=y!=null?PN(y):void 0;return r("div",{key:f,className:it("modal-list-item-btn"),onClick:()=>l(f),role:"button",tabIndex:0},r("div",{className:it("modal-list-item",{"modal-list-item-active":s===f}),onContextMenu:P=>{m.type===0?st.openContextMenu(P,()=>r(MN,{guild:t,roleId:m.id,onClose:o.onClose})):m.type===1&&st.openContextMenu(P,()=>r(NN,{userId:m.id}))}},(m.type===0||m.type===2)&&r("span",{className:it("modal-role-circle"),style:{backgroundColor:y?.colorString??"var(--primary-300)"}}),m.type===0&&b!=null&&r("img",{className:it("modal-role-image"),src:b}),m.type===1&&g!=null&&r("img",{className:it("modal-user-img"),src:g.getAvatarURL(void 0,void 0,!1)}),r(H,{variant:"text-md/normal",className:it("modal-list-item-text")},m.type===0?y?.name??"Unknown Role":m.type===1?(g!=null&&nn(g))??"Unknown User":r(oe,{gap:"0.2em"},"@owner",r(uh,{height:18,width:18,"aria-hidden":"true"})))))})),r("div",{className:it("modal-divider")}),r(qn,{className:it("modal-perms"),orientation:"auto"},Object.values(ce).map(m=>r("div",{key:m,className:it("modal-perms-item")},r("div",{className:it("modal-perms-item-icon")},(()=>{let{permissions:f,overwriteAllow:g,overwriteDeny:y}=c;return f?(f&m)===m?fy():my():g&&(g&m)===m?fy():y&&(y&m)===m?my():$T()})()),r(H,{variant:"text-md/normal"},i[String(m)].title),r(Q,{text:(()=>{let{description:f}=i[String(m)];return typeof f=="function"?pr.intl.format(f,{}):f})()},f=>r(pl,{...f}))))))))}function MN({guild:e,roleId:t,onClose:o}){return r(I.Menu,{navId:it("role-context-menu"),onClose:st.closeContextMenu,"aria-label":"Role Options"},r(I.MenuItem,{id:it("copy-role-id"),label:xe("COPY_ID_ROLE"),action:()=>{to(t)}}),mi.store.unsafeViewAsRole&&r(I.MenuItem,{id:it("view-as-role"),label:xe("VIEW_AS_ROLE"),action:()=>{let n=bt.getRole(e.id,t);n&&(o(),B.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:n}}}))}}))}function NN({userId:e}){return r(I.Menu,{navId:it("user-context-menu"),onClose:st.closeContextMenu,"aria-label":"User Options"},r(I.MenuItem,{id:it("copy-user-id"),label:xe("COPY_ID_USER"),action:()=>{to(e)}}))}var kN=M.wrap(IN);function ms(e,t,o){return de(n=>r(kN,{modalProps:n,permissions:e,guild:t,header:o}))}a();cn();ie();te();E();v();var{RoleRootClasses:CN,RoleClasses:Dc,RoleBorderClasses:AN}=ko(()=>{let[e,t,o]=Un(O.byProps("root","expandButton","collapseButton"),O.byProps("role","roleCircle","roleName"),O.byProps("roleCircle","dot","dotBorderColor"));return{RoleRootClasses:e,RoleClasses:t,RoleBorderClasses:o}});function GT({text:e,color:t,...o}){return r("div",{...o,className:L(Dc.role)},r("div",{className:Dc.roleRemoveButton},r("span",{className:L(AN.roleCircle,Dc.roleCircle),style:{backgroundColor:t}})),r("div",{className:Dc.roleName},r(H,{className:Dc.roleNameOverflow,variant:"text-xs/medium"},e)))}function RN({roleName:e,roleColor:t}){return r(p,null,r(H,{variant:"text-sm/medium"},"Granted By"),r(GT,{text:e,color:t}))}function DN({guild:e,guildMember:t,closePopout:o}){let{permissionsSortOrder:n}=mi.use(["permissionsSortOrder"]),i=le(()=>Rm(e),[e.id]),[s,l]=le(()=>{let c=[],u=Dm(e,t),m=u.map(f=>({type:0,...f}));if(e.ownerId===t.userId){m.push({type:2,permissions:Object.values(ce).reduce((g,y)=>g|y,0n)});let f=xe("GUILD_OWNER")??"Server Owner";c.push({permission:f,roleName:"Owner",roleColor:"var(--primary-300)",rolePosition:1/0})}UT(u);for(let f of Object.values(ce))for(let{permissions:g,colorString:y,position:b,name:P}of u)if((g&f)===f){c.push({permission:i[String(f)].title,roleName:P,roleColor:y||"var(--primary-300)",rolePosition:b});break}return c.sort((f,g)=>g.rolePosition-f.rolePosition),[m,c]},[n]);return r("div",null,r("div",{className:it("user-header-container")},r(Fr,null,"Permissions"),r("div",{className:it("user-header-btns")},r(Q,{text:`Sorting by ${n===0?"Highest Role":"Lowest Role"}`},c=>r("div",{...c,className:it("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(Q,{text:"Role Details"},c=>r("div",{...c,className:it("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{o(),ms(s,e,t.nick||k.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:L(CN.root)},l.map(({permission:c,roleColor:u,roleName:m})=>r(Q,{key:c,text:r(RN,{roleName:m,roleColor:u}),tooltipClassName:it("granted-by-container"),tooltipContentClassName:it("granted-by-content")},f=>r(GT,{...f,text:c,color:u})))))}var HT=M.wrap(DN,{noop:!0});var LN=D("container","scroller","list"),zT=D("button","buttonInner","icon","banner");var mi=w({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 gy(e,t,o){return o===0&&!be.isMember(e,t)?null:r(I.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let n=Me.getGuild(e),{permissions:i,header:s}=Iu(o).returnType().with(0,()=>{let l=be.getMember(e,t),c=Dm(n,l).map(u=>({type:0,...u}));return n.ownerId===t&&c.push({type:2,permissions:Object.values(ce).reduce((u,m)=>u|m,0n)}),{permissions:c,header:l.nick??k.getUser(l.userId).username}}).with(1,()=>{let l=Z.getChannel(t);return{permissions:Lm(Object.values(l.permissionOverwrites).map(({id:u,allow:m,deny:f,type:g})=>({type:g,id:u,overwriteAllow:m,overwriteDeny:f})),e),header:l.name}}).otherwise(()=>({permissions:bt.getSortedRoles(n.id).map(c=>({type:0,...c})),header:n.name}));ms(i,n,s)}})}function Om(e,t){return(o,n)=>{if(!n||t===0&&!n.user||t===2&&!n.guild||t===1&&(!n.channel||!n.guild))return;let i=Ge(e,o),s=Iu(t).with(0,()=>gy(n.guildId,n.user.id,t)).with(1,()=>gy(n.guild.id,n.channel.id,t)).with(2,()=>gy(n.guild.id)).otherwise(()=>null);if(s!=null){if(i)return i.push(s);e==="roles"&&n.guildId&&o.splice(-1,0,r(I.MenuGroup,null,s))}}}var ha=h({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[d.Nuckyz,d.Ven],settings:mi,patches:[{find:"#{intl::VIEW_ALL_ROLES}",replacement:{match:/\.expandButton,.+?null,/,replace:"$&$self.ViewPermissionsButton(arguments[0]),"}}],ViewPermissionsButton:M.wrap(({guild:e,guildMember:t})=>{let o=nt(null);return r(Bs,{position:"bottom",align:"center",targetElementRef:o,renderPopout:({closePopout:n})=>r(Ch,{className:LN.container,style:{width:"500px"}},r(HT,{guild:e,guildMember:t,closePopout:n}))},n=>r(Vo,{text:"View Permissions"},r(R,{...n,ref:o,color:R.Colors.CUSTOM,look:R.Looks.FILLED,size:R.Sizes.NONE,className:L(zT.button,zT.icon,"vc-permviewer-role-button")},r(fh,{height:"16",width:"16"}))))},{noop:!0}),contextMenus:{"user-context":Om("roles",0),"channel-context":Om(["mute-channel","unmute-channel"],1),"guild-context":Om("privacy",2),"guild-header-popout":Om("privacy",2)}});a();T();$o();E();v();var ya=kg(z0()),ON=20,_N=128,_m=10,BN=Jr(()=>Promise.all(Array.from({length:_m},(e,t)=>WT(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),EN=D("getUploads");function WT(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,c,u,m,f)=>i(f||l),s.crossOrigin="Anonymous",s.src=o})}async function UN(e,t,o){for(let n of e)switch(n.name){case"image":let i=EN.getUpload(t.channel.id,n.name,$t.SlashCommand);if(i){if(!i.isImage)throw Ei.clearAll(t.channel.id,$t.SlashCommand),"Upload is not an image";return i.item.file}break;case"url":return n.value;case"user":try{return(await ro.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),Ei.clearAll(t.channel.id,$t.SlashCommand),"Failed to fetch user. Check the console for more info."}}return Ei.clearAll(t.channel.id,$t.SlashCommand),null}var Bm=h({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[d.Ven],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let o=await BN(),n=Oo(e,"no-server-pfp",!1);try{var i=await UN(e,t,n);if(!i)throw"No Image specified!"}catch(y){Ei.clearAll(t.channel.id,$t.SlashCommand),at(t.channel.id,{content:String(y)});return}let s=await WT(i),l=Oo(e,"delay",ON),c=Oo(e,"resolution",_N),u=(0,ya.GIFEncoder)(),m=document.createElement("canvas");m.width=m.height=c;let f=m.getContext("2d");Ei.clearAll(t.channel.id,$t.SlashCommand);for(let y=0;y<_m;y++){f.clearRect(0,0,m.width,m.height);let b=y<_m/2?y:_m-y,P=.8+b*.02,S=.8-b*.05,_=(1-P)*.5+.1,N=1-S-.08;f.drawImage(s,_*c,N*c,P*c,S*c),f.drawImage(o[y],0,0,c,c);let{data:U}=f.getImageData(0,0,c,c),j=(0,ya.quantize)(U,256),z=(0,ya.applyPalette)(U,j);u.writeFrame(z,c,c,{transparent:!0,palette:j,delay:l})}u.finish();let g=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>Ml.promptToUpload([g],t.channel,$t.ChannelMessage),10)}}]});a();T();v();var jT=w({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),Em=h({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[d.Lumap],settings:jT,patches:[{find:".removeMosaicItemHoverButton),",replacement:{match:/(\.nonMediaMosaicItem\]:.{0,40}children:)(\i.slice\(\i\))(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/,replace:(e,t,o,n,i)=>`${t}[${n}&&${i}&&$self.PictureInPictureButton(),...${o}]`}}],PictureInPictureButton:M.wrap(()=>r(Q,{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=jT.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();T();te();E();v();a();a();ct();v();var qT,It=[];async function hy(){let e=k.getCurrentUser()?.id;e!=null&&(It=uo.store.userBasedCategoryList[e]??=[],qT?.())}function KT(){qT=Go(),uo.use(["pinOrder","canCollapseDmSection","dmSectionCollapsed","userBasedCategoryList"])}function YT(e){return It.find(t=>t.id===e)}function Oc(e){return It[e]}function ZT(e){It.push(e)}function JT(e,t){let o=It.find(n=>n.id===t);o!=null&&(o.channels.includes(e)||o.channels.push(e))}function QT(e){let t=It.find(o=>o.channels.includes(e));t!=null&&(t.channels=t.channels.filter(o=>o!==e))}function XT(e){let t=It.findIndex(o=>o.id===e);t!==-1&&It.splice(t,1)}function VT(e,t=!0){let o=It.find(n=>n.id===e);o!=null&&(o.collapsed=t)}function _c(e){return It.some(t=>t.channels.includes(e))}function Um(){return It.length}function e4(){if(uo.store.pinOrder===0){let e=Sy.getPrivateChannelIds();return It.filter(t=>!t.collapsed).flatMap(t=>e.filter(o=>t.channels.includes(o)))}return It.filter(e=>!e.collapsed).flatMap(e=>e.channels)}function t4(){return It.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}var o4=(e,t,o)=>{let n=e[t],i=e[t+o];return n&&i},Lc=(e,t)=>{let o=It.findIndex(n=>n.id===e);return o4(It,o,t)},r4=e=>Lc(e,-1)||Lc(e,1),yy=(e,t)=>{let o=It.find(i=>i.channels.includes(e));if(o==null)return!1;let n=o.channels.indexOf(e);return o4(o.channels,n,t)};function n4(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}function vy(e,t){let o=It.findIndex(i=>i.id===e),n=o+t;n4(It,o,n)}function by(e,t){let o=It.find(s=>s.channels.includes(e));if(o==null)return;let n=o.channels.indexOf(e),i=n+t;n4(o.channels,n,i)}v();a();ve();Jt();a();var i4=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306];Fe();E();v();var $N=pe('id:"color-picker"'),xy=Pi(['name:"UserSettings"'],/createPromise:.{0,20}(\i\.\i\("?.+?"?\).*?).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/),GN=Y("vc-pindms-modal-");function HN(e,t){return le(()=>{if(e)return YT(e);if(t)return{id:q.genId(),name:`Pin Category ${Um()+1}`,color:10070709,collapsed:!1,channels:[t]}},[e,t])}function zN({categoryId:e,modalProps:t,initialChannelId:o}){let n=HN(e,o);if(!n)return null;let[i,s]=C(n.name),[l,c]=C(n.color),u=m=>{m.preventDefault(),n.name=i,n.color=l,e||ZT(n),t.onClose()};return r(he,{...t},r(ke,null,r(H,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),r("form",{onSubmit:u},r(Se,{className:GN("content")},r("section",null,r(x.FormTitle,null,"Name"),r(dt,{value:i,onChange:m=>s(m)})),r(Ee,null),r("section",null,r(x.FormTitle,null,"Color"),r($N,{key:n.id,defaultColor:10070709,colors:i4,onChange:m=>c(m),value:l,renderDefaultButton:()=>null,renderCustomButton:()=>r(jn,{color:l,onChange:m=>c(m),key:n.id,showEyeDropper:!1})}))),r(yt,null,r(R,{type:"submit",onClick:u,disabled:!i},e?"Save":"Create"))))}var Fm=(e,t)=>sl(async()=>(await xy(),o=>r(zN,{categoryId:e,modalProps:o,initialChannelId:t})));function a4(e){let t=_c(e);return r(I.MenuItem,{id:"pin-dm",label:"Pin DMs"},!t&&r(p,null,r(I.MenuItem,{id:"vc-add-category",label:"Add Category",color:"brand",action:()=>Fm(null,e)}),r(I.MenuSeparator,null),It.map(o=>r(I.MenuItem,{key:o.id,id:`pin-category-${o.id}`,label:o.name,action:()=>JT(e,o.id)}))),t&&r(p,null,r(I.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>QT(e)}),uo.store.pinOrder===1&&yy(e,-1)&&r(I.MenuItem,{id:"move-up",label:"Move Up",action:()=>by(e,-1)}),uo.store.pinOrder===1&&yy(e,1)&&r(I.MenuItem,{id:"move-down",label:"Move Down",action:()=>by(e,1)})))}var WN=(e,t)=>{Ge("leave-channel",e)?.unshift(a4(t.channel.id))},jN=(e,t)=>{let o=Ge("close-dm",e);if(o){let n=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(n,0,a4(t.channel.id))}},l4={"gdm-context":WN,"user-context":jN};var c4=D("privateChannelsHeaderContainer"),Sy=Ie("PrivateChannelSortStore"),KN;var uo=w({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:{}}}),$m=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:[d.Ven,d.Aria],settings:uo,contextMenus:l4,patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=channels:\i,)privateChannelIds:(\i)(?=,listRef:)/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c))"},{match:/(?<=renderRow:this\.renderRow,)sections:\[.+?1\)]/,replace:"...$self.makeProps(this,{$&})"},{match:/"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.\i),\{channel:.+?)/,replace:"$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();"},{match:/"renderSection",(\i)=>{/,replace:"$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);"},{match:/(?<=span",{)className:\i\.headerText,/,replace:"...$self.makeSpanProps(),$&"},{match:/(\.startsWith\("section-divider"\).+?return 1===)(\i)/,replace:"$1($2-$self.categoryLen())"},{match:/"getRowHeight",\((\i),(\i)\)=>{/,replace:"$&if($self.isChannelHidden($1,$2))return 0;"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"},{match:/(scrollToChannel\(\i\){.{1,300})(this\.props\.privateChannelIds)/,replace:"$1[...$2,...$self.getAllUncollapsedChannels()]"}]},{find:'.FRIENDS},"friends"',replacement:{match:/let{showLibrary:\i,/,replace:"$self.usePinnedDms();$&"}},{find:".APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}}],sections:null,set _instance(e){this.instance=e,KN=e},startAt:"WebpackReady",start:hy,flux:{CONNECTION_OPEN:hy},usePinnedDms:KT,isPinned:_c,categoryLen:Um,getSections:t4,getAllUncollapsedChannels:e4,requireSettingsMenu:xy,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 uo.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(uo.store.canCollapseDmSection&&uo.store.dmSectionCollapsed&&e!==0)return!0;let o=Oc(e-1);return this.isCategoryIndex(e)&&(o?.channels?.length===0||o?.channels[t])},collapseDMList(){uo.store.dmSectionCollapsed=!uo.store.dmSectionCollapsed},isChannelHidden(e,t){if(e===0)return!1;if(uo.store.canCollapseDmSection&&uo.store.dmSectionCollapsed&&this.getSections().length+1===e)return!0;if(!this.instance||!this.isChannelIndex(e,t))return!1;let o=Oc(e-1);return o?o.collapsed&&this.instance.props.selectedChannelId!==this.getCategoryChannels(o)[t]:!1},getScrollOffset(e,t,o,n,i){return _c(e)?t*(this.getAllUncollapsedChannels().indexOf(e)+n)+o:(t+o)*2+t*this.getAllUncollapsedChannels().length+i},renderCategory:M.wrap(({section:e})=>{let t=Oc(e-1);return t?r(So,{onClick:()=>VT(t.id,!t.collapsed),onContextMenu:o=>{st.openContextMenu(o,()=>r(I.Menu,{navId:"vc-pindms-header-menu",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),color:"danger","aria-label":"Pin DMs Category Menu"},r(I.MenuItem,{id:"vc-pindms-edit-category",label:"Edit Category",action:()=>Fm(t.id,null)}),r4(t.id)&&r(p,null,Lc(t.id,-1)&&r(I.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>vy(t.id,-1)}),Lc(t.id,1)&&r(I.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>vy(t.id,1)})),r(I.MenuSeparator,null),r(I.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>XT(t.id)})))}},r("h2",{className:L(c4.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`}},r("span",{className:c4.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=Oc(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?[]:uo.store.pinOrder===0?Sy.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}});a();T();var Gm=h({name:"PlainFolderIcon",description:"Dont show the small guild icons in folders",authors:[d.botato],patches:[{find:".folderPreviewGuildIconError",replacement:[{match:/(?<=.folderButtonContent]:(!\i))/,replace:(e,t)=>`,"vc-plainFolderIcon-plain":${t}`}]}]});a();T();E();v();var YN=Ie("SessionsStore");function Hm(e,t){return({color:o,tooltip:n,small:i})=>r(Q,{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 u4={desktop:Hm("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:Hm("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:Hm("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:Hm("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",{viewBox:"0 0 50 50"})},{useStatusFillColor:ZN}=Ue(".concat(.5625*",{useStatusFillColor:O.byCode(".hex")}),m4=({platform:e,status:t,small:o})=>{let n=e==="embedded"?"Console":e[0].toUpperCase()+e.slice(1),i=u4[e]??u4.desktop;return r(i,{color:ZN(t),tooltip:n,small:o})};function f4(e){if(e.id===io.getId()){let t=YN.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}=no.getState();i[io.getId()]=n}}function JN({userId:e}){let t=k.getUser(e);if(!t||t.bot)return[];f4(t);let o=no.getClientStatus(t.id);return o?Object.entries(o).map(([n,i])=>({component:()=>r("span",{className:"vc-platform-indicator"},r(m4,{key:n,platform:n,status:i,small:!1})),key:`vc-platform-indicator-${n}`})):[]}var p4=({user:e,small:t=!1})=>{f4(e);let o=ne([no],()=>no.getClientStatus(e.id));if(!o)return null;let n=Object.entries(o).map(([i,s])=>r(m4,{key:i,platform:i,status:s,small:t}));return n.length?r("span",{className:"vc-platform-indicator",style:{gap:"2px"}},n):null},d4={getBadges:JN,position:0},Ty={list:{description:"In the member list",onEnable:()=>zi("platform-indicator",({user:e})=>e&&!e.bot?r(p4,{user:e,small:!0}):null),onDisable:()=>Wi("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Wa(d4),onDisable:()=>ja(d4)},messages:{description:"Inside messages",onEnable:()=>ji("platform-indicator",e=>{let t=e.message?.author;return t&&!t.bot?r(p4,{user:e.message?.author}):null}),onDisable:()=>qi("platform-indicator")}},zm=h({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[d.kemo,d.TheSun,d.Nuckyz,d.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=G.plugins.PlatformIndicators;Object.entries(Ty).forEach(([t,o])=>{e[t]&&o.onEnable()})},stop(){Object.entries(Ty).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>G.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:()=>G.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,o)=>`${o}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>G.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(Ty).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();T();E();v();var h4=D("getUploads"),g4=e=>Fs.getDraft(e,$t.ChannelMessage),QN=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),XN=async e=>await Promise.all(h4.getUploads(e,$t.ChannelMessage).map(async t=>{let{isImage:o,filename:n,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:El(),filename:i?"SPOILER_"+n:n,content_type:void 0,size:t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let u=await QN(l);if(!u)return c;c.width=u.width,c.height=u.height}return c})),y4=({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"})),VN=({isAnyChat:e,isEmpty:t,type:{attachments:o},channel:{id:n}})=>{let i=ne([Fs],()=>g4(n));if(!e)return null;let s=o&&h4.getUploads(n,$t.ChannelMessage).length>0;return!(!t&&i?.length>0)&&!s?null:r(Sr,{tooltip:"Preview Message",onClick:async()=>at(n,{content:g4(n),author:k.getCurrentUser(),attachments:s?await XN(n):void 0}),buttonProps:{style:{translate:"0 2px"}}},r(y4,null))},Wm=h({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[d.Aria],startAt:"Init",chatBarButton:{icon:y4,render:VN}});a();T();ie();v();function v4({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 jm=h({name:"QuickMention",authors:[d.kemo],description:"Adds a quick mention button to the message actions bar",messagePopoverButton:{icon:v4,render(e){let t=Z.getChannel(e.channel_id);return t.guild_id&&!Te.can(ce.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:v4,message:e,channel:t,onClick:()=>Ni(`<@${e.author.id}> `)}}}});a();T();v();var Bc=null,Ec=null;var wy=w({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}}),qm=h({name:"QuickReply",authors:[d.fawn,d.Ven,d.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:wy,start(){document.addEventListener("keydown",b4)},stop(){document.removeEventListener("keydown",b4)},flux:{DELETE_PENDING_REPLY(){Bc=null},MESSAGE_END_EDIT(){Ec=null},CHANNEL_SELECT(){Bc=null,Ec=null},MESSAGE_START_EDIT:ek,CREATE_PENDING_REPLY:tk}});function ek({messageId:e,_isQuickEdit:t}){t||(Ec=e)}function tk({message:e,_isQuickReply:t}){t||(Bc=e.id)}var ok=e=>ho?e.metaKey:e.ctrlKey,rk=e=>e.altKey||!ho&&e.metaKey;function b4(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!ok(e)||rk(e)||(e.preventDefault(),e.shiftKey?sk(t):ik(t))}function S4(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)&&vo.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function x4(e,t){let o=jt.getMessages(Be.getChannelId())._array,n=k.getCurrentUser().id,i=Ne(ds.name);o=o.filter(l=>!(l.deleted||!t&&l.author.id!==n||!kl.REPLYABLE.has(l.type)||l.hasFlag(64)||wy.store.ignoreBlockedAndIgnored&&we.isBlockedOrIgnored(l.author.id)||i&&ds.shouldIgnoreMessage(l)));let s=l=>{if(l===null)return o[o.length-1];let c=o.findIndex(m=>m.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(Bc);return Bc=l?.id??null,l}else{let l=s(Ec);return Ec=l?.id??null,l}}function nk(e){switch(wy.store.shouldMention){case 2:return Ne(qr.name)?qr.shouldMention(e,!1):!0;case 0:return!1;default:return!0}}function ik(e){let t=Z.getChannel(Be.getChannelId());if(t.guild_id&&!Te.can(ce.SEND_MESSAGES,t))return;let o=x4(e,!0);if(!o)return void B.dispatch({type:"DELETE_PENDING_REPLY",channelId:Be.getChannelId()});let n=Z.getChannel(o.channel_id),i=k.getCurrentUser().id;B.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:o,shouldMention:nk(o),showMentionToggle:!n.isPrivate()&&o.author.id!==i,_isQuickReply:!0}),Co.dispatchToLastSubscribed("TEXTAREA_FOCUS"),S4(n.id,o.id)}function sk(e){let t=Z.getChannel(Be.getChannelId());if(t.guild_id&&!Te.can(ce.SEND_MESSAGES,t))return;let o=x4(e,!1);if(!o)return B.dispatch({type:"MESSAGE_END_EDIT",channelId:Be.getChannelId()});B.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),S4(o.channel_id,o.id)}a();T();v();var Py,Km=h({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[d.Cyn,d.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${se.version}/scripts/error-codes/codes.json`;Py=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
|
|
`,t))},stop(){Py=void 0},decodeError(e,...t){let o=0;return Py?.[e]?.replace(/%s/g,()=>{let n=t[o];return o++,n})}});a();var My={};et(My,{ServerListRenderPosition:()=>Ym,addServerListElement:()=>Uc,removeServerListElement:()=>Fc,renderAll:()=>ck});a();var Ym=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(Ym||{}),ak=new Set,lk=new Set;function Iy(e){return e===0?ak:lk}function Uc(e,t){Iy(e).add(t)}function Fc(e,t){Iy(e).delete(t)}var ck=e=>Array.from(Iy(e),(t,o)=>r(M,{noop:!0,key:o},r(t,null)));an();T();E();v();var uk=Ie("ActiveJoinedThreadsStore");function pk(){let e=[];Object.values(Me.getGuilds()).forEach(t=>{$r.getChannels(t.id).SELECTABLE.concat($r.getChannels(t.id).VOCAL).concat(Object.values(uk.getActiveJoinedThreadsForGuild(t.id)).flatMap(o=>Object.values(o))).forEach(o=>{Kn.hasUnread(o.channel.id)&&e.push({channelId:o.channel.id,messageId:Kn.lastMessageId(o.channel.id),readStateType:0})})}),B.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var dk=()=>r(bu,{variant:"secondary",onClick:pk,className:"vc-ranb-button"},"Read All"),Zm=h({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[d.kemo],dependencies:["ServerListAPI"],renderReadAllButton:M.wrap(dk,{noop:!0}),start(){Uc(0,this.renderReadAllButton)},stop(){Fc(0,this.renderReadAllButton)}});a();T();a();ie();v();a();var Bo=w({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();a();ie();E();v();var Ny=Ie("GuildAvailabilityStore"),va=new Map,ba=new Map,fs={friends:[],requests:[]},T4=()=>`relationship-notifier-guilds-${k.getCurrentUser().id}`,w4=()=>`relationship-notifier-groups-${k.getCurrentUser().id}`,P4=()=>`relationship-notifier-friends-${k.getCurrentUser().id}`;async function fk(){Gh(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function ky(){if(await fk(),k.getCurrentUser()==null)return;let[e,t,o]=await Fh([T4(),w4(),P4()]);if(await Promise.all([Jm(),Qm(),$c()]),Bo.store.offlineRemovals){if(Bo.store.groups&&t?.size)for(let[n,i]of t)ba.has(n)||Nn(`You are no longer in the group ${i.name}.`,i.iconURL);if(Bo.store.servers&&e?.size)for(let[n,i]of e)!va.has(n)&&!Ny.isUnavailable(n)&&Nn(`You are no longer in the server ${i.name}.`,i.iconURL);if(Bo.store.friends&&o?.friends.length)for(let n of o.friends){if(fs.friends.includes(n))continue;let i=await ro.getUser(n).catch(()=>{});i&&Nn(`You are no longer friends with ${nn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Wo(i.id))}if(Bo.store.friendRequestCancels&&o?.requests?.length)for(let n of o.requests){if(fs.requests.includes(n)||[1,2,4].includes(we.getRelationshipType(n)))continue;let i=await ro.getUser(n).catch(()=>{});i&&Nn(`Friend request from ${nn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Wo(i.id))}}}function Nn(e,t,o){Bo.store.notices&&bn(e,"OK",()=>Xi()),qe({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function I4(e){return va.get(e)}function Cy(e){va.delete(e),Jm()}async function Jm(){va.clear();let e=k.getCurrentUser().id;for(let[t,{name:o,icon:n}]of Object.entries(Me.getGuilds()))be.isMember(t,e)&&va.set(t,{id:t,name:o,iconURL:n&&`https://cdn.discordapp.com/icons/${t}/${n}.png`});await Ht(T4(),va)}function M4(e){return ba.get(e)}function Ay(e){ba.delete(e),Qm()}async function Qm(){ba.clear();for(let{type:e,id:t,name:o,rawRecipients:n,icon:i}of Z.getSortedPrivateChannels())e===3&&ba.set(t,{id:t,name:o||n.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await Ht(w4(),ba)}async function $c(){fs.friends=[],fs.requests=[];let e=we.getMutableRelationships();for(let[t,o]of e)switch(o){case 1:fs.friends.push(t);break;case 3:fs.requests.push(t);break}await Ht(P4(),fs)}var Ry,Dy,Ly,N4=e=>Ry=e,k4=e=>Dy=e,C4=e=>Ly=e;async function A4({relationship:{type:e,id:t}}){if(Ry===t){Ry=void 0;return}let o=await ro.getUser(t).catch(()=>null);if(o)switch(e){case 1:Bo.store.friends&&Nn(`${nn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Wo(o.id));break;case 3:Bo.store.friendRequestCancels&&Nn(`A friend request from ${nn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Wo(o.id));break}}function R4({guild:{id:e,unavailable:t}}){if(!Bo.store.servers||t||Ny.isUnavailable(e))return;if(Dy===e){Cy(e),Dy=void 0;return}let o=I4(e);o&&(Cy(e),Nn(`You were removed from the server ${o.name}.`,o.iconURL))}function D4({channel:{id:e,type:t}}){if(!Bo.store.groups||t!==3)return;if(Ly===e){Ay(e),Ly=void 0;return}let o=M4(e);o&&(Ay(e),Nn(`You were removed from the group ${o.name}.`,o.iconURL))}var Xm=h({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[d.nick],settings:Bo,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:Jm,GUILD_DELETE:R4,CHANNEL_CREATE:Qm,CHANNEL_DELETE:D4,RELATIONSHIP_ADD:$c,RELATIONSHIP_UPDATE:$c,RELATIONSHIP_REMOVE(e){A4(e),$c()},CONNECTION_OPEN:ky},async start(){setTimeout(()=>{ky()},5e3)},removeFriend:N4,removeGroup:C4,removeGuild:k4});a();T();v();var O4={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="};var _4=w({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(O4).map(e=>({label:e,value:e}))]}});function L4(e,t){open(t+encodeURIComponent(e.trim()),"_blank")}function gk(e){let{customEngineName:t,customEngineURL:o,replacementEngine:n}=_4.store,i=!!(t&&o),s=n!=="off"&&!(n==="custom"&&!i),l={...O4};if(i&&(l[t]=o),s){let c=n==="custom"&&i?t:n;return r(I.MenuItem,{label:`Search with ${c}`,key:"search-custom-engine",id:"vc-search-custom-engine",action:()=>L4(e,l[c])})}return r(I.MenuItem,{label:"Search Text",key:"search-text",id:"vc-search-text"},Object.keys(l).map(c=>{let u="vc-search-content-"+c;return r(I.MenuItem,{key:u,id:u,label:r(oe,{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:()=>L4(e,l[c])})}))}var hk=(e,t)=>{let o=document.getSelection()?.toString();if(!o)return;let n=Ge("search-google",e);if(n){let i=n.findIndex(s=>s?.props?.id==="search-google");i!==-1&&(n[i]=gk(o))}},Vm=h({name:"ReplaceGoogleSearch",description:"Replaces the Google search with different Engine(s)",authors:[d.Moxxie,d.Ethan],settings:_4,contextMenus:{message:hk}});a();T();E();v();var yk=D("separator","latin24CompactTimeStamp");function B4(e){return r("i",{className:yk.separator,"aria-hidden":!0,...e})}function vk({referencedMessage:e,baseMessage:t}){if(e.state!==0)return null;let o=e.message.timestamp,n=t.timestamp;return r(Qt,{className:"vc-reply-timestamp",compact:Yn.isSameDay(o,n),timestamp:o,isInline:!1},r(B4,null,"["),Yn.isSameDay(o,n)?Yn.dateFormat(o,"LT"):Yn.calendarFormat(o),r(B4,null,"]"))}var ef=h({name:"ReplyTimestamp",description:"Shows a timestamp on replied-message previews",authors:[d.Kyuuhachi],patches:[{find:"#{intl::REPLY_QUOTE_MESSAGE_BLOCKED}",replacement:{match:/\.onClickReply,.+?}\),(?=\i,\i,\i\])/,replace:"$&$self.ReplyTimestamp(arguments[0]),"}}],ReplyTimestamp:M.wrap(vk,{noop:!0})});a();T();E();var bk=D("spoilerContent"),Sk=D("messagesWrapper","navigationDescription"),tf=h({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[d.whqwert],patches:[{find:".removeObscurity,",replacement:{match:/(?<="removeObscurity",(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,metaKey:o,shiftKey:n,target:i}=e;if(!(ho?o:t))return;let{spoilerContent:s,hidden:l}=bk,{messagesWrapper:c}=Sk,u=n?document.querySelector(`div.${c}`):i.parentElement;for(let m of u.querySelectorAll(`span.${s}.${l}`))m.click()}});a();Qe();T();v();var of={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",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 E4(e,t){open(t+encodeURIComponent(e),"_blank")}function U4(e){return r(I.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(of).map((t,o)=>{let n="search-image-"+t;return r(I.MenuItem,{key:n,id:n,label:r(oe,{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(of[t]).host}.ico`}),t),action:()=>E4(e,of[t])})}),r(I.MenuItem,{key:"search-image-all",id:"search-image-all",label:r(oe,{alignItems:"center",gap:"0.5em"},r(Xo,{height:16,width:16}),"All"),action:()=>Object.values(of).forEach(t=>E4(e,t))}))}var xk=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;Ge("copy-link",e)?.push(U4(o))},Tk=(e,t)=>{if(!t?.src)return;(Ge("copy-native-link",e)??e).push(U4(t.src))},rf=h({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[d.Ven,d.Nuckyz],tags:["ImageUtilities"],patches:[{find:"#{intl::MESSAGE_ACTIONS_MENU_LABEL}),shouldHideMediaOptions:",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],contextMenus:{message:xk,"image-context":Tk}});a();Qe();T();te();E();v();a();ae();Fe();v();var F4="rdb-auth",St={};async function Oy(){St=await $4()??{}}async function $4(){return(await Gt(F4))?.[k.getCurrentUser()?.id]}async function kn(){return(await $4())?.token}async function Gc(e){return tr(F4,t=>(t??={},St=t[k.getCurrentUser().id]??={},e.token&&(St.token=e.token),e.user&&(St.user=e.user),t))}function Sa(e){de(t=>r(Li,{...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();Re(l||"An error occured while authorizing",q.Type.FAILURE);return}let{token:s}=await i.json();Gc({token:s}),Re("Successfully logged in!",q.Type.SUCCESS),e?.()}catch(n){new F("ReviewDB").error("Failed to authorize",n)}}}))}a();a();v();a();a();v();a();a();ve();v();var gt=Y("vc-rdb-");function G4(e,t){let o=k.getCurrentUser().id;return o===e||t.sender.discordID===o||St.user?.type===1}function H4(e,t){let o=k.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function z4(e){return e.sender.discordID!==k.getCurrentUser().id}function po(e,t=q.Type.MESSAGE){q.show({id:q.genId(),message:e,type:t,options:{position:q.Position.BOTTOM}})}ae();Fe();ct();v();function wk(e){return r(Q,{text:"Unblock user"},t=>r("div",{...t,role:"button",onClick:e.onClick,className:gt("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 Pk({user:e,isBusy:t,setIsBusy:o}){let[n,i]=C(!1);return n?null:r("div",{className:gt("block-modal-row")},r("img",{className:gt("block-modal-avatar"),src:e.profilePhoto,alt:""}),r(x.FormText,{className:gt("block-modal-username")},e.username),r(wk,{onClick:t?void 0:async()=>{o(!0);try{await sf(e.discordID),i(!0)}finally{o(!1)}}}))}function Ik(){let[e,t]=C(!1),[o,n,i]=ht(W4,{onError:s=>new F("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:n?r(x.FormText,null,"Failed to fetch blocks: $",String(n)):o.length?r(p,null,o.map(s=>r(Pk,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):r(x.FormText,null,"No blocked users.")}function nf(){de(e=>r(he,{...e},r(ke,{className:gt("block-modal-header")},r(x.FormTitle,{style:{margin:0}},"Blocked Users"),r(tt,{onClick:e.onClose})),r(Se,{className:gt("block-modal")},St.token?r(Ik,null):r(x.FormText,null,"You are not logged into ReviewDB!"))))}var Cn=w({authorize:{type:6,component:()=>r(R,{onClick:()=>Sa()},"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:gt("button-grid")},r(R,{onClick:nf},"Manage Blocked Users"),r(R,{color:R.Colors.GREEN,onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),r(R,{onClick:async()=>{let e="https://reviewdb.mantikafasi.dev",t=await kn();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),r(R,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server"))}}).withPrivateSettings();var j4="https://manti.vendicated.dev/api/reviewdb",af=50,Mk=2;async function gs(e,t={}){return fetch(j4+e,{...t,headers:{...t.headers,Authorization:await kn()||""}})}async function q4(e,t=0){let o=0;Cn.store.showWarning||(o|=Mk);let n=new URLSearchParams({flags:String(o),offset:String(t)}),i=await fetch(`${j4}/users/${e}/reviews?${n}`),s=i.ok?await i.json():{message:i.status===429?"You are sending requests too fast. Wait a few seconds and try again.":"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return i.ok?s:(po(s.message,q.Type.FAILURE),{...s,reviews:[{id:0,comment:s.message,star:0,timestamp:0,type:3,sender:{id:0,username:"ReviewDB",profilePhoto:"https://cdn.discordapp.com/avatars/1134864775000629298/3f87ad315b32ee464d84f1270c8d1b37.png?size=256&format=webp&quality=lossless",discordID:"1134864775000629298",badges:[]}}]})}async function K4(e){return await kn()?await gs(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let n=await o.json();return po(n.message),o.ok?n:null}):(po("Please authorize to add a review."),Sa(),null)}async function Y4(e){return await gs(`/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 po(o.message),t.ok?o:null})}async function Z4(e){let t=await gs("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());po(t.message)}async function J4(e,t){if(!(await gs("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)po(`Failed to ${e} user`,q.Type.FAILURE);else if(po(`Successfully ${e}ed user`,q.Type.SUCCESS),St?.user?.blockedUsers){let n=e==="block"?[...St.user.blockedUsers,t]:St.user.blockedUsers.filter(i=>i!==t);Gc({user:{...St.user,blockedUsers:n}})}}var Q4=e=>J4("block",e),sf=e=>J4("unblock",e);async function W4(){let e=await gs("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function X4(e){return gs("/users",{method:"POST"}).then(t=>t.json())}async function V4(e){return gs(`/notifications?id=${e}`,{method:"PATCH"})}Fe();ct();v();a();ie();te();ct();E();v();a();Qe();te();E();v();var lf=D("button","wrapper","disabled","separator");function ew({onClick:e}){return r(Q,{text:"Delete Review"},t=>r("div",{...t,className:L(lf.button,lf.dangerous),onClick:e,role:"button"},r(Ci,{width:"20",height:"20"})))}function tw({onClick:e}){return r(Q,{text:"Report Review"},t=>r("div",{...t,className:lf.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 ow({onClick:e,isBlocked:t}){return r(Q,{text:`${t?"Unblock":"Block"} user`},o=>r("div",{...o,className:lf.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 cf(e){let t=e.redirectURL?Pl:o=>r("span",{...o,role:"button"},o.children);return r(Q,{text:e.name},({onMouseEnter:o,onMouseLeave:n})=>r(t,{className:gt("blocked-badge"),href:e.redirectURL,onClick:e.onClick},r("img",{className:gt("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:n,src:e.icon,alt:e.description})))}var uf=Ke(()=>{let e=O.byProps,[{cozyMessage:t,buttons:o,message:n,buttonsInner:i,groupStart:s},{container:l,isHeader:c},{avatar:u,clickable:m,username:f,wrapper:g,cozy:y},b,P]=Un(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTagRegular")),S=new Intl.DateTimeFormat;return function({review:N,refetch:U,profileId:j}){let[z,J]=C(!1);function me(){Wo(N.sender.discordID)}function W(){Le.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await kn())Y4(N.id).then(re=>{re&&U()});else return po("You must be logged in to delete reviews.")}})}function ee(){Le.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await kn())Z4(N.id);else return po("You must be logged in to report reviews.")}})}let K=St?.user?.blockedUsers?.includes(N.sender.discordID)??!1;function ze(){if(K)return sf(N.sender.discordID);Le.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 kn())Q4(N.sender.discordID);else return po("You must be logged in to block users.")}})}return r("div",{className:L(gt("review"),t,g,n,s,y),style:{marginLeft:"0px",paddingLeft:"52px"}},r("img",{className:L(u,m),onClick:me,src:N.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px",zIndex:0}}),r("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},r("span",{className:L(m,f),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>me()},N.sender.username),N.type===3&&r("span",{className:L(P.botTagVerified,P.botTagRegular,P.px,P.rem),style:{marginLeft:"4px"}},r("span",{className:P.botText},"System"))),K&&r(cf,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>nf()}),N.sender.badges.map((re,fe)=>r(cf,{key:fe,...re})),!Cn.store.hideTimestamps&&N.type!==3&&r(Qt,{timestamp:new Date(N.timestamp*1e3)},S.format(N.timestamp*1e3)),r("div",{className:gt("review-comment")},N.comment.length>200&&!z?r(p,null,Pe.parseGuildEventDescription(N.comment.substring(0,200)),"...",r("br",null),r("a",{onClick:()=>J(!0)},"Read more"),"]"):Pe.parseGuildEventDescription(N.comment)),N.id!==0&&r("div",{className:L(l,c,o),style:{padding:"0px"}},r("div",{className:L(b.wrapper,i)},z4(N)&&r(tw,{onClick:ee}),H4(j,N)&&r(ow,{isBlocked:K,onClick:ze}),G4(j,N)&&r(ew,{onClick:W}))))}});a();ct();E();v();var Nk=D("insertNodes","textToText"),rw=D("start","end","toSlateRange"),kk=D("FORM","USER_PROFILE"),Ck=pe("editorClassName","CHANNEL_TEXT_AREA"),Ak=ue(".GUILD_TEXT])","fromServer)");function By({discordId:e,name:t,onFetchReviews:o,refetchSignal:n,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:c=!1,type:u}){let[m,f]=Go(!0),[g]=ht(()=>q4(e,(s-1)*af),{fallbackValue:null,deps:[n,m,s],onSuccess:y=>{Cn.store.hideBlockedUsers&&(y.reviews=y.reviews?.filter(b=>!we.isBlocked(b.sender.discordID))),i?.(),o(y)}});return g?r(p,null,r(Rk,{refetch:f,reviews:g.reviews,hideOwnReview:c,profileId:e,type:u}),l&&r(Ey,{name:t,discordId:e,refetch:f,isAuthor:g.reviews?.some(y=>y.sender.discordID===k.getCurrentUser().id)})):null}function Rk({refetch:e,reviews:t,hideOwnReview:o,profileId:n,type:i}){let s=k.getCurrentUser().id;return r("div",{className:gt("view")},t?.map(l=>(l.sender.discordID!==s||!o)&&r(uf,{key:l.id,review:l,refetch:e,profileId:n})),t?.length===0&&r(x.FormText,{className:gt("placeholder")},"Looks like nobody reviewed this ",i===0?"user":"server"," yet. You could be the first!"))}function Ey({discordId:e,isAuthor:t,refetch:o,name:n,modalKey:i}){let{token:s}=St,l=nt(null),c=kk.USER_PROFILE_REPLY;c.disableAutoFocus=!0;let u=Ak({id:"0",type:1});return r(p,null,r("div",{onClick:()=>{s||(po("Opening authorization window..."),Sa())}},r(Ck,{className:gt("input"),channel:u,placeholder:s?t?`Update review for @${n}`:`Review @${n}`:"You need to authorize to review users!",type:c,disableThemedBackground:!0,setEditorRef:m=>l.current=m,parentModalKey:i,textValue:"",onSubmit:async m=>{if(await K4({userid:e,comment:m.value})){o();let g=l.current.ref.current.getSlateEditor();Nk.delete(g,{at:{anchor:rw.start(g,[]),focus:rw.end(g,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}function Dk({modalProps:e,modalKey:t,discordId:o,name:n,type:i}){let[s,l]=C(),[c,u]=Go(!0),[m,f]=C(1),g=nt(null),y=s?.reviewCount,b=s?.reviews.find(P=>P.sender.discordID===St.user?.discordID);return r(M,null,r(he,{...e,size:"medium"},r(ke,null,r(H,{variant:"heading-lg/semibold",className:gt("modal-header")},n,"'s Reviews",!!y&&r("span",null," (",y," Reviews)")),r(tt,{onClick:e.onClose})),r(Se,{scrollerRef:g},r("div",{className:gt("modal-reviews")},r(By,{discordId:o,name:n,page:m,refetchSignal:c,onFetchReviews:l,scrollToTop:()=>g.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0,type:i}))),r(yt,{className:gt("modal-footer")},r("div",{className:gt("modal-footer-wrapper")},b&&r(uf,{refetch:u,review:b,profileId:o}),r(Ey,{isAuthor:b!=null,discordId:o,name:n,refetch:u,modalKey:t}),!!y&&r(Ah,{currentPage:m,maxVisiblePages:5,pageSize:af,totalCount:y,onPageChange:f})))))}function pf(e,t,o){let n="vc-rdb-modal-"+Date.now();de(i=>r(Dk,{modalKey:n,modalProps:i,discordId:e,name:t,type:o}),{modalKey:n})}var Lk=D("bannerButton"),nw=(e,{guild:t})=>{t&&e.push(r(I.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:Xo,action:()=>pf(t.id,t.name,1)}))},Uy=(e,{user:t})=>{t&&e.push(r(I.MenuItem,{label:"View Reviews",id:"vc-rdb-user-reviews",icon:Xo,action:()=>pf(t.id,t.username,0)}))},df=h({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[d.mantikafasi,d.Ven],settings:Cn,contextMenus:{"guild-header-popout":nw,"guild-context":nw,"user-context":Uy,"user-profile-actions":Uy,"user-profile-overflow-menu":Uy},patches:[{find:".POPOUT,user:",replacement:{match:/children:\[(?=[^[]+?shouldShowTooltip:)/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}},{find:".SIDEBAR,disableToolbar:",replacement:{match:/children:\[(?=[^[]+?\.SIDEBAR}\),\i\.bot)/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}}],flux:{CONNECTION_OPEN:Oy},async start(){let e=Cn.store,{lastReviewId:t,notifyReviews:o}=e;await Oy(),setTimeout(async()=>{if(!St.token)return;let n=await X4(St.token);if(Gc({user:n}),o&&t&&t<n.lastReviewID&&(e.lastReviewId=n.lastReviewID,n.lastReviewID!==0&&po("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:St.token,page:"dashboard/appeal"}))}:{};Le.show({title:n.notification.title,body:Pe.parse(n.notification.content,!1),...i}),V4(n.notification.id)}},4e3)},BiteSizeReviewsButton:M.wrap(({user:e})=>r(Vo,{text:"View Reviews"},r(So,{onClick:()=>pf(e.id,e.username,0),className:L(Lk.bannerButton)},r(gh,{height:16,width:16}))),{noop:!0})});a();T();ae();E();v();var Ok=ue('"Result cannot be null because the message is not null"'),Kr=w({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:Xt(0,100,10),default:30}}),mf=h({name:"RoleColorEverywhere",authors:[d.KingFish,d.lewisakura,d.AutumnVN,d.Kyuuhachi,d.jamesbt365],description:"Adds the top role color anywhere possible",settings:Kr,patches:[{find:".USER_MENTION)",replacement:[{match:/(?<=user:(\i),guildId:([^,]+?),.{0,100}?children:\i=>\i)\((\i)\)/,replace:"({...$3,color:$self.getColorInt($1?.id,$2)})"}],predicate:()=>Kr.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:\i,channelId:(\i)[^}]*\}.*?\.\i,{(?=children)/,replace:"$&color:$self.getColorInt($1,$2),"}],predicate:()=>Kr.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/null,\i," — ",\i\]/,replace:"null,$self.RoleGroupColor(arguments[0])]"}],predicate:()=>Kr.store.memberList},{find:"#{intl::THREAD_BROWSER_PRIVATE}",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.RoleGroupColor(arguments[0])]"}],predicate:()=>Kr.store.memberList},{find:".usernameSpeaking]:",replacement:[{match:/\.usernameSpeaking\]:.+?,(?=children)(?<=guildId:(\i),.+?user:(\i).+?)/,replace:"$&style:$self.getColorStyle($2.id,$1),"}],predicate:()=>Kr.store.voiceUsers},{find:".reactionDefault",replacement:{match:/tag:"strong"(?=.{0,50}\i\.name)(?<=onContextMenu:.{0,15}\((\i),(\i),\i\).+?)/,replace:"$&,style:$self.getColorStyle($2?.id,$1?.channel?.id)"},predicate:()=>Kr.store.reactorsList},{find:",reactionVoteCounts",replacement:{match:/\.nickname,(?=children:)/,replace:"$&style:$self.getColorStyle(arguments[0]?.user?.id,arguments[0]?.channel?.id),"},predicate:()=>Kr.store.pollResults},{find:".SEND_FAILED,",replacement:{match:/(?<=isUnsupported\]:(\i)\.isUnsupported\}\),)(?=children:\[)/,replace:"style:$self.useMessageColorsStyle($1),"},predicate:()=>Kr.store.colorChatMessages}],getColorString(e,t){try{let o=Z.getChannel(t)?.guild_id??Me.getGuild(t)?.id;return o==null?null:be.getMember(o,e)?.colorString??null}catch(o){new F("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}=Kr.use(["messageSaturation"]),o=Ok(e);if(o.colorString!=null&&t!==0){let n=`color-mix(in oklab, ${o.colorString} ${t}%, var({DEFAULT}))`;return{color:n.replace("{DEFAULT}","--text-default"),"--header-primary":n.replace("{DEFAULT}","--header-primary"),"--text-muted":n.replace("{DEFAULT}","--text-muted")}}}catch(t){new F("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=bt.getRole(n,e);return r("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},{noop:!0})});a();T();var iw=w({onlySnow:{type:3,description:"Only play the Snow Halation Theme",default:!1,restartNeeded:!0}}),ff=h({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[d.AndrewDLO,d.FieryFlames,d.RamziAH],settings:iw,patches:[{find:'"call_ringing_beat"',replacement:[{match:/500!==\i\(\)\.random\(1,1e3\)/,replace:"false"},{predicate:()=>iw.store.onlySnow,match:/"call_ringing_beat",/,replace:""}]}]});a();T();ie();E();v();var _k=D("allSummaries","findSummary"),Bk=ue(".people)),startId:",".type}"),sw=w({summaryExpiryThresholdDays:{type:5,description:"The time in days before a summary is removed. Note that only up to 50 summaries are kept per channel",markers:[1,3,5,7,10,15,20,25,30],stickToMarkers:!1,default:3}}),gf=h({name:"Summaries",description:"Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",authors:[d.mantikafasi],settings:sw,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=>({...Bk(o),time:Date.now()}));tr("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 tr("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*sw.store.summaryExpiryThresholdDays&&e[t].splice(o,1);e[t].length===0&&delete e[t]}return Object.assign(_k.allSummaries(),e),e})},shouldFetch(e){let t=Z.getChannel(e),o=Me.getGuild(t.guild_id);return ll(o,"SUMMARIES_ENABLED_GA")}});a();ve();T();ie();Fe();v();var aw=w({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});function lw(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 Ek=["","t","T","d","D","f","F","s","S","R"],fi=Y("vc-st-");function Uk({rootProps:e,close:t}){let[o,n]=C(),[i,s]=C(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(f,g)=>`<t:${f}${g&&`:${g}`}>`,[u,m]=le(()=>{let f=c(l,i);return[f,Pe.parse(f)]},[l,i]);return r(he,{...e},r(ke,{className:fi("modal-header")},r(x.FormTitle,{tag:"h2",className:fi("modal-title")},"Timestamp Picker"),r(tt,{onClick:t,className:fi("modal-close-button")})),r(Se,{className:fi("modal-content")},r("input",{className:fi("date-picker"),type:"datetime-local",value:o,onChange:f=>n(f.currentTarget.value),style:{colorScheme:As()===2?"light":"dark"}}),r(x.FormTitle,null,"Timestamp Format"),r("div",{className:fi("format-select")},r(Ro,{options:Ek.map(f=>({label:f,value:f})),isSelected:f=>f===i,select:f=>s(f),serialize:f=>f,renderOptionLabel:f=>r("div",{className:fi("format-label")},Pe.parse(c(l,f.value))),renderOptionValue:()=>m})),r(x.FormTitle,{className:A.bottom8},"Preview"),r(x.FormText,{className:fi("preview-text")},m," (",u,")")),r(yt,null,r(R,{onClick:()=>{Ni(u+" "),t()}},"Insert")))}var cw=({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"}))),Fk=({isAnyChat:e})=>e?r(Sr,{tooltip:"Insert Timestamp",onClick:()=>{let t=de(o=>r(Uk,{rootProps:o,close:()=>on(t)}))},buttonProps:{"aria-haspopup":"dialog"}},r(cw,null)):null,hf=h({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[d.Ven,d.Tyler,d.Grzesiek11],settings:aw,chatBarButton:{icon:cw,render:Fk},onBeforeMessageSend(e,t){aw.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,lw))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return r(p,null,r(x.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),r(x.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),r(x.FormText,null,"Examples:",r("ul",null,e.map(t=>r("li",{key:t},r("code",null,t)," ","->"," ",Pe.parse(lw(t)))))))}});a();T();v();a();ve();ie();te();Fe();ct();E();v();var uw=D("icon","acronym","childWrapper"),$k=pe("discriminatorClass:",".isMobileOnline","getAvatarURL"),Vt=Y("vc-gp-");function dw(e){de(t=>r(he,{...t,size:"medium"},r(Gk,{guild:e})))}var Hc={friends:!1,blocked:!1,ignored:!1};function pw(e){return r(Qt,{timestamp:new Date(e)})}function Gk({guild:e}){let[t,o]=C(),[n,i]=C(),[s,l]=C();X(()=>{Hc.friends=!1,Hc.blocked=!1,Hc.ignored=!1},[]);let[c,u]=C(0),m=e.banner&&Pt.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),f=e.icon&&Pt.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return r("div",{className:Vt("root")},m&&c===0&&r("img",{className:Vt("banner"),src:m,alt:"",onClick:()=>zo({url:m,width:1024})}),r("div",{className:Vt("header")},f?r("img",{className:Vt("icon"),src:f,alt:"",onClick:()=>zo({url:f,height:512,width:512})}):r("div",{"aria-hidden":!0,className:L(uw.childWrapper,uw.acronym)},Ds(e)),r("div",{className:Vt("name-and-description")},r(x.FormTitle,{tag:"h5",className:Vt("name")},e.name),e.description&&r(x.FormText,null,e.description))),r(bo,{type:"top",look:"brand",className:Vt("tab-bar"),selectedItem:c,onItemSelect:u},r(bo.Item,{className:Vt("tab",{selected:c===0}),id:0},"Server Info"),r(bo.Item,{className:Vt("tab",{selected:c===1}),id:1},"Friends",t!==void 0?` (${t})`:""),r(bo.Item,{className:Vt("tab",{selected:c===2}),id:2},"Blocked Users",n!==void 0?` (${n})`:""),r(bo.Item,{className:Vt("tab",{selected:c===3}),id:3},"Ignored Users",s!==void 0?` (${s})`:"")),r("div",{className:Vt("tab-content")},c===0&&r(zk,{guild:e}),c===1&&r(Wk,{guild:e,setCount:o}),c===2&&r(jk,{guild:e,setCount:i}),c===3&&r(qk,{guild:e,setCount:l})))}function Hk(e,t){let o=be.getMember(e,t.id)?.avatar,n=o?Pt.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):Pt.getUserAvatarURL(t,!0);return r("div",{className:Vt("owner")},r("img",{className:Vt("owner-avatar"),src:n,alt:"",onClick:()=>zo({url:n,height:512,width:512})}),Pe.parse(`<@${t.id}>`))}function zk({guild:e}){let[t]=ht(()=>ro.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?Hk(e.id,t):"Loading...","Created At":pw(xo.extractTimestamp(e.id)),"Joined At":e.joinedAt?pw(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:$r.getChannels(e.id)?.count-1||"?",Roles:bt.getSortedRoles(e.id).length-1};return r("div",{className:Vt("info")},Object.entries(o).map(([n,i])=>r("div",{className:Vt("server-info-pair"),key:n},r(x.FormTitle,{tag:"h5"},n),typeof i=="string"?r("span",null,i):i)))}function Wk({guild:e,setCount:t}){return Fy("friends",e,we.getFriendIDs(),t)}function jk({guild:e,setCount:t}){let o=we.getBlockedIDs();return Fy("blocked",e,o,t)}function qk({guild:e,setCount:t}){let o=we.getIgnoredIDs();return Fy("ignored",e,o,t)}function Fy(e,t,o,n){let i=[],s=[];for(let l of o)be.isMember(t.id,l)?s.push(l):i.push(l);return ne([be],()=>be.getMemberIds(t.id),null,(l,c)=>l.length===c.length),X(()=>{!Hc[e]&&i.length&&(Hc[e]=!0,B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),X(()=>n(s.length),[s.length]),r(qn,{fade:!0,className:Vt("scroller")},s.map(l=>r($k,{key:l,user:k.getUser(l),status:no.getStatus(l)||"offline",onSelect:()=>Wo(l),onContextMenu:()=>{}})))}var mw=(e,{guild:t})=>{Ge("privacy",e)?.push(r(I.MenuItem,{id:"vc-server-info",label:"Server Info",action:()=>dw(t)}))},yf=h({name:"ServerInfo",description:"Allows you to view info about a server",authors:[d.Ven,d.Nuckyz],dependencies:["DynamicImageModalAPI"],tags:["guild","info","ServerProfile"],contextMenus:{"guild-context":mw,"guild-header-popout":mw}});a();T();E();v();var fw=Ie("UserGuildJoinRequestStore");function Kk(){let e=ne([we,no],()=>{let t=0,o=we.getFriendIDs();for(let n of o)(no.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 Yk(){let e=ne([Me,fw],()=>{let t=fw.computeGuildIds(),o=Me.getGuilds();return Me.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 vf=h({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[d.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=G.plugins.ServerListIndicators;return r(M,{noop:!0},r("div",{style:{marginBottom:"4px"}},!!(e&2)&&r(Kk,null),!!(e&1)&&r(Yk,null)))},start(){Uc(0,this.renderIndicator)},stop(){Fc(0,this.renderIndicator)}});a();ve();T();a();var gw=`/* 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 bf={id:null,theme:null},$y=new Set,hw=()=>{let[,e]=se.useState(bf);return se.useEffect(()=>($y.add(e),()=>void $y.delete(e)),[]),bf};function Gy(e){bf.id!==e.id&&(Object.assign(bf,e),$y.forEach(t=>t(e)))}a();var yw="https://cdn.jsdelivr.net/npm/@vap/shiki-worker@0.0.8/dist/index.min.js",vw="https://cdn.jsdelivr.net/npm/@vap/shiki@0.10.3/dist/onig.wasm";var kw=kg(Pw());a();a();var Xy="shikijs/textmate-grammars-themes",Vy="bc5436518111d87ea58eb56d97b3f9bec30e6b83",V=e=>`https://cdn.jsdelivr.net/gh/${Xy}@${Vy}/packages/tm-themes/themes/${e}.json`,Rn={DarkPlus:V("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",Andromeeda:V("andromeeda"),AuroraX:V("aurora-x"),AyuDark:V("ayu-dark"),CatppuccinLatte:V("catppuccin-latte"),CatppuccinFrappe:V("catppuccin-frappe"),CatppuccinMacchiato:V("catppuccin-macchiato"),CatppuccinMocha:V("catppuccin-mocha"),DraculaSoft:V("dracula-soft"),Dracula:V("dracula"),EverforestDark:V("everforest-dark"),EverforestLight:V("everforest-light"),GithubDarkDefault:V("github-dark-default"),GithubDarkDimmed:V("github-dark-dimmed"),GithubDarkHighContrast:V("github-dark-high-contrast"),GithubDark:V("github-dark"),GithubLightDefault:V("github-light-default"),GithubLightHighContrast:V("github-light-high-contrast"),GithubLight:V("github-light"),GruvBoxDarkHard:V("gruvbox-dark-hard"),GruvBoxDarkMedium:V("gruvbox-dark-medium"),GruvBoxDarkSoft:V("gruvbox-dark-soft"),GruvBoxLightHard:V("gruvbox-light-hard"),GruvBoxLightMedium:V("gruvbox-light-medium"),GruvBoxLightSoft:V("gruvbox-light-soft"),Houston:V("houston"),KanagawaDragon:V("kanagawa-dragon"),KanagawaLotus:V("kanagawa-lotus"),KanagawaWave:V("kanagawa-wave"),LaserWave:V("laserwave"),LightPlus:V("light-plus"),MaterialDarker:V("material-theme-darker"),MaterialDefault:V("material-theme"),MaterialLighter:V("material-theme-lighter"),MaterialOcean:V("material-theme-ocean"),MaterialPalenight:V("material-theme-palenight"),MinDark:V("min-dark"),MinLight:V("min-light"),Monokai:V("monokai"),NightOwl:V("night-owl"),Nord:V("nord"),OneDarkPro:V("one-dark-pro"),OneLight:V("one-light"),Plastic:V("plastic"),Poimandres:V("poimandres"),Red:V("red"),RosePineDawn:V("rose-pine-dawn"),RosePineMoon:V("rose-pine-moon"),RosePine:V("rose-pine"),SlackDark:V("slack-dark"),SlackOchin:V("slack-ochin"),SnazzyLight:V("snazzy-light"),SolarizedDark:V("solarized-dark"),SolarizedLight:V("solarized-light"),Synthwave84:V("synthwave-84"),TokyoNight:V("tokyo-night"),Vesper:V("vesper"),VitesseBlack:V("vitesse-black"),VitesseDark:V("vitesse-dark"),VitesseLight:V("vitesse-light")};var eC="Vencord/ShikiPluginAssets",tC="75d69df9fdf596a31eef8b7f6f891231a6feab44",oC=`https://cdn.jsdelivr.net/gh/${eC}@${tC}/grammars.json`,rC=e=>`https://cdn.jsdelivr.net/gh/${Xy}@${Vy}/packages/tm-grammars/grammars/${e}.json`,Pa={},Iw=async()=>{let e=await fetch(oC).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:rC(n)}]}));Object.assign(Pa,t)},Mw=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),nC=new Map;function hs(e){if(Object.prototype.hasOwnProperty.call(Pa,e))return Pa[e];let t=Object.values(Pa).find(o=>o.aliases?.includes(e));return t?(nC.set(e,t),t):null}var ev=Object.values(Rn),Nw,Ce={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Pa,themes:Rn,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>Nw=e),init:async e=>{let t=await fetch(yw).then(i=>i.blob()),o=Ce.client=new kw.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let n=e||ev[0];await Iw(),await o.run("setOnigasm",{wasm:vw}),await o.run("setHighlighter",{theme:n,langs:[]}),Ce.loadedThemes.add(n),await Ce._setTheme(n),Nw(o)},_setTheme:async e=>{Ce.currentThemeUrl=e;let{themeData:t}=await Ce.client.run("getTheme",{theme:e});Ce.currentTheme=JSON.parse(t),Gy({id:e,theme:Ce.currentTheme})},loadTheme:async e=>{let t=await Ce.clientPromise;Ce.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),Ce.loadedThemes.add(e))},setTheme:async e=>{await Ce.clientPromise,e||=ev[0],Ce.loadedThemes.has(e)||await Ce.loadTheme(e),await Ce._setTheme(e)},loadLang:async e=>{let t=await Ce.clientPromise,o=hs(e);!o||Ce.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await Mw(o)}}),Ce.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await Ce.clientPromise,n=hs(t);return n?(Ce.loadedLangs.has(n.id)||await Ce.loadLang(n.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:Ce.currentThemeUrl??ev[0]})):[]},destroy(){Ce.currentTheme=null,Ce.currentThemeUrl=null,Gy({id:null,theme:null}),Ce.client?.destroy()}};a();a();a();ve();te();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 Wc="src/plugins/shikiCodeblocks.desktop/devicon.css";a();var sC=Object.keys(Rn),gi=w({theme:{type:4,description:"Default themes",options:sC.map(e=>({label:yn(Eh(e)),value:Rn[e],default:Rn[e]===Rn.DarkPlus})),onChange:Ce.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:Rn.MaterialCandy,onChange:e=>{Ce.setTheme(e||gi.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"?go(Wc):Yt(Wc)}},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=Fg(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}});v();function Aw(e){let t=gi.use([...e,"customTheme","theme"]),[o,n]=se.useState(!1),i=t.customTheme||t.theme,s=Ce.currentThemeUrl&&i&&i!==Ce.currentThemeUrl;return o&&!s&&n(!1),!o&&s&&(n(!0),Ce.setTheme(i)),{...t,isThemeLoading:o}}a();function Rw(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();ve();v();var No=Y("vc-shiki-"),Dw=({lang:e,tryHljs:t})=>{let o=e?_i?.getLanguage?.(e):null,i=(e?hs(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}};ct();v();a();a();a();tn();v();function Lw(e){let[t,o]=se.useState(!1);function n(i){to(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,n]}function Ow({content:e,...t}){let[o,n]=Lw(1e3);return r("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>n(e)},o?"Copied!":"Copy")}function _w({content:e,theme:t}){return r("div",{className:No("btns")},r(Ow,{content:e,className:No("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}}))}a();v();var Bw=({theme:e,useHljs:t,lang:o,content:n,tokens:i})=>{let s;if(t)try{let{value:c}=_i.highlight(n,{language:o,ignoreIllegals:!0});s=c.split(`
|
|
`).map((u,m)=>r("span",{key:m,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,m)=>u.length===0?r("span",{key:m},`
|
|
`):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:No("table-row"),key:u},r("td",{className:No("table-cell"),style:{color:e.plainColor}},u+1),r("td",{className:No("table-cell")},c)));return r("table",{className:No("table")},...l)};a();function Ew({langName:e,useDevIcon:t,shikiLang:o}){return e?r("div",{className:No("lang")},t!=="DISABLED"&&o?.devicon&&r("i",{className:`${No("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):r(p,null)}var Tf=e=>r("pre",{className:No("container")},r(M,null,r(aC,{...e}))),aC=({lang:e,content:t,isPreview:o})=>{let{tryHljs:n,useDevIcon:i,bgOpacity:s}=Aw(["tryHljs","useDevIcon","bgOpacity"]),{id:l,theme:c}=hw(),u=e?hs(e):null,m=Dw({lang:e,tryHljs:n}),[f,g]=nh(!0),[y]=ht(async()=>!u||m||!g?null:await Ce.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,l,g]}),b={plainColor:c?.fg||"var(--text-default)",accentBgColor:c?.colors?.["statusBar.background"]||(m?"#7289da":"#007BC8"),accentFgColor:c?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:c?.colors?.["editor.background"]||"var(--background-base-lower)"},P;return e&&(P=m?_i?.getLanguage?.(e)?.name:u?.name),r("div",{ref:f,className:No("root",{plain:!P,preview:o}),style:{backgroundColor:m?b.backgroundColor:`rgba(${Rw(b.backgroundColor).concat(s/100).join(", ")})`,color:b.plainColor}},r("code",{className:No("code")},r(Ew,{langName:P,useDevIcon:i,shikiLang:u}),r(Bw,{theme:b,useHljs:m,lang:e,content:t,tokens:y}),!o&&r(_w,{content:t,theme:b})))};a();var Uw=new Map;var Fw=()=>{Uw.forEach(e=>e.remove()),Uw.clear()};var wf=h({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[d.Vap],reporterTestable:8,settings:gi,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()=>{gi.store.useDevIcon!=="DISABLED"&&Yt(Wc),await Ce.init(gi.store.customTheme||gi.store.theme)},stop:()=>{Ce.destroy(),Fw()},settingsAboutComponent:()=>Tf({lang:"tsx",content:gw,isPreview:!0}),shiki:Ce,createHighlighter:Tf,renderHighlighter:({lang:e,content:t})=>Tf({lang:e?.toLowerCase(),content:t,isPreview:!1})});a();T();var Pf=h({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[d.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]});a();Qe();T();ie();E();v();a();ie();E();v();var tv=Dt(e=>e.colors?.INTERACTIVE_MUTED?.css),lC=pe("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}");function $w(){let e=wl(tv.colors.INTERACTIVE_MUTED).hex(),t=wl(tv.colors.INTERACTIVE_ICON_ACTIVE??tv.colors.INTERACTIVE_ACTIVE).hex();return r(lC,{color:e,forcedIconColor:t,size:16,tooltipText:xe("CONNECTION_VERIFIED"),className:"vc-sc-tooltip-icon"})}var cC=ue(".TWITTER_LEGACY:"),uC=D("isSupported","getByUrl"),pC=ue(".getPreviewThemeColors","primaryColor:");var dC=e=>(e??0)*2+4,If=w({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}]}}),mC=M.wrap(e=>r(fC,{...e,id:e.user.id,theme:pC(e).theme}),{noop:!0});function fC({id:e,theme:t}){let o=Lt.getUserProfile(e);if(!o)return null;let n=o.connectedAccounts;return n?.length?r(oe,{gap:dC(If.store.iconSpacing),flexWrap:"wrap"},n.map(i=>r(gC,{connection:i,theme:t,key:i.id}))):null}function gC({connection:e,theme:t}){let o=uC.get(cC(e.type)),n=o.getPlatformUserUrl?.(e),i=r("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:If.store.iconSize,height:If.store.iconSize}}),s=n?ki:sn;return r(Q,{text:r("span",{className:"vc-sc-tooltip"},r("span",{className:"vc-sc-connection-name"},e.name),e.verified&&r($w,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=>{Ne(Mn.name)&&Mn.handleLink(c.currentTarget,c)}},i):r("button",{...l,className:"vc-user-connection",onClick:()=>rt(e.name)},i))}var Mf=h({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[d.TheKodeToad],settings:If,patches:[{find:".hasAvatarForGuild(null==",replacement:{match:/currentUser:\i,guild:\i[^}]*?\}\)(?=])(?<=user:(\i),bio:null==(\i)\?.+?)/,replace:"$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2 })"}}],profilePopoutComponent:mC});a();ve();T();te();E();v();a();te();E();v();var ov=D("auto","managedReactiveScroller"),YSe=D("chat","content","noChat","chatContent"),hC=pe("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"),yC=pe("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"),vC=D("convertSurrogateToName"),bC=D("getURL","getEmojiColors"),SC={0:"text",5:"announcement",15:"forum",2:"voice",13:"stage"},xC={0:"Latest activity",1:"Creation date"},TC={0:"Not set",1:"List view",2:"Gallery view"},wC={1:"Automatic",2:"720p"},PC="/assets/433e3ec4319a9d11b0cbe39342614982.svg";function IC({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Dn.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,n]=C([]),{type:i,topic:s,lastMessageId:l,defaultForumLayout:c,lastPinTimestamp:u,defaultAutoArchiveDuration:m,availableTags:f,id:g,rateLimitPerUser:y,defaultThreadRateLimitPerUser:b,defaultSortOrder:P,defaultReactionEmoji:S,bitrate:_,rtcRegion:N,videoQualityMode:U,permissionOverwrites:j,guild_id:z}=e;return X(()=>{let J=[],me=Me.getGuild(z).ownerId;be.getMember(z,me)||J.push(me),Object.values(j).forEach(({type:W,id:ee})=>{W===1&&!be.getMember(z,ee)&&J.push(ee)}),J.length>0&&B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[z],userIds:J}),G.plugins.PermissionsViewer.enabled&&n(Lm(Object.values(j).map(W=>({type:W.type,id:W.id,overwriteAllow:W.allow,overwriteDeny:W.deny})),z))},[g]),r("div",{className:L(ov.auto,ov.customTheme,ov.managedReactiveScroller)},r("div",{className:Eo("container")},r("img",{className:Eo("logo"),src:PC}),r("div",{className:Eo("heading-container")},r(H,{variant:"heading-xxl/bold"},"This is a ",Te.can(ce.VIEW_CHANNEL,e)?"locked":"hidden"," ",SC[i]," channel"),e.isNSFW()&&r(Q,{text:"NSFW"},({onMouseLeave:J,onMouseEnter:me})=>r("svg",{onMouseLeave:J,onMouseEnter:me,className:Eo("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(H,{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:Eo("topic-container")},Pe.parseTopic(s,!1,{channelId:g})),l&&r(H,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",r(Qt,{timestamp:new Date(xo.extractTimestamp(l))})),u&&r(H,{variant:"text-md/normal"},"Last message pin: ",r(Qt,{timestamp:new Date(u)})),(y??0)>0&&r(H,{variant:"text-md/normal"},"Slowmode: ",Ol(y,"seconds")),(b??0)>0&&r(H,{variant:"text-md/normal"},"Default thread slowmode: ",Ol(b,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&_!=null&&r(H,{variant:"text-md/normal"},"Bitrate: ",_," bits"),N!==void 0&&r(H,{variant:"text-md/normal"},"Region: ",N??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&r(H,{variant:"text-md/normal"},"Video quality mode: ",wC[U??1]),(m??0)>0&&r(H,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ol(m,"minutes")),c!=null&&r(H,{variant:"text-md/normal"},"Default layout: ",TC[c]),P!=null&&r(H,{variant:"text-md/normal"},"Default sort order: ",xC[P]),S!=null&&r("div",{className:Eo("default-emoji-container")},r(H,{variant:"text-md/normal"},"Default reaction emoji:"),Pe.defaultRules[S.emojiName?"emoji":"customEmoji"].react({name:S.emojiName?vC.convertSurrogateToName(S.emojiName):er.getCustomEmojiById(S.emojiId)?.name??"",emojiId:S.emojiId??void 0,surrogate:S.emojiName??void 0,src:S.emojiName?bC.getURL(S.emojiName):void 0},void 0,{key:0})),e.hasFlag(16)&&r(H,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),f&&f.length>0&&r("div",{className:Eo("tags-container")},r(H,{variant:"text-lg/bold"},"Available tags:"),r("div",{className:Eo("tags")},f.map(J=>r(yC,{tag:J,key:J.id})))),r("div",{className:Eo("allowed-users-and-roles-container")},r("div",{className:Eo("allowed-users-and-roles-container-title")},Ne(ha.name)&&r(Q,{text:"Permission Details"},({onMouseLeave:J,onMouseEnter:me})=>r("button",{onMouseLeave:J,onMouseEnter:me,className:Eo("allowed-users-and-roles-container-permdetails-btn"),onClick:()=>ms(o,Me.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(H,{variant:"text-lg/bold"},"Allowed users and roles:"),r(Q,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:J,onMouseEnter:me})=>r("button",{onMouseLeave:J,onMouseEnter:me,className:Eo("allowed-users-and-roles-container-toggle-btn"),onClick:()=>Dn.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(hC,{channel:e}))))}var Gw=M.wrap(IC);var Hw=D("modeMuted","modeSelected","unread","icon"),Eo=Y("vc-shc-");var MC=1n<<20n,Dn=w({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 NC(e){return e.channel.id==="null"&&e.channel.name==="Uncategorized"&&e.comparator===-1}var Ia=h({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[d.BigDuck,d.AverageReactEnjoyer,d.D3SOX,d.Ven,d.Nuckyz,d.Nickyux,d.dzshn],settings:Dn,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:()=>Dn.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:()=>Dn.store.showMode===1,replacement:[{match:/\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.Children\.count.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)(?:\)return |\?)(\i\.MUTED)/,replace:(e,t,o,n)=>`${o}?${n}:"",${t}if(${o})return ""`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Dn.store.hideUnreads===!1&&Dn.store.showMode===1,match:/(?<=\.LOCKED;if\()(?<={channel:(\i).+?)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{predicate:()=>Dn.store.hideUnreads===!0,match:/\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'"ChannelListUnreadsStore",',replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?<=!0\))(?=&&\(0,\i\.\i\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"ignoreRecents:!0",replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/"renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_TEXT:(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,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(${MC}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\.members.+?\]}\)),)/,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:/(?<="\+"\.concat\()\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:/callContainer,(?<=\i\.callContainer,)/,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:/(?<=&&)\(0,\i\.jsxs?\).{0,180}\.buttonIcon/,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:'className:"channelMention",children',replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'"GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.*?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??arguments[0]==="@favorites");}`}]},{find:".invitesDisabledTooltip",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 Te.can(ce.CONNECT,t)||(e&=~ce.VIEW_CHANNEL,e|=ce.CONNECT),e},isHiddenChannel(e,t=!1){try{return e==null||Object.hasOwn(e,"channelId")&&e.channelId==null||(e.channelId!=null&&(e=Z.getChannel(e.channelId)),e==null||e.isDM()||e.isGroupDM()||e.isMultiUserDM())||["browse","customize","guide"].includes(e.id)?!1:!Te.can(ce.VIEW_CHANNEL,e)||t&&!Te.can(ce.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)(NC(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(Gw,{channel:e}),LockIcon:M.wrap(()=>r("svg",{className:Hw.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(Q,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>r("svg",{onMouseLeave:e,onMouseEnter:t,className:L(Hw.icon,Eo("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();T();ae();var rv=e=>({type:3,description:e,default:!0,restartNeeded:!0}),Ma=w({showTimeouts:rv("Show member timeout icons in chat."),showInvitesPaused:rv("Show the invites paused tooltip in the server list."),showModView:rv("Show the member mod view context menu item in all servers.")}),Nf=h({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused","ShowModView","DisableDiscoveryFilters"],description:"Displays various hidden & moderator-only things regardless of permissions.",authors:[d.Dolfies],settings:Ma,patches:[{find:"showCommunicationDisabledStyles",predicate:()=>Ma.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"INVITES_DISABLED))||",predicate:()=>Ma.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,replace:"true"}},{find:/,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/,predicate:()=>Ma.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:()=>Ma.store.showModView,replacement:{match:/(?<=\.highestRole\),)role:\i(?<=\[\i\.roles,\i\.highestRoleId,(\i)\].+)/,replace:"role:$self.getHighestRole(arguments[0],$1)"}},{find:'action:"PRESS_MOD_VIEW",icon:',predicate:()=>Ma.store.showModView,replacement:{match:/\i(?=\?null)/,replace:"false"}}],getHighestRole({member:e},t){try{return t.find(o=>o.id===e.highestRoleId)}catch(o){new F("ShowHiddenThings").error("Failed to find highest role",o);return}}});a();T();v();var zw=w({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"}}),kf=h({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[d.Rini,d.TheKodeToad,d.rae],patches:[{find:'="SYSTEM_TAG"',replacement:{match:/(?<=onContextMenu:\i,children:)\i\?(?=.{0,100}?user[Nn]ame:)/,replace:"$self.renderUsername(arguments[0]),_oldChildren:$&"}}],settings:zw,renderUsername:M.wrap(({author:e,channel:t,message:o,isRepliedMessage:n,withMentionPrefix:i,userOverride:s})=>{try{let{mode:l,friendNicknames:c,displayNames:u,inReplies:m}=zw.store,f=s??o.author,g=Il.enabled?f.username[0]+"\u2026":f.username;u&&(g=f.globalName||g);let{nick:y}=e,b=we.getNickname(e.authorId);b&&(c==="always"||c==="dms"&&t.isPrivate()||c==="fallback"&&!y)&&(y=b);let P=i?"@":"";return n&&!m||g.toLowerCase()===y.toLowerCase()?r(p,null,P,y):l==="user-nick"?r(p,null,P,g," ",r("span",{className:"vc-smyn-suffix"},y)):l==="nick-user"?r(p,null,P,y," ",r("span",{className:"vc-smyn-suffix"},g)):r(p,null,P,g)}catch{return r(p,null,e?.nick)}},{noop:!0})});a();T();ie();Zo();E();v();var kC=Rt(/#{intl::MAX_AGE_NEVER}/),CC=pu(e=>e.prototype?.render&&kC.test(e.prototype.render.toString()));var Ww=w({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 jw(e,t){let o=Z.getChannel(e.channel_id)?.guild_id;if(!o)return null;let n=be.getMember(o,e.author.id);if(!n?.communicationDisabledUntil)return null;let i=()=>r(CC,{deadline:new Date(n.communicationDisabledUntil),showUnits:!0,stopAtOneSec:!0});return xe("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i}),t?i():xe("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i})}var Cf=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:[d.Ven,d.Sqaaakoi],settings:Ww,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})=>Ww.store.displayStyle==="tooltip"?r(Vo,{text:jw(e,!1)},t):r("div",{className:"vc-std-wrapper"},r(Vo,{text:o},t),r(H,{variant:"text-md/normal",color:"status-danger"},jw(e,!0)," timeout remaining")),{noop:!0})});a();T();v();var nv=!1,iv=w({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(nv=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});function AC(){return r(sv,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 sv=({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),RC=({isMainChat:e})=>{let[t,o]=C(nv);function n(i){iv.store.persistState&&(nv=i),o(i)}return X(()=>{let i=(s,l)=>{t&&(iv.store.autoDisable&&n(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Ki(i),()=>void Yi(i)},[t]),e?r(Sr,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>n(!t)},t?r(sv,null):r(AC,null)):null},Af=h({name:"SilentMessageToggle",authors:[d.Nuckyz,d.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",settings:iv,chatBarButton:{icon:sv,render:RC}});a();T();v();var Rr=w({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 DC(){return r(av,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 av=({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),LC=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=Rr.use(["isEnabled","showIcon"]),n=()=>Rr.store.isEnabled=!Rr.store.isEnabled;return!e||!o?null:r(Sr,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:n},t?r(DC,null):r(av,null))},OC=e=>{let{isEnabled:t,contextMenu:o}=Rr.use(["isEnabled","contextMenu"]);if(!o)return;let n=Ge("submit-button",e);if(!n)return;let i=n.findIndex(s=>s?.props?.id==="submit-button");n.splice(i+1,0,r(I.MenuCheckboxItem,{id:"vc-silent-typing",label:"Enable Silent Typing",checked:t,action:()=>Rr.store.isEnabled=!Rr.store.isEnabled}))},Rf=h({name:"SilentTyping",authors:[d.Ven,d.Rini,d.ImBanana],description:"Hide that you are typing",settings:Rr,contextMenus:{"textarea-context":OC},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)=>{Rr.store.isEnabled=!!Oo(e,"value",!Rr.store.isEnabled),at(t.channel.id,{content:Rr.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){Rr.store.isEnabled||B.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarButton:{icon:av,render:LC}});a();ve();T();v();var _C=new Intl.DateTimeFormat(void 0,{month:"numeric",day:"numeric",year:"numeric"}),lv=Y("vc-sortFriendRequests-");function qw(e){return new Date(we.getSince(e.id))}var Kw=w({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),Df=h({name:"SortFriendRequests",authors:[d.Megu],description:"Sorts friend requests by date of receipt",settings:Kw,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:"#{intl::FRIEND_REQUEST_CANCEL}",replacement:{predicate:()=>Kw.store.showDates,match:/(?<=\.listItemContents,children:\[)\(0,.+?(?=,\(0)(?<=user:(\i).+?)/,replace:(e,t)=>`$self.WrapperDateComponent({user:${t},children:${e}})`}}],wrapSort(e,t){return t.type===3||t.type===4?-qw(t.user):e(t)},WrapperDateComponent:M.wrap(({user:e,children:t})=>{let o=qw(e);return r("div",{className:lv("wrapper")},t,!isNaN(o.getTime())&&r(Vo,{text:Yn.dateFormat(o,"LLLL"),tooltipClassName:lv("tooltip")},r(H,{variant:"text-xs/normal",className:lv("date")},_C.format(o))))},{noop:!0})});a();ve();T();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 Yw="src/plugins/spotifyControls/hoverOnly.css";a();ve();Qe();mr();Su();ie();te();v();a();vi();v();var Zw=Ke(()=>{let e=Wn.$$vencordGetWrappedComponent();return class extends e{static getDerivedStateFromProps(o,n){let i=super.getDerivedStateFromProps(o,n);return i&&(i.value=o.initialValue),i}}});a();E();v();var Je=ko(()=>{let{Store:e}=Es,t=tl("getActiveSocketAndDevice"),o=D("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=G.plugins.SpotifyControls.useSpotifyUris||Ne(Mn.name)?"spotify:"+c.replaceAll("/",(m,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,m={}){this.device?.is_active&&((m.query??={}).device_id=this.device.id);let{socket:f}=t.getActiveSocketAndDevice();return o[c](f.accountId,f.accessToken,{url:n+u,...m})}}let s=new i(B,{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 Xe=Y("vc-spotify-");function cv(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 Na(e,t){return()=>r("svg",{className:Xe("button-icon",t),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},r("path",{d:e}))}var BC=Na("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"),EC=Na("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"),UC=Na("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"),FC=Na("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"),$C=Na("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"),GC=Na("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 jc(e){return r("button",{className:Xe("button"),...e},e.children)}function HC({name:e,type:t,path:o}){return r(I.Menu,{navId:"vc-spotify-menu",onClose:st.closeContextMenu,"aria-label":`Spotify ${t} Menu`},r(I.MenuItem,{id:"vc-spotify-copy-name",label:`Copy ${t} Name`,action:()=>rt(e),icon:sn}),r(I.MenuItem,{id:"vc-spotify-copy-link",label:`Copy ${t} Link`,action:()=>rt("https://open.spotify.com"+o),icon:ki}),r(I.MenuItem,{id:"vc-spotify-open",label:`Open ${t} in Spotify`,action:()=>Je.openExternal(o),icon:Xo}))}function zC(){let[e,t,o]=ne([Je],()=>[Je.isPlaying,Je.shuffle,Je.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(oe,{className:Xe("button-row"),gap:"0"},r(jc,{className:L(Xe("button"),Xe("shuffle"),Xe(t?"shuffle-on":"shuffle-off")),onClick:()=>Je.setShuffle(!t)},r(GC,null)),r(jc,{onClick:()=>{G.plugins.SpotifyControls.previousButtonRestartsTrack&&Je.position>3e3?Je.seek(0):Je.prev()}},r(UC,null)),r(jc,{onClick:()=>Je.setPlaying(!e)},e?r(EC,null):r(BC,null)),r(jc,{onClick:()=>Je.next()},r(FC,null)),r(jc,{className:L(Xe("button"),Xe("repeat"),Xe(i)),onClick:()=>Je.setRepeat(n),style:{position:"relative"}},o==="track"&&r("span",{className:Xe("repeat-1")},"1"),r($C,null)))}var WC=qt(e=>{Je.seek(e)});function jC(){let{duration:e}=Je.track,[t,o,n]=ne([Je],()=>[Je.mPosition,Je.isSettingPosition,Je.isPlaying]),[i,s]=C(t);X(()=>{if(n&&!o){s(Je.position);let c=setInterval(()=>{s(u=>u+1e3)},1e3);return()=>clearInterval(c)}},[t,o,n]);let l=c=>{o||(s(c),WC(c))};return r("div",{id:Xe("progress-bar")},r(Ri,{size:"xs",weight:"medium",className:Xe("progress-time")+" "+Xe("time-left"),"aria-label":"Progress"},cv(i)),r(Zw,{initialValue:i,minValue:0,maxValue:e,onValueChange:l,asValueChanges:l,onValueRender:cv}),r(Ri,{size:"xs",weight:"medium",className:Xe("progress-time")+" "+Xe("time-right"),"aria-label":"Total Duration"},cv(e)))}function qC({track:e}){let t=ne([Je],()=>Je.volume);return r(I.Menu,{navId:"spotify-album-menu",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},r(I.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>Je.openExternal(`/album/${e.album.id}`),icon:Xo}),r(I.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>zo(e.album.image),icon:dr}),r(I.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,n)=>r(I.MenuSliderControl,{...o,ref:n,value:t,minValue:0,maxValue:100,onChange:qt(i=>Je.setVolume(i))})}))}function uv(e,t,o,n){return t?{role:"link",onClick:()=>Je.openExternal(n),onContextMenu:i=>st.openContextMenu(i,()=>r(HC,{type:e,name:o,path:n}))}:{}}function KC({track:e}){let t=e?.album?.image,[o,n]=C(!1),i=r(p,null,t&&r("img",{id:Xe("album-image"),src:t.url,alt:"Album Image",onClick:()=>n(!o),onContextMenu:s=>{st.openContextMenu(s,()=>r(qC,{track:e}))}}));return o&&t?r("div",{id:Xe("album-expanded-wrapper")},i):r("div",{id:Xe("info-wrapper")},i,r("div",{id:Xe("titles")},r($e,{weight:"semibold",id:Xe("song-title"),className:Xe("ellipoverflow"),title:e.name,...uv("Song",e.id,e.name,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&r($e,{className:Xe(["ellipoverflow","secondary-song-info"])},r("span",{className:Xe("song-info-prefix")},"by\xA0"),e.artists.map((s,l)=>r(se.Fragment,{key:s.name},r("span",{className:Xe("artist"),style:{fontSize:"inherit"},title:s.name,...uv("Artist",s.id,s.name,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&r("span",{className:Xe("comma")},", ")))),e.album.name&&r($e,{className:Xe(["ellipoverflow","secondary-song-info"])},r("span",{className:Xe("song-info-prefix")},"on\xA0"),r("span",{id:Xe("album-title"),className:Xe("album"),style:{fontSize:"inherit"},title:e.album.name,...uv("Album",e.album.id,e.album.name,`/album/${e.album.id}`)},e.album.name))))}function Jw(){let e=ne([Je],()=>Je.track,null,(l,c)=>l?.id?l.id===c?.id:l?.name===c?.name),t=ne([Je],()=>Je.device,null,(l,c)=>l?.id===c?.id),o=ne([Je],()=>Je.isPlaying),[n,i]=C(!1);if(se.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:Xe("player"),style:s},r(KC,{track:e}),r(jC,null),r(zC,null))}function Qw(e){(e?Yt:go)(Yw)}var Lf=h({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[d.Ven,d.afn,d.KraXen72,d.Av32000,d.nin0dev],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>Qw(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1},previousButtonRestartsTrack:{type:3,description:"Restart currently playing track when pressing the previous button if playtime is >3s",default:!0}},patches:[{find:"this.isCopiedStreakGodlike",replacement:{match:/(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,hidePrivateData:)/,replace:"$self.PanelWrapper,{VencordOriginal:$1,"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),vcSpotifyMarker:1,$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:[{match:/repeat:"off"!==(\i),/,replace:"shuffle:arguments[2]?.shuffle_state??false,actual_repeat:$1,$&"},{match:/(?<=artists.filter\(\i=>).{0,10}\i\.id\)&&/,replace:""}]}],start:()=>Qw(G.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(Jw,null)),r(e,{...t}))}});a();T();var pv=w({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}}),Of=h({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[d.Cyn,d.Nuckyz],settings:pv,patches:[{find:'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',replacement:{match:/SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,replace:(e,t)=>`${e}(${t}.body.product="premium")&&`}},{find:'"displayName","SpotifyStore")',replacement:[{predicate:()=>pv.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>pv.store.keepSpotifyActivityOnIdle,match:/(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:"$1"}]}]});a();T();ie();E();v();var YC=D("getPlayerState"),ZC=D("getPendingReply");function dv(e,t){return{name:e,description:`Share your current Spotify ${e} in chat`,inputType:0,options:[Ul],execute(o,{channel:n}){let i=YC.getTrack();if(!i)return at(n.id,{content:"You're not listening to any music."});if(i.id==null)return at(n.id,{content:"Failed to find the track on spotify."});let s=t(i),l=Oo(o,"message");Rs(n.id,{content:l?`${l} ${s}`:s},!1,vo.getSendMessageOptionsForReply(ZC.getPendingReply(n.id))).then(()=>{B.dispatch({type:"DELETE_PENDING_REPLY",channelId:n.id})})}}}var _f=h({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[d.katlyn],commands:[dv("track",e=>`https://open.spotify.com/track/${e.id}`),dv("album",e=>`https://open.spotify.com/album/${e.album.id}`),dv("artist",e=>e.artists[0].external_urls.spotify)]});a();T();a();E();v();var qc=D("markWithDelta","markAndLog","markAt");function JC({emoji:e,prefix:t,log:o,delta:n,instance:i}){return r(se.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 QC({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,m=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:m}});return r("section",null,r(x.FormTitle,{tag:"h2"},e),r("code",null,o&&r("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),r("div",{style:{color:"var(--header-primary)",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"),qc.logs.map((l,c)=>r(JC,{key:c,...l,instance:s[c]})))))}function XC({trace:e}){let t=e.split(`
|
|
`);return r("section",null,r(x.FormTitle,{tag:"h3"},"Server Trace"),r("code",null,r(oe,{flexDirection:"column",gap:"5px",style:{color:"var(--header-primary)",userSelect:"text"}},t.map((o,n)=>r("span",{key:n},o)))))}function VC(){if(!qc?.logs)return r("div",null,"Loading...");let e=qc.logGroups.find(t=>t.serverTrace)?.serverTrace;return r(se.Fragment,null,r(QC,{title:"Startup Timings",logs:qc.logs,traceEnd:qc.endTime_}),r("div",{style:{marginTop:5}},"\xA0"),e&&r(XC,{trace:e}))}var Xw=M.wrap(VC);var Bf=h({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[d.Megu],patches:[{find:"#{intl::ACTIVITY_SETTINGS}",replacement:[{match:/(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+\)\)\}\))(?=\)\})/,replace:(e,t,o,n)=>`${t}${o}?.[0]==="EXPERIMENTS"&&${n}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`}]}],StartupTimingPage:Xw});a();T();var Ef=h({name:"StickerPaste",description:"Makes picking a sticker in the sticker picker insert it into the chatbox instead of instantly sending",authors:[d.ImBanana],patches:[{find:".stickers,previewSticker:",replacement:{match:/if\(\i\.\i\.getUploadCount/,replace:"return true;$&"}}]});a();T();v();function Vw({streamKey:e},t){e.endsWith(k.getCurrentUser().id)&&B.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var Uf=h({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[d.Kodarru],flux:{STREAM_CREATE:e=>Vw(e,!0),STREAM_DELETE:e=>Vw(e,!1)}});a();T();v();var Ff=w({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}}}),$f=h({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[d.FieryFlames,d.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:[{match:/(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=5+?(?=\))/,replace:(e,t,o)=>`${t}!$self.shouldPlayBurstReaction(${o})`,noWarn:!0},{match:/((\i)=5.+?)if\((.{0,20}?)>=\2\)return;/,replace:(e,t,o)=>`${t}if(!$self.shouldPlayBurstReaction(${o}))return;`}]},{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:Ff,shouldPlayBurstReaction(e){return!!(Ff.store.unlimitedSuperReactionPlaying||Ff.store.superReactionPlayingLimit>e)},get shouldSuperReactByDefault(){return Ff.store.superReactByDefault&&k.getCurrentUser().premiumType!=null}});a();Qe();T();ae();v();var o5=()=>({find:"",replace:"",onlyIfIncludes:""}),e5=()=>[o5()],Gf=w({replace:{type:6,component:()=>{let{stringRules:e,regexRules:t}=Gf.use(["stringRules","regexRules"]);return r(p,null,r(t5,{title:"Using String",rulesArray:e}),r(t5,{title:"Using Regex",rulesArray:t}),r(tA,null))}},stringRules:{type:7,default:e5()},regexRules:{type:7,default:e5()}});function r5(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 eA(e){try{return r5(e),null}catch(t){return r("span",{style:{color:"var(--text-feedback-critical, var(--text-danger))"}},String(t))}}function mv({initialValue:e,onChange:t,placeholder:o}){let[n,i]=C(e);return r(dt,{placeholder:o,value:n,onChange:i,spellCheck:!1,onBlur:()=>n!==e&&t(n)})}function t5({title:e,rulesArray:t}){let o=e==="Using Regex";async function n(s){s!==t.length-1&&t.splice(s,1)}async function i(s,l,c){l===t.length-1&&t.push(o5()),t[l][c]=s,t[l].find===""&&t[l].replace===""&&t[l].onlyIfIncludes===""&&l!==t.length-1&&t.splice(l,1)}return r(p,null,r(x.FormTitle,{tag:"h4"},e),r(oe,{flexDirection:"column",style:{gap:"0.5em"}},t.map((s,l)=>r(se.Fragment,{key:`${s.find}-${l}`},r(oe,{gap:"0.5em",flexDirection:"row",style:{flexGrow:1}},r(mv,{placeholder:"Find",initialValue:s.find,onChange:c=>i(c,l,"find")}),r(mv,{placeholder:"Replace",initialValue:s.replace,onChange:c=>i(c,l,"replace")}),r(mv,{placeholder:"Only if includes",initialValue:s.onlyIfIncludes,onChange:c=>i(c,l,"onlyIfIncludes")}),r(R,{size:R.Sizes.MIN,onClick:()=>n(l),style:{background:"none",color:"var(--status-danger)",...l===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},r(Ci,null))),o&&eA(s.find)))))}function tA(){let[e,t]=C("");return r(p,null,r(x.FormTitle,{tag:"h4"},"Test Rules"),r(dt,{placeholder:"Type a message",onChange:t}),r(dt,{placeholder:"Message with rules applied",editable:!1,value:n5(e)}))}function n5(e){if(e.length===0)return e;for(let t of Gf.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 Gf.store.regexRules)if(t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=r5(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
|
|
`))}catch{new F("TextReplace").error(`Invalid regex: ${t.find}`)}return e=e.trim(),e}var oA="1102784112584040479",Hf=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:[d.AutumnVN,d.TheKodeToad],settings:Gf,onBeforeMessageSend(e,t){e!==oA&&(t.content=n5(t.content))}});a();T();ae();v();var zf=h({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[d.Ven,d.Board],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}},{find:"#{intl::LABEL_WITH_ONLINE_STATUS}",replacement:{match:/src:null!=\i\?(\i).{1,50}"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}},{find:"showCommunicationDisabledStyles",replacement:{match:/src:(\i),"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}}],getAvatarStyles(e){return!e||e.startsWith("data:")?{}:Object.fromEntries([128,256,512,1024,2048,4096].map(t=>[`--avatar-url-${t}`,`url(${e.replace(/\d+$/,String(t))})`]))},getMessageProps(e){try{let t=e.message?.author,o=t?.id;return{"data-author-id":o,"data-author-username":t?.username,"data-is-self":o&&o===k.getCurrentUser()?.id}}catch(t){return new F("ThemeAttributes").error("Error in getMessageProps",t),{}}}});a();T();v();a();var _e=w({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:fv},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 fv(){_e.store.service==="google"?(_e.store.receivedInput="auto",_e.store.receivedOutput="en",_e.store.sentInput="auto",_e.store.sentOutput="en"):(_e.store.receivedInput="",_e.store.receivedOutput="en-us",_e.store.sentInput="",_e.store.sentOutput="en-us")}a();te();Fe();v();a();Jt();Hn();Fe();v();a();ve();v();a();var gv={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"},hv={"":"Detect language",ar:"Arabic",bg:"Bulgarian","zh-hans":"Chinese (Simplified)","zh-hant":"Chinese (Traditional)",cs:"Czech",da:"Danish",nl:"Dutch","en-us":"English (American)","en-gb":"English (British)",et:"Estonian",fi:"Finnish",fr:"French",de:"German",el:"Greek",hu:"Hungarian",id:"Indonesian",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",nb:"Norwegian",pl:"Polish","pt-br":"Portuguese (Brazilian)","pt-pt":"Portuguese (European)",ro:"Romanian",ru:"Russian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sv:"Swedish",tr:"Turkish",uk:"Ukrainian"};function yv(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 Dr=Y("vc-trans-"),rA=VencordNative.pluginHelpers.Translate,s5=()=>_e.store.service==="google"?gv:hv;async function Kc(e,t){let o=_e.store.service==="google"?a5:iA;try{return await o(t,_e.store[`${e}Input`],_e.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 Re(i,q.Type.FAILURE),n instanceof Error?n:new Error(i)}}async function a5(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:gv[s]??s,text:l}}function i5(e,t,o){return a5(e,yv(t),yv(o))}var nA=gn(()=>Re("Deepl API quota exceeded. Falling back to Google Translate",q.Type.FAILURE));async function iA(e,t,o){if(!_e.store.deeplApiKey)return Re("DeepL API key is not set. Resetting to Google",q.Type.FAILURE),_e.store.service="google",fv(),i5(e,t,o);let{status:n,data:i}=await rA.makeDeeplTranslateRequest(_e.store.service==="deepl-pro",_e.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 nA(),i5(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:hv[l]??l,text:s[0].text}}var sA=["receivedInput","receivedOutput","sentInput","sentOutput"];function aA({settingsKey:e,includeAuto:t}){let o=_e.use([e])[e],n=le(()=>{let i=Object.entries(s5()).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return r("section",{className:A.bottom16},r(x.FormTitle,{tag:"h3"},_e.def[e].description),r(_s,{options:n,value:n.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>_e.store[e]=i}))}function lA(){let e=_e.use(["autoTranslate"]).autoTranslate;return r(jo,{title:"Auto Translate",description:_e.def.autoTranslate.description,value:e,onChange:t=>_e.store.autoTranslate=t,hideBorder:!0})}function l5({rootProps:e}){return r(he,{...e},r(ke,{className:Dr("modal-header")},r(x.FormTitle,{tag:"h2",className:Dr("modal-title")},"Translate"),r(tt,{onClick:e.onClose})),r(Se,{className:Dr("modal-content")},sA.map(t=>r(aA,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),r(Ee,{className:A.bottom16}),r(lA,null)))}var hi=({height:e=20,width:t=20,className:o})=>r("svg",{viewBox:"0 96 960 960",height:e,width:t,className:L(Dr("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"})),Yc,c5=({isMainChat:e})=>{let{autoTranslate:t}=_e.use(["autoTranslate"]),[o,n]=C(!1);if(X(()=>(Yc=n,()=>Yc=void 0),[]),!e)return null;let i=()=>{let l=!t;_e.store.autoTranslate=l,l&&_e.store.showAutoTranslateAlert!==!1&&Le.show({title:"Vencord Auto-Translate Enabled",body:r(p,null,r(x.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:()=>_e.store.showAutoTranslateAlert=!1,onConfirm:()=>_e.store.autoTranslate=!1,confirmColor:"vc-notification-log-danger-btn"})},s=r(Sr,{tooltip:"Open Translate Modal",onClick:l=>{if(l.shiftKey)return i();de(c=>r(l5,{rootProps:c}))},onContextMenu:i,buttonProps:{"aria-haspopup":"dialog"}},r(hi,{className:Dr({"auto-translate":t,"chat-button":!0})}));return o&&_e.store.showAutoTranslateTooltip?r(Q,{text:"Auto Translate Enabled",forceOpen:!0},()=>s):s};a();v();var vv=new Map;function bv(e,t){vv.get(e)(t)}function cA({onDismiss:e}){return r("button",{onClick:e,className:Dr("dismiss")},"Dismiss")}function u5({message:e}){let[t,o]=C();return X(()=>{if(!e.vencordEmbeddedBy)return vv.set(e.id,o),()=>void vv.delete(e.id)},[]),t?r("span",{className:Dr("accessory")},r(hi,{width:16,height:16,className:Dr("accessory-icon")}),Pe.parse(t.text),r("br",null),"(translated from ",t.sourceLanguage," - ",r(cA,{onDismiss:()=>o(void 0)}),")"):null}var uA=(e,{message:t})=>{let o=d5(t);if(!o)return;let n=Ge("copy-text",e);n&&n.splice(n.findIndex(i=>i?.props?.id==="copy-text")+1,0,r(I.MenuItem,{id:"vc-trans",label:"Translate",icon:hi,action:async()=>{let i=await Kc("received",o);bv(t.id,i)}}))};function d5(e){return e.content||e.messageSnapshots?.[0]?.message.content||e.embeds?.find(t=>t.type==="auto_moderation_message")?.rawDescription||""}var p5,Wf=h({name:"Translate",description:"Translate messages with Google Translate or DeepL",authors:[d.Ven,d.AshtonMemer],settings:_e,contextMenus:{message:uA},translate:Kc,renderMessageAccessory:e=>r(u5,{message:e.message}),chatBarButton:{icon:hi,render:c5},messagePopoverButton:{icon:hi,render(e){let t=d5(e);return t?{label:"Translate",icon:hi,message:e,channel:Z.getChannel(e.channel_id),onClick:async()=>{let o=await Kc("received",t);bv(e.id,o)}}:null}},async onBeforeMessageSend(e,t){if(!_e.store.autoTranslate||!t.content)return;Yc?.(!0),clearTimeout(p5),p5=setTimeout(()=>Yc?.(!1),2e3);let o=await Kc("sent",t.content);t.content=o.text}});a();a();T();ie();ae();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 m5="src/plugins/typingTweaks/style.css";var jf=w({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"}}),Sv=M.wrap(function({users:t,count:o,guildId:n}){return r(p,null,t.slice(0,o).map(i=>r(se.Fragment,{key:i.id},r(f5,{user:i,guildId:n}),", ")),"and ",o," others are typing...")},{noop:!0}),f5=M.wrap(function({user:t,guildId:o}){return r("strong",{className:"vc-typing-user",role:"button",onClick:()=>{Wo(t.id)},style:{color:jf.store.showRoleColors?be.getMember(o,t.id)?.colorString:void 0}},jf.store.showAvatars&&r(Sl,{size:"SIZE_16",src:t.getAvatarURL(o,128)}),be.getNick(o,t.id)||!o&&we.getNickname(t.id)||t.globalName||t.username)},{noop:!0}),qf=h({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[d.zt,d.sadan],settings:jf,managedStyle:m5,patches:[{find:"#{intl::THREE_USERS_TYPING}",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\})/,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:()=>jf.store.alternativeFormatting}]}],useTypingUsers(e){try{if(!e)throw new Error("No channel");let t=ne([pn],()=>pn.getTypingUsers(e.id)),o=ne([io],()=>io.getId());return Object.keys(t).filter(n=>n&&n!==o&&!we.isBlockedOrIgnored(n)).map(n=>k.getUser(n)).filter(Tr)}catch(t){return new F("TypingTweaks").error("Failed to get typing users:",t),[]}},buildSeveralUsers:Sv,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"&&!se.isValidElement(i)))return i;let s=t[n++];return r(f5,{key:s.id,guildId:e,user:s})})}catch(n){new F("TypingTweaks").error("Failed to render typing users:",n)}return o},{noop:!0})});T();ie();E();v();var pA=pe(".dots,","dotRadius:"),dA=Ie("UserGuildSettingsStore");function ka(e,t){let o=k.getUser(t);return be.getNick(e,t)??o.globalName??o.username}function mA({channelId:e,guildId:t}){let o=ne([pn],()=>({...pn.getTypingUsers(e)}),null,(f,g)=>{let y=Object.keys(f),b=Object.keys(g);return y.length===b.length&&b.every(P=>f[P]!=null)}),n=ne([Be],()=>Be.getChannelId());if(!Ca.store.includeMutedChannels&&dA.isChannelMuted(t,e)||!Ca.store.includeCurrentChannel&&n===e)return null;let i=k.getCurrentUser()?.id,s=Object.keys(o).filter(f=>f!==i&&!(we.isBlocked(f)&&!Ca.store.includeBlockedUsers)),[l,c,u]=s,m;switch(s.length){case 0:break;case 1:{m=xe("ONE_USER_TYPING",{a:ka(t,l)});break}case 2:{m=xe("TWO_USERS_TYPING",{a:ka(t,l),b:ka(t,c)});break}case 3:{m=xe("THREE_USERS_TYPING",{a:ka(t,l),b:ka(t,c),c:ka(t,u)});break}default:{m=G.plugins.TypingTweaks.enabled?Sv({users:[l,c].map(k.getUser),count:s.length-2,guildId:t}):xe("SEVERAL_USERS_TYPING");break}}return s.length>0?r(Q,{text:m},f=>r("div",{className:"vc-typing-indicator",...f},(Ca.store.indicatorMode&2)===2&&r("div",{onClick:g=>{g.stopPropagation(),g.preventDefault()},onKeyPress:g=>g.stopPropagation()},r(gr,{users:s.map(g=>k.getUser(g)),guildId:t,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"})),(Ca.store.indicatorMode&1)===1&&r("div",{className:"vc-typing-indicator-dots"},r(pA,{dotRadius:3,themed:!0})))):null}var Ca=w({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}]}}),Kf=h({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[d.Nuckyz,d.fawn,d.Sqaaakoi],settings:Ca,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(mA,{channelId:e,guildId:t}))});a();T();var Yf=h({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[d.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();T();var fA=w({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:Xt(2,16),default:4}}),Zf=h({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[d.nakoyasha],settings:fA,patches:[{find:"#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]});a();Qe();T();v();var xv=4,gA=(e,{channel:t,message:{author:o,messageSnapshots:n,embeds:i,flags:s,id:l}})=>{let c=(s&xv)!==0,u=n.some(y=>y.message.embeds.length);if(!c&&!i.length&&!u)return;let m=t.isPrivate()||!!(Te.getChannelPermissions({id:t.id})&ce.EMBED_LINKS);if(o.id===k.getCurrentUser().id&&!m)return;let f=Ge("delete",e),g=f?.findIndex(y=>y?.props?.id==="delete");!g||!f||f.splice(g-1,0,r(I.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:c?"Unsuppress Embeds":"Suppress Embeds",color:c?void 0:"danger",icon:c?dl:Ls,action:()=>wt.patch({url:vt.Endpoints.MESSAGE(t.id,l),body:{flags:c?s&~xv:s|xv}})}))},Jf=h({name:"UnsuppressEmbeds",authors:[d.rad,d.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:gA}});a();T();a();ie();te();E();v();a();var Aa=w({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();ie();v();function hA(e,t=!1){let o=ne([Lt],()=>Lt.getUserProfile(e)?.pronouns),n=ne([Lt],()=>Lt.getGuildMemberProfile(e,Ho()?.getGuildId())?.pronouns);return t?o:n||o}function g5(e,t=!1){let o=hA(e,t)?.trim().replace(/\n+/g,"");return Aa.store.pronounsFormat==="LOWERCASE"?o?.toLowerCase():o}var h5=D("timestampInline"),yA=Po("textAndImages","messageDisplayCompact"),vA=24;function y5(e){return!(e.author.bot||e.author.system||e.type===vA||!Aa.store.showSelf&&e.author.id===k.getCurrentUser().id)}function v5({message:e}){let t=g5(e.author.id);return t&&r(Q,{text:xe("USER_PROFILE_PRONOUNS")},o=>r("span",{...o,className:L(h5.timestampInline,h5.timestamp)},"\u2022 ",t))}var b5=M.wrap(({message:e})=>y5(e)?r(v5,{message:e}):null,{noop:!0}),S5=M.wrap(({message:e})=>!yA.useSetting()||!y5(e)?null:r(v5,{message:e}),{noop:!0});br("UserMessagesPronouns","PronounDB");var Qf=h({name:"UserMessagesPronouns",authors:[d.Tyman,d.TheKodeToad,d.Ven,d.Elvyra],description:"Adds pronouns to chat user messages",settings:Aa,patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:'="SYSTEM_TAG"',replacement:[{match:/className:\i\(\)\(\i\.className(?:,\i\.clickable)?,\i\)}\)\),(?=\i)/g,replace:"$&$self.CompactPronounsChatComponentWrapper(arguments[0]),"}]}],PronounsChatComponentWrapper:b5,CompactPronounsChatComponentWrapper:S5});a();T();a();ve();te();E();v();var Ra=Y("vc-uvs-"),{selectVoiceChannel:bA}=D("selectVoiceChannel","selectChannel"),{useChannelName:L3e}=Ue("#{intl::GROUP_DM_ALONE}",{useChannelName:O.byCode("()=>null==")}),x5=D("actionButton","highlight");function Vf(e){let{size:t=16,className:o,iconClassName:n,...i}=e;return r("div",{...i,className:L(Ra("speaker"),o)},r("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor"},e.children))}function T5(e){return r(Vf,{...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 w5(e){return r(Vf,{...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 SA(e){return r(Vf,{...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 xA(e){return r(Vf,{...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 TA({channel:e,isLocked:t}){let o=ne([so],()=>so.getVoiceStatesForChannel(e.id)),n=le(()=>Object.values(o).map(s=>k.getUser(s.userId)).filter(s=>s!=null),[o]),i=t?w5:T5;return r(p,null,r(H,{variant:"text-sm/bold"},"In Voice Chat"),r(H,{variant:"text-sm/bold"},Pe.parse(`<#${e.id}>`)),r("div",{className:Ra("vc-members")},r(i,{size:18}),r(gr,{users:n,renderIcon:!1,max:13,size:18})))}var Xf=new Map,eg=M.wrap(({userId:e,isProfile:t,isActionButton:o,shouldHighlight:n})=>{let i=ne([so],()=>so.getVoiceStateForUser(e)?.channelId),{isMuted:s,isDeaf:l}=ne([so],()=>{let y=so.getVoiceStateForUser(e);return{isMuted:y?.mute||y?.selfMute||!1,isDeaf:y?.deaf||y?.selfDeaf||!1}}),c=i==null?void 0:Z.getChannel(i);if(c==null)return null;let u=c.isDM()||c.isMultiUserDM();if(!u&&!Te.can(ce.VIEW_CHANNEL,c)&&!Ne(Ia.name))return null;let m=!u&&(!Te.can(ce.VIEW_CHANNEL,c)||!Te.can(ce.CONNECT,c));function f(y){if(y.preventDefault(),y.stopPropagation(),!(c==null||i==null))if(clearTimeout(Xf.get(i)),Xf.delete(i),y.detail>1){if(!u&&!Te.can(ce.CONNECT,c)){Re("You cannot join the user's Voice Channel",q.Type.FAILURE);return}bA(i)}else{let b=setTimeout(()=>{Gs.transitionToChannel(i),Xf.delete(i)},250);Xf.set(i,b)}}let g=m?w5:l?xA:s?SA:T5;return r(Q,{text:r(TA,{channel:c,isLocked:m}),tooltipClassName:Ra("tooltip-container"),tooltipContentClassName:Ra("tooltip-content")},y=>r(g,{...y,role:"button",onClick:f,className:L(Ra("clickable"),o&&x5.actionButton,o&&n&&x5.highlight),iconClassName:L(Ra(t&&"profile-speaker")),size:o?20:16}))},{noop:!0});var Zc=w({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}}),tg=h({name:"UserVoiceShow",description:"Shows an indicator when a user is in a Voice Channel",authors:[d.Nuckyz,d.LordElias],dependencies:["MemberListDecoratorsAPI","MessageDecorationsAPI"],settings:Zc,patches:[{find:"#{intl::USER_PROFILE_LOAD_ERROR}",replacement:{match:/(\.fetchError.+?\?)null/,replace:(e,t)=>`${t}$self.VoiceChannelIndicator({userId:arguments[0]?.userId,isProfile:true})`},predicate:()=>Zc.store.showInUserProfileModal},{find:"null!=this.peopleListItemRef.current",replacement:{match:/\.actions,children:\[(?<=isFocused:(\i).+?)/,replace:"$&$self.VoiceChannelIndicator({userId:this?.props?.user?.id,isActionButton:true,shouldHighlight:$1}),"},predicate:()=>Zc.store.showInMemberList}],start(){Zc.store.showInMemberList&&zi("UserVoiceShow",({user:e})=>e==null?null:r(eg,{userId:e.id})),Zc.store.showInMessages&&ji("UserVoiceShow",({message:e})=>e?.author==null?null:r(eg,{userId:e.author.id}))},stop(){Wi("UserVoiceShow"),qi("UserVoiceShow")},VoiceChannelIndicator:eg});a();an();T();var wA="https://usrbg.is-hardly.online/users",Tv=w({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}}),og=h({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[d.AutumnVN,d.katlyn,d.pylix,d.TheKodeToad],settings:Tv,patches:[{find:'.banner)==null?"COMPLETE"',replacement:{match:/(?<=void 0:)\i.getPreviewBanner\(\i,\i,\i\)/,replace:"$self.patchBannerUrl(arguments[0])||$&"}},{find:'"data-selenium-video-tile":',predicate:()=>Tv.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.getVoiceBackgroundStyles($1);"}]}],data:null,settingsAboutComponent:()=>r(bl,{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&&Tv.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(wA);e.ok&&(this.data=await e.json())}});a();T();E();v();var wv=new Map,Pv,PA=ue(".createFromServer(",".isBlockedForMessage","messageReference:"),rg=h({name:"ValidReply",description:'Fixes "Message could not be loaded" upon hovering over the reply',authors:[d.newwares],patches:[{find:"#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}",replacement:{match:/#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}\)/,replace:"$&,onMouseEnter:()=>$self.fetchReply(arguments[0])"}},{find:"ReferencedMessageStore",replacement:{match:/constructor\(\)\{\i\(this,"_channelCaches",new Map\)/,replace:"$&;$self.setReplyStore(this);"}}],setReplyStore(e){Pv=e},async fetchReply(e){let{channel_id:t,message_id:o}=e.baseMessage.messageReference;wv.has(o)||(wv.set(o,t),wt.get({url:`/channels/${t}/messages`,query:{limit:1,around:o},retries:2}).then(n=>{let i=n?.body?.[0];i&&(i.id!==o?(Pv.set(t,o,{state:2}),B.dispatch({type:"MESSAGE_DELETE",channelId:t,message:o})):(Pv.set(i.channel_id,i.id,{state:0,message:PA(i)}),B.dispatch({type:"MESSAGE_UPDATE",message:i})))}).catch(()=>{}).finally(()=>{wv.delete(o)}))}});a();T();te();v();var IA=vt.UserFlags,P5={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"}},ng=new Set,I5=new wo(5);async function MA(e){let t=k.getUser(e);if(t)return t;let o=await wt.get({url:vt.Endpoints.USER(e)}).then(s=>(B.dispatch({type:"USER_UPDATE",user:s.body}),s.body));await B.dispatch({type:"USER_PROFILE_FETCH_FAILURE",userId:e}),t=k.getUser(e);let n=Object.entries(IA).filter(([s,l])=>!isNaN(l)&&t.hasFlag(l)).map(([s])=>P5[s.toLowerCase()]).filter(Tr);(o.premium_type||!o.bot&&(o.banner||o.avatar?.startsWith?.("a_")))&&n.push(P5.premium);let i=Lt.getUserProfile(e);return i&&(i.accentColor=o.accent_color,i.badges=n,i.banner=o.banner,i.premiumType=o.premium_type),t}function NA({data:e,UserMention:t,RoleMention:o,parse:n,props:i}){let[s,l]=C(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 m=u.match(/<@!?(\d+)>/)?.[1];if(!m||ng.has(m))return;if(k.getUser(m))return l(m);let f=()=>{ng.add(m),I5.unshift(()=>MA(m).then(()=>{l(m),ng.delete(m)}).catch(g=>{g?.status===429&&(I5.unshift(()=>ur(g?.body?.retry_after??1e3).then(f)),ng.delete(m))}).finally(()=>ur(300)))};f()}},c))}var ig=h({name:"ValidUser",description:"Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",authors:[d.Ven,d.Dolfies],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,100}return null==.{0,70}\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}},{find:"unknownUserMentionPlaceholder:",replacement:{match:/unknownUserMentionPlaceholder:/,replace:"$&false&&"}}],renderMention(e,t,o,n,i){return r(M,{noop:!0},r(NA,{key:"mention"+o.userId,RoleMention:e,UserMention:t,data:o,parse:n,props:i}))}});a();T();v();var Iv={},sg=h({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[d.Ven,d.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:'className:"channelMention",children',replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,o)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let o=Z.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Be.getVoiceChannelId()===o){e();return}let n=Iv[o]??={timeout:void 0,i:0};clearTimeout(n.timeout),++n.i>=2?(e(),delete Iv[o]):n.timeout=setTimeout(()=>{delete Iv[o]},500)}});a();T();ae();v();a();ae();a();v();function kA(e,t){return e.reduce((o,n)=>{let i=t(n);return o[i]??=[],o[i].push(n),o},{})}function Mv({voice:e,voices:t}){let o=t.map(n=>({label:n.name,value:n.voiceURI,default:n.default}));return r(_s,{placeholder:"Select a voice",maxVisibleItems:5,options:o,value:o.find(n=>n.value===e),onChange:n=>eo.store.voice=n,closeOnSelect:!0})}var CA=new Intl.DisplayNames(["en"],{type:"language"});function AA({voice:e,voices:t}){let o=le(()=>kA(t,u=>u.lang),[t]),n=le(()=>{let u=[];for(let m in o)try{let f=CA.of(m);f&&u.push({name:m,friendlyName:f})}catch{}return u},[o]),[i,s]=C(()=>ag()?.lang??n[0].name);if(n.length===1)return r(Mv,{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(x.FormTitle,null,"Language"),r(_s,{placeholder:"Select a language",options:c,value:c.find(u=>u.value===i),onChange:u=>s(u),maxVisibleItems:5,closeOnSelect:!0}),r(x.FormTitle,null,"Voice"),r(Mv,{voice:e,voices:l}))}function RA(){let e=le(()=>window.speechSynthesis?.getVoices()??[],[]),{voice:t}=eo.use(["voice"]);if(!e.length)return r(x.FormText,null,"No voices found.");let o=e.length>20?AA:Mv;return r(o,{voice:t,voices:e})}function M5(){return r("section",null,r(x.FormTitle,null,"Voice"),r(RA,null))}var DA=()=>window.speechSynthesis?.getVoices().find(e=>e.default);function ag(e=window.speechSynthesis?.getVoices()){if(!e)return;if(eo.store.voice){let o=e.find(n=>n.voiceURI===eo.store.voice);if(o)return o;new F("VcNarrator").error(`Voice "${eo.store.voice}" not found. Resetting to default.`)}let t=e.find(o=>o.default);return eo.store.voice=t?.voiceURI,t}var eo=w({voice:{type:6,component:M5,get default(){return DA()?.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 cg(e){if(!e)return;let{volume:t,rate:o}=eo.store,n=new SpeechSynthesisUtterance(e),i=ag();n.voice=i,n.volume=t,n.rate=o,speechSynthesis.speak(n)}function lg(e){let t=eo.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 ug(e,t,o,n,i){return e.replaceAll("{{USER}}",lg(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",lg(o)||"channel").replaceAll("{{DISPLAY_NAME}}",lg(n)||(n?"Someone":"")).replaceAll("{{NICKNAME}}",lg(i)||(i?"Someone":""))}var Nv;function LA({channelId:e,oldChannelId:t},o){if(o&&e!==Nv&&(t=Nv,Nv=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function OA(e){let t=k.getCurrentUser(),o=oo.getGuildId();cg(ug(eo.store[e+"Message"],t.username,"general",t.globalName??t.username,be.getNick(o,t.id)??t.username))}var pg=h({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[d.Ven],reporterTestable:2,settings:eo,flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=oo.getGuildId(),o=Be.getVoiceChannelId(),n=k.getCurrentUser().id;if(Z.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===n;if(!u&&(!o||l!==o&&c!==o))continue;let[m,f]=LA(i,u);if(!m)continue;let g=eo.store[m+"Message"],y=u&&!eo.store.sayOwnName?"":k.getUser(s).username,b=y&&(k.getUser(s).globalName??y),P=y&&(be.getNick(t,s)??b),S=Z.getChannel(f).name;cg(ug(g,y,S,b,P))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Be.getVoiceChannelId(),t=so.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";cg(ug(eo.store[o+"Message"],"",Z.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Be.getVoiceChannelId(),t=so.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";cg(ug(eo.store[o+"Message"],"",Z.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new F("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]=le(()=>{let i=speechSynthesis.getVoices();return[i.length!==0,i.some(s=>s.lang.startsWith("en"))]},[]),o=le(()=>Object.keys(eo.def).filter(i=>i.endsWith("Message")).map(i=>i.slice(0,-7)),[]),n=null;if(e)t||(n=r(Ct,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let i="No narrator voices found. ";i+=Ug?"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(Ct,null,i)}return r("section",null,r(x.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),r(x.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(x.FormTitle,{className:A.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(R,{key:i,onClick:()=>OA(i)},yn([i]))))),n)}});a();Qe();T();ie();v();var kv=w({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"}))}}),Jc=e=>k5(e,512,512),N5=e=>k5(e,1024);function k5(e,t,o){let n=new URL(e,window.location.href),i=e.startsWith("/")?"png":n.searchParams.get("animated")==="true"?"gif":kv.store.format;n.searchParams.set("size",kv.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 _A=(e,{user:t,guildId:o})=>{if(!t)return;let n=be.getMember(o,t.id)?.avatar||null;e.splice(-1,0,r(I.MenuGroup,null,r(I.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Jc(Pt.getUserAvatarURL(t,!0)),icon:dr}),n&&r(I.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Jc(Pt.getGuildMemberAvatarURLSimple({userId:t.id,avatar:n,guildId:o,canAnimate:!0})),icon:dr})))},BA=(e,{guild:t})=>{if(!t)return;let{id:o,icon:n,banner:i}=t;!i&&!n||e.splice(-1,0,r(I.MenuGroup,null,n?r(I.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Jc(Pt.getGuildIconURL({id:o,icon:n,canAnimate:!0})),icon:dr}):null,i?r(I.MenuItem,{id:"view-banner",label:"View Banner",action:()=>N5(Pt.getGuildBannerURL(t,!0)),icon:dr}):null))},EA=(e,{channel:t})=>{t&&e.splice(-1,0,r(I.MenuGroup,null,r(I.MenuItem,{id:"view-group-channel-icon",label:"View Icon",action:()=>Jc(Pt.getChannelIconURL(t)),icon:dr})))},dg=h({name:"ViewIcons",authors:[d.Ven,d.TheKodeToad,d.Nuckyz,d.nyx],description:"Makes avatars and banners in user profiles clickable, adds View Icon/Banner entries in the user, server and group channel context menu.",tags:["ImageUtilities"],dependencies:["DynamicImageModalAPI"],settings:kv,openAvatar:Jc,openBanner:N5,contextMenus:{"user-context":_A,"guild-context":BA,"gdm-context":EA},patches:[{find:".overlay:void 0,status:",replacement:[{match:/avatarSrc:(\i),eventHandlers:(\i).+?"div",.{0,100}className:\i,/,replace:'$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},'}],all:!0},{find:'backgroundColor:"COMPLETE"',replacement:{match:/(\.banner,.+?),style:{(?=.+?backgroundImage:null!=(\i)\?"url\("\.concat\(\2,)/,replace:(e,t,o)=>`${t},onClick:()=>${o}!=null&&$self.openBanner(${o}),style:{cursor:${o}!=null?"pointer":void 0,`}},{find:'["aria-hidden"],"aria-label":',replacement:{match:/null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,replace:(e,t)=>`${e},onClick:()=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${t})`}},{find:".cursorPointer:null,children",replacement:{match:/(?=,src:(\i.getAvatarURL\(.+?[)]))/,replace:(e,t)=>`,onClick:()=>$self.openAvatar(${t})`}},{find:".EMPTY_GROUP_DM)",replacement:{match:/(?<=SIZE_80,)(?=src:(.+?\))[,}])/,replace:(e,t)=>`onClick:()=>$self.openAvatar(${t}),`}}]});a();Jt();T();ie();Fe();v();var fg=({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 UA(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function FA(e){let t=UA(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 Cv(e,t,o){let n=de(i=>r(M,null,r(he,{...i,size:"large"},r(ke,null,r(H,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),r(tt,{onClick:()=>on(n)})),r(Se,null,r("div",{style:{padding:"16px 0"}},!!o&&r(p,null,r(x.FormTitle,{tag:"h5"},"Content"),r(Rl,{content:o,lang:""}),r(Ee,{className:A.bottom20})),r(x.FormTitle,{tag:"h5"},t," Data"),r(Rl,{content:e,lang:"json"}))),r(yt,null,r(oe,null,r(R,{onClick:()=>rt(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&r(R,{onClick:()=>rt(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function C5(e){e=FA(e);let t=JSON.stringify(e,null,4);return Cv(t,"Message",e.content)}var mg=w({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 Da(e){return(t,o)=>{let n=o[e.toLowerCase()];if(!n||o.label===xe("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(I.MenuItem,{id:s,label:"View Raw",action:()=>Cv(JSON.stringify(n,null,4),e),icon:fg}))}}var $A=(e,{id:t})=>{let o=rn();if(!o)return;let n=bt.getRole(o.id,t);n&&e.push(r(I.MenuItem,{id:"vc-view-role-raw",label:"View Raw",action:()=>Cv(JSON.stringify(n,null,4),"Role"),icon:fg}))},gg=h({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[d.KingFish,d.Ven,d.rad,d.ImLvna],settings:mg,contextMenus:{"guild-context":Da("Guild"),"guild-settings-role-context":Da("Role"),"channel-context":Da("Channel"),"thread-context":Da("Channel"),"gdm-context":Da("Channel"),"user-context":Da("User"),"dev-context":$A},messagePopoverButton:{icon:fg,render(e){let t=()=>{mg.store.clickMethod==="Right"?rt(e.content):C5(e)},o=i=>{mg.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),rt(e.content)):(i.preventDefault(),i.stopPropagation(),C5(e))};return{label:mg.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:fg,message:e,channel:Z.getChannel(e.channel_id),onClick:t,onContextMenu:o}}}});a();T();var hg=h({name:"VoiceDownload",description:"Adds a download to voice messages. (Opens a new browser tab)",authors:[d.puv],patches:[{find:"rippleContainer,children",replacement:{match:/\(0,\i\.jsx\).{0,150},children:.{0,50}\("source",{src:(\i)}\)}\)/,replace:"[$&, $self.renderDownload($1)]"}}],renderDownload(e){return 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();Qe();Wt();mr();T();Fe();ct();E();v();a();v();a();var La=w({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}});a();ve();E();var Av=Ie("MediaEngineStore"),Ln=Y("vc-vmsg-");var IIe=VencordNative.pluginHelpers.VoiceMessages;a();ct();E();var GA=pe("waveform:","onVolumeChange"),A5=({src:e,waveform:t,recording:o})=>{let n=nl({deps:[o]}),i=o?Math.floor(n/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?r(GA,{key:e,src:e,waveform:t}):r("div",{className:Ln("preview",o?"preview-recording":[])},r("div",{className:Ln("preview-indicator")}),r("div",{className:Ln("preview-time")},s),r("div",{className:Ln("preview-label")},o?"RECORDING":"----"))};a();v();var R5=({setAudioBlob:e,onRecordingChange:t})=>{let[o,n]=C(!1),[i,s]=C(!1),[l,c]=C(),[u,m]=C([]),f=y=>{n(y),t?.(y)};function g(){!o?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:La.store.echoCancellation,noiseSuppression:La.store.noiseSuppression,deviceId:Av.getInputDeviceId()}}).then(b=>{let P=[];m(P);let S=new MediaRecorder(b);c(S),S.addEventListener("dataavailable",_=>{P.push(_.data)}),S.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(R,{onClick:g},o?"Stop":"Start"," recording"),r(R,{disabled:!o,onClick:()=>{s(!i),i?l?.resume():l?.pause()}},i?"Resume":"Pause"," recording"))};var HA=Dt(e=>e.prototype?.trackUploadFinished),zA=Ie("PendingReplyStore"),Rv=D("optionName","optionIcon","optionLabel"),WA=R5,jA=(e,t)=>{t.channel.guild_id&&!(Te.can(ce.SEND_VOICE_MESSAGES,t.channel)&&Te.can(ce.SEND_MESSAGES,t.channel))||e.push(r(I.MenuItem,{id:"vc-send-vmsg",label:r("div",{className:Rv.optionLabel},r(dh,{className:Rv.optionIcon,height:24,width:24}),r("div",{className:Rv.optionName},"Send voice message")),action:()=>de(o=>r(YA,{modalProps:o}))}))},yg=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:[d.Ven,d.Vap,d.Nickyux],settings:La,contextMenus:{"channel-attach":jA}}),Dv={waveform:"AAAAAAAAAAAA",duration:1};function qA(e,t){let o=Be.getChannelId(),n=zA.getPendingReply(o);n&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new HA({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isThumbnail:!1,platform:1},o);i.on("complete",()=>{wt.post({url:vt.Endpoints.MESSAGES(o),body:{flags:8192,channel_id:o,content:"",nonce:xo.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?vo.getSendMessageOptionsForReply(n)?.messageReference:null}})}),i.on("error",()=>Re("Failed to upload voice message",q.Type.FAILURE)),i.upload()}function KA(){let[e,t]=C();return[e,n=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(n))}]}function YA({modalProps:e}){let[t,o]=C(!1),[n,i]=C(),[s,l]=KA();X(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c,u]=ht(async()=>{if(!n)return Dv;let g=await new AudioContext().decodeAudioData(await n.arrayBuffer()),y=g.getChannelData(0),b=new Uint8Array(Bi.clamp(Math.floor(g.duration*10),Math.min(32,y.length),256)),P=Math.floor(y.length/b.length);for(let N=0;N<b.length;N++){let U=0;for(let j=0;j<P;j++){let z=N*P+j;U+=y[z]**2}b[N]=~~(Math.sqrt(U/P)*255)}let S=Math.max(...b),_=1+(255/S-1)*Math.min(1,100*(S/255)**3);for(let N=0;N<b.length;N++)b[N]=Math.min(255,~~(b[N]*_));return{waveform:window.btoa(String.fromCharCode(...b)),duration:g.duration}},{deps:[n],fallbackValue:Dv}),m=n&&(!n.type.startsWith("audio/ogg")||n.type.includes("codecs")&&!n.type.includes("opus"));return r(he,{...e},r(ke,null,r(x.FormTitle,null,"Record Voice Message")),r(Se,{className:Ln("modal")},r("div",{className:Ln("buttons")},r(WA,{setAudioBlob:f=>{i(f),l(f)},onRecordingChange:o}),r(R,{onClick:async()=>{let f=await Hu("audio/*");f&&(i(f),l(f))}},"Upload File")),r(x.FormTitle,null,"Preview"),u?r($e,{className:Ln("error")},"Failed to parse selected audio file: ",u.message):r(A5,{src:s,waveform:c.waveform,recording:t}),m&&r(ut,{variant:"warning",className:A.top16,defaultPadding:!0},r(x.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(x.FormText,{className:A.top8},"To fix it, first convert it to OggOpus, for example using the ",r(De,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),r(yt,null,r(R,{disabled:!n,onClick:()=>{qA(n,c??Dv),e.onClose(),Re("Now sending voice message... Please be patient",q.Type.MESSAGE)}},"Send")))}a();T();var ZA=w({multiplier:{description:"Volume Multiplier",type:5,markers:Xt(1,5,.5),default:2,stickToMarkers:!0}}),vg=h({name:"VolumeBooster",authors:[d.Nuckyz,d.sadan],description:"Allows you to set the user and stream volume above the default maximum",settings:ZA,patches:[...["#{intl::USER_VOLUME}","currentVolume:"].map(e=>({find:e,replacement:{match:/(?<=maxValue:)\i\.\i\?(\d+?):(\d+?)(?=,)/,replace:(t,o,n)=>`${o}*$self.settings.store.multiplier`}})),{find:"streamSourceNode",predicate:()=>!0,group:!0,replacement:[{match:/Math\.max.{0,30}\)\)/,replace:"arguments[0]"},{match:/\}return"video"/,replace:"this.updateAudioElement();$&"},{match:/\.volume=this\._volume\/100;/,replace:".volume=0.00;$self.patchVolume(this);"}]},{find:"AudioContextSettingsMigrated",replacement:[{match:/(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localMutes\).+?volume:).+?(?=,)/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localVolumes\).+?volume:).+?(?=})/,replace:"$&>200?200:$&"}]},{find:'="MediaEngineStore",',replacement:[{match:/(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,replace:(e,t,o,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();tn();T();E();v();var bg=Ue('.tagName)==="TEXTAREA"||',{contextMenuCallbackWeb:O.byCode('.tagName)==="INPUT"||'),contextMenuCallbackNative:O.byCode('.tagName)==="TEXTAREA"||')});async function JA(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var QA=w({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0,hidden:!0}}),Oa=()=>!0,XA="https://media.discordapp.net",D5="cdn.discordapp.com";function L5(e){let t=new URL(e);return t.host===D5?e:(t.searchParams.delete("width"),t.searchParams.delete("height"),t.origin===XA?(t.host=D5,t.searchParams.delete("size"),t.searchParams.delete("quality"),t.searchParams.delete("format")):t.searchParams.set("quality","lossless"),t.toString())}var Sg=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:[d.Ven],enabledByDefault:!0,required:!0,settings:QA,start(){Oa()&&(window.removeEventListener("contextmenu",bg.contextMenuCallbackWeb),window.addEventListener("contextmenu",bg.contextMenuCallbackNative),this.changedListeners=!0)},stop(){this.changedListeners&&(window.removeEventListener("contextmenu",bg.contextMenuCallbackNative),window.addEventListener("contextmenu",bg.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}\),)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=#{intl::SAVE_IMAGE_MENU_ITEM}\),)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',all:!0,predicate:Oa,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:Oa,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:Oa,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/,replace:"||true)"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:Oa,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:Oa,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=L5(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=L5(e);let t=await JA(e);if(!t)return;let o=new URL(e).pathname.split("/").pop(),n=new File([t],o,{type:t.type});Gu(n)},copy(){let e=document.getSelection();e&&to(e.toString())},cut(){this.copy(),Co.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();T();E();v();var Lv=D("JUMP_TO_GUILD","SERVER_NEXT"),xg=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:[d.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&ho)switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(oo.getGuildId()&&hr.transitionToGuild("@me"),Co.safeDispatch("TOGGLE_DM_CREATE")):B.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case"Tab":(e.shiftKey?Lv.SERVER_PREV:Lv.SERVER_NEXT).action(e);break;case",":e.preventDefault(),Hs.open("My Account");break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),Lv.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}});a();T();var Tg=h({name:"WebScreenShareFixes",authors:[d.Kaitlyn],description:"Removes 2500kbps bitrate cap on chromium and vesktop clients.",enabledByDefault:!0,patches:[{find:"x-google-max-bitrate",replacement:[{match:/"x-google-max-bitrate=".concat\(\i\)/,replace:'"x-google-max-bitrate=".concat("80_000")'},{match:";level-asymmetry-allowed=1",replace:";b=AS:800000;level-asymmetry-allowed=1"},{match:/;usedtx=".concat\((\i)\?"0":"1"\)/,replace:'$&.concat($1?";stereo=1;sprop-stereo=1":"")'}]}]});a();T();te();ct();E();v();var GMe=D("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Ov=null,VA=new wo,_5;function eR(e,t,o){let n=t.name+(t.id?`:${t.id}`:"");return wt.get({url:vt.Endpoints.REACTIONS(e.channel_id,e.id,n),query:{limit:100,type:o},oldFormErrors:!0}).then(i=>{for(let s of i.body)B.dispatch({type:"USER_UPDATE",user:s});B.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})}).catch(console.error).finally(()=>ur(250))}function tR(e,t,o){let n=`${e.id}:${t.name}:${t.id??""}:${o}`,i=_5[n]??={fetched:!1,users:new Map};return i.fetched||(VA.unshift(()=>eR(e,t,o)),i.fetched=!0),i.users}function O5(e){e.stopPropagation()}var wg=h({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[d.Ven,d.KannaDev,d.newwares],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'"MessageReactionsStore"',replacement:{match:/function (\i)\(\){(\i)={}(?=.*CONNECTION_OPEN:\1)/,replace:"$&;$self.reactions=$2;"}},{find:"cleanAutomaticAnchor(){",replacement:{match:/constructor\(\i\)\{(?=.{0,100}automaticAnchor)/,replace:"$&$self.setScrollObj(this);"}}],setScrollObj(e){Ov=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=Go();un(()=>{Ov?.scrollCounter>0&&Ov.setAutomaticAnchor(null)}),X(()=>{let l=c=>{c?.messageId===e.id&&n()};return B.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>B.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id,n]);let s=[...tR(e,t,o).values()].filter(Boolean);return r("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},r("div",{onClick:O5,onKeyDown:O5},r(gr,{users:s,guildId:Z.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0})))},set reactions(e){_5=e}});a();T();ae();E();v();var Pg=Dt(e=>e.ANNOUNCEMENT_THREAD===10),oR=ue(".SUPPRESS_NOTIFICATIONS))return!1"),QMe=new F("XSOverlay"),Ut=w({webSocketPort:{type:1,description:"Websocket port",default:42070,async onChange(){await _v()}},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:Xt(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:Xt(0,1,.1)}}),On;async function _v(){return On&&On.close(),On=new WebSocket(`ws://127.0.0.1:${Ut.store.webSocketPort??42070}/?client=Vencord`),new Promise((e,t)=>{On.onopen=e,On.onerror=t,setTimeout(t,3e3)})}var rR=VencordNative.pluginHelpers.XSOverlay,Ig=h({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[d.Nyako],tags:["vr","notify"],reporterTestable:2,settings:Ut,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(k.getCurrentUser().id)&&Ut.store.callNotifications){let t=Z.getChannel(e.channel_id);B5("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){if(t)return;let o=Z.getChannel(e.channel_id);if(!sR(e,e.channel_id))return;let n=Ut.store.pingColor.replaceAll("#","").trim(),i=Ut.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let f=Me.getGuild(o.guild_id);l=`${e.author.username} (${f.name}, #${o.name})`}switch(o.type){case Pg.DM:l=e.author.username.trim();break;case Pg.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>@${k.getUser(g)?.username||"unknown-user"}</color></b>`)),e.mention_roles.length>0)for(let f of e.mention_roles){let g=bt.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")),m=s.match(new RegExp("<(#\\d+)>","g"));if(u)for(let f of u)s=s.replace(new RegExp(`${f}`,"g"),`:${f.split(":")[1]}:`);if(m)for(let f of m){let g=f.split("<#")[1];g=g.substring(0,g.length-1),s=s.replace(new RegExp(`${f}`,"g"),`<b><color=#${i}>#${Z.getChannel(g).name}</color></b>`)}nR(o)||iR(l,s,e)}},start:_v,stop(){On.close()},settingsAboutComponent:()=>r(p,null,r(R,{onClick:()=>B5("This is a test notification! explode","Hello from Vendor!")},"Send test notification"))});function nR(e){return e.type===Pg.DM&&Ut.store.dmNotifications||e.type===Pg.GROUP_DM&&Ut.store.groupDmNotifications?!1:!Ut.store.serverNotifications}function iR(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:Ut.store.lengthBasedTimeout?F5(t):Ut.store.timeout,height:U5(t),opacity:Ut.store.opacity,volume:Ut.store.volume,audioPath:Ut.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:n,sourceApp:"Vencord"};E5(i)})}function B5(e,t){let o={type:1,timeout:Ut.store.lengthBasedTimeout?F5(e):Ut.store.timeout,height:U5(e),opacity:Ut.store.opacity,volume:Ut.store.volume,audioPath:Ut.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:"default",sourceApp:"Vencord"};E5(o)}async function E5(e){if(Ut.store.preferUDP){rR.sendToOverlay(e);return}let t={sender:"Vencord",target:"xsoverlay",command:"SendNotification",jsonData:JSON.stringify(e),rawData:null};On.readyState!==On.OPEN&&await _v(),On.send(JSON.stringify(t))}function sR(e,t){let o=k.getCurrentUser();return e.author.id===o.id||e.author.bot&&!Ut.store.botNotifications?!1:oR(e,t)}function U5(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function F5(e){return e.length<=100?3:e.length<=200?4:e.length<=300?5:6}a();T();var Mg=h({name:"YoutubeAdblock",description:"Block ads in YouTube embeds and the WatchTogether activity via AdGuard",authors:[d.ImLvna,d.Ven]});var je={[Bn.name]:Bn,[Zu.name]:Zu,[Ju.name]:Ju,[Qu.name]:Qu,[Xu.name]:Xu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[op.name]:op,[rp.name]:rp,[np.name]:np,[ip.name]:ip,[sp.name]:sp,[ap.name]:ap,[lp.name]:lp,[cp.name]:cp,[ta.name]:ta,[up.name]:up,[dp.name]:dp,[mp.name]:mp,[fp.name]:fp,[gp.name]:gp,[hp.name]:hp,[vp.name]:vp,[bp.name]:bp,[xp.name]:xp,[Tp.name]:Tp,[wp.name]:wp,[Pp.name]:Pp,[Ip.name]:Ip,[Mp.name]:Mp,[Np.name]:Np,[Cp.name]:Cp,[Ap.name]:Ap,[Rp.name]:Rp,[Dp.name]:Dp,[Lp.name]:Lp,[Op.name]:Op,[os.name]:os,[_p.name]:_p,[Bp.name]:Bp,[Up.name]:Up,[Fp.name]:Fp,[$p.name]:$p,[Hp.name]:Hp,[zp.name]:zp,[Wp.name]:Wp,[jp.name]:jp,[qp.name]:qp,[sa.name]:sa,[Xp.name]:Xp,[pa.name]:pa,[nd.name]:nd,[id.name]:id,[ad.name]:ad,[na.name]:na,[ld.name]:ld,[yd.name]:yd,[vd.name]:vd,[bd.name]:bd,[Sd.name]:Sd,[xd.name]:xd,[Td.name]:Td,[wd.name]:wd,[Pd.name]:Pd,[Id.name]:Id,[Md.name]:Md,[Nd.name]:Nd,[kd.name]:kd,[Cd.name]:Cd,[Rd.name]:Rd,[Dd.name]:Dd,[Od.name]:Od,[_d.name]:_d,[Bd.name]:Bd,[Ed.name]:Ed,[Ud.name]:Ud,[Fd.name]:Fd,[$d.name]:$d,[Gd.name]:Gd,[Hd.name]:Hd,[Wd.name]:Wd,[qd.name]:qd,[Kd.name]:Kd,[Zd.name]:Zd,[Jd.name]:Jd,[Xd.name]:Xd,[Vd.name]:Vd,[tm.name]:tm,[rm.name]:rm,[im.name]:im,[cm.name]:cm,[um.name]:um,[ds.name]:ds,[dm.name]:dm,[mm.name]:mm,[fm.name]:fm,[gm.name]:gm,[hm.name]:hm,[ym.name]:ym,[vm.name]:vm,[bm.name]:bm,[qr.name]:qr,[Sm.name]:Sm,[xm.name]:xm,[Tm.name]:Tm,[wm.name]:wm,[Pm.name]:Pm,[Im.name]:Im,[Mm.name]:Mm,[Mn.name]:Mn,[km.name]:km,[Cm.name]:Cm,[Am.name]:Am,[ha.name]:ha,[Bm.name]:Bm,[Em.name]:Em,[$m.name]:$m,[Gm.name]:Gm,[zm.name]:zm,[Wm.name]:Wm,[jm.name]:jm,[qm.name]:qm,[Km.name]:Km,[Zm.name]:Zm,[Xm.name]:Xm,[Vm.name]:Vm,[ef.name]:ef,[tf.name]:tf,[rf.name]:rf,[df.name]:df,[mf.name]:mf,[ff.name]:ff,[gf.name]:gf,[hf.name]:hf,[yf.name]:yf,[vf.name]:vf,[wf.name]:wf,[Pf.name]:Pf,[Mf.name]:Mf,[Ia.name]:Ia,[Nf.name]:Nf,[kf.name]:kf,[Cf.name]:Cf,[Af.name]:Af,[Rf.name]:Rf,[Df.name]:Df,[Lf.name]:Lf,[Of.name]:Of,[_f.name]:_f,[Bf.name]:Bf,[Ef.name]:Ef,[Uf.name]:Uf,[$f.name]:$f,[Hf.name]:Hf,[zf.name]:zf,[Wf.name]:Wf,[Kf.name]:Kf,[qf.name]:qf,[Yf.name]:Yf,[Zf.name]:Zf,[Jf.name]:Jf,[Qf.name]:Qf,[tg.name]:tg,[og.name]:og,[rg.name]:rg,[ig.name]:ig,[sg.name]:sg,[pg.name]:pg,[rs.name]:rs,[dg.name]:dg,[gg.name]:gg,[hg.name]:hg,[yg.name]:yg,[vg.name]:vg,[Sg.name]:Sg,[xg.name]:xg,[Tg.name]:Tg,[wg.name]:wg,[Ig.name]:Ig,[Mg.name]:Mg},ti={[Bn.name]:{folderName:"_api/badges",userPlugin:!1},[Zu.name]:{folderName:"_api/chatButtons.ts",userPlugin:!1},[Ju.name]:{folderName:"_api/commands.ts",userPlugin:!1},[Qu.name]:{folderName:"_api/contextMenu.ts",userPlugin:!1},[Xu.name]:{folderName:"_api/dynamicImageModalApi.ts",userPlugin:!1},[Vu.name]:{folderName:"_api/memberListDecorators",userPlugin:!1},[ep.name]:{folderName:"_api/menuItemDemangler.ts",userPlugin:!1},[tp.name]:{folderName:"_api/messageAccessories.ts",userPlugin:!1},[op.name]:{folderName:"_api/messageDecorations",userPlugin:!1},[rp.name]:{folderName:"_api/messageEvents.ts",userPlugin:!1},[np.name]:{folderName:"_api/messagePopover.ts",userPlugin:!1},[ip.name]:{folderName:"_api/messageUpdater.ts",userPlugin:!1},[sp.name]:{folderName:"_api/notices.ts",userPlugin:!1},[ap.name]:{folderName:"_api/serverList.ts",userPlugin:!1},[lp.name]:{folderName:"_api/userSettings.ts",userPlugin:!1},[cp.name]:{folderName:"_core/noTrack.ts",userPlugin:!1},[ta.name]:{folderName:"_core/settings.tsx",userPlugin:!1},[up.name]:{folderName:"_core/supportHelper.tsx",userPlugin:!1},[dp.name]:{folderName:"accountPanelServerProfile",userPlugin:!1},[mp.name]:{folderName:"alwaysAnimate",userPlugin:!1},[fp.name]:{folderName:"alwaysExpandRoles",userPlugin:!1},[gp.name]:{folderName:"alwaysTrust",userPlugin:!1},[hp.name]:{folderName:"anonymiseFileNames",userPlugin:!1},[vp.name]:{folderName:"appleMusic.desktop",userPlugin:!1},[bp.name]:{folderName:"arRPC.web",userPlugin:!1},[xp.name]:{folderName:"betterFolders",userPlugin:!1},[Tp.name]:{folderName:"betterGifAltText",userPlugin:!1},[wp.name]:{folderName:"betterGifPicker",userPlugin:!1},[Pp.name]:{folderName:"betterNotes",userPlugin:!1},[Ip.name]:{folderName:"betterRoleContext",userPlugin:!1},[Mp.name]:{folderName:"betterRoleDot",userPlugin:!1},[Np.name]:{folderName:"betterSessions",userPlugin:!1},[Cp.name]:{folderName:"betterSettings",userPlugin:!1},[Ap.name]:{folderName:"betterUploadButton",userPlugin:!1},[Rp.name]:{folderName:"biggerStreamPreview",userPlugin:!1},[Dp.name]:{folderName:"blurNsfw",userPlugin:!1},[Lp.name]:{folderName:"callTimer",userPlugin:!1},[Op.name]:{folderName:"clearURLs",userPlugin:!1},[os.name]:{folderName:"clientTheme",userPlugin:!1},[_p.name]:{folderName:"colorSighted",userPlugin:!1},[Bp.name]:{folderName:"consoleJanitor",userPlugin:!1},[Up.name]:{folderName:"consoleShortcuts",userPlugin:!1},[Fp.name]:{folderName:"copyEmojiMarkdown",userPlugin:!1},[$p.name]:{folderName:"copyFileContents",userPlugin:!1},[Hp.name]:{folderName:"copyStickerLinks",userPlugin:!1},[zp.name]:{folderName:"copyUserURLs",userPlugin:!1},[Wp.name]:{folderName:"crashHandler",userPlugin:!1},[jp.name]:{folderName:"ctrlEnterSend",userPlugin:!1},[qp.name]:{folderName:"customIdle",userPlugin:!1},[sa.name]:{folderName:"customRPC",userPlugin:!1},[Xp.name]:{folderName:"dearrow",userPlugin:!1},[pa.name]:{folderName:"decor",userPlugin:!1},[nd.name]:{folderName:"disableCallIdle",userPlugin:!1},[id.name]:{folderName:"dontRoundMyTimestamps",userPlugin:!1},[ad.name]:{folderName:"experiments",userPlugin:!1},[na.name]:{folderName:"expressionCloner",userPlugin:!1},[ld.name]:{folderName:"f8break",userPlugin:!1},[yd.name]:{folderName:"fakeNitro",userPlugin:!1},[vd.name]:{folderName:"fakeProfileThemes",userPlugin:!1},[bd.name]:{folderName:"favEmojiFirst",userPlugin:!1},[Sd.name]:{folderName:"favGifSearch",userPlugin:!1},[xd.name]:{folderName:"fixCodeblockGap",userPlugin:!1},[Td.name]:{folderName:"fixImagesQuality",userPlugin:!1},[wd.name]:{folderName:"fixSpotifyEmbeds.desktop",userPlugin:!1},[Pd.name]:{folderName:"fixYoutubeEmbeds.desktop",userPlugin:!1},[Id.name]:{folderName:"forceOwnerCrown",userPlugin:!1},[Md.name]:{folderName:"friendInvites",userPlugin:!1},[Nd.name]:{folderName:"friendsSince",userPlugin:!1},[kd.name]:{folderName:"fullSearchContext",userPlugin:!1},[Cd.name]:{folderName:"fullUserInChatbox",userPlugin:!1},[Rd.name]:{folderName:"gameActivityToggle",userPlugin:!1},[Dd.name]:{folderName:"gifPaste",userPlugin:!1},[Od.name]:{folderName:"greetStickerPicker",userPlugin:!1},[_d.name]:{folderName:"hideAttachments",userPlugin:!1},[Bd.name]:{folderName:"iLoveSpam",userPlugin:!1},[Ed.name]:{folderName:"ignoreActivities",userPlugin:!1},[Ud.name]:{folderName:"imageFilename",userPlugin:!1},[Fd.name]:{folderName:"imageLink",userPlugin:!1},[$d.name]:{folderName:"imageZoom",userPlugin:!1},[Gd.name]:{folderName:"implicitRelationships",userPlugin:!1},[Hd.name]:{folderName:"ircColors",userPlugin:!1},[Wd.name]:{folderName:"keepCurrentChannel",userPlugin:!1},[qd.name]:{folderName:"lastfmRichPresence",userPlugin:!1},[Kd.name]:{folderName:"loadingQuotes",userPlugin:!1},[Zd.name]:{folderName:"memberCount",userPlugin:!1},[Jd.name]:{folderName:"mentionAvatars",userPlugin:!1},[Xd.name]:{folderName:"messageClickActions",userPlugin:!1},[Vd.name]:{folderName:"messageLatency",userPlugin:!1},[tm.name]:{folderName:"messageLinkEmbeds",userPlugin:!1},[rm.name]:{folderName:"messageLogger",userPlugin:!1},[im.name]:{folderName:"messageTags",userPlugin:!1},[cm.name]:{folderName:"mutualGroupDMs",userPlugin:!1},[um.name]:{folderName:"newGuildSettings",userPlugin:!1},[ds.name]:{folderName:"noBlockedMessages",userPlugin:!1},[dm.name]:{folderName:"noDeepLinks.web",userPlugin:!1},[mm.name]:{folderName:"noDevtoolsWarning",userPlugin:!1},[fm.name]:{folderName:"noF1",userPlugin:!1},[gm.name]:{folderName:"noMaskedUrlPaste",userPlugin:!1},[hm.name]:{folderName:"noMosaic",userPlugin:!1},[ym.name]:{folderName:"noOnboardingDelay",userPlugin:!1},[vm.name]:{folderName:"noPendingCount",userPlugin:!1},[bm.name]:{folderName:"noProfileThemes",userPlugin:!1},[qr.name]:{folderName:"noReplyMention",userPlugin:!1},[Sm.name]:{folderName:"noServerEmojis",userPlugin:!1},[xm.name]:{folderName:"noTypingAnimation",userPlugin:!1},[Tm.name]:{folderName:"noUnblockToJump",userPlugin:!1},[wm.name]:{folderName:"normalizeMessageLinks",userPlugin:!1},[Pm.name]:{folderName:"notificationVolume",userPlugin:!1},[Im.name]:{folderName:"onePingPerDM",userPlugin:!1},[Mm.name]:{folderName:"oneko",userPlugin:!1},[Mn.name]:{folderName:"openInApp",userPlugin:!1},[km.name]:{folderName:"overrideForumDefaults",userPlugin:!1},[Cm.name]:{folderName:"pauseInvitesForever",userPlugin:!1},[Am.name]:{folderName:"permissionFreeWill",userPlugin:!1},[ha.name]:{folderName:"permissionsViewer",userPlugin:!1},[Bm.name]:{folderName:"petpet",userPlugin:!1},[Em.name]:{folderName:"pictureInPicture",userPlugin:!1},[$m.name]:{folderName:"pinDms",userPlugin:!1},[Gm.name]:{folderName:"plainFolderIcon",userPlugin:!1},[zm.name]:{folderName:"platformIndicators",userPlugin:!1},[Wm.name]:{folderName:"previewMessage",userPlugin:!1},[jm.name]:{folderName:"quickMention",userPlugin:!1},[qm.name]:{folderName:"quickReply",userPlugin:!1},[Km.name]:{folderName:"reactErrorDecoder",userPlugin:!1},[Zm.name]:{folderName:"readAllNotificationsButton",userPlugin:!1},[Xm.name]:{folderName:"relationshipNotifier",userPlugin:!1},[Vm.name]:{folderName:"replaceGoogleSearch",userPlugin:!1},[ef.name]:{folderName:"replyTimestamp",userPlugin:!1},[tf.name]:{folderName:"revealAllSpoilers",userPlugin:!1},[rf.name]:{folderName:"reverseImageSearch",userPlugin:!1},[df.name]:{folderName:"reviewDB",userPlugin:!1},[mf.name]:{folderName:"roleColorEverywhere",userPlugin:!1},[ff.name]:{folderName:"secretRingTone",userPlugin:!1},[gf.name]:{folderName:"seeSummaries",userPlugin:!1},[hf.name]:{folderName:"sendTimestamps",userPlugin:!1},[yf.name]:{folderName:"serverInfo",userPlugin:!1},[vf.name]:{folderName:"serverListIndicators",userPlugin:!1},[wf.name]:{folderName:"shikiCodeblocks.desktop",userPlugin:!1},[Pf.name]:{folderName:"showAllMessageButtons",userPlugin:!1},[Mf.name]:{folderName:"showConnections",userPlugin:!1},[Ia.name]:{folderName:"showHiddenChannels",userPlugin:!1},[Nf.name]:{folderName:"showHiddenThings",userPlugin:!1},[kf.name]:{folderName:"showMeYourName",userPlugin:!1},[Cf.name]:{folderName:"showTimeoutDuration",userPlugin:!1},[Af.name]:{folderName:"silentMessageToggle",userPlugin:!1},[Rf.name]:{folderName:"silentTyping",userPlugin:!1},[Df.name]:{folderName:"sortFriendRequests",userPlugin:!1},[Lf.name]:{folderName:"spotifyControls",userPlugin:!1},[Of.name]:{folderName:"spotifyCrack",userPlugin:!1},[_f.name]:{folderName:"spotifyShareCommands",userPlugin:!1},[Bf.name]:{folderName:"startupTimings",userPlugin:!1},[Ef.name]:{folderName:"stickerPaste",userPlugin:!1},[Uf.name]:{folderName:"streamerModeOnStream",userPlugin:!1},[$f.name]:{folderName:"superReactionTweaks",userPlugin:!1},[Hf.name]:{folderName:"textReplace",userPlugin:!1},[zf.name]:{folderName:"themeAttributes",userPlugin:!1},[Wf.name]:{folderName:"translate",userPlugin:!1},[Kf.name]:{folderName:"typingIndicator",userPlugin:!1},[qf.name]:{folderName:"typingTweaks",userPlugin:!1},[Yf.name]:{folderName:"unindent",userPlugin:!1},[Zf.name]:{folderName:"unlockedAvatarZoom",userPlugin:!1},[Jf.name]:{folderName:"unsuppressEmbeds",userPlugin:!1},[Qf.name]:{folderName:"userMessagesPronouns",userPlugin:!1},[tg.name]:{folderName:"userVoiceShow",userPlugin:!1},[og.name]:{folderName:"usrbg",userPlugin:!1},[rg.name]:{folderName:"validReply",userPlugin:!1},[ig.name]:{folderName:"validUser",userPlugin:!1},[sg.name]:{folderName:"vcDoubleClick",userPlugin:!1},[pg.name]:{folderName:"vcNarrator",userPlugin:!1},[rs.name]:{folderName:"vencordToolbox",userPlugin:!1},[dg.name]:{folderName:"viewIcons",userPlugin:!1},[gg.name]:{folderName:"viewRaw",userPlugin:!1},[hg.name]:{folderName:"voiceDownload",userPlugin:!1},[yg.name]:{folderName:"voiceMessages",userPlugin:!1},[vg.name]:{folderName:"volumeBooster",userPlugin:!1},[Sg.name]:{folderName:"webContextMenus.web",userPlugin:!1},[xg.name]:{folderName:"webKeybinds.web",userPlugin:!1},[Tg.name]:{folderName:"webScreenShareFixes.web",userPlugin:!1},[wg.name]:{folderName:"whoReacted",userPlugin:!1},[Ig.name]:{folderName:"xsOverlay",userPlugin:!1},[Mg.name]:{folderName:"youtubeAdblock.desktop",userPlugin:!1}},o2={AutoDNDWhilePlaying:"discordDesktop",DevCompanion:"dev",NoSystemBadge:"discordDesktop"};var Ev={};et(Ev,{Badges:()=>gR,ChatButtons:()=>wR,Commands:()=>pR,ContextMenu:()=>TR,DataStore:()=>dR,MemberListDecorators:()=>vR,MessageAccessories:()=>mR,MessageDecorations:()=>yR,MessageEvents:()=>cR,MessagePopover:()=>fR,MessageUpdater:()=>PR,Notices:()=>uR,Notifications:()=>xR,PluginManager:()=>ql,ServerList:()=>hR,Settings:()=>bR,Styles:()=>SR,Themes:()=>MR,UserSettings:()=>IR});a();ve();var Bv={};et(Bv,{initQuickCssThemeStore:()=>lR});a();a();function yi(e,t=document.documentElement){let o=document.createElement("style");return o.id=e,t.append(o),o}var _a,$5;async function aR(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,n])=>`--${o}: ${n};`).join("");yi("vencord-os-theme-values").textContent=`:root{${t}}`}async function G5(e){_a?_a.disabled=!e:e&&(_a=yi("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{_a.textContent=t,_a.disabled=!G.useQuickCss}),_a.textContent=await VencordNative.quickCss.get())}async function Ba(){$5??=yi("vencord-themes");let{themeLinks:e,enabledThemes:t}=G,{ThemeStore:o}=(Dh(),eu(bb)),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)}$5.textContent=i.map(s=>`@import url("${s.trim()}");`).join(`
|
|
`)}document.addEventListener("DOMContentLoaded",()=>{aR(),Ba(),G5(G.useQuickCss),ft.addChangeListener("useQuickCss",G5),ft.addChangeListener("themeLinks",Ba),ft.addChangeListener("enabledThemes",Ba),VencordNative.quickCss.addThemeChangeListener(Ba)},{once:!0});function lR(e){Ba();let t=e.theme;e.addChangeListener(()=>{t!==e.theme&&(t=e.theme,Ba())})}var cR=d1,uR=P1,pR=o1,dR=or,mR=n1,fR=f1,gR=Kg,hR=My,yR=i1,vR=r1,bR=Zh,SR=Rg,xR=D1,TR=jh,wR=Xh,PR=K0,IR=n0,MR=Bv;var Uv={};et(Uv,{AddonBadge:()=>I1,AddonCard:()=>Zl,BackupAndRestoreTab:()=>Ql,BackupRestoreIcon:()=>Th,BaseText:()=>Gn,Button:()=>Ur,ButtonCompat:()=>Os,Card:()=>ut,CheckedTextInput:()=>sc,CloudIcon:()=>xh,CloudTab:()=>ac,CodeBlock:()=>Rl,CogWheel:()=>ml,CopyIcon:()=>sn,DeleteIcon:()=>Ci,Divider:()=>Ee,ErrorBoundary:()=>M,ErrorCard:()=>Ct,Flex:()=>oe,FolderIcon:()=>gl,FormSwitch:()=>jo,FormSwitchCompat:()=>Mh,GithubIcon:()=>yl,Grid:()=>W1,Heading:()=>Ao,HeadingPrimary:()=>I3,HeadingSecondary:()=>M3,HeadingTertiary:()=>Fr,Heart:()=>qa,ImageIcon:()=>dr,ImageInvisible:()=>Ls,ImageVisible:()=>dl,InfoIcon:()=>pl,Link:()=>De,LinkButton:()=>bl,LinkIcon:()=>ki,LogIcon:()=>hh,MainSettingsIcon:()=>bh,Margins:()=>A,Microphone:()=>dh,NoEntrySignIcon:()=>fl,NotesIcon:()=>gh,OpenExternalIcon:()=>Xo,OwnerCrownIcon:()=>uh,PaintbrushIcon:()=>Ai,Paragraph:()=>$e,PatchHelperIcon:()=>x3,PatchHelperTab:()=>Mb,PencilIcon:()=>yh,PlaceholderIcon:()=>vl,PluginsIcon:()=>Sh,PluginsTab:()=>ts,PlusIcon:()=>mh,QuickAction:()=>lr,QuickActionCard:()=>lc,ReplyIcon:()=>S3,RestartIcon:()=>hl,SafetyIcon:()=>fh,ScreenshareIcon:()=>ph,SettingsTab:()=>Do,Span:()=>Ri,SpecialCard:()=>cc,Switch:()=>ln,TextButton:()=>bu,TextCompat:()=>th,ThemesTab:()=>ii,UpdaterIcon:()=>wh,UpdaterTab:()=>Wr,VencordTab:()=>uc,VesktopSettingsIcon:()=>Ph,WebsiteIcon:()=>vh,generateMarginCss:()=>Dg,generateTextCss:()=>eh,handleSettingsTabError:()=>Bh,openContributorModal:()=>ei,openPluginModal:()=>sr,openSettingsTabModal:()=>hn,wrapTab:()=>Lo});a();Ii();an();Jt();Hn();cn();Qe();Wt();mr();Su();Di();var Fv={};et(Fv,{CONTRIB_ROLE_ID:()=>Lg,ChangeList:()=>Kl,CspBlockedUrls:()=>Xs,DONOR_ROLE_ID:()=>Ha,Devs:()=>d,DevsById:()=>bi,IS_LINUX:()=>Ug,IS_MAC:()=>ho,IS_MOBILE:()=>r3,IS_WINDOWS:()=>Eg,KNOWN_ISSUES_CHANNEL_ID:()=>_g,LazyComponent:()=>Ke,Logger:()=>F,Margins:()=>A,ModalAPI:()=>il,ModalCloseButton:()=>tt,ModalContent:()=>Se,ModalFooter:()=>yt,ModalHeader:()=>ke,ModalRoot:()=>he,ModalSize:()=>yo,Modals:()=>Cs,NoopComponent:()=>oh,Queue:()=>wo,REACT_GLOBAL:()=>o3,REGULAR_ROLE_ID:()=>Og,SUPPORT_CATEGORY_ID:()=>_n,SUPPORT_CHANNEL_ID:()=>ou,SYM_LAZY_CACHED:()=>Zr,SYM_LAZY_GET:()=>cr,Theme:()=>hu,VENBOT_USER_ID:()=>Ts,VENCORD_GUILD_ID:()=>Ga,ZWSP:()=>Dl,canonicalizeDescriptor:()=>iu,canonicalizeFind:()=>Jg,canonicalizeMatch:()=>Rt,canonicalizeReplace:()=>Za,canonicalizeReplacement:()=>Ti,checkIntersecting:()=>$g,classes:()=>L,closeAllModals:()=>Er,closeModal:()=>on,copyToClipboard:()=>to,copyWithToast:()=>rt,createAndAppendStyle:()=>yi,debounce:()=>qt,fetchUserProfile:()=>al,formatDuration:()=>Ol,getCurrentChannel:()=>Ho,getCurrentGuild:()=>rn,getEmojiURL:()=>yu,getGuildAcronym:()=>Ds,getIntlMessage:()=>xe,getIntlMessageFromHash:()=>ah,getTheme:()=>As,getUniqueUsername:()=>nn,hasGuildFeature:()=>ll,humanFriendlyJoin:()=>Z3,identity:()=>ws,insertTextIntoChatInputBox:()=>Ni,interpolateIfDefined:()=>za,isNonNullish:()=>Tr,isObject:()=>n3,isObjectEmpty:()=>Si,isPluginDev:()=>Or,isPrimitiveReactNode:()=>rh,isTruthy:()=>Xn,localStorage:()=>Ea,makeCodeblock:()=>$i,makeLazy:()=>Jr,mergeDefaults:()=>js,onceDefined:()=>NR,onlyOnce:()=>gn,openImageModal:()=>zo,openInviteModal:()=>Mi,openMediaModal:()=>sh,openModal:()=>de,openModalLazy:()=>sl,openPrivateChannel:()=>b3,openUserProfile:()=>Wo,parseUrl:()=>Fg,pluralise:()=>Hg,proxyLazy:()=>Nt,runtimeHashMessageKey:()=>Xr,runtimeHashMessageKeyLegacy:()=>xi,sendMessage:()=>Rs,shouldShowContributorBadge:()=>Gg,sleep:()=>ur,stripIndent:()=>Ib,toInlineCode:()=>J3,tryOrElse:()=>zg,useAwaiter:()=>ht,useCleanupEffect:()=>ih,useCspErrors:()=>q1,useForceUpdater:()=>Go,useIntersection:()=>nh,useTimer:()=>nl,wordsFromCamel:()=>Ll,wordsFromKebab:()=>H3,wordsFromPascal:()=>Eh,wordsFromSnake:()=>G3,wordsFromTitle:()=>z3,wordsToCamel:()=>W3,wordsToKebab:()=>q3,wordsToPascal:()=>K3,wordsToSnake:()=>j3,wordsToTitle:()=>yn});a();a();function NR(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})}tn();T();ie();Ps();$o();vi();a();var{localStorage:Ea}=window;ae();te();Fe();Zo();ct();var $v={};et($v,{ChunkIdsRegex:()=>mu,Common:()=>$n,DefaultExtractAndLoadChunksRegex:()=>du,LazyComponentWebpack:()=>cu,_blacklistBadModules:()=>lu,_initWebpack:()=>Va,_resolveReady:()=>Ja,cache:()=>Jo,extract:()=>rl,extractAndLoadChunks:()=>Xg,extractAndLoadChunksLazy:()=>Pi,factoryListeners:()=>Xa,filters:()=>O,find:()=>Qo,findAll:()=>En,findBulk:()=>Un,findByCode:()=>Ms,findByCodeLazy:()=>ue,findByProps:()=>tl,findByPropsLazy:()=>D,findComponentByCode:()=>uu,findComponentByCodeLazy:()=>pe,findComponentLazy:()=>pu,findExportedComponentLazy:()=>nb,findLazy:()=>Dt,findModuleFactory:()=>el,findModuleId:()=>Fn,findStore:()=>ol,findStoreLazy:()=>Ie,fluxStores:()=>_r,handleModuleNotFound:()=>Br,lazyWebpackSearchHistory:()=>rb,mapMangledModule:()=>Qg,mapMangledModuleLazy:()=>Ue,moduleListeners:()=>au,onceReady:()=>Is,proxyLazyWebpack:()=>ko,search:()=>Ns,stringMatches:()=>Qa,waitFor:()=>Ae,waitForSubscriptions:()=>wi,wreq:()=>pt});a();v();a();E();a();Ii();function H5(){yi("vencord-text",document.head).textContent=eh(),yi("vencord-margins").textContent=Dg()}T();v();async function kR(){if(G.cloud.authenticated&&!await Gt("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:()=>Hs.open("VencordCloud")});return}G.cloud.settingsSync&&G.cloud.authenticated&&(Ea.Vencord_settingsDirty?(await ic(),delete Ea.Vencord_settingsDirty):await Ku(!1)&&qe({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:_t}));let e=qt(async()=>{G.cloud.settingsSync&&G.cloud.authenticated&&(await ic(),delete Ea.Vencord_settingsDirty)},6e4);ft.addGlobalChangeListener(()=>{Ea.Vencord_settingsDirty=!0,e()})}var z5=!1;async function W5(){let e=t=>{z5||(z5=!0,setTimeout(()=>qe({permanent:!0,noPersist:!0,...t}),1e4))};try{if(!await fn())return;if(G.autoUpdate){await Jn(),G.autoUpdateNotification&&e({title:"Vencord has been updated!",body:"Click here to restart",onClick:_t});return}e({title:"A Vencord update is available!",body:"Click here to view the update",onClick:()=>hn(Wr)})}catch(t){Zn.error("Failed to check for updates",t)}}async function CR(){await Is,Wl("WebpackReady"),kR(),W5(),G.autoUpdate&&!G.autoUpdateNotification&&setInterval(W5,1e3*60*30)}T1();Wl("Init");CR();document.addEventListener("DOMContentLoaded",()=>{H5(),Wl("DOMContentLoaded")},{once:!0});return eu(AR);})();
|
|
//# sourceURL=file:///VencordDesktopRenderer
|
|
//# sourceMappingURL=vencord://vencordDesktopRenderer.js.map
|
|
/*! For license information please see vencordDesktopRenderer.js.LEGAL.txt */
|