261 lines
645 KiB
JavaScript
261 lines
645 KiB
JavaScript
// Vencord d753478
|
|
// Standalone: true
|
|
// Platform: Universal
|
|
// Updater Disabled: false
|
|
"use strict";var Vencord=(()=>{var qN=Object.create;var Gc=Object.defineProperty;var KN=Object.getOwnPropertyDescriptor;var YN=Object.getOwnPropertyNames;var ZN=Object.getPrototypeOf,JN=Object.prototype.hasOwnProperty;var hs=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var vi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t)=>{for(var o in t)Gc(e,o,{get:t[o],enumerable:!0})},vb=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of YN(t))!JN.call(e,i)&&i!==o&&Gc(e,i,{get:()=>t[i],enumerable:!(r=KN(t,i))||r.enumerable});return e};var zc=(e,t,o)=>(o=e!=null?qN(ZN(e)):{},vb(t||!e||!e.__esModule?Gc(o,"default",{value:e,enumerable:!0}):o,e)),bb=e=>vb(Gc({},"__esModule",{value:!0}),e);var m,n,a=f(()=>{"use strict";m=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var V,Ae=f(()=>{"use strict";a();V=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var Sb,F,ze=f(()=>{"use strict";a();Sb="",F={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;F[`${e}${t}`]=o,Sb+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Sb,id:"vencord-margins"})),{once:!0})});function en(e,t=5){let o=0,r;return()=>(r===void 0&&t>o++&&(r=e(),r===void 0&&t===o&&console.error("Lazy factory failed:",e)),r)}function Dt(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[Zn]:void 0,[sn](){return!s[Zn]&&t>i++&&(s[Zn]=e(),!s[Zn]&&t===i&&console.error("Lazy factory failed:",e)),s[Zn]}});return new Proxy(s,{...Hc,get(l,c,u){if(c===Zn||c===sn)return Reflect.get(l,c,u);if(!o&&r)return Dt(()=>Reflect.get(l[sn](),c,u),t,!0);let d=l[sn]();if(typeof d=="object"||typeof d=="function")return Reflect.get(d,c,u);throw new Error("proxyLazy called on a primitive value")}})}var xb,Hc,sn,Zn,So=f(()=>{"use strict";a();xb=["arguments","caller","prototype"],Hc={},sn=Symbol.for("vencord.lazy.get"),Zn=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Hc[e]=(t,...o)=>Reflect[e](t[sn](),...o);Hc.ownKeys=e=>{let t=e[sn](),o=Reflect.ownKeys(t);for(let r of xb)o.includes(r)||o.push(r);return o};Hc.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&xb.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[sn](),t);return o&&Object.defineProperty(e,t,o),o}});function gt(e,t=5){let o=en(e,t),r=i=>{let s=o()??QN;return n(s,{...i})};return r.$$vencordInternal=o,r}var QN,Ca=f(()=>{"use strict";a();So();QN=()=>null});function Mb(e,t,o,r){return BigInt(e)|BigInt(t)<<16n|BigInt(o)<<32n|BigInt(r)<<48n}function Jn(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 zt(e,t){return e<<t&XN|e>>Pb-t}function Te(e){return BigInt.asUintN(64,e)}function jc(e,t=0){return new Yg(t).update(e).digest()}var Bt,ao,Tb,ka,wb,Pb,XN,VN,Yg,Zg=f(()=>{a();Bt=11400714785074694791n,ao=14029467366897019727n,Tb=1609587929392839161n,ka=9650029242287828579n,wb=2870177450012600261n,Pb=64n,XN=2n**Pb-1n,VN=new TextEncoder;Yg=class{#t;#o;#n;#r;#i;#s;#a;#e;constructor(t=0){this.reset(t)}reset(t=this.#t){return this.#t=BigInt.asUintN(32,BigInt(t)),this.#o=Te(this.#t+Bt+ao),this.#n=Te(this.#t+ao),this.#r=this.#t,this.#i=Te(this.#t-Bt),this.#s=null,this.#a=0,this.#e=0,this}update(t){typeof t=="string"&&(t=VN.encode(t));let o=0,r=t.length,i=o+r;if(r===0)return this;if(this.#a+=r,this.#e===0&&(this.#s=new Uint8Array(32)),this.#e+r<32)return this.#s.set(t.subarray(0,r),this.#e),this.#e+=r,this;if(this.#e>0){this.#s.set(t.subarray(0,32-this.#e),this.#e);let s=0,l;l=Jn(this.#s,s),this.#o=Te(zt(Te(this.#o+l*ao),31n)*Bt),s+=8,l=Jn(this.memory,s),this.#n=Te(zt(Te(this.#n+l*ao),31n)*Bt),s+=8,l=Jn(this.memory,s),this.#r=Te(zt(Te(this.#r+l*ao),31n)*Bt),s+=8,l=Jn(this.memory,s),this.#i=Te(zt(Te(this.#i+l*ao),31n)*Bt),o+=32-this.#e,this.#e=0}if(o<=i-32){let s=i-32;do{let l;l=Jn(t,o),this.#o=Te(zt(Te(this.#o+l*ao),31n)*Bt),o+=8,l=Jn(t,o),this.#n=Te(zt(Te(this.#n+l*ao),31n)*Bt),o+=8,l=Jn(t,o),this.#r=Te(zt(Te(this.#r+l*ao),31n)*Bt),o+=8,l=Jn(t,o),this.#i=Te(zt(Te(this.#i+l*ao),31n)*Bt),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,r=0,i=0n,s=0n,l=0n;for(this.#a>=32?(i=zt(this.#o,1n)+zt(this.#n,7n)+zt(this.#r,12n)+zt(this.#i,18n),i=Te(i^zt(Te(this.#o*ao),31n)*Bt),i=Te(i*Bt+ka),i=Te(i^zt(Te(this.#n*ao),31n)*Bt),i=Te(i*Bt+ka),i=Te(i^zt(Te(this.#r*ao),31n)*Bt),i=Te(i*Bt+ka),i=Te(i^zt(Te(this.#i*ao),31n)*Bt),i=Te(i*Bt+ka)):i=Te(this.#t+wb),i+=BigInt(this.#a);r<=o-8;)l=Jn(t,r),l=Te(zt(Te(l*ao),31n)*Bt),i=Te(zt(i^l,27n)*Bt+ka),r+=8;for(r+4<=o&&(l=Mb(t[r+1]<<8|t[r],t[r+3]<<8|t[r+2],0,0),i=Te(zt(i^Te(l*Bt),23n)*ao+Tb),r+=4);r<o;)l=Mb(t[r++],0,0,0),i=Te(zt(i^Te(l*wb),11n)*Bt);return s=Te(i>>33n),i=Te((i^s)*ao),s=Te(i>>29n),i=Te((i^s)*Tb),s=Te(i>>32n),i=Te(i^s),i}}});function tA(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 r=new Uint8Array(t);return eA?r:r.reverse()}function Ln(e){let t=jc(e,0),o=tA(t);return[ys[o[0]>>2],ys[(o[0]&3)<<4|o[1]>>4],ys[(o[1]&15)<<2|o[2]>>6],ys[o[2]&63],ys[o[3]>>2],ys[(o[3]&3)<<4|o[3]>>4]].join("")}var ys,eA,vs=f(()=>{"use strict";a();Zg();ys="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),eA=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})()});function Lt(e){let t=typeof e=="string"?e:e.source;if(t=t.replaceAll(/#{intl::([\w$+/]*)(?:::(\w+))?}/g,(i,s,l)=>{let c=l==="raw"?s:Ln(s),u=typeof e=="string";return!Number.isNaN(Number(c[0]))||c.includes("+")||c.includes("/")?u?`["${c}"]`:String.raw`(?:\["${c}"\])`.replaceAll("+","\\+"):u?`.${c}`:String.raw`(?:\.${c})`}),typeof e=="string")return t;let o=t.replaceAll("\\i",String.raw`(?:[A-Za-z_$][\w$]*)`),r=new RegExp(o,e.flags);return r.toString=e.toString.bind(e),r}function Na(e,t){return typeof e!="function"?e.replaceAll("$self",t):(...o)=>e(...o).replaceAll("$self",t)}function Wc(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 bi(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Wc(o.match,Lt),o.replace=Wc(o.replace,r=>Na(r,t)),Object.defineProperties(e,o)}function Jg(e){let t=Object.getOwnPropertyDescriptors(e);t.find=Wc(t.find,Lt),Object.defineProperties(e,t)}var Ho=f(()=>{"use strict";a();vs()});function oA(e,t,o){return function(...r){return[t.apply(this,r),0]}}function nA(e,t,o){return t}var Ib,Qn,qc=f(()=>{"use strict";a();Ae();Ib=oA,Qn=nA});var eu={};lt(eu,{ChunkIdsRegex:()=>Vc,DefaultExtractAndLoadChunksRegex:()=>Xc,LazyComponentWebpack:()=>Zc,_blacklistBadModules:()=>Yc,_initWebpack:()=>La,_resolveReady:()=>Aa,cache:()=>tn,extract:()=>Ba,extractAndLoadChunks:()=>Vg,extractAndLoadChunksLazy:()=>Xn,factoryListeners:()=>Da,filters:()=>B,find:()=>on,findAll:()=>Gr,findBulk:()=>zr,findByCode:()=>_a,findByCodeLazy:()=>Ce,findByProps:()=>Oa,findByPropsLazy:()=>R,findComponentByCode:()=>Jc,findComponentByCodeLazy:()=>se,findComponentLazy:()=>Qc,findExportedComponentLazy:()=>Rb,findLazy:()=>kt,findModuleFactory:()=>Ea,findModuleId:()=>an,findStore:()=>Qg,findStoreLazy:()=>be,fluxStores:()=>xi,handleModuleNotFound:()=>En,lazyWebpackSearchHistory:()=>Ab,mapMangledModule:()=>Xg,mapMangledModuleLazy:()=>Ze,moduleListeners:()=>Kc,onceReady:()=>Ti,proxyLazyWebpack:()=>mo,search:()=>bs,stringMatches:()=>Ra,waitFor:()=>Xe,waitForSubscriptions:()=>wi,wreq:()=>ht});function La(e){ht=e,tn=e.c,Reflect.defineProperty(e.c,Symbol.toStringTag,{value:"ModuleCache",configurable:!0,writable:!0,enumerable:!1})}function kb(e){return e==null||e===window||e===document||e===document.documentElement||e[Symbol.toStringTag]==="DOMTokenList"||e[Symbol.toStringTag]==="IntlMessagesProxy"?!0:e[Cb]!==void 0?(Reflect.deleteProperty(e,Cb),!0):e instanceof rA}function Nb(e,t){let o=Object.getOwnPropertyDescriptor(e,t);o!=null&&Reflect.defineProperty(e,t,{...o,enumerable:!1})}function Yc(e,t,o){if(kb(t))return Nb(e,o),!0;if(typeof t!="object")return!1;let r=!0;for(let i in t)kb(t[i])?Nb(t,i):r=!1;return r}function En(e,...t){let o=new Error(`webpack.${e} found no module`);Si.error(o,"Filter:",t)}function Gr(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in tn){let r=tn[o];if(!(!r?.loaded||r.exports==null)&&(e(r.exports)&&t.push(r.exports),typeof r.exports=="object"))for(let i in r.exports){let s=r.exports[i];s&&e(s)&&t.push(s)}}return t}function Ea(...e){let t=an(...e);return t?ht.m[t]:null}function mo(e,t){return Dt(e,t)}function Zc(e,t){return gt(e,t)}function kt(e){return Dt(()=>on(e))}function Oa(...e){let t=on(B.byProps(...e),{isIndirect:!0});return t||En("findByProps",...e),t}function R(...e){return Dt(()=>Oa(...e))}function _a(...e){let t=on(B.byCode(...e),{isIndirect:!0});return t||En("findByCode",...e),t}function Ce(...e){return Dt(()=>_a(...e))}function Qg(e){let t=xi[e];if(t==null){for(let o of Mi.Store.getAll?.()??[]){let r=o.getName();r===e&&(t=o),xi[r]==null&&(xi[r]=o)}t==null&&(t=on(B.byStoreName(e),{isIndirect:!0}))}return t||En("findStore",e),t}function be(e){return Dt(()=>Qg(e))}function Jc(...e){let t=on(B.componentByCode(...e),{isIndirect:!0});return t||En("findComponentByCode",...e),t}function Qc(e){return gt(()=>{let t=on(e,{isIndirect:!0});return t||En("findComponent",e),t})}function se(...e){return gt(()=>{let t=on(B.componentByCode(...e),{isIndirect:!0});return t||En("findComponentByCode",...e),t})}function Rb(...e){return gt(()=>{let t=on(B.byProps(...e),{isIndirect:!0});return t||En("findExportedComponent",...e),t[e[0]]})}function iA(e,t){let o=new Set,r=t?Object.getOwnPropertyNames:Object.keys;do r(e).forEach(i=>i!=="__esModule"&&o.add(i)),e=Object.getPrototypeOf(e);while(e!=null);return o}function Ze(e,t,o=!1){return Dt(()=>Xg(e,t,o))}async function Vg(e,t=Xc){let o=Ea(...e);if(!o){let u=new Error("extractAndLoadChunks: Couldn't find module factory");return Si.warn(u,"Code:",e,"Matcher:",t),!1}let r=String(o).match(Lt(t));if(!r){let u=new Error("extractAndLoadChunks: Couldn't find chunk loading in module factory code");return Si.warn(u,"Code:",e,"Matcher:",t),!1}let[,i,s]=r;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 Si.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(Vc)).map(d=>{let g=Number(d[1]);return Number.isNaN(g)?d[1]:g});await Promise.all(u.map(d=>ht.e(d)))}if(ht.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 Si.warn(u,"Code:",e,"Matcher:",t),!1}return ht(c),!0}function Xn(e,t=Xc){return en(()=>Vg(e,t))}function Xe(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=B.byProps(e);else if(Array.isArray(e))e=B.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(tn!=null){let[r,i]=on(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}wi.set(e,t)}function bs(...e){e=e.map(Lt);let t={},o=ht.m;for(let r in o){let i=o[r];Ra(i.toString(),e)&&(t[r]=i)}return t}function Ba(e){let t=ht.m[e];if(!t)return null;let o=`
|
|
// [EXTRACTED] WebpackModule${e}
|
|
// WARNING: This module was extracted to be more easily readable.
|
|
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
|
|
|
|
0,${t.toString()}
|
|
//# sourceURL=ExtractedWebpackModule${e}
|
|
`;return(0,eval)(o)}var Si,Aa,Ti,ht,tn,xi,Ra,B,wi,Kc,Da,rA,Cb,on,zr,an,Ab,Xg,Xc,Vc,$=f(()=>{"use strict";a();So();Ca();Ae();Ho();qc();S();Si=new V("Webpack"),Ti=new Promise(e=>Aa=e),xi={},Ra=(e,t)=>t.every(o=>typeof o=="string"?e.includes(o):(o.global&&(o.lastIndex=0),o.test(e))),B={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>{let t=e.map(Lt),o=r=>typeof r!="function"?!1:Ra(Function.prototype.toString.call(r),t);return o.$$vencordProps=[...e],o},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=B.byCode(...e),o=r=>{let i=r;for(;i!=null;){if(t(i))return!0;if(i.$$typeof)if(i.type)i=i.type;else if(i.render)i=i.render;else return!1;else return!1}return!1};return o.$$vencordProps=[...e],o}},wi=new Map,Kc=new Set,Da=new Set;rA=Object.getPrototypeOf(Int8Array),Cb="is this a proxy that returns values for any key?";on=Qn("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in tn){let s=tn[i];if(!(!s?.loaded||s.exports==null)){if(t(s.exports))return r?[s.exports,i]:s.exports;if(typeof s.exports=="object")for(let l in s.exports){let c=s.exports[l];if(c&&t(c))return r?[c,i]:c}}}return o||En("find",t),r?[null,null]:null});zr=Qn("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 on(t[0]);let r=t,i=0,s=Array(o);e:for(let l in tn){let c=tn[l];if(!(!c?.loaded||c.exports==null))for(let u=0;u<o;u++){let d=r[u];if(d!==void 0){if(d(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===o)break e;break}if(typeof c.exports=="object")for(let g in c.exports){let h=c.exports[g];if(h&&d(h)){if(s[u]=h,r[u]=void 0,++i===o)break e;continue e}}}}}if(i!==o){let l=new Error(`Got ${o} filters, but only found ${i} modules!`);Si.warn(l)}return s}),an=Qn("findModuleId",function(...t){t=t.map(Lt);for(let r in ht.m)if(Ra(ht.m[r].toString(),t))return r;let o=new Error(`Didn't find module with code(s):
|
|
`+t.join(`
|
|
`));return Si.warn(o),null});Ab=[];Xg=Qn("mapMangledModule",function(t,o,r=!1){let i={},s=an(...Array.isArray(t)?t:[t]);if(s===null)return i;let l=ht(s),c=iA(l,r);e:for(let u of c){let d=l[u];for(let g in o)if(o[g](d)){i[g]=d;continue e}}return i});Xc=/(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/,Vc=/\("([^"]+?)"\)/g});var sA,tu,Db=f(()=>{"use strict";a();$();sA=kt(e=>e.image&&e.modal&&!e.applicationIcon),tu=R("buttonWrapper","buttonContent")});function vt(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=gt(()=>o);return Xe(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function oo(e,t){Xe(B.byStoreName(e),t,{isIndirect:!0})}var eh=f(()=>{"use strict";a();wt();$()});var aA,lA,cA,uA,b,Zt,I,fo,th,Lb,oe,Vn,ct,ou,Q,pA,nn,oh,Ss,xs,nh,xo,rh,er,Fa,Ua,ln,dA,Hr,mA,fA,nu,$a,Ga,lo,Ts,Pi,ru,Eb=f(()=>{"use strict";a();Ca();$();eh();aA=vt("FormTitle",B.componentByCode('["defaultMargin".concat','="h5"')),lA=vt("FormText",B.componentByCode(".SELECTABLE),",".DISABLED:")),cA=vt("FormSection",B.componentByCode(".titleId)")),uA=vt("FormDivider",B.componentByCode(".divider,",",style:",'"div"',/\.divider,\i\),style:/)),b={FormTitle:aA,FormText:lA,FormSection:cA,FormDivider:uA},Zt=vt("Card",B.componentByCode(".editable),",".outline:")),I=vt("Button",B.componentByCode("#{intl::A11Y_LOADING_STARTED}))),!1")),fo=vt("Switch",B.componentByCode(".labelRow,ref:",".disabledText")),th=vt("Checkbox",B.componentByCode(".checkboxWrapperDisabled:")),Lb=Ze(".tooltipTop,bottom:",{Tooltip:B.componentByCode("this.renderTooltip()]"),TooltipContainer:B.componentByCode('="div"')}),oe=gt(()=>Lb.Tooltip),Vn=gt(()=>Lb.TooltipContainer),ct=vt("TextInput",B.componentByCode(".error]:this.hasError()")),ou=vt("TextArea",B.componentByCode("this.getPaddingRight()},id:")),Q=vt("Text",B.componentByCode('case"always-white"')),pA=vt("Heading",B.componentByCode(">6?{","variant:")),nn=vt("Select",B.componentByCode('.selectPositionTop]:"top"===','"Escape"===')),oh=vt("SearchableSelect",B.componentByCode('.selectPositionTop]:"top"===',".multi]:")),Ss=vt("Slider",B.componentByCode('"markDash".concat(')),xs=vt("Popout",B.componentByCode("ref:this.ref,","renderPopout:this.renderPopout,")),nh=vt("Dialog",B.componentByCode('role:"dialog",tabIndex:-1')),xo=vt("TabBar",B.componentByCode("ref:this.tabBarRef,className:")),rh=vt("Paginator",B.componentByCode('rel:"prev",children:')),er=vt("Clickable",B.componentByCode("this.context?this.renderNonInteractive():")),Fa=vt("Avatar",B.componentByCode(".size-1.375*"));Xe(B.byCode('="ltr",orientation:',"customTheme:","forwardRef"),e=>Ua=e);Xe(["thin","auto","customTheme"],e=>ln=e);dA=gt(()=>Ua(ln.none,ln.fade,ln.customTheme)),Hr=gt(()=>Ua(ln.thin,ln.fade,ln.customTheme)),mA=gt(()=>Ua(ln.auto,ln.fade,ln.customTheme)),{FocusLock_:fA}=Ze('document.getElementById("app-mount"))',{FocusLock_:B.componentByCode(".containerRef")}),nu=gt(()=>fA);Xe(e=>{if(typeof e!="function")return!1;let t=String(e);return t.includes(".resolve({theme:null")&&!t.includes("useMemo")},e=>$a=e);Ga=vt("MaskedLink",B.componentByCode("MASKED_LINK)")),lo=vt("Timestamp",B.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}")),Ts=vt("Flex",["Justify","Align","Wrap"]),Pi=vt("OAuth2AuthorizeModal",B.componentByCode(".authorize,children:",".contentBackground")),ru=Ze(".assign({colorNames:",{Transition:B.componentByCode('["items","children"]',",null,"),animated:B.byProps("div","text")})});var E,Et,Ob=f(()=>{"use strict";a();$();E={};Xe(e=>e.name==="MenuCheckboxItem",(e,t)=>{let o=ht(t);for(let r of Object.values(o))typeof r=="function"&&r.name.startsWith("Menu")&&(E[r.name]=r)});Xe(B.componentByCode('path:["empty"]'),e=>E.Menu=e);Xe(B.componentByCode("sliderContainer","slider","handleSize:16","=100"),e=>E.MenuSliderControl=e);Xe(B.componentByCode('role:"searchbox',"top:2","query:"),e=>E.MenuSearchControl=e);Et=Ze('type:"CONTEXT_MENU_OPEN',{closeContextMenu:B.byCode("CONTEXT_MENU_CLOSE"),openContextMenu:B.byCode("renderLazy:"),openContextMenuLazy:e=>typeof e=="function"&&e.toString().length<100})});var W,K,le,Ii,$e,Mt,ws,iu,Ci,_b=f(()=>{"use strict";a();$();Ci=R("createPortal","render");Xe("useState",e=>{W=e,{useEffect:le,useState:K,useLayoutEffect:Ii,useMemo:$e,useRef:Mt,useReducer:ws,useCallback:iu}=W})});var Mi,no,Jt,za,Be,tr,ki,cn,ce,D,Qt,Le,jo,ie,Re,Fe,un,pn,Ha,ja,Se,Bb=f(()=>{"use strict";a();$();eh();Mi=R("connectStores"),no=R("ChannelMessage","SlashCommand"),za=R("openPrivateChannel"),Se=Ce("useStateFromStores");oo("DraftStore",e=>ja=e);oo("UserStore",e=>D=e);oo("UserProfileStore",e=>Qt=e);oo("ChannelStore",e=>ie=e);oo("SelectedChannelStore",e=>Le=e);oo("SelectedGuildStore",e=>jo=e);oo("GuildStore",e=>ce=e);oo("GuildMemberStore",e=>Re=e);oo("RelationshipStore",e=>Fe=e);oo("PermissionStore",e=>Be=e);oo("PresenceStore",e=>cn=e);oo("ReadStateStore",e=>ki=e);oo("GuildChannelStore",e=>tr=e);oo("MessageStore",e=>Jt=e);oo("WindowStore",e=>Ha=e);oo("EmojiStore",e=>un=e);oo("ThemeStore",e=>pn=e)});var Fb={};var Ub=f(()=>{"use strict";a()});var $b={};var Gb=f(()=>{"use strict";a()});var sh={};lt(sh,{DisplayProfile:()=>ih});var ih,zb=f(()=>{"use strict";a();ih=class{userId;banner;bio;pronouns;accentColor;themeColors;popoutAnimationParticleType;profileEffectId;_userProfile;_guildMemberProfile;canUsePremiumProfileCustomization;canEditThemes;premiumGuildSince;premiumSince;premiumType;primaryColor}});var Wa,Hb=f(()=>{"use strict";a();$();Wa={FrecencyUserSettingsActionCreators:kt(e=>e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")),PreloadedUserSettingsActionCreators:kt(e=>e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings"))}});function Je(e,t=jb.MESSAGE,o){ee.show(ee.create(e,t,o))}var G,On,Pt,bt,jr,Ni,Ms,ah,Ai,dn,To,Ee,rt,jb,gA,ee,go,Ri,qa,Di,Ht,or,Ps,su,ke,Li,lh,Wo,au,ch,uh,Ft,Ka,hA,yA,vA,Wr,Wb=f(()=>{"use strict";a();$();Xe(["dispatch","subscribe"],e=>{G=e,Vencord.Plugins.subscribeAllPluginsFluxEvents(e);let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Aa()};e.subscribe("CONNECTION_OPEN",t)});Xe(["dispatchToLastSubscribed"],e=>On=e);Pt=Ze('ME:"/users/@me"',{Endpoints:B.byProps("USER","ME"),UserFlags:B.byProps("STAFF","SPAMMER"),FriendsSections:e=>e.PENDING==="PENDING"&&e.ADD_FRIEND}),bt=kt(e=>typeof e=="object"&&e.del&&e.put),jr=R("parseTwoDigitYear"),Ni=R("highlight","registerLanguage"),{match:Ms,P:ah}=Ze("@ts-pattern/matcher",{match:B.byCode("return new"),P:B.byProps("when")}),Ai=R("debounce","cloneDeep"),dn=Ze('defaultLocale:"en-US"',{t:e=>e?.[Symbol.toStringTag]==="IntlMessagesProxy",intl:e=>e!=null&&Object.getPrototypeOf(e)?.withFormatters!=null},!0);Xe(["fromTimestamp","extractTimestamp"],e=>To=e);Xe("parseTopic",e=>Ee=e);Xe(["show","close"],e=>rt=e);jb={MESSAGE:"message",SUCCESS:"success",FAILURE:"failure",CUSTOM:"custom",CLIP:"clip",LINK:"link",FORWARD:"forward",BOOKMARK:"bookmark",CLOCK:"clock"},gA={TOP:0,BOTTOM:1},ee={Type:jb,Position:gA,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Xe("showToast",e=>{ee.show=e.showToast,ee.pop=e.popToast,ee.create=e.createToast});go={getUser:Ce(".USER(")},Ri=R("clearAll","addFile"),qa={promptToUpload:Ce("#{intl::ATTACHMENT_TOO_MANY_ERROR_TITLE}")},Di=Ze("getAssetImage: size must === [",{fetchAssetIds:B.byCode('.startsWith("http:")',".dispatch({"),getAssetFromImageURL:B.byCode("].serialize(",',":"'),getAssetImage:B.byCode("getAssetImage: size must === ["),getAssets:B.byCode(".assets")}),Ht=Ze('queryCommandEnabled("copy")',{copy:B.byCode(".copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),or=Ze("Transitioning to ",{transitionTo:B.byCode("transitionTo -"),transitionToGuild:B.byCode("transitionToGuild -"),back:B.byCode("goBack()"),forward:B.byCode("goForward()")}),Ps=Ze('"Thread must have a parent ID."',{transitionToChannel:B.byCode(".preload"),transitionToThread:B.byCode('"Thread must have a parent ID."')});Xe(["open","saveAccountChanges"],e=>su=e);ke=kt(e=>typeof e.ADMINISTRATOR=="bigint"),{zustandCreate:Li}=Ze(["useSyncExternalStoreWithSelector:","Object.assign"],{zustandCreate:B.byCode(/=>(\i)\?\i\(\1/)}),{zustandPersist:lh}=Ze(".onRehydrateStorage)?",{zustandPersist:B.byCode(/(\(\i,\i\))=>.+?\i\1/)}),Wo=R("editMessage","sendMessage"),au=R("clearCache","_channelMessages"),ch=R("openUserProfileModal","closeUserProfileModal"),uh=R("resolveInvite"),Ft=R("getGuildBannerURL","getUserAvatarURL"),Ka=Ze("expression-picker-last-active-view",{openExpressionPicker:B.byCode(/setState\({activeView:(?:(?!null)\i),activeViewType:/),closeExpressionPicker:B.byCode("setState({activeView:null"),toggleMultiExpressionPicker:B.byCode(".EMOJI,"),toggleExpressionPicker:B.byCode(/getState\(\)\.activeView===\i\?\i\(\):\i\(/),setExpressionPickerView:B.byCode(/setState\({activeView:\i,lastActiveView:/),setSearchQuery:B.byCode("searchQuery:"),useExpressionPickerStore:B.byCode(/\(\i,\i=\i\)=>/)}),hA=Ze('type:"POPOUT_WINDOW_OPEN"',{open:B.byCode('type:"POPOUT_WINDOW_OPEN"'),close:B.byCode('type:"POPOUT_WINDOW_CLOSE"'),setAlwaysOnTop:B.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"')}),yA=R("useName","getGlobalName"),vA=Ze(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/,{getDisplayProfile:B.byCode(".getGuildMemberProfile("),useDisplayProfile:B.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)}),Wr=Ze("millisecondsInUnit:",{calendarFormat:B.byCode("sameElse"),dateFormat:B.byCode('":'),isSameDay:B.byCode("Math.abs(+"),diffAsUnits:B.byCode("days:0","millisecondsInUnit")})});var Is={};lt(Is,{Alerts:()=>rt,Animations:()=>ru,ApplicationAssetUtils:()=>Di,Avatar:()=>Fa,Button:()=>I,ButtonWrapperClasses:()=>tu,Card:()=>Zt,ChannelRouter:()=>Ps,ChannelStore:()=>ie,Checkbox:()=>th,Clickable:()=>er,Clipboard:()=>Ht,ComponentDispatch:()=>On,ComponentTypes:()=>Fb,Constants:()=>Pt,ContextMenuApi:()=>Et,DateUtils:()=>Wr,Dialog:()=>nh,DisplayProfileUtils:()=>vA,DraftStore:()=>ja,DraftType:()=>no,EmojiStore:()=>un,ExpressionPickerStore:()=>Ka,Flex:()=>Ts,Flux:()=>Mi,FluxDispatcher:()=>G,FocusLock:()=>nu,Forms:()=>b,GuildChannelStore:()=>tr,GuildMemberStore:()=>Re,GuildStore:()=>ce,Heading:()=>pA,IconUtils:()=>Ft,InviteActions:()=>uh,MaskedLink:()=>Ga,Menu:()=>E,MenuTypes:()=>$b,MessageActions:()=>Wo,MessageCache:()=>au,MessageStore:()=>Jt,ModalImageClasses:()=>sA,NavigationRouter:()=>or,OAuth2AuthorizeModal:()=>Pi,P:()=>ah,Paginator:()=>rh,Parser:()=>Ee,PermissionStore:()=>Be,PermissionsBits:()=>ke,Popout:()=>xs,PopoutActions:()=>hA,PresenceStore:()=>cn,PrivateChannelsStore:()=>za,React:()=>W,ReactDOM:()=>Ci,ReadStateStore:()=>ki,RelationshipStore:()=>Fe,RestAPI:()=>bt,ScrollerAuto:()=>mA,ScrollerNone:()=>dA,ScrollerThin:()=>Hr,SearchableSelect:()=>oh,Select:()=>nn,SelectedChannelStore:()=>Le,SelectedGuildStore:()=>jo,SettingsRouter:()=>su,Slider:()=>Ss,SnowflakeUtils:()=>To,Switch:()=>fo,TabBar:()=>xo,Text:()=>Q,TextArea:()=>ou,TextInput:()=>ct,ThemeStore:()=>pn,Timestamp:()=>lo,Toasts:()=>ee,Tooltip:()=>oe,TooltipContainer:()=>Vn,UploadHandler:()=>qa,UploadManager:()=>Ri,UserProfileActions:()=>ch,UserProfileStore:()=>Qt,UserSettingsActionCreators:()=>Wa,UserStore:()=>D,UserUtils:()=>go,UsernameUtils:()=>yA,UtilTypes:()=>sh,WindowStore:()=>Ha,createScroller:()=>Ua,hljs:()=>Ni,i18n:()=>dn,lodash:()=>Ai,match:()=>Ms,moment:()=>jr,scrollerClasses:()=>ln,showToast:()=>Je,useCallback:()=>iu,useEffect:()=>le,useLayoutEffect:()=>Ii,useMemo:()=>$e,useReducer:()=>ws,useRef:()=>Mt,useState:()=>K,useStateFromStores:()=>Se,useToken:()=>$a,zustandCreate:()=>Li,zustandPersist:()=>lh});var S=f(()=>{"use strict";a();Db();Eb();Ob();_b();Bb();Ub();Gb();zb();Hb();Wb()});var bA,lu,Ya,Za,ph,dh,cu,Cs,mh,p,ks,M=f(()=>{"use strict";a();bA="Vencord.Webpack.Common.React",lu="1017176847865352332",Ya="1015060230222131221",Za="1042507929485586532",ph="1026534353167208489",dh="1026504932959977532",cu="1026515880080842772",Cs="1108135649699180705",mh="1222936386626129920",p=Object.freeze({Ven:{name:"Vee",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n,badge:!1},Cyn:{name:"Cynosphere",id:150745989836308480n},Trwy:{name:"trey",id:354427199023218689n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},fawn:{name:"fawn",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:715746190813298788n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"sunnie",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},arHSM:{name:"arHSM",id:841509053422632990n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"lillith <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},UlyssesZhan:{name:"UlyssesZhan",id:586808226058862623n},ant0n:{name:"ant0n",id:145224646868860928n},Board:{name:"BoardTM",id:285475344817848320n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Lexi:{name:"Lexi",id:506101469787717658n},Mopi:{name:"Mopi",id:1022189106614243350n},Grzesiek11:{name:"Grzesiek11",id:368475654662127616n},Samwich:{name:"Samwich",id:976176454511509554n},coolelectronics:{name:"coolelectronics",id:696392247205298207n},Av32000:{name:"Av32000",id:593436735380127770n},Noxillio:{name:"Noxillio",id:138616536502894592n},Kyuuhachi:{name:"Kyuuhachi",id:236588665420251137n},nin0dev:{name:"nin0dev",id:886685857560539176n},Elvyra:{name:"Elvyra",id:708275751816003615n},HappyEnderman:{name:"Happy enderman",id:1083437693347827764n},Vishnya:{name:"Vishnya",id:282541644484575233n},Inbestigator:{name:"Inbestigator",id:761777382041714690n},newwares:{name:"newwares",id:421405303951851520n},JohnyTheCarrot:{name:"JohnyTheCarrot",id:132819036282159104n},puv:{name:"puv",id:469441552251355137n},Kodarru:{name:"Kodarru",id:785227396218748949n},nakoyasha:{name:"nakoyasha",id:222069018507345921n},Sqaaakoi:{name:"Sqaaakoi",id:259558259491340288n},Byron:{name:"byeoon",id:1167275288036655133n},Kaitlyn:{name:"kaitlyn",id:306158896630988801n},PolisanTheEasyNick:{name:"Oleh Polisan",id:242305263313485825n},HAHALOSAH:{name:"HAHALOSAH",id:903418691268513883n},GabiRP:{name:"GabiRP",id:507955112027750401n},ImBanana:{name:"Im_Banana",id:635250116688871425n},xocherry:{name:"xocherry",id:221288171013406720n},ScattrdBlade:{name:"ScattrdBlade",id:678007540608532491n},goodbee:{name:"goodbee",id:658968552606400512n},Moxxie:{name:"Moxxie",id:712653921692155965n},Ethan:{name:"Ethan",id:721717126523781240n},nyx:{name:"verticalsync.",id:1207087393929171095n},nekohaxx:{name:"nekohaxx",id:1176270221628153886n},Antti:{name:"Antti",id:312974985876471810n},Joona:{name:"Joona",id:297410829589020673n},sadan:{name:"sadan",id:521819891141967883n},Kylie:{name:"Cookie",id:721853658941227088n},AshtonMemer:{name:"AshtonMemer",id:373657230530052099n},surgedevs:{name:"Chloe",id:1084592643784331324n},Lumap:{name:"Lumap",id:585278686291427338n},Obsidian:{name:"Obsidian",id:683171006717755446n},SerStars:{name:"SerStars",id:861631850681729045n},niko:{name:"niko",id:341377368075796483n},relitrix:{name:"Relitrix",id:423165393901715456n},RamziAH:{name:"RamziAH",id:1279957227612147747n},SomeAspy:{name:"SomeAspy",id:516750892372852754n},jamesbt365:{name:"jamesbt365",id:158567567487795200n},samsam:{name:"samsam",id:836452332387565589n}}),ks=Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t])))});function z(...e){return e.filter(Boolean).join(" ")}function mn(e){return new Promise(t=>setTimeout(t,e))}function Xt(e,t="Copied to clipboard!"){Ht.SUPPORTS_COPY?Ht.copy(e):t="Your browser does not support copying to clipboard",ee.show({message:t,id:ee.genId(),type:ee.Type.SUCCESS})}function SA(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function nr(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function fh(e){try{return new URL(e)}catch{return null}}function Ns(e){return e}function hh(e,t,o=t+"s"){return e===1?`${e} ${t}`:`${e} ${o}`}function Ja(e,...t){return t.some(o=>o==null)?"":String.raw({raw:e},...t)}function uu(e,t){try{let o=e();return o instanceof Promise?o.catch(()=>t):o}catch{return t}}var gh,xA,fn,me=f(()=>{"use strict";a();S();M();gh=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};xA=navigator.userAgent.includes("Mobi"),fn=e=>Object.hasOwn(ks,e)});function St(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=K({value:o.fallbackValue,error:null,pending:!0});return le(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{s&&(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{s&&(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function rr(e){let t=ws(o=>o+1,0);return e?t:t[1]}function Qa({interval:e=1e3,deps:t=[]}){let[o,r]=K(0),i=$e(()=>Date.now(),t);return le(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var yh,vh,wt=f(()=>{"use strict";a();S();me();Ca();yh=()=>null,vh=(e=!1)=>{let t=W.useRef(null),[o,r]=K(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(gh(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},o]}});var qb=f(()=>{});function wo(e){return n("div",{...e,className:z(e.className,"vc-error-card")},e.children)}var Ei=f(()=>{"use strict";a();qb();me()});var TA,wA,Kb,bh,k,ne=f(()=>{"use strict";a();Ae();ze();wt();S();Ei();TA="#e78284",wA=new V("React ErrorBoundary",TA),Kb={},bh=gt(()=>class extends W.PureComponent{state={error:Kb,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
|
|
`);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),wA.error(`${this.props.message||"A component threw an Error"}
|
|
`,t,o.componentStack)}render(){if(this.state.error===Kb)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{wrappedProps:this.props.wrappedProps,...this.state},this.props.children);let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(wo,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:F.top8},this.state.stack)))}});bh.wrap=(e,t)=>o=>n(bh,{...t,wrappedProps:o},n(e,{...o}));k=bh});var Yb=f(()=>{});function Xa(e){return n("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",height:"16",width:"16",...e,className:z("vc-heart-icon",e.className)},n("path",{fill:"#db61a2",fillRule:"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var pu=f(()=>{"use strict";a();me()});function Va({look:e=I.Looks.LINK,color:t=I.Colors.TRANSPARENT,...o}){return n(I,{...o,look:e,color:t,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated"),innerClassName:"vc-donate-button"},n(Xa,null),"Donate")}var du=f(()=>{"use strict";a();S();pu()});function ge(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var jt=f(()=>{"use strict";a()});var Zb=f(()=>{});function Eo(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var Oi=f(()=>{"use strict";a()});var Sh,Jb,mu,Qb=f(()=>{"use strict";a();Sh=Symbol("SettingsStore.isProxy"),Jb=Symbol("SettingsStore.getRawTarget"),mu=class{pathListeners=new Map;globalListeners=new Set;proxyContexts=new WeakMap;proxyHandler=(()=>{let t=this;return{get(o,r,i){if(r===Sh)return!0;if(r===Jb)return o;let s=Reflect.get(o,r,i),l=t.proxyContexts.get(o);if(l==null)return s;let{root:c,path:u}=l;if(!(r in o)&&t.getDefaultValue!=null&&(s=t.getDefaultValue({target:o,key:r,root:c,path:u})),typeof s=="object"&&s!==null&&!s[Sh]){let d=`${u}${u&&"."}${r}`;return t.makeProxy(s,c,d)}return s},set(o,r,i){if(i?.[Sh]&&(i=i[Jb]),o[r]===i)return!0;if(!Reflect.set(o,r,i))return!1;let s=t.proxyContexts.get(o);if(s==null)return!0;let{root:l,path:c}=s,u=`${c}${c&&"."}${r}`;return t.notifyListeners(u,i,l),!0},deleteProperty(o,r){if(!Reflect.deleteProperty(o,r))return!1;let i=t.proxyContexts.get(o);if(i==null)return!0;let{root:s,path:l}=i,c=`${l}${l&&"."}${r}`;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,r=""){return this.proxyContexts.set(t,{root:o,path:r}),new Proxy(t,this.proxyHandler)}notifyListeners(t,o,r){let i=t.split(".");if(i.length>2&&i[0]==="plugins"){let s=i.slice(0,3),l=s.join("."),c=s.reduce((u,d)=>u[d],r);this.globalListeners.forEach(u=>u(r,l)),this.pathListeners.get(l)?.forEach(u=>u(c))}else this.globalListeners.forEach(s=>s(r,t));this.pathListeners.get(t)?.forEach(s=>s(o))}setData(t,o){if(this.readOnly)throw new Error("SettingsStore is read-only");if(this.plain=t,this.store=this.makeProxy(t),o){let r=t,i=o.split(".");for(let s of i){if(!r){console.warn(`Settings#setData: Path ${o} does not exist in new data. Not dispatching update`);return}r=r[s]}this.pathListeners.get(o)?.forEach(s=>s(r))}this.markAsChanged()}addGlobalChangeListener(t){this.globalListeners.add(t)}addChangeListener(t,o){let r=this.pathListeners.get(t)??new Set;r.add(o),this.pathListeners.set(t,r)}removeGlobalChangeListener(t){this.globalListeners.delete(t)}removeChangeListener(t,o){let r=this.pathListeners.get(t);r&&(r.delete(o),r.size||this.pathListeners.delete(t))}markAsChanged(){this.globalListeners.forEach(t=>t(this.plain,""))}}});var _i,fu=f(()=>{"use strict";a();({localStorage:_i}=window)});function As(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},As(e[o],r)):e[o]??=r}return e}var gu=f(()=>{"use strict";a()});var Mo,qr=f(()=>{"use strict";a();Mo=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var Xb=f(()=>{});var hu,xh=f(()=>{"use strict";a();Xb();_();ne();me();S();hu=k.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:d,className:g,dismissOnClick:h}){let{timeout:v,position:C}=Ot(["notifications.timeout","notifications.position"]).notifications,w=Se([Ha],()=>Ha.isFocused()),[x,N]=K(!1),[A,L]=K(0),U=$e(()=>Date.now(),[v,x,w]);le(()=>{if(x||!w||v===0||d)return void L(0);let X=setInterval(()=>{let re=Date.now()-U;re>=v?c():L(re)},10);return()=>clearInterval(X)},[v,x,w]);let H=A/v;return n("button",{className:z("vc-notification-root",g),style:C==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:X=>{X.preventDefault(),X.stopPropagation(),c()},onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:X=>{X.preventDefault(),X.stopPropagation(),c()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),u&&n("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!d&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-H)*100}%`,backgroundColor:i||"var(--brand-500)"}}))},{onError:({props:e})=>e.onClose()})});var ir={};lt(ir,{clear:()=>CA,createStore:()=>Vb,del:()=>Kr,delMany:()=>IA,entries:()=>NA,get:()=>co,getMany:()=>PA,keys:()=>Mh,promisifyRequest:()=>Po,set:()=>hn,setMany:()=>MA,update:()=>Bi,values:()=>kA});function Po(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function Vb(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=Po(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function gn(){return Th||(Th=Vb("VencordData","VencordStore")),Th}function co(e,t=gn()){return t("readonly",o=>Po(o.get(e)))}function hn(e,t,o=gn()){return o("readwrite",r=>(r.put(t,e),Po(r.transaction)))}function MA(e,t=gn()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),Po(o.transaction)))}function PA(e,t=gn()){return t("readonly",o=>Promise.all(e.map(r=>Po(o.get(r)))))}function Bi(e,t,o=gn()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Po(r.transaction))}catch(l){s(l)}}}))}function Kr(e,t=gn()){return t("readwrite",o=>(o.delete(e),Po(o.transaction)))}function IA(e,t=gn()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),Po(o.transaction)))}function CA(e=gn()){return e("readwrite",t=>(t.clear(),Po(t.transaction)))}function wh(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Po(e.transaction)}function Mh(e=gn()){return e("readonly",t=>{if(t.getAllKeys)return Po(t.getAllKeys());let o=[];return wh(t,r=>o.push(r.key)).then(()=>o)})}function kA(e=gn()){return e("readonly",t=>{if(t.getAll)return Po(t.getAll());let o=[];return wh(t,r=>o.push(r.value)).then(()=>o)})}function NA(e=gn()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Po(t.getAllKeys()),Po(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>wh(r,i=>o.push([i.key,i.value])).then(()=>o))})}var Th,_n=f(()=>{"use strict";a();});var Ch={};lt(Ch,{classNameFactory:()=>ue,classNameToSelector:()=>tS,compileStyle:()=>Ih,disableStyle:()=>qo,enableStyle:()=>Io,isStyleEnabled:()=>Ph,requireStyle:()=>el,setStyleClassNames:()=>RA,styleMap:()=>eS,toggleStyle:()=>AA});function el(e){let t=eS.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Io(e){let t=el(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Ih(t),document.head.appendChild(t.dom),!0)}function qo(e){let t=el(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var eS,AA,Ph,RA,Ih,tS,ue,He=f(()=>{"use strict";a();eS=window.VencordStyles??=new Map;AA=e=>Ph(e)?qo(e):Io(e),Ph=e=>el(e).dom?.isConnected??!1,RA=(e,t,o=!0)=>{let r=el(e);r.classNames=t,o&&Ph(r.name)&&Ih(r)},Ih=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?tS(r):t})},tS=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),ue=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});var Oo,Rs,ve,Ne,we,ut,pt,kh,tl,ol,he,sr,Bn,Ke=f(()=>{"use strict";a();$();wt();Oo=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Oo||{}),Rs=Ze(':"thin")',{ModalRoot:B.componentByCode('.MODAL,"aria-labelledby":'),ModalHeader:B.componentByCode(",id:"),ModalContent:B.componentByCode(".content,"),ModalFooter:B.componentByCode(".footer,"),ModalCloseButton:B.componentByCode(".close]:")}),ve=gt(()=>Rs.ModalRoot),Ne=gt(()=>Rs.ModalHeader),we=gt(()=>Rs.ModalContent),ut=gt(()=>Rs.ModalFooter),pt=gt(()=>Rs.ModalCloseButton),kh=mo(()=>{let e=an('"Zoomed Media Modal"');if(e==null)return;let t=ht(an(e,"modalKey:"));return Object.values(t).find(o=>String(o).includes("modalKey:"))}),tl=Ze(".modalKey?",{openModalLazy:B.byCode(".modalKey?"),openModal:B.byCode(",instant:"),closeModal:B.byCode(".onCloseCallback()"),closeAllModals:B.byCode(".getState();for")}),{openModalLazy:ol,openModal:he,closeModal:sr,closeAllModals:Bn}=tl});function Nh({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var yu=f(()=>{"use strict";a()});function nl({value:e,onChange:t,validate:o}){let[r,i]=W.useState(e),[s,l]=W.useState();function c(u){i(u);let d=o(u);d===!0?(l(void 0),t(u)):l(d)}return n(m,null,n(ct,{type:"text",value:r,onChange:c,error:s}))}var vu=f(()=>{"use strict";a();S()});function rl(e){return n("div",{className:DA.markup},Ee.defaultRules.codeBlock.react(e,null,{}))}var DA,bu=f(()=>{"use strict";a();$();S();DA=R("markup","codeContainer")});var oS=f(()=>{});var nS=f(()=>{});function Me(e,t){return rS(Ln(e),t,e)}function rS(e,t,o){try{return t==null?dn.intl.string(dn.t[e]):dn.intl.format(dn.t[e],t)}catch(r){return LA.error(`Failed to get intl message for key: ${o??e}`,r),o??""}}async function Fi(e){let{invite:t}=await uh.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return G.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;G.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),G.subscribe("INVITE_MODAL_CLOSE",r=()=>{G.unsubscribe("INVITE_MODAL_CLOSE",r),G.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function Ko(){return ie.getChannel(Le.getChannelId())}function ar(){return ce.getGuild(Ko()?.guild_id)}function EA(e){za.openPrivateChannel(e)}function Ds(){return Wa.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function lr(e){On.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function Ls(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return Wo.sendMessage(e,i,o,r)}function Yo(e,t){return kh({className:"vc-image-modal",fit:"vc-position-inherit",shouldAnimateCarousel:!0,items:[{type:"IMAGE",original:e.original??e.url,...e}],...t})}async function Zo(e){if(!await go.getUser(e))throw new Error("No such user: "+e);let o=jo.getGuildId();ch.openUserProfileModal({userId:e,guildId:o,channelId:Le.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Ah(e,t){let o=Qt.getUserProfile(e);if(o)return o;G.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await bt.get({url:Pt.Endpoints.USER_PROFILE(e),query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return G.dispatch({type:"USER_UPDATE",user:r.user}),await G.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&G.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),Qt.getUserProfile(e)}function cr(e){return e.discriminator==="0"?e.username:e.tag}function xu(e,t,o){let r=Ft.getEmojiURL({id:e,animated:t,size:o});return t?r.replace(".webp",".gif"):r}var LA,Su,Pe=f(()=>{"use strict";a();nS();S();vs();Ae();Ke();LA=new V("IntlManager");Su=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Su||{})});function Nt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:z(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ui({height:e=24,width:t=24,className:o}){return n(Nt,{height:e,width:t,className:z(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none",fillRule:"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function $i(e){return n(Nt,{...e,className:z(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M3 16a1 1 0 0 1-1-1v-5a8 8 0 0 1 8-8h5a1 1 0 0 1 1 1v.5a.5.5 0 0 1-.5.5H10a6 6 0 0 0-6 6v5.5a.5.5 0 0 1-.5.5H3Z"}),n("path",{d:"M6 18a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4v-4h-3a5 5 0 0 1-5-5V6h-4a4 4 0 0 0-4 4v8Z"}),n("path",{d:"M21.73 12a3 3 0 0 0-.6-.88l-4.25-4.24a3 3 0 0 0-.88-.61V9a3 3 0 0 0 3 3h2.73Z"})))}function ur(e){return n(Nt,{...e,className:z(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function yn(e){return n(Nt,{...e,className:z(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function il(e){return n(Nt,{...e,className:z(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",d:"M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5-4.75a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm-.77 3.96a1 1 0 1 0-1.96-.42l-1.04 4.86a2.77 2.77 0 0 0 4.31 2.83l.24-.17a1 1 0 1 0-1.16-1.62l-.24.17a.77.77 0 0 1-1.2-.79l1.05-4.86Z",clipRule:"evenodd"}))}function Rh(e){return n(Nt,{"aria-label":Me("GUILD_OWNER"),...e,className:z(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Dh(e){return n(Nt,{...e,className:z(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function sl(e){return n(Nt,{...e,className:z(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function al(e){return n(Nt,{...e,className:z(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function Lh(e){return n(Nt,{...e,className:z(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function ll(e){return n(Nt,{...e,className:z(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.56 1.1c-.46.05-.7.53-.64.98.18 1.16-.19 2.2-.98 2.53-.8.33-1.79-.15-2.49-1.1-.27-.36-.78-.52-1.14-.24-.77.59-1.45 1.27-2.04 2.04-.28.36-.12.87.24 1.14.96.7 1.43 1.7 1.1 2.49-.33.8-1.37 1.16-2.53.98-.45-.07-.93.18-.99.64a11.1 11.1 0 0 0 0 2.88c.06.46.54.7.99.64 1.16-.18 2.2.19 2.53.98.33.8-.14 1.79-1.1 2.49-.36.27-.52.78-.24 1.14.59.77 1.27 1.45 2.04 2.04.36.28.87.12 1.14-.24.7-.95 1.7-1.43 2.49-1.1.8.33 1.16 1.37.98 2.53-.07.45.18.93.64.99a11.1 11.1 0 0 0 2.88 0c.46-.06.7-.54.64-.99-.18-1.16.19-2.2.98-2.53.8-.33 1.79.14 2.49 1.1.27.36.78.52 1.14.24.77-.59 1.45-1.27 2.04-2.04.28-.36.12-.87-.24-1.14-.96-.7-1.43-1.7-1.1-2.49.33-.8 1.37-1.16 2.53-.98.45.07.93-.18.99-.64a11.1 11.1 0 0 0 0-2.88c-.06-.46-.54-.7-.99-.64-1.16.18-2.2-.19-2.53-.98-.33-.8.14-1.79 1.1-2.49.36-.27.52-.78.24-1.14a11.07 11.07 0 0 0-2.04-2.04c-.36-.28-.87-.12-1.14.24-.7.96-1.7 1.43-2.49 1.1-.8-.33-1.16-1.37-.98-2.53.07-.45-.18-.93-.64-.99a11.1 11.1 0 0 0-2.88 0ZM16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",clipRule:"evenodd"}))}function OA(e){return n(Nt,{...e,className:z(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function Gi(e){return n(Nt,{...e,className:z(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function Eh(e){return n(Nt,{...e,className:z(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{fillRule:"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function cl(e){return n(Nt,{...e,className:z(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}function Oh(e){return n(Nt,{...e,className:z(e.className,"vc-safety-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M4.27 5.22A2.66 2.66 0 0 0 3 7.5v2.3c0 5.6 3.3 10.68 8.42 12.95.37.17.79.17 1.16 0A14.18 14.18 0 0 0 21 9.78V7.5c0-.93-.48-1.78-1.27-2.27l-6.17-3.76a3 3 0 0 0-3.12 0L4.27 5.22ZM6 7.68l6-3.66V12H6.22C6.08 11.28 6 10.54 6 9.78v-2.1Zm6 12.01V12h5.78A11.19 11.19 0 0 1 12 19.7Z"}))}function _h(e){return n(Nt,{...e,className:z(e.className,"vc-notes-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M8 3C7.44771 3 7 3.44772 7 4V5C7 5.55228 7.44772 6 8 6H16C16.5523 6 17 5.55228 17 5V4C17 3.44772 16.5523 3 16 3H15.1245C14.7288 3 14.3535 2.82424 14.1002 2.52025L13.3668 1.64018C13.0288 1.23454 12.528 1 12 1C11.472 1 10.9712 1.23454 10.6332 1.64018L9.8998 2.52025C9.64647 2.82424 9.27121 3 8.8755 3H8Z"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M19 4.49996V4.99996C19 6.65681 17.6569 7.99996 16 7.99996H8C6.34315 7.99996 5 6.65681 5 4.99996V4.49996C5 4.22382 4.77446 3.99559 4.50209 4.04109C3.08221 4.27826 2 5.51273 2 6.99996V19C2 20.6568 3.34315 22 5 22H19C20.6569 22 22 20.6568 22 19V6.99996C22 5.51273 20.9178 4.27826 19.4979 4.04109C19.2255 3.99559 19 4.22382 19 4.49996ZM8 12C7.44772 12 7 12.4477 7 13C7 13.5522 7.44772 14 8 14H16C16.5523 14 17 13.5522 17 13C17 12.4477 16.5523 12 16 12H8ZM7 17C7 16.4477 7.44772 16 8 16H13C13.5523 16 14 16.4477 14 17C14 17.5522 13.5523 18 13 18H8C7.44772 18 7 17.5522 7 17Z"}))}function ul(e){return n(Nt,{...e,className:z(e.className,"vc-folder-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 5a3 3 0 0 1 3-3h3.93a2 2 0 0 1 1.66.9L12 5h7a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5Z"}))}function Bh(e){return n(Nt,{...e,className:z(e.className,"vc-log-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3.11 8H6v10.82c0 .86.37 1.68 1 2.27.46.43 1.02.71 1.63.84A1 1 0 0 0 9 22h10a4 4 0 0 0 4-4v-1a2 2 0 0 0-2-2h-1V5a3 3 0 0 0-3-3H4.67c-.87 0-1.7.32-2.34.9-.63.6-1 1.42-1 2.28 0 .71.3 1.35.52 1.75a5.35 5.35 0 0 0 .48.7l.01.01h.01L3.11 7l-.76.65a1 1 0 0 0 .76.35Zm1.56-4c-.38 0-.72.14-.97.37-.24.23-.37.52-.37.81a1.69 1.69 0 0 0 .3.82H6v-.83c0-.29-.13-.58-.37-.8C5.4 4.14 5.04 4 4.67 4Zm5 13a3.58 3.58 0 0 1 0 3H19a2 2 0 0 0 2-2v-1H9.66ZM3.86 6.35ZM11 8a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2h-5Zm-1 5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1Z"}))}function pl(e){return n(Nt,{...e,className:z(e.className,"vc-restart-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 14.93-4H15a1 1 0 1 0 0 2h6a1 1 0 0 0 1-1V3a1 1 0 1 0-2 0v3a9.98 9.98 0 0 0-18 6 10 10 0 0 0 16.29 7.78 1 1 0 0 0-1.26-1.56A8 8 0 0 1 4 12Z"}))}function dl(e){return n(Nt,{...e,className:z(e.className,"vc-paintbrush-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M15.35 7.24C15.9 6.67 16 5.8 16 5a3 3 0 1 1 3 3c-.8 0-1.67.09-2.24.65a1.5 1.5 0 0 0 0 2.11l1.12 1.12a3 3 0 0 1 0 4.24l-5 5a3 3 0 0 1-4.25 0l-5.76-5.75a3 3 0 0 1 0-4.24l4.04-4.04.97-.97a3 3 0 0 1 4.24 0l1.12 1.12c.58.58 1.52.58 2.1 0ZM6.9 9.9 4.3 12.54a1 1 0 0 0 0 1.42l2.17 2.17.83-.84a1 1 0 0 1 1.42 1.42l-.84.83.59.59 1.83-1.84a1 1 0 0 1 1.42 1.42l-1.84 1.83.17.17a1 1 0 0 0 1.42 0l2.63-2.62L6.9 9.9Z"}))}function Fh(e){return n(Nt,{...e,className:z(e.className,"vc-pencil-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z"}))}function ml(e){return n(Nt,{...e,viewBox:"-3 -3 30 30"},n("path",{fill:e.fill||"currentColor",d:"M12 0C5.37 0 0 5.37 0 12c0 5.3 3.438 9.8 8.205 11.385.6.11.82-.26.82-.577v-2.17c-3.338.726-4.042-1.61-4.042-1.61-.546-1.387-1.333-1.757-1.333-1.757-1.09-.745.083-.73.083-.73 1.205.084 1.84 1.237 1.84 1.237 1.07 1.835 2.807 1.305 3.492.998.108-.775.42-1.305.763-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.467-2.38 1.235-3.22-.123-.303-.535-1.523.117-3.176 0 0 1.008-.322 3.3 1.23.957-.266 1.98-.398 3-.403 1.02.005 2.043.137 3 .403 2.29-1.552 3.297-1.23 3.297-1.23.653 1.653.24 2.873.118 3.176.77.84 1.233 1.91 1.233 3.22 0 4.61-2.803 5.625-5.475 5.92.43.37.823 1.102.823 2.222v3.293c0 .32.218.694.825.577C20.565 21.797 24 17.298 24 12c0-6.63-5.37-12-12-12z"}))}function Uh(e){return n(Nt,{...e,viewBox:"0 0 24 24"},n("path",{fill:e.fill||"currentColor",d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zM4 12c0-.899.156-1.762.431-2.569L6 11l2 2v2l2 2 1 1v1.931C7.061 19.436 4 16.072 4 12zm14.33 4.873C17.677 16.347 16.687 16 16 16v-1a2 2 0 0 0-2-2h-4v-3a2 2 0 0 0 2-2V7h1a2 2 0 0 0 2-2v-.411C17.928 5.778 20 8.65 20 12a7.947 7.947 0 0 1-1.67 4.873z"}))}var At=f(()=>{"use strict";a();oS();Pe();me()});function it(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var _o=f(()=>{"use strict";a()});var iS=f(()=>{});function zh({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:z(Tu.container,"default-colors",e?Tu.checked:void 0),style:{backgroundColor:e?$h:Gh,opacity:o?.3:1}},n("svg",{className:Tu.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(m,null,n("path",{fill:$h,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:$h,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(m,null,n("path",{fill:Gh,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:Gh,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:Tu.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var $h,Gh,Tu,Hh=f(()=>{"use strict";a();iS();me();$();$h="var(--brand-500)",Gh="var(--primary-400)",Tu=R("slider","input","container")});var jh={};lt(jh,{Badge:()=>Nh,CheckedTextInput:()=>nl,CodeBlock:()=>rl,CogWheel:()=>ll,CopyIcon:()=>$i,DeleteIcon:()=>Gi,ErrorBoundary:()=>k,ErrorCard:()=>wo,Flex:()=>ge,FolderIcon:()=>ul,GithubIcon:()=>ml,Heart:()=>Xa,ImageIcon:()=>yn,ImageInvisible:()=>al,ImageVisible:()=>sl,InfoIcon:()=>il,Link:()=>it,LinkIcon:()=>Ui,LogIcon:()=>Bh,Microphone:()=>Lh,NoEntrySignIcon:()=>cl,NotesIcon:()=>_h,OpenExternalIcon:()=>ur,OwnerCrownIcon:()=>Rh,PaintbrushIcon:()=>dl,PencilIcon:()=>Fh,PlusIcon:()=>Eh,ReplyIcon:()=>OA,RestartIcon:()=>pl,SafetyIcon:()=>Oh,ScreenshareIcon:()=>Dh,Switch:()=>zh,WebsiteIcon:()=>Uh});var Es=f(()=>{"use strict";a();yu();vu();bu();du();ne();Ei();jt();pu();At();_o();Hh()});function _A(){let e=Ot().notifications;return n("div",{style:{padding:"1em 0"}},n(b.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(wo,{style:{padding:"1em"},className:F.bottom8},n(b.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(b.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(b.FormText,{className:F.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(nn,{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:Ns}),n(b.FormTitle,{tag:"h5",className:F.top16+" "+F.bottom8},"Notification Position"),n(nn,{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:Ns}),n(b.FormTitle,{tag:"h5",className:F.top16+" "+F.bottom8},"Notification Timeout"),n(b.FormText,{className:F.bottom16},"Set to 0s to never automatically time out"),n(Ss,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(b.FormTitle,{tag:"h5",className:F.top16+" "+F.bottom8},"Notification Log Limit"),n(b.FormText,{className:F.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(Ss,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}))}function wu(){he(e=>n(ve,{...e,size:"medium"},n(Ne,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Settings"),n(pt,{onClick:e.onClose})),n(we,null,n(_A,null))))}var Wh=f(()=>{"use strict";a();_();ze();me();Ke();S();Es()});var sS,aS=f(()=>{a();sS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"});var lS,cS=f(()=>{a();aS();lS=(e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=sS[o[e]&63];return t}});async function pS(e){if(e.noPersist)return;let t=j.notifications.logLimit;t!==0&&(await Bi(Mu,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:d,...g}=e;return r.unshift({...g,timestamp:Date.now(),id:lS()}),r.length>t&&t!==200&&(r.length=t),r}),fl.forEach(o=>o()))}async function BA(e){let t=await uS(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await hn(Mu,t),fl.forEach(r=>r()))}function FA(){let[e,t]=ws(s=>s+1,0);le(()=>(fl.add(t),()=>void fl.delete(t)),[]);let[o,r,i]=St(uS,{fallbackValue:[],deps:[e]});return[o,i]}function UA({data:e}){let[t,o]=K(!1),r=W.useRef(null);return le(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:Os("wrapper",{removing:t}),ref:r},n(hu,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>BA(e.timestamp),200))},richBody:n("div",{className:Os("body")},e.body,n(lo,{timestamp:new Date(e.timestamp),className:Os("timestamp")}))}))}function $A({log:e,pending:t}){return!e.length&&!t?n("div",{className:Os("container")},n("div",{className:Os("empty")}),n(b.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:Os("container")},e.map(o=>n(UA,{data:o,key:o.id})))}function GA({modalProps:e,close:t}){let[o,r]=FA();return n(ve,{...e,size:"large"},n(Ne,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(pt,{onClick:t})),n(we,null,n($A,{log:o,pending:r})),n(ut,null,n(ge,null,n(I,{onClick:wu},"Notification Settings"),n(I,{disabled:o.length===0,color:I.Colors.RED,onClick:()=>{rt.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await hn(Mu,[]),fl.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log"))))}function gl(){let e=he(t=>n(GA,{modalProps:t,close:()=>sr(e)}))}var Mu,uS,Os,fl,Pu=f(()=>{"use strict";a();_n();_();He();jt();Wh();Ke();wt();S();cS();xh();Mu="notification-log",uS=async()=>await co(Mu)??[],Os=ue("vc-notification-log-"),fl=new Set});function jA(){if(!qh){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),qh=Ci.createRoot(e)}return qh}function WA(e,t){let o=jA();return new Promise(r=>{o.render(n(hu,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function qA(){if(typeof Notification>"u")return!1;let{useNative:e}=j.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function dS(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ye(e){if(pS(e),qA()&&await dS()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:o,icon:r,image:i});c.onclick=s,c.onclose=l}else zA.push(()=>WA(e,HA++))}var zA,qh,HA,mS=f(()=>{"use strict";a();_();qr();S();xh();Pu();zA=new Mo,HA=42});var Kh={};lt(Kh,{requestPermission:()=>dS,showNotification:()=>Ye});var pr=f(()=>{"use strict";a();mS()});function MS(e,t){return o3(e,t||{},0,0)}function PS(e,t){return VA(e,{i:2},t&&t.out,t&&t.dictionary)}var ho,Jo,t1,Iu,Cu,Qh,yS,vS,bS,Xh,SS,KA,fS,Vh,dr,Ve,Fn,Yr,Ve,Ve,Ve,Ve,vl,Ve,YA,ZA,JA,QA,Yh,vn,Zh,o1,xS,XA,fr,VA,mr,hl,Jh,e1,gS,yl,TS,hS,e3,wS,t3,o3,n3,r3,IS=f(()=>{a();ho=Uint8Array,Jo=Uint16Array,t1=Int32Array,Iu=new ho([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Cu=new ho([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Qh=new ho([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yS=function(e,t){for(var o=new Jo(31),r=0;r<31;++r)o[r]=t+=1<<e[r-1];for(var i=new t1(o[30]),r=1;r<30;++r)for(var s=o[r];s<o[r+1];++s)i[s]=s-o[r]<<5|r;return{b:o,r:i}},vS=yS(Iu,2),bS=vS.b,Xh=vS.r;bS[28]=258,Xh[258]=28;SS=yS(Cu,0),KA=SS.b,fS=SS.r,Vh=new Jo(32768);for(Ve=0;Ve<32768;++Ve)dr=(Ve&43690)>>1|(Ve&21845)<<1,dr=(dr&52428)>>2|(dr&13107)<<2,dr=(dr&61680)>>4|(dr&3855)<<4,Vh[Ve]=((dr&65280)>>8|(dr&255)<<8)>>1;Fn=function(e,t,o){for(var r=e.length,i=0,s=new Jo(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new Jo(t);for(i=1;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(o){c=new Jo(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var d=i<<4|e[i],g=t-e[i],h=l[e[i]-1]++<<g,v=h|(1<<g)-1;h<=v;++h)c[Vh[h]>>u]=d}else for(c=new Jo(r),i=0;i<r;++i)e[i]&&(c[i]=Vh[l[e[i]-1]++]>>15-e[i]);return c},Yr=new ho(288);for(Ve=0;Ve<144;++Ve)Yr[Ve]=8;for(Ve=144;Ve<256;++Ve)Yr[Ve]=9;for(Ve=256;Ve<280;++Ve)Yr[Ve]=7;for(Ve=280;Ve<288;++Ve)Yr[Ve]=8;vl=new ho(32);for(Ve=0;Ve<32;++Ve)vl[Ve]=5;YA=Fn(Yr,9,0),ZA=Fn(Yr,9,1),JA=Fn(vl,5,0),QA=Fn(vl,5,1),Yh=function(e){for(var t=e[0],o=1;o<e.length;++o)e[o]>t&&(t=e[o]);return t},vn=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Zh=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},o1=function(e){return(e+7)/8|0},xS=function(e,t,o){return(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length),new ho(e.subarray(t,o))},XA=["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"],fr=function(e,t,o){var r=new Error(t||XA[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,fr),!o)throw r;return r},VA=function(e,t,o,r){var i=e.length,s=r?r.length:0;if(!i||t.f&&!t.l)return o||new ho(0);var l=!o,c=l||t.i!=2,u=t.i;l&&(o=new ho(i*3));var d=function(Dn){var O=o.length;if(Dn>O){var J=new ho(Math.max(O*2,Dn));J.set(o),o=J}},g=t.f||0,h=t.p||0,v=t.b||0,C=t.l,w=t.d,x=t.m,N=t.n,A=i*8;do{if(!C){g=vn(e,h,1);var L=vn(e,h+1,3);if(h+=3,L)if(L==1)C=ZA,w=QA,x=9,N=5;else if(L==2){var re=vn(e,h,31)+257,te=vn(e,h+10,15)+4,Y=re+vn(e,h+5,31)+1;h+=14;for(var Z=new ho(Y),ae=new ho(19),fe=0;fe<te;++fe)ae[Qh[fe]]=vn(e,h+fe*3,7);h+=te*3;for(var xe=Yh(ae),xt=(1<<xe)-1,qe=Fn(ae,xe,1),fe=0;fe<Y;){var Ue=qe[vn(e,h,xt)];h+=Ue&15;var U=Ue>>4;if(U<16)Z[fe++]=U;else{var ot=0,Ge=0;for(U==16?(Ge=3+vn(e,h,3),h+=2,ot=Z[fe-1]):U==17?(Ge=3+vn(e,h,7),h+=3):U==18&&(Ge=11+vn(e,h,127),h+=7);Ge--;)Z[fe++]=ot}}var _e=Z.subarray(0,re),Ie=Z.subarray(re);x=Yh(_e),N=Yh(Ie),C=Fn(_e,x,1),w=Fn(Ie,N,1)}else fr(1);else{var U=o1(h)+4,H=e[U-4]|e[U-3]<<8,X=U+H;if(X>i){u&&fr(0);break}c&&d(v+H),o.set(e.subarray(U,X),v),t.b=v+=H,t.p=h=X*8,t.f=g;continue}if(h>A){u&&fr(0);break}}c&&d(v+131072);for(var Lo=(1<<x)-1,Ct=(1<<N)-1,at=h;;at=h){var ot=C[Zh(e,h)&Lo],io=ot>>4;if(h+=ot&15,h>A){u&&fr(0);break}if(ot||fr(2),io<256)o[v++]=io;else if(io==256){at=h,C=null;break}else{var so=io-254;if(io>264){var fe=io-257,Tt=Iu[fe];so=vn(e,h,(1<<Tt)-1)+bS[fe],h+=Tt}var zo=w[Zh(e,h)&Ct],Kn=zo>>4;zo||fr(3),h+=zo&15;var Ie=KA[Kn];if(Kn>3){var Tt=Cu[Kn];Ie+=Zh(e,h)&(1<<Tt)-1,h+=Tt}if(h>A){u&&fr(0);break}c&&d(v+131072);var $r=v+so;if(v<Ie){var Rn=s-Ie,eo=Math.min(Ie,$r);for(Rn+v<0&&fr(3);v<eo;++v)o[v]=r[Rn+v]}for(;v<$r;++v)o[v]=o[v-Ie]}}t.l=C,t.p=at,t.b=v,t.f=g,C&&(g=1,t.m=x,t.d=w,t.n=N)}while(!g);return v!=o.length&&l?xS(o,0,v):o.subarray(0,v)},mr=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>8},hl=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>8,e[r+2]|=o>>16},Jh=function(e,t){for(var o=[],r=0;r<e.length;++r)e[r]&&o.push({s:r,f:e[r]});var i=o.length,s=o.slice();if(!i)return{t:wS,l:0};if(i==1){var l=new ho(o[0].s+1);return l[o[0].s]=1,{t:l,l:1}}o.sort(function(X,re){return X.f-re.f}),o.push({s:-1,f:25001});var c=o[0],u=o[1],d=0,g=1,h=2;for(o[0]={s:-1,f:c.f+u.f,l:c,r:u};g!=i-1;)c=o[o[d].f<o[h].f?d++:h++],u=o[d!=g&&o[d].f<o[h].f?d++:h++],o[g++]={s:-1,f:c.f+u.f,l:c,r:u};for(var v=s[0].s,r=1;r<i;++r)s[r].s>v&&(v=s[r].s);var C=new Jo(v+1),w=e1(o[g-1],C,0);if(w>t){var r=0,x=0,N=w-t,A=1<<N;for(s.sort(function(re,te){return C[te.s]-C[re.s]||re.f-te.f});r<i;++r){var L=s[r].s;if(C[L]>t)x+=A-(1<<w-C[L]),C[L]=t;else break}for(x>>=N;x>0;){var U=s[r].s;C[U]<t?x-=1<<t-C[U]++-1:++r}for(;r>=0&&x;--r){var H=s[r].s;C[H]==t&&(--C[H],++x)}w=t}return{t:new ho(C),l:w}},e1=function(e,t,o){return e.s==-1?Math.max(e1(e.l,t,o+1),e1(e.r,t,o+1)):t[e.s]=o},gS=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new Jo(++t),r=0,i=e[0],s=1,l=function(u){o[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[c]}return{c:o.subarray(0,r),n:t}},yl=function(e,t){for(var o=0,r=0;r<t.length;++r)o+=e[r]*t[r];return o},TS=function(e,t,o){var r=o.length,i=o1(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<r;++s)e[i+s+4]=o[s];return(i+4+r)*8},hS=function(e,t,o,r,i,s,l,c,u,d,g){mr(t,g++,o),++i[256];for(var h=Jh(i,15),v=h.t,C=h.l,w=Jh(s,15),x=w.t,N=w.l,A=gS(v),L=A.c,U=A.n,H=gS(x),X=H.c,re=H.n,te=new Jo(19),Y=0;Y<L.length;++Y)++te[L[Y]&31];for(var Y=0;Y<X.length;++Y)++te[X[Y]&31];for(var Z=Jh(te,7),ae=Z.t,fe=Z.l,xe=19;xe>4&&!ae[Qh[xe-1]];--xe);var xt=d+5<<3,qe=yl(i,Yr)+yl(s,vl)+l,Ue=yl(i,v)+yl(s,x)+l+14+3*xe+yl(te,ae)+2*te[16]+3*te[17]+7*te[18];if(u>=0&&xt<=qe&&xt<=Ue)return TS(t,g,e.subarray(u,u+d));var ot,Ge,_e,Ie;if(mr(t,g,1+(Ue<qe)),g+=2,Ue<qe){ot=Fn(v,C,0),Ge=v,_e=Fn(x,N,0),Ie=x;var Lo=Fn(ae,fe,0);mr(t,g,U-257),mr(t,g+5,re-1),mr(t,g+10,xe-4),g+=14;for(var Y=0;Y<xe;++Y)mr(t,g+3*Y,ae[Qh[Y]]);g+=3*xe;for(var Ct=[L,X],at=0;at<2;++at)for(var io=Ct[at],Y=0;Y<io.length;++Y){var so=io[Y]&31;mr(t,g,Lo[so]),g+=ae[so],so>15&&(mr(t,g,io[Y]>>5&127),g+=io[Y]>>12)}}else ot=YA,Ge=Yr,_e=JA,Ie=vl;for(var Y=0;Y<c;++Y){var Tt=r[Y];if(Tt>255){var so=Tt>>18&31;hl(t,g,ot[so+257]),g+=Ge[so+257],so>7&&(mr(t,g,Tt>>23&31),g+=Iu[so]);var zo=Tt&31;hl(t,g,_e[zo]),g+=Ie[zo],zo>3&&(hl(t,g,Tt>>5&8191),g+=Cu[zo])}else hl(t,g,ot[Tt]),g+=Ge[Tt]}return hl(t,g,ot[256]),g+Ge[256]},e3=new t1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),wS=new ho(0),t3=function(e,t,o,r,i,s){var l=s.z||e.length,c=new ho(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),d=s.l,g=(s.r||0)&7;if(t){g&&(u[0]=s.r>>3);for(var h=e3[t-1],v=h>>13,C=h&8191,w=(1<<o)-1,x=s.p||new Jo(32768),N=s.h||new Jo(w+1),A=Math.ceil(o/3),L=2*A,U=function(ye){return(e[ye]^e[ye+1]<<A^e[ye+2]<<L)&w},H=new t1(25e3),X=new Jo(288),re=new Jo(32),te=0,Y=0,Z=s.i||0,ae=0,fe=s.w||0,xe=0;Z+2<l;++Z){var xt=U(Z),qe=Z&32767,Ue=N[xt];if(x[qe]=Ue,N[xt]=qe,fe<=Z){var ot=l-Z;if((te>7e3||ae>24576)&&(ot>423||!d)){g=hS(e,u,0,H,X,re,Y,ae,xe,Z-xe,g),ae=te=Y=0,xe=Z;for(var Ge=0;Ge<286;++Ge)X[Ge]=0;for(var Ge=0;Ge<30;++Ge)re[Ge]=0}var _e=2,Ie=0,Lo=C,Ct=qe-Ue&32767;if(ot>2&&xt==U(Z-Ct))for(var at=Math.min(v,ot)-1,io=Math.min(32767,Z),so=Math.min(258,ot);Ct<=io&&--Lo&&qe!=Ue;){if(e[Z+_e]==e[Z+_e-Ct]){for(var Tt=0;Tt<so&&e[Z+Tt]==e[Z+Tt-Ct];++Tt);if(Tt>_e){if(_e=Tt,Ie=Ct,Tt>at)break;for(var zo=Math.min(Ct,Tt-2),Kn=0,Ge=0;Ge<zo;++Ge){var $r=Z-Ct+Ge&32767,Rn=x[$r],eo=$r-Rn&32767;eo>Kn&&(Kn=eo,Ue=$r)}}}qe=Ue,Ue=x[qe],Ct+=qe-Ue&32767}if(Ie){H[ae++]=268435456|Xh[_e]<<18|fS[Ie];var Dn=Xh[_e]&31,O=fS[Ie]&31;Y+=Iu[Dn]+Cu[O],++X[257+Dn],++re[O],fe=Z+_e,++te}else H[ae++]=e[Z],++X[e[Z]]}}for(Z=Math.max(Z,fe);Z<l;++Z)H[ae++]=e[Z],++X[e[Z]];g=hS(e,u,d,H,X,re,Y,ae,xe,Z-xe,g),d||(s.r=g&7|u[g/8|0]<<3,g-=7,s.h=N,s.p=x,s.i=Z,s.w=fe)}else{for(var Z=s.w||0;Z<l+d;Z+=65535){var J=Z+65535;J>=l&&(u[g/8|0]=d,J=l),g=TS(u,g+1,e.subarray(Z,J))}s.i=l}return xS(c,0,r+o1(g)+i)},o3=function(e,t,o,r,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),l=new ho(s.length+e.length);l.set(s),l.set(e,s.length),e=l,i.w=s.length}return t3(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,o,r,i)};n3=typeof TextDecoder<"u"&&new TextDecoder,r3=0;try{n3.decode(wS,{stream:!0}),r3=1}catch{}});async function CS(){let e=await co("Vencord_cloudSecret")??{},t=n1();return e[t]?(await Bi("Vencord_cloudSecret",o=>(o??={},o[`${t}:${bl()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${bl()}`]}async function i3(e){await Bi("Vencord_cloudSecret",t=>(t??={},t[`${n1()}:${bl()}`]=e,t))}async function Nu(){await Bi("Vencord_cloudSecret",e=>(e??={},delete e[`${n1()}:${bl()}`],e))}async function r1(){if(await CS()!==void 0){j.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",Zr()));var{clientId:e,redirectUri:t}=await o.json()}catch{Ye({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),j.cloud.authenticated=!1;return}he(o=>n(Pi,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){j.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(ku.info("Authorized with secret"),await i3(s),Ye({title:"Cloud Integration",body:"Cloud integrations enabled!"}),j.cloud.authenticated=!0):(Ye({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),j.cloud.authenticated=!1)}catch(i){ku.error("Failed to authorize",i),Ye({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),j.cloud.authenticated=!1}}}))}async function _s(){let e=await CS();return window.btoa(`${e}:${bl()}`)}var ku,Zr,n1,bl,i1=f(()=>{"use strict";a();_n();pr();_();S();Ae();Ke();ku=new V("Cloud","#39b7e0"),Zr=()=>new URL(j.cloud.url),n1=()=>Zr().origin,bl=()=>{let e=D.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function Co(){window.DiscordNative.app.relaunch()}function Au(e){window.DiscordNative.fileManager.showItemInFolder(e)}var gr=f(()=>{"use strict";a()});function kS(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var s1=f(()=>{"use strict";a()});async function NS(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(Un,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 AS({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 RS(){let e=`vencord-settings-backup-${jr().format("YYYY-MM-DD")}.json`,t=await AS(),o=new TextEncoder().encode(t);DiscordNative.fileManager.saveWithDialog(o,e)}async function LS(e=!0){{let[t]=await DiscordNative.fileManager.openFiles({filters:[{name:"Vencord Settings Backup",extensions:["json"]},{name:"all",extensions:["*"]}]});if(t)try{await NS(new TextDecoder().decode(t.data)),e&&s3()}catch(o){new V("SettingsSync").error(o),e&&a3(o)}}}async function Bs(e){let t=await AS({minify:!0});try{let o=await fetch(new URL("/v1/settings",Zr()),{method:"PUT",headers:{Authorization:await _s(),"Content-Type":"application/octet-stream"},body:MS(new TextEncoder().encode(t))});if(!o.ok){bn.error(`Failed to sync up, API returned ${o.status}`),Ye({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();Un.cloud.settingsSyncVersion=r,VencordNative.settings.set(Un),bn.info("Settings uploaded to cloud successfully"),e&&Ye({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){bn.error("Failed to sync up",o),Ye({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function Ru(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",Zr()),{method:"GET",headers:{Authorization:await _s(),Accept:"application/octet-stream","If-None-Match":j.cloud.settingsSyncVersion.toString()}});if(o.status===404)return bn.info("No settings on the cloud"),e&&Ye({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return bn.info("Settings up to date"),e&&Ye({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return bn.error(`Failed to sync down, API returned ${o.status}`),Ye({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=j.cloud.settingsSyncVersion;if(!t&&r<i){e&&Ye({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await o.arrayBuffer(),l=new TextDecoder().decode(PS(new Uint8Array(s)));return await NS(l),Un.cloud.settingsSyncVersion=r,VencordNative.settings.set(Un),bn.info("Settings loaded from cloud successfully"),e&&Ye({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Co,noPersist:!0}),!0}catch(o){return bn.error("Failed to sync down",o),Ye({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${o.toString()}).`,color:"var(--red-360)"}),!1}}async function ES(){try{let e=await fetch(new URL("/v1/settings",Zr()),{method:"DELETE",headers:{Authorization:await _s()}});if(!e.ok){bn.error(`Failed to delete, API returned ${e.status}`),Ye({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}bn.info("Settings deleted from cloud successfully"),Ye({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){bn.error("Failed to delete",e),Ye({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var DS,s3,a3,bn,Sl=f(()=>{"use strict";a();pr();_();S();IS();i1();Ae();gr();s1();DS=(e,t)=>ee.show({type:e,message:t,id:ee.genId()}),s3=()=>DS(ee.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),a3=e=>DS(ee.Type.FAILURE,`Failed to import settings: ${String(e)}`);bn=new V("Cloud:Settings","#39b7e0")});function y(e){return e}var T=f(()=>{"use strict";a()});var c1={};lt(c1,{PlainSettings:()=>Un,Settings:()=>j,SettingsStore:()=>Wt,definePluginSettings:()=>P,migratePluginSetting:()=>l1,migratePluginSettings:()=>hr,useSettings:()=>Ot});function Ot(e){let[,t]=W.useReducer(()=>({}),{});return le(()=>e?(e.forEach(o=>Wt.addChangeListener(o,t)),()=>e.forEach(o=>Wt.removeChangeListener(o,t))):(Wt.addGlobalChangeListener(t),()=>Wt.removeGlobalChangeListener(t)),[e]),Wt.store}function hr(e,...t){let{plugins:o}=Wt.plain;if(!(e in o)){for(let r of t)if(r in o){l3.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],Wt.markAsChanged();break}}}function l1(e,t,o){let r=Wt.plain.plugins[e];r&&(!Object.hasOwn(r,t)||Object.hasOwn(r,o)||(r[o]=r[t],delete r[t],Wt.markAsChanged()))}function P(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return j.plugins[o.pluginName]},get plain(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return Un.plugins[o.pluginName]},use:r=>Ot(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var l3,c3,a1,u3,Wt,Un,j,_=f(()=>{"use strict";a();Oi();Qb();fu();Ae();gu();Sl();T();S();$n();l3=new V("Settings"),c3={autoUpdate:!0,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],eagerPatches:!1,enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}},a1=VencordNative.settings.get();As(a1,c3);u3=Eo(async()=>{j.cloud.settingsSync&&j.cloud.authenticated&&(await Bs(),delete _i.Vencord_settingsDirty)},6e4),Wt=new mu(a1,{readOnly:!0,getDefaultValue({target:e,key:t,path:o}){let r=e[t];if(!je)return r;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 r;if("default"in s)return e[t]=s.default;if(s.type===4){let l=s.options.find(c=>c.default);return l&&(e[t]=l.value),l?.value}}}return r}});Wt.addGlobalChangeListener((e,t)=>{Wt.plain.cloud.settingsSyncVersion=Date.now(),_i.Vencord_settingsDirty=!0,u3(),VencordNative.settings.set(Wt.plain,t)});Un=a1,j=Wt.store});var OS=f(()=>{});var m1={};lt(m1,{currentNotice:()=>xl,nextNotice:()=>_S,noticesQueue:()=>p1,popNotice:()=>p3,showNotice:()=>d1});function p3(){u1.dismiss()}function _S(){xl=p1.shift(),xl&&u1.show(...xl,"VencordNotice")}function d1(e,t,o){p1.push(["GENERIC",e,t,o]),xl||_S()}var u1,p1,xl,f1=f(()=>{"use strict";a();$();Xe(e=>e.show&&e.dismiss&&!e.suppressAll,e=>u1=e);p1=[],xl=null});var BS=f(()=>{});function FS(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function wl(e,t,o=!1){let r=jr.duration(e,t),i=b3.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;u<i.length;u++)if(!(i[u].amount===0||!(u+1<i.length))){for(let d=u+1;d<i.length;d++)if(i[d].amount!==0)continue e;s=i.length-(u+1)}i=s===0?i:i.slice(0,-s);let l=i.findIndex(({unit:u})=>u==="days");if(l!==-1){let u=i[l],d=u.amount%7;d===0?i.splice(l,1):u.amount=d}let c="";for(;i.length;){let{amount:u,unit:d}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${FS(d,u===1,o)}`)}return c.length?c:`0 ${FS(t,!1,o)}`}function S3(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i<o;i++)r+=t(e[i]),o-i>2?r+=", ":o-i>1&&(r+=" and ");return r}function zi(e,t){let o="```";return`${o}${t||""}
|
|
${e.replaceAll("```","\\`\\`\\`")}
|
|
${o}`}function x3(e,...t){let o=String.raw({raw:e},...t),r=o.match(/^[ \t]*(?=\S)/gm);if(!r)return o.trim();let i=r.reduce((s,l)=>Math.min(s,l.length),1/0);return o.replace(new RegExp(`^[ \\t]{${i}}`,"gm"),"").trim()}function T3(e){return"``"+Tl+e.replaceAll("`",Tl+"`"+Tl)+Tl+"``"}var Sn,d3,m3,g1,f3,g3,h3,y3,v3,ko,b3,Tl,Qo=f(()=>{"use strict";a();S();Sn=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),d3=e=>e.toLowerCase().split("_"),m3=e=>e.toLowerCase().split("-"),g1=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),f3=e=>e.toLowerCase().split(" "),g3=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),h3=e=>e.join("_").toUpperCase(),y3=e=>e.join("-").toLowerCase(),v3=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),ko=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),b3=["years","months","weeks","days","hours","minutes","seconds"];Tl="\u200B"});function Ml(){return`-${To.fromTimestamp(Date.now())}`}function mt(e,t){let o=w3({channelId:e,content:"",embeds:[]});return Wo.receiveMessage(e,As(t,o)),t}function qt(e,t,o){return e.find(r=>r.name===t)?.value??o}var w3,h1=f(()=>{"use strict";a();gu();$();S();w3=Ce('username:"Clyde"')});var Fs,yr,y1,v1=f(()=>{"use strict";a();Fs=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(Fs||{}),yr=(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))(yr||{}),y1=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(y1||{})});var x1={};lt(x1,{ApplicationCommandInputType:()=>yr,ApplicationCommandOptionType:()=>Fs,ApplicationCommandType:()=>y1,BUILT_IN:()=>Gn,OptionalMessageOption:()=>zn,RequiredMessageOption:()=>Pl,_handleCommand:()=>P3,_init:()=>M3,commands:()=>b1,findOption:()=>qt,generateId:()=>Ml,prepareOption:()=>S1,registerCommand:()=>Us,sendBotMessage:()=>mt,unregisterCommand:()=>Il});function S1(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===US?r[o]=zn:t===$S&&(r[o]=Pl),t.choices?.forEach(i=>i.displayName||=i.name),S1(r[o])}),e}function I3(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,options:o.options!==void 0?o.options:void 0,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};Us(r,t)})}function Us(e,t){if(!Gn){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Gn.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??=`-${Gn.length+GS+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,S1(e),e.options?.[0]?.type===1){I3(e,t);return}b1[e.name]=e,Gn.push(e)}function Il(e){let t=Gn.findIndex(o=>o.name===e);return t===-1?!1:(Gn.splice(t,1),delete b1[e],!0)}var Gn,b1,US,$S,zn,Pl,GS,M3,P3,rn=f(()=>{"use strict";a();Ae();Qo();h1();v1();h1();v1();b1={},US=Symbol("OptionalMessageOption"),$S=Symbol("RequiredMessageOption"),zn=US,Pl=$S,M3=function(e){try{Gn=e,zn=e.find(t=>(t.untranslatedName||t.displayName)==="shrug").options[0],Pl=e.find(t=>(t.untranslatedName||t.displayName)==="me").options[0],GS=Math.abs(Gn.map(t=>Number(t.id)).sort((t,o)=>t-o)[0])-Gn.length}catch(t){new V("CommandsAPI").error("Failed to load CommandsApi",t," - cmds is",e)}return e},P3=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),mt(o.channel.id,{content:`${s}:
|
|
${zi(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var xn,$s=f(()=>{a();xn="d753478"});var Hi,zS=f(()=>{a();Hi="Vendicated/Vencord"});var oG,T1=f(()=>{"use strict";a();$s();zS();oG=`Vencord/${xn}${Hi?` (https://github.com/${Hi})`:""}`});function HS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=W.useState(l??!1),[d,g]=W.useState(null);W.useEffect(()=>{s(d!==null)},[d]);function h(v){let C=e.isValid?.call(o,v)??!0;typeof C=="string"?g(C):C?(g(null),u(v),i(v)):g("Invalid input provided.")}return n(b.FormSection,null,n(fo,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},ko(Sn(r))),d&&n(b.FormText,{style:{color:"var(--text-danger)"}},d))}var jS=f(()=>{"use strict";a();Qo();S()});function WS({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var qS=f(()=>{"use strict";a()});function w1({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=W.useState(`${t[r]??e.default??0}`),[d,g]=W.useState(null);W.useEffect(()=>{s(d!==null)},[d]);function h(v){let C=e.isValid?.call(o,v)??!0;g(null),typeof C=="string"?g(C):C||g("Invalid input provided."),e.type===1&&BigInt(v)>=C3?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return n(b.FormSection,null,n(b.FormTitle,null,ko(Sn(r))),n(b.FormText,{className:F.bottom20,type:"description"},e.description),n(ct,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),d&&n(b.FormText,{style:{color:"var(--text-danger)"}},d))}var C3,KS=f(()=>{"use strict";a();ze();Qo();T();S();C3=BigInt(Number.MAX_SAFE_INTEGER)});function YS({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=W.useState(l??null),[d,g]=W.useState(null);W.useEffect(()=>{i(d!==null)},[d]);function h(v){let C=e.isValid?.call(o,v)??!0;typeof C=="string"?g(C):C?(g(null),u(v),r(v)):g("Invalid input provided.")}return n(b.FormSection,null,n(b.FormTitle,null,ko(Sn(s))),n(b.FormText,{className:F.bottom16,type:"description"},e.description),n(nn,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),d&&n(b.FormText,{style:{color:"var(--text-danger)"}},d))}var ZS=f(()=>{"use strict";a();ze();Qo();S()});function Vt(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function JS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=W.useState(null);W.useEffect(()=>{s(c!==null)},[c]);function d(g){let h=e.isValid?.call(o,g)??!0;typeof h=="string"?u(h):h?(u(null),i(g)):u("Invalid input provided.")}return n(b.FormSection,null,n(b.FormTitle,null,ko(Sn(r))),n(b.FormText,{className:F.bottom20,type:"description"},e.description),n(Ss,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:d,onValueRender:g=>String(g.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var M1=f(()=>{"use strict";a();ze();Qo();S()});function QS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=W.useState(t[r]??e.default??null),[u,d]=W.useState(null);W.useEffect(()=>{s(u!==null)},[u]);function g(h){let v=e.isValid?.call(o,h)??!0;d(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return n(b.FormSection,null,n(b.FormTitle,null,ko(Sn(r))),n(b.FormText,{className:F.bottom20,type:"description"},e.description),n(ct,{type:"text",value:l,onChange:g,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,maxLength:null,...e.componentProps}),u&&n(b.FormText,{style:{color:"var(--text-danger)"}},u))}var XS=f(()=>{"use strict";a();ze();Qo();S()});var vr=f(()=>{"use strict";a();yu();jS();qS();KS();ZS();M1();XS()});var VS=f(()=>{});function k3(){let e=Ds()===2?"#000000":"#FFFFFF";return n(ml,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function N3(){let e=Ds()===2?"#000000":"#FFFFFF";return n(Uh,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function e2({text:e,href:t,Icon:o}){return n(oe,{text:e},r=>n(Ga,{...r,href:t},n(o,null)))}var Du,Lu,P1=f(()=>{"use strict";a();VS();Pe();S();Es();Du=e=>n(e2,{...e,Icon:N3}),Lu=e=>n(e2,{...e,Icon:k3})});function o2(e){let t=new R3({username:e.username,id:e.id??Ml(),avatar:e.avatar,bot:!0});return G.dispatch({type:"USER_UPDATE",user:t}),t}function n2({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=W.useState([]),l=Ot().plugins[e.name],[c,u]=W.useState({}),[d,g]=W.useState({}),[h,v]=W.useState(null),C=()=>Object.values(d).every(U=>!U),w=!!(l&&e.options&&!nr(e.options));W.useEffect(()=>{(async()=>{for(let U of e.authors.slice(0,6)){let H=U.id?await go.getUser(`${U.id}`).catch(()=>o2({username:U.name})):o2({username:U.name});s(X=>[...X,H])}})()},[e.authors]);async function x(){if(!e.options){o();return}if(e.beforeSave){let H=await Promise.resolve(e.beforeSave(c));if(H!==!0){v(H);return}}let U=!1;for(let[H,X]of Object.entries(c)){let re=e.options[H];l[H]=X,re.type!==7&&re?.restartNeeded&&(U=!0)}U&&t(),o()}function N(){if(!w||!e.options)return n(b.FormText,null,"There are no settings for this plugin.");{let U=Object.entries(e.options).map(([H,X])=>{if(X.type===7||X.hidden)return null;function re(Z){u(ae=>({...ae,[H]:Z}))}function te(Z){g(ae=>({...ae,[H]:Z}))}let Y=D3[X.type];return n(Y,{id:H,key:H,option:X,onChange:re,onError:te,pluginSettings:l,definedSettings:e.settings})});return n(ge,{flexDirection:"column",style:{gap:12,marginBottom:16}},U)}}function A(U,H){let X=e.authors.length-H,re=e.authors.length-X,te=re+e.authors.length-H;return n(oe,{text:e.authors.slice(re,te).map(Y=>Y.name).join(", ")},({onMouseEnter:Y,onMouseLeave:Z})=>n("div",{className:I1.moreUsers,onMouseEnter:Y,onMouseLeave:Z},"+",X))}let L=zs[e.name];return n(ve,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Ne,{separator:!1},n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(pt,{onClick:o})),n(we,null,n(b.FormSection,null,n(ge,{className:t2("info")},n(b.FormText,{className:t2("description")},e.description),!L.userPlugin&&n("div",{className:"vc-settings-modal-links"},n(Du,{text:"View more info",href:`https://vencord.dev/plugins/${e.name}`}),n(Lu,{text:"View source code",href:`https://github.com/${Hi}/tree/main/src/plugins/${L.folderName}`}))),n(b.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(A3,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:A,renderUser:U=>n(er,{className:I1.clickableAvatar,onClick:()=>Gs(U)},n("img",{className:I1.avatar,src:U.getAvatarURL(void 0,80,!0),alt:U.username,title:U.username}))}))),!!e.settingsAboutComponent&&n("div",{className:z(F.bottom8,"vc-text-selectable")},n(b.FormSection,null,n(k,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:c})))),n(b.FormSection,{className:F.bottom16},n(b.FormTitle,{tag:"h3"},"Settings"),N())),w&&n(ut,null,n(ge,{flexDirection:"column",style:{width:"100%"}},n(ge,{style:{marginLeft:"auto"}},n(I,{onClick:o,size:I.Sizes.SMALL,color:I.Colors.PRIMARY,look:I.Looks.LINK},"Cancel"),n(oe,{text:"You must fix all errors before saving",shouldShow:!C()},({onMouseEnter:U,onMouseLeave:H})=>n(I,{size:I.Sizes.SMALL,color:I.Colors.BRAND,onClick:x,onMouseEnter:U,onMouseLeave:H,disabled:!C()},"Save & Close"))),h&&n(Q,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}function Jr(e,t){he(o=>n(n2,{...o,plugin:e,onRestartNeeded:()=>t?.(e.name)}))}var t2,A3,I1,R3,D3,Cl=f(()=>{"use strict";a();BS();rn();_();He();ne();jt();T1();So();ze();me();Ke();T();$();S();$n();vr();Eu();P1();t2=ue("vc-plugin-modal-"),A3=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),I1=R("moreUsers","emptyUser","avatarContainer","clickableAvatar"),R3=Dt(()=>D.getCurrentUser().constructor);D3={0:QS,1:w1,2:w1,3:HS,4:YS,5:JS,6:WS,7:()=>null}});var r2=f(()=>{});function Ou({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:d,onMouseLeave:g}){let h=Mt(null),v=Mt(null);return n("div",{className:Qr("card",{"card-disabled":e}),onMouseEnter:d,onMouseLeave:g},n("div",{className:Qr("header")},n("div",{className:Qr("name-author")},n(Q,{variant:"text-md/bold",className:Qr("name")},n("div",{ref:v,className:Qr("title-container")},n("div",{ref:h,className:Qr("title"),onMouseOver:()=>{let C=h.current,w=v.current;C.style.setProperty("--offset",`${w.clientWidth-C.scrollWidth}px`),C.style.setProperty("--duration",`${Math.max(.5,(C.scrollWidth-w.clientWidth)/7)}s`)}},o)),t&&n(Nh,{text:"NEW",color:"#ED4245"})),!!s&&n(Q,{variant:"text-md/normal",className:Qr("author")},s)),r,n(zh,{checked:l,onChange:c,disabled:e})),n(Q,{className:Qr("note"),variant:"text-sm/normal"},u),i)}var Qr,C1=f(()=>{"use strict";a();r2();He();yu();Hh();S();Qr=ue("vc-addon-")});var i2=f(()=>{});var s2=f(()=>{});var N1={};lt(N1,{UpdateLogger:()=>Wi,changes:()=>Xr,checkForUpdates:()=>br,getRepo:()=>k1,isNewer:()=>kl,isOutdated:()=>ji,maybePromptToUpdate:()=>Nl,update:()=>Vr,updateError:()=>Hs});async function _u(e){let t=await e;if(t.ok)return t.value;throw Hs=t.error,t.error}async function br(){return Xr=await _u(VencordNative.updater.getUpdates()),Xr.some(e=>e.hash===xn)?(kl=!0,ji=!1):ji=Xr.length>0}async function Vr(){if(!ji)return!0;let e=await _u(VencordNative.updater.update());if(e&&(ji=!1,!await _u(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Nl(e,t=!1){try{if(await br()){let r=confirm(e);if(r&&kl)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Vr(),Co())}}catch(o){Wi.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Wi,ji,kl,Hs,Xr,k1,qi=f(()=>{"use strict";a();$s();Ae();gr();Wi=new V("Updater","white"),ji=!1,kl=!1;k1=()=>_u(VencordNative.updater.getRepo())});function a2(){Nl("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var l2=f(()=>{"use strict";a();qi()});function Ki(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Al=f(()=>{"use strict";a()});function Xo({title:e,children:t}){return n(b.FormSection,null,n(Q,{variant:"heading-lg/semibold",tag:"h2",className:F.bottom16},e),t)}function Bo(e,t){return k.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:A1})}var A1,Sr=f(()=>{"use strict";a();i2();s2();ne();l2();ze();Al();S();A1=Ki(a2)});var Rl,R1=f(()=>{"use strict";a();Rl=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var c2=f(()=>{});var _1={};lt(_1,{ChatBarButton:()=>Vo,_injectButtons:()=>E3,addChatBarButton:()=>E1,removeChatBarButton:()=>O1});function E3(e,t){if(!t.disabled)for(let[o,r]of L1)e.push(n(k,{noop:!0,key:o,onError:i=>L3.error(`Failed to render ${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var D1,L1,L3,E1,O1,Vo,xr=f(()=>{"use strict";a();c2();ne();Ae();$();S();Xe(["buttonContainer","channelTextArea"],e=>D1=e);L1=new Map,L3=new V("ChatButtons");E1=(e,t)=>L1.set(e,t),O1=e=>L1.delete(e),Vo=k.wrap(e=>n(oe,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("div",{className:`expression-picker-chat-input-button ${D1?.buttonContainer??""} vc-chatbar-button`},n(I,{"aria-label":e.tooltip,size:"",look:I.Looks.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${tu.button} ${D1?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,onAuxClick:e.onAuxClick,...e.buttonProps},n("div",{className:tu.buttonWrapper},e.children)))),{noop:!0})});var $1={};lt($1,{_usePatchContextMenu:()=>B3,addContextMenuPatch:()=>F1,addGlobalContextMenuPatch:()=>O3,findGroupChildrenByChildId:()=>dt,globalPatches:()=>Bu,navPatches:()=>Dl,removeContextMenuPatch:()=>U1,removeGlobalContextMenuPatch:()=>_3});function F1(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=Dl.get(o);r||(r=new Set,Dl.set(o,r)),r.add(t)}}function O3(e){Bu.add(e)}function U1(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Dl.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function _3(e){return Bu.delete(e)}function dt(e,t,o=!1){for(let r of t){if(r==null)continue;if(Array.isArray(r)){let s=dt(e,r,o);if(s!==null)return s}if(Array.isArray(e)&&e.some(s=>o?r.props?.id?.includes(s):r.props?.id===s)||(o?r.props?.id?.includes(e):r.props?.id===e))return t;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=dt(e,i,o);if(s!==null)return s}}return null}function B3(e){e={...e,children:B1(e.children)},e.contextMenuAPIArguments??=[];let t=Dl.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{o(e.children,...e.contextMenuAPIArguments)}catch(r){u2.error(`Patch for ${e.navId} errored,`,r)}for(let o of Bu)try{o(e.navId,e.children,...e.contextMenuAPIArguments)}catch(r){u2.error("Global patch errored,",r)}return e}function B1(e){return Array.isArray(e)?e.map(B1):(W.isValidElement(e)&&(e=W.cloneElement(e),e?.props?.children&&(e.type!==E.MenuControlItem||e.type===E.MenuControlItem&&e.props.control!=null)&&(e.props.children=B1(e.props.children))),e)}var u2,Dl,Bu,No=f(()=>{"use strict";a();Ae();S();u2=new V("ContextMenu"),Dl=new Map,Bu=new Set});var G1={};lt(G1,{__getDecorators:()=>F3,addMemberListDecorator:()=>Yi,decoratorsFactories:()=>Fu,removeMemberListDecorator:()=>Zi});function Yi(e,t,o){Fu.set(e,{render:t,onlyIn:o})}function Zi(e){Fu.delete(e)}function F3(e){let t=!!e.guildId,o=Array.from(Fu.entries(),([r,{render:i,onlyIn:s}])=>s==="guilds"&&!t||s==="dms"&&t?null:n(k,{noop:!0,key:r,message:`Failed to render ${r} Member List Decorator`},n(i,{...e})));return n("div",{className:"vc-member-list-decorators-wrapper"},o)}var Fu,Ll=f(()=>{"use strict";a();ne();Fu=new Map});var z1={};lt(z1,{_modifyAccessories:()=>U3,accessories:()=>Uu,addMessageAccessory:()=>El,removeMessageAccessory:()=>Ol});function El(e,t,o){Uu.set(e,{render:t,position:o})}function Ol(e){Uu.delete(e)}function U3(e,t){for(let[o,r]of Uu.entries()){let i=n(k,{message:`Failed to render ${o} Message Accessory`,key:o},n(r.render,{...t}));e.splice(r.position!=null?r.position<0?e.length+r.position:r.position:e.length,0,i)}return e}var Uu,$u=f(()=>{"use strict";a();ne();Uu=new Map});var H1={};lt(H1,{__addDecorationsToMessage:()=>$3,addMessageDecoration:()=>Ji,decorationsFactories:()=>Gu,removeMessageDecoration:()=>Qi});function Ji(e,t){Gu.set(e,t)}function Qi(e){Gu.delete(e)}function $3(e){let t=Array.from(Gu.entries(),([o,r])=>n(k,{noop:!0,message:`Failed to render ${o} Message Decoration`,key:o},n(r,{...e})));return n("div",{className:"vc-message-decorations-wrapper"},t)}var Gu,_l=f(()=>{"use strict";a();ne();Gu=new Map});var J1={};lt(J1,{_handleClick:()=>H3,_handlePreEdit:()=>z3,_handlePreSend:()=>G3,addMessageClickListener:()=>Y1,addMessagePreEditListener:()=>Bl,addMessagePreSendListener:()=>Xi,removeMessageClickListener:()=>Z1,removeMessagePreEditListener:()=>Fl,removeMessagePreSendListener:()=>Vi});async function G3(e,t,o,r){o.replyOptions=r;for(let i of W1)try{if((await i(e,t,o))?.cancel)return!0}catch(s){j1.error(`MessageSendHandler: Listener encountered an unknown error
|
|
`,s)}return!1}async function z3(e,t,o){for(let r of q1)try{if((await r(e,t,o))?.cancel)return!0}catch(i){j1.error(`MessageEditHandler: Listener encountered an unknown error
|
|
`,i)}return!1}function Xi(e){return W1.add(e),e}function Bl(e){return q1.add(e),e}function Vi(e){return W1.delete(e)}function Fl(e){return q1.delete(e)}function H3(e,t,o){e=Jt.getMessage(t.id,e.id)??e;for(let r of K1)try{r(e,t,o)}catch(i){j1.error(`MessageClickHandler: Listener encountered an unknown error
|
|
`,i)}}function Y1(e){return K1.add(e),e}function Z1(e){return K1.delete(e)}var j1,W1,q1,K1,Ul=f(()=>{"use strict";a();Ae();S();j1=new V("MessageEvents","#e5c890"),W1=new Set,q1=new Set;K1=new Set});var V1={};lt(V1,{_buildPopoverElements:()=>W3,addMessagePopoverButton:()=>Q1,buttons:()=>zu,removeMessagePopoverButton:()=>X1});function Q1(e,t){zu.set(e,t)}function X1(e){zu.delete(e)}function W3(e,t){let o=[];for(let[r,i]of zu.entries())try{let s=i(t);s&&(s.key??=r,o.push(n(k,{noop:!0},n(e,{...s}))))}catch(s){j3.error(`[${r}]`,s)}return n(m,null,o)}var j3,zu,ey=f(()=>{"use strict";a();ne();Ae();j3=new V("MessagePopover"),zu=new Map});var ry={};lt(ry,{SYM_IS_PROXIED_FACTORY:()=>ty,SYM_ORIGINAL_FACTORY:()=>ti,SYM_PATCHED_BY:()=>ny,SYM_PATCHED_SOURCE:()=>oy,allWebpackInstances:()=>Hu,getBuildNumber:()=>m2,getFactoryPatchedBy:()=>Y3,getFactoryPatchedSource:()=>K3,patchTimings:()=>q3,patches:()=>ei});function K3(e,t=ht){return t.m[e]?.[oy]}function Y3(e,t=ht){return t.m[e]?.[ny]}function f2(e,t,o,r,i=!1){if(Q3(e,t,o,r,i))return!0;X3(t,o);let s=new Proxy(j.eagerPatches?h2(t,o):o,J3);return Reflect.set(e,t,s,r)}function Q3(e,t,o,r,i){let s,l;for(let c of Hu)if(!(i&&c.m===e)&&Object.hasOwn(c.m,t)){s=c.m[t],l=c.m;break}return s!=null?(l!==e&&s[ty]?Reflect.set(e,t,s,r):g2(t,o),s[ti]!=null&&(s[ti]=o),!0):!1}function g2(e,t){for(let o of Hu)Tn(o.m,e,{value:t})}function X3(e,t){for(let o of Da)try{o(t,e)}catch(r){wn.error(`Error in Webpack factory listener:
|
|
`,r,o)}}function d2(e,t,o){let r=e[ti];e===r&&delete e[ti];let[i,s,l]=o;if(g2(i.id,r),ht==null&&!p2&&(p2=!0,typeof l=="function"&&l.m!=null&&l.c!=null)){let{stack:u}=new Error,d=u?.match(/\/assets\/(.+?\.js)/)?.[1];wn.warn(`WebpackRequire was not initialized, falling back to WebpackRequire passed to the first called wrapped module factory (id: ${String(i.id)}`+Ja`, WebpackInstance origin: ${d}`+")"),La(l)}let c;try{c=e.apply(t,o)}catch(u){if(e===r)throw u;return wn.error(`Error in patched module factory:
|
|
`,u),r.apply(t,o)}if(s=i.exports,typeof l=="function"&&l.c&&Yc(l.c,s,i.id)||s==null)return c;for(let u of Kc)try{u(s,i.id)}catch(d){wn.error(`Error in Webpack module listener:
|
|
`,d,u)}for(let[u,d]of wi)try{if(u(s)){wi.delete(u),d(s,i.id);continue}if(typeof s!="object")continue;for(let g in s){let h=s[g];if(h!=null&&u(h)){wi.delete(u),d(h,i.id);break}}}catch(g){wn.error(`Error while firing callback for Webpack waitFor subscription:
|
|
`,g,u,d)}return c}function h2(e,t){let o="0,"+String(t),r=o,i=t,s=new Set;for(let l=0;l<ei.length;l++){let c=ei[l],u=m2(),d=u!==-1;if(d&&c.fromBuild!=null&&u<c.fromBuild||c.toBuild!=null&&u>c.toBuild){ei.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 h=Ib(`patch by ${c.plugin}`,(x,N)=>(typeof x!="string"&&x.global&&(x.lastIndex=0),o.replace(x,N))),v=o,C=t,w=!1;for(let x of c.replacement){if(d&&x.fromBuild!=null&&u<x.fromBuild||x.toBuild!=null&&u>x.toBuild)continue;c.plugin==="Vesktop"&&bi(x,"VCDP");let N=o,A=t;try{let[L,U]=h(x.match,x.replace);if(L===o){if(c.noWarn||x.noWarn||wn.warn(`Patch by ${c.plugin} had no effect (Module id is ${String(e)}): ${x.match}`),c.group){wn.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${x.match} had no effect`),o=v,i=C,w&&s.delete(c.plugin);break}continue}let H=[...s];s.has(c.plugin)||H.push(c.plugin),o=L,r=`// Webpack Module ${String(e)} - Patched by ${H.join(", ")}
|
|
${L}
|
|
//# sourceURL=WebpackModule${String(e)}`,i=(0,eval)(r),s.has(c.plugin)||(s.add(c.plugin),w=!0)}catch(L){if(wn.error(`Patch by ${c.plugin} errored (Module id is ${String(e)}): ${x.match}
|
|
`,L),w&&s.delete(c.plugin),c.group){wn.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${x.match} errored`),o=v,i=C;break}o=N,i=A}}c.all||ei.splice(l--,1)}return i[ti]=t,i}var ei,ty,ti,oy,ny,Hu,q3,m2,wn,p2,Tn,Z3,J3,ju=f(()=>{"use strict";a();_();So();Ae();me();Ho();qc();$();ei=[],ty=Symbol("WebpackPatcher.isProxiedFactory"),ti=Symbol("WebpackPatcher.originalFactory"),oy=Symbol("WebpackPatcher.patchedSource"),ny=Symbol("WebpackPatcher.patchedBy"),Hu=new Set,q3=[],m2=en(()=>{try{let t=function(i){let s=i.match(/.concat\("(\d+?)"\)/);return s==null?-1:Number(s[1])};var e=t;let o=String(ht.m[128014]);if(o.includes("Trying to open a changelog for an invalid build number")){let i=t(o);if(i!==-1)return i}let r=Ea("Trying to open a changelog for an invalid build number");return t(String(r))}catch{return-1}});wn=new V("WebpackInterceptor","#8caaee"),p2=!1,Tn=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));Tn(Function.prototype,"m",{enumerable:!1,set(e){Tn(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];Tn(this,"p",{enumerable:!1,set(l){Tn(this,"p",{value:l}),clearTimeout(r),l==="/assets/"&&(ht==null&&this.c!=null&&(wn.info("Main WebpackInstance found"+Ja` in ${o}`+", initializing internal references to WebpackRequire"),La(this)),s())}}),Tn(this,"O",{enumerable:!1,set(l){Tn(this,"O",{value:l}),clearTimeout(i);let c=this;Tn(l,"j",{enumerable:!1,set(u){Tn(this,"j",{value:u}),c.p==null&&s()}})}});let r=setTimeout(()=>Reflect.deleteProperty(this,"p"),0),i=setTimeout(()=>Reflect.deleteProperty(this,"O"),0),s=()=>{wn.info("Found Webpack module factories"+Ja` in ${o}`),Hu.add(this);for(let c in e)f2(e,c,e[c],e,!0);Tn(e,Symbol.toStringTag,{value:"ModuleFactories",enumerable:!1});let l=new Proxy(e,Z3);Tn(this,"m",{value:l}),this.d=function(c,u){for(let d in u)Object.hasOwn(u,d)&&!Object.hasOwn(c,d)&&Object.defineProperty(c,d,{enumerable:!0,configurable:!0,get:u[d]})}}}});Z3={set:f2},J3={apply(e,t,o){if(e[ti]!=null)return d2(e,t,o);let r=e.name,i=h2(r,e);return d2(i,t,o)},get(e,t,o){if(t===ty)return!0;let r=e[ti]??e;if(t==="toString"||t===oy||t===ny){let i=Reflect.get(r,t,r);return t==="toString"?i.bind(r):i}return Reflect.get(e,t,o)}}});var Wu={};lt(Wu,{PMLogger:()=>V3,addPatch:()=>b2,isPluginEnabled:()=>Gl,patches:()=>ei,plugins:()=>eR,startAllPlugins:()=>zl,startDependenciesRecursive:()=>S2,startPlugin:()=>ay,stopPlugin:()=>nR,subscribeAllPluginsFluxEvents:()=>oR,subscribePluginFluxEvents:()=>sy,unsubscribePluginFluxEvents:()=>x2});function Gl(e){return(je[e]?.required||je[e]?.isDependency||$l[e]?.enabled)??!1}function b2(e,t,o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`){let r=e;if(r.plugin=t,!(r.predicate&&!r.predicate())){Jg(r),Array.isArray(r.replacement)||(r.replacement=[r.replacement]);for(let i of r.replacement)bi(i,o);r.replacement=r.replacement.filter(({predicate:i})=>!i||i()),ei.push(r)}}function S2(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!$l[r].enabled){let i=je[r];if(S2(i),$l[r].enabled=!0,i.isDependency=!0,i.patches){Kt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}ay(i)||o.push(r)}}),{restartNeeded:t,failures:o}}function sy(e,t){if(e.flux&&!iy.has(e.name)){iy.add(e.name),Kt.debug("Subscribing to flux events of plugin",e.name);for(let[o,r]of Object.entries(e.flux)){let i=e.flux[o]=function(){try{let s=r.apply(e,arguments);return s instanceof Promise?s.catch(l=>Kt.error(`${e.name}: Error while handling ${o}
|
|
`,l)):s}catch(s){Kt.error(`${e.name}: Error while handling ${o}
|
|
`,s)}};t.subscribe(o,i)}}}function x2(e,t){if(e.flux){iy.delete(e.name),Kt.debug("Unsubscribing from flux events of plugin",e.name);for(let[o,r]of Object.entries(e.flux))t.unsubscribe(o,r)}}function oR(e){y2=!0;for(let t in je)Gl(t)&&sy(je[t],e)}var Kt,V3,eR,y2,iy,v2,$l,tR,Tr,zl,ay,nR,qu=f(()=>{"use strict";a();Wl();xr();rn();No();Ll();$u();_l();Ul();ey();_();He();Ae();Ho();T();S();ju();$n();qc();Kt=new V("PluginManager","#a6d189"),V3=Kt,eR=je,y2=!1,iy=new Set,v2=Object.values(je),$l=j.plugins;tR=["onBeforeMessageEdit","onBeforeMessageSend","onMessageClick","renderChatBarButton","renderMemberListDecorator","renderMessageAccessory","renderMessageDecoration","renderMessagePopoverButton"],Tr=new Set;for(let e of v2)if(Gl(e.name)){e.dependencies?.forEach(t=>{let o=je[t];if(!o){let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);Kt.warn(r);return}$l[t].enabled=!0,o.isDependency=!0}),e.commands?.length&&Tr.add("CommandsAPI"),(e.onBeforeMessageEdit||e.onBeforeMessageSend||e.onMessageClick)&&Tr.add("MessageEventsAPI"),e.renderChatBarButton&&Tr.add("ChatInputButtonAPI"),e.renderMemberListDecorator&&Tr.add("MemberListDecoratorsAPI"),e.renderMessageAccessory&&Tr.add("MessageAccessoriesAPI"),e.renderMessageDecoration&&Tr.add("MessageDecorationsAPI"),e.renderMessagePopoverButton&&Tr.add("MessagePopoverAPI"),e.userProfileBadge&&Tr.add("BadgeAPI");for(let t of tR)e[t]&&=e[t].bind(e)}for(let e of Tr)je[e].isDependency=!0,$l[e].enabled=!0;for(let e of v2){if(e.settings){e.options??={},e.settings.pluginName=e.name;for(let t in e.settings.def){let o=e.settings.def[t],r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.options)for(let t in e.options){let o=e.options[t];o.onChange!=null&&Wt.addChangeListener(`plugins.${e.name}.${t}`,o.onChange)}if(e.patches&&Gl(e.name))for(let t of e.patches)b2(t,e.name)}zl=Qn("startAllPlugins",function(t){Kt.info(`Starting plugins (stage ${t})`);for(let o in je)if(Gl(o)){if((je[o].startAt??"WebpackReady")!==t)continue;ay(je[o])}});ay=Qn("startPlugin",function(t){let{name:o,commands:r,contextMenus:i,managedStyle:s,userProfileBadge:l,onBeforeMessageEdit:c,onBeforeMessageSend:u,onMessageClick:d,renderChatBarButton:g,renderMemberListDecorator:h,renderMessageAccessory:v,renderMessageDecoration:C,renderMessagePopoverButton:w}=t;if(t.start){if(Kt.info("Starting plugin",o),t.started)return Kt.warn(`${o} already started`),!1;try{t.start()}catch(x){return Kt.error(`Failed to start ${o}
|
|
`,x),!1}}if(t.started=!0,r?.length){Kt.debug("Registering commands of plugin",o);for(let x of r)try{Us(x,o)}catch(N){return Kt.error(`Failed to register command ${x.name}
|
|
`,N),!1}}if(y2&&sy(t,G),i){Kt.debug("Adding context menus patches of plugin",o);for(let x in i)F1(x,i[x])}return s&&Io(s),l&&Hl(l),c&&Bl(c),u&&Xi(u),d&&Y1(d),g&&E1(o,g),h&&Yi(o,h),C&&Ji(o,C),v&&El(o,v),w&&Q1(o,w),!0},e=>`startPlugin ${e.name}`),nR=Qn("stopPlugin",function(t){let{name:o,commands:r,contextMenus:i,managedStyle:s,userProfileBadge:l,onBeforeMessageEdit:c,onBeforeMessageSend:u,onMessageClick:d,renderChatBarButton:g,renderMemberListDecorator:h,renderMessageAccessory:v,renderMessageDecoration:C,renderMessagePopoverButton:w}=t;if(t.stop){if(Kt.info("Stopping plugin",o),!t.started)return Kt.warn(`${o} already stopped`),!1;try{t.stop()}catch(x){return Kt.error(`Failed to stop ${o}
|
|
`,x),!1}}if(t.started=!1,r?.length){Kt.debug("Unregistering commands of plugin",o);for(let x of r)try{Il(x.name)}catch(N){return Kt.error(`Failed to unregister command ${x.name}
|
|
`,N),!1}}if(x2(t,G),i){Kt.debug("Removing context menus patches of plugin",o);for(let x in i)U1(x,i[x])}return s&&qo(s),l&&jl(l),c&&Fl(c),u&&Vi(u),d&&Z1(d),g&&O1(o),h&&Zi(o),C&&Qi(o),v&&Ol(o),w&&X1(o),!0},e=>`stopPlugin ${e.name}`)});function lR(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function cR({required:e}){return n(Zt,{className:Hn("info-card",{"restart-card":e})},e?n(m,null,n(b.FormTitle,{tag:"h5"},"Restart required!"),n(b.FormText,{className:Hn("dep-text")},"Restart now to apply new plugins and their settings"),n(I,{onClick:()=>location.reload(),className:Hn("restart-button")},"Restart")):n(m,null,n(b.FormTitle,{tag:"h5"},"Plugin Management"),n(b.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(b.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ku({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=j.plugins[e.name],c=()=>Vencord.Plugins.isPluginEnabled(e.name);function u(){let d=c();if(!d){let{restartNeeded:h,failures:v}=rR(e);if(v.length){T2.error(`Failed to start dependencies for ${e.name}: ${v.join(", ")}`),d1("Failed to start dependencies: "+v.join(", "),"Close",()=>null);return}else if(h){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!d,o(e.name);return}if(d&&!e.started){l.enabled=!d;return}if(!(d?sR(e):iR(e))){l.enabled=!1;let h=`Error while ${d?"stopping":"starting"} plugin ${e.name}`;T2.error(h),lR(h);return}l.enabled=!d}return n(Ou,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:u,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>Jr(e,o),className:z(aR.button,Hn("info-button"))},e.options&&!nr(e.options)?n(ll,{className:Hn("info-icon")}):n(il,{className:Hn("info-icon")}))})}function uR({search:e}){let t=Object.entries(M2).filter(([r])=>r.toLowerCase().includes(e)),o={desktop:"Discord Desktop app or Vesktop",discordDesktop:"Discord Desktop app",vesktop:"Vesktop app",web:"Vesktop app and the Web version of Discord",dev:"Developer version of Vencord"};return n(Q,{variant:"text-md/normal",className:F.top16},t.length?n(m,null,n(b.FormText,null,"Are you looking for:"),n("ul",null,t.map(([r,i])=>n("li",{key:r},n("b",null,r),": Only available on the ",o[i])))):"No plugins meet the search criteria.")}function ly(){let e=Ot(),t=W.useMemo(()=>new Rl,[]);W.useEffect(()=>()=>void(t.hasChanges&&rt.show({title:"Restart required",body:n(m,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((w,x)=>n(m,null,x>0&&", ",Ee.parse("`"+w+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=W.useMemo(()=>{let w={};for(let x in je){let N=je[x].dependencies;if(N)for(let A of N)w[A]??=[],w[A].push(x)}return w},[]),r=$e(()=>Object.values(je).sort((w,x)=>w.name.localeCompare(x.name)),[]),[i,s]=W.useState({value:"",status:0}),l=i.value.toLowerCase(),c=w=>s(x=>({...x,value:w})),u=w=>s(x=>({...x,status:w})),d=w=>{let{status:x}=i,N=Vencord.Plugins.isPluginEnabled(w.name);return N&&x===2||!N&&x===1||x===3&&!g?.includes(w.name)?!1:l.length?w.name.toLowerCase().includes(l)||w.description.toLowerCase().includes(l)||w.tags?.some(A=>A.toLowerCase().includes(l)):!0},[g]=St(()=>co("Vencord_existingPlugins").then(w=>{let x=Date.now()/1e3,N={},A=Object.values(r).map(U=>U.name),L=[];for(let{name:U}of r)(N[U]=w?.[U]??x)+60*60*24*2>x&&L.push(U);return hn("Vencord_existingPlugins",N),Ai.isEqual(L,A)?[]:L})),h=[],v=[],C=i.value.includes("API");for(let w of r){if(w.hidden||!w.options&&w.name.endsWith("API")&&!C||!d(w))continue;if(w.required||w.isDependency||o[w.name]?.some(N=>e.plugins[N].enabled)){let N=w.required||!o[w.name]?"This plugin is required for Vencord to function.":pR(o[w.name]?.filter(A=>e.plugins[A].enabled));v.push(n(oe,{text:N,key:w.name},({onMouseLeave:A,onMouseEnter:L})=>n(Ku,{onMouseLeave:A,onMouseEnter:L,onRestartNeeded:U=>t.handleChange(U),disabled:!0,plugin:w,key:w.name})))}else h.push(n(Ku,{onRestartNeeded:N=>t.handleChange(N),disabled:!1,plugin:w,isNew:g?.includes(w.name),key:w.name}))}return n(Xo,{title:"Plugins"},n(cR,{required:t.hasChanges}),n(b.FormTitle,{tag:"h5",className:z(F.top20,F.bottom8)},"Filters"),n("div",{className:z(F.bottom20,Hn("filter-controls"))},n(ct,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:c}),n("div",{className:w2.inputWrapper},n(nn,{options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:u,isSelected:w=>w===i.status,closeOnSelect:!0,className:w2.inputDefault}))),n(b.FormTitle,{className:F.top20},"Plugins"),h.length||v.length?n("div",{className:Hn("grid")},h.length?h:n(Q,{variant:"text-md/normal"},"No plugins meet the search criteria.")):n(uR,{search:l}),n(b.FormDivider,{className:F.top20}),n(b.FormTitle,{tag:"h5",className:z(F.top20,F.bottom8)},"Required Plugins"),n("div",{className:Hn("grid")},v.length?v:n(Q,{variant:"text-md/normal"},"No plugins meet the search criteria.")))}function pR(e){return n(W.Fragment,null,n(b.FormText,null,"This plugin is required by:"),e.map(t=>n(b.FormText,{key:t,className:Hn("dep-text")},t)))}var rR,iR,sR,Hn,T2,w2,aR,cy=f(()=>{"use strict";a();OS();_n();f1();_();He();At();Cl();C1();Sr();R1();So();Ae();ze();me();wt();$();S();$n();({startDependenciesRecursive:rR,startPlugin:iR,stopPlugin:sR}=Dt(()=>(qu(),bb(Wu)))),Hn=ue("vc-plugins-"),T2=new V("PluginSettings","#a6d189"),w2=R("inputWrapper","inputDefault","error"),aR=R("button","disabled","enabled")});function Gs(e){he(t=>n(ve,{...t},n(k,null,n(we,{className:js("root")},n(dR,{user:e})))))}function dR({user:e}){Ot();let t=Se([Qt],()=>Qt.getUserProfile(e.id));le(()=>{!t&&!e.bot&&e.id&&Ah(e.id)},[e.id,e.bot,t]);let o=t?.connectedAccounts?.find(l=>l.type==="github")?.name,r=t?.connectedAccounts?.find(l=>l.type==="domain")?.name,i=$e(()=>{let l=Object.values(je);return(ks[e.id]?l.filter(u=>u.authors.includes(ks[e.id])):l.filter(u=>u.authors.some(d=>d.name===e.username))).filter(u=>!u.name.endsWith("API")).sort((u,d)=>Number(u.required??!1)-Number(d.required??!1))},[e.id,e.username]),s=n(it,{href:"https://vencord.dev/source"},"contributed");return n(m,null,n("div",{className:js("header")},n("img",{className:js("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(b.FormTitle,{tag:"h2",className:js("name")},e.username),n("div",{className:z("vc-settings-modal-links",js("links"))},r&&n(Du,{text:r,href:`https://${r}`}),o&&n(Lu,{text:o,href:`https://github.com/${o}`}))),i.length?n(b.FormText,null,"This person has ",s," to ",hh(i.length,"plugin"),"!"):n(b.FormText,null,"This person has not made any plugins. They likely ",s," to Vencord in other ways!"),!!i.length&&n("div",{className:js("plugins")},i.map(l=>n(Ku,{key:l.name,plugin:l,disabled:l.required??!1,onRestartNeeded:()=>Je("Restart to apply changes!")}))))}var js,Eu=f(()=>{"use strict";a();Zb();_();He();ne();_o();M();Pe();me();Ke();S();$n();cy();P1();js=ue("vc-author-modal-")});async function P2(e=!1){uy={};let t={};e&&(t.cache="no-cache"),uy=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var mR,fR,uy,Ws,py=f(()=>{"use strict";a();Yb();Wl();du();ne();jt();pu();Eu();M();Ae();ze();me();Ke();T();S();mR="https://vencord.dev/assets/favicon.png",fR={description:"Vencord Contributor",image:mR,position:0,shouldShow:({userId:e})=>fn(e),onClick:(e,{userId:t})=>Gs(D.getUser(t))},uy={};Ws=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:".FULL_SIZE]:26",replacement:{match:/(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/,replace:";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])"}},{find:"#{intl::PROFILE_USER_BADGES}",replacement:[{match:/(alt:" ","aria-hidden":!0,src:)(.+?)(?=,)(?<=href:(\i)\.link.+?)/,replace:(e,t,o,r)=>`...${r}.props,${t}${r}.image??(${o})`},{match:/(?<="aria-label":(\i)\.description,.{0,200})children:/,replace:"children:$1.component?$self.renderBadgeComponent({...$1}) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick&&{onClick:vcE=>$1.onClick(vcE,$1)}),$&"}]}],toolboxActions:{async"Refetch Badges"(){await P2(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},userProfileBadge:fR,async start(){await P2()},getBadges(e){if(!e)return[];try{return e.userId??=e.user?.id,dy(e)}catch(t){return new V("BadgeAPI#hasBadges").error(t),[]}},renderBadgeComponent:k.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return uy[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=he(r=>n(k,{noop:!0,onError:()=>{sr(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(ve,{...r},n(Ne,null,n(ge,{style:{width:"100%",justifyContent:"center"}},n(b.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(Xa,null),"Vencord Donor"))),n(we,null,n(ge,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(b.FormText,null,"This Badge is a special perk for Vencord Donors"),n(b.FormText,{className:F.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(ut,null,n(ge,{style:{width:"100%",justifyContent:"center"}},n(Va,null))))))}}))}})});var Zu,I2=f(()=>{"use strict";a();M();T();Zu=y({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[p.Ven],patches:[{find:'"sticker")',replacement:{match:/return\((!)?\i\.\i(?:\|\||&&)(?=\(.+?(\i)\.push)/,replace:(e,t,o)=>t?`${e}(Vencord.Api.ChatButtons._injectButtons(${o},arguments[0]),true)&&`:`${e}(Vencord.Api.ChatButtons._injectButtons(${o},arguments[0]),false)||`}}]})});var Ju,C2=f(()=>{"use strict";a();M();T();Ju=y({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Qu,k2=f(()=>{"use strict";a();M();T();Qu=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven,p.Kyuuhachi],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?=let{navId:)(?<=function \i\((\i)\).+?)/,replace:"$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);"}},{find:"navId:",all:!0,noWarn:!0,replacement:[{match:/navId:(?=.+?([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?`contextMenuAPIArguments:typeof arguments!=='undefined'?arguments:[],${e}`:e}]}]})});var Xu,N2=f(()=>{"use strict";a();M();T();Xu=y({name:"DynamicImageModalAPI",authors:[p.sadan,p.Nuckyz],description:"Allows you to omit either width or height when opening an image modal",patches:[{find:".contain,SCALE_DOWN:",replacement:{match:/(?<="IMAGE"===\i\?)\i(?=\?)/,replace:"true"}},{find:".dimensionlessImage,",replacement:{match:/(?<="IMAGE"===\i&&\(\i=)\i(?=\?)/,replace:"true"}}]})});var A2,R2=f(()=>{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});A2="src/plugins/_api/memberListDecorators/style.css"});var Vu,D2=f(()=>{"use strict";a();M();T();R2();Vu=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.Ven],managedStyle:A2,patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/#{intl::GUILD_OWNER}(?=.+?decorators:(\i)\(\)).+?\1=?\(\)=>.+?children:\[/,replace:"$&(typeof vencordProps=='undefined'?null:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]),$1?$2:null]"}}]})});var L2,ep,E2=f(()=>{"use strict";a();M();Ho();T();L2={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"},ep=y({name:"MenuItemDemanglerAPI",description:"Demangles Discord's Menu Item module",authors:[p.Ven],required:!0,patches:[{find:'"Menu API',replacement:{match:/function.{0,80}type===(\i\.\i)\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let o=[],r=Lt(/\(\i\.type===(\i\.\i)\)/g),i=/type:"(\w+)"/g,s;for(;(s=r.exec(e))!==null;){let l=s[1];i.lastIndex=r.lastIndex;let c=i.exec(e)?.[1];if(c&&c in L2){let u=L2[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}`}}}]})});var tp,O2=f(()=>{"use strict";a();M();T();tp=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:"#{intl::REMOVE_ATTACHMENT_BODY}",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var _2,B2=f(()=>{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});_2="src/plugins/_api/messageDecorations/style.css"});var op,F2=f(()=>{"use strict";a();M();T();B2();op=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],managedStyle:_2,patches:[{find:'"Message Username"',replacement:{match:/#{intl::GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE}.+?renderPopout:.+?(?=\])/,replace:"$&,Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var np,U2=f(()=>{"use strict";a();M();T();np=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:"#{intl::EDIT_TEXTAREA_HELP}",replacement:{match:/(?<=,channel:\i\}\)\.then\().+?(?=return \i\.content!==this\.props\.message\.content&&\i\((.+?)\))/,replace:(e,t)=>`async ${e}if(await Vencord.Api.MessageEvents._handlePreEdit(${t}))return Promise.resolve({shouldClear:false,shouldRefocus:true});`}},{find:".handleSendMessage,onResize",replacement:{match:/let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptions\(\{.+?\}\);(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i)=>e+`if(await Vencord.Api.MessageEvents._handlePreSend(${o}.id,${t},${i},${r}))return{shouldClear:false,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg,vcChan,${r});`}}]})});var rp,$2=f(()=>{"use strict";a();M();T();rp=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish,p.Ven,p.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/(?<=:null),(.{0,40}togglePopout:.+?}\)),(.+?)\]}\):null,(?<=\((\i\.\i),{label:.+?:null,(\i&&!\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,replace:(e,t,o,r,i,s)=>`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${r},${s}),${i}?${t}:null,${i}&&${o},`}}]})});var ip,G2=f(()=>{"use strict";a();M();T();ip=y({name:"MessageUpdaterAPI",description:"API for updating and re-rendering messages.",authors:[p.Nuckyz],patches:[{find:"}renderEmbeds(",replacement:{match:/(?<=this.props,\i,\[)"message",/,replace:""}}]})});var sp,z2=f(()=>{"use strict";a();M();T();sp=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:'"NoticeStore"',replacement:[{match:/(?<=!1;)\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1?.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var ap,H2=f(()=>{"use strict";a();M();T();ap=y({name:"ServerListAPI",authors:[p.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"#{intl::DISCODO_DISABLED}",replacement:{match:/(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"#{intl::SERVERS}),children",replacement:{match:/(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var lp,j2=f(()=>{"use strict";a();M();T();lp=y({name:"UserSettingsAPI",description:"Patches Discord's UserSettings to expose their group and name.",authors:[p.Nuckyz],patches:[{find:",updateSetting:",replacement:[{match:/(?<=INFREQUENT_USER_ACTION.{0,20},)useSetting:/,replace:"userSettingsAPIGroup:arguments[0],userSettingsAPIName:arguments[1],$&"},{match:/updateSetting:.{0,100}SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE/,replace:"userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&"},{match:/updateSetting:.{0,60}USER_SETTINGS_OVERRIDE_CLEAR/,replace:"userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&"}]}]})});var W2,cp,q2=f(()=>{"use strict";a();_();M();Ae();T();W2=P({disableAnalytics:{type:3,description:"Disable Discord's tracking (analytics/'science')",default:!0,restartNeeded:!0}}),cp=y({name:"NoTrack",description:"Disable Discord's tracking (analytics/'science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz,p.Arrow],required:!0,settings:W2,patches:[{find:"AnalyticsActionHandlers.handle",predicate:()=>W2.store.disableAnalytics,replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=void 0&&"},{match:/(?:increment|distribution)\(\i(?:,\i)?\){/g,replace:"$&return;"}]},{find:".BetterDiscord||null!=",replacement:{match:/(?=let \i=window;)/,replace:"return false;"}}],startAt:"Init",start(){Object.defineProperty(Function.prototype,"g",{configurable:!0,set(e){Object.defineProperty(this,"g",{value:e,configurable:!0,enumerable:!0,writable:!0});let{stack:t}=new Error;if(this.c!=null||!t?.includes("http")||!String(this).includes("exports:{}"))return;let o=t.match(/http.+?(?=:\d+?:\d+?$)/m)?.[0];if(!o)return;let r=new XMLHttpRequest;if(r.open("GET",o,!1),r.send(),!!r.responseText.includes(".DiscordSentry="))throw new V("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 V("NoTrack","#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(window,"DiscordSentry")}})}})});function gR(){return n(Xo,{title:"Backup & Restore"},n(Zt,{className:z("vc-settings-card","vc-backup-restore-card")},n(ge,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(Q,{variant:"text-md/normal",className:F.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(Q,{variant:"text-md/normal",className:F.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(ge,null,n(I,{onClick:()=>LS(),size:I.Sizes.SMALL},"Import Settings"),n(I,{onClick:RS,size:I.Sizes.SMALL},"Export Settings")))}var K2,Y2=f(()=>{"use strict";a();jt();ze();me();Sl();S();Sr();K2=Bo(gR,"Backup & Restore")});function Z2(e){let t={display:e.inline?"inline-grid":"grid",gridTemplateColumns:`repeat(${e.columns}, 1fr)`,gap:e.gap,...e.style};return n("div",{...e,style:t},e.children)}var J2=f(()=>{"use strict";a()});function hR(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function yR(){let e=await fetch(new URL("/v1/",Zr()),{method:"DELETE",headers:{Authorization:await _s()}});if(!e.ok){ku.error(`Failed to erase data, API returned ${e.status}`),Ye({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}j.cloud.authenticated=!1,await Nu(),Ye({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function vR(){let{cloud:e}=Ot(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(b.FormSection,{title:"Settings Sync",className:F.top16},n(b.FormText,{variant:"text-md/normal",className:F.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(fo,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(I,{size:I.Sizes.SMALL,disabled:!t,onClick:()=>Bs(!0)},"Sync to Cloud"),n(oe,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(I,{onMouseLeave:o,onMouseEnter:r,size:I.Sizes.SMALL,color:I.Colors.RED,disabled:!t,onClick:()=>Ru(!0,!0)},"Sync from Cloud")),n(I,{size:I.Sizes.SMALL,color:I.Colors.RED,disabled:!t,onClick:()=>ES()},"Delete Cloud Settings")))}function bR(){let e=Ot(["cloud.authenticated","cloud.url"]);return n(Xo,{title:"Vencord Cloud"},n(b.FormSection,{title:"Cloud Settings",className:F.top16},n(b.FormText,{variant:"text-md/normal",className:F.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(it,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(it,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(fo,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t?r1():e.cloud.authenticated=t},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(b.FormTitle,{tag:"h5"},"Backend URL"),n(b.FormText,{className:F.bottom8},"Which backend to use when using cloud integrations."),n(nl,{key:"backendUrl",value:e.cloud.url,onChange:async t=>{e.cloud.url=t,e.cloud.authenticated=!1,Nu()},validate:hR}),n(Z2,{columns:2,gap:"1em",className:F.top8},n(I,{size:I.Sizes.MEDIUM,disabled:!e.cloud.authenticated,onClick:async()=>{await Nu(),e.cloud.authenticated=!1,await r1()}},"Reauthorise"),n(I,{size:I.Sizes.MEDIUM,color:I.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>rt.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:yR,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data")),n(b.FormDivider,{className:F.top16})),n(vR,null))}var Q2,X2=f(()=>{"use strict";a();pr();_();vu();J2();_o();i1();ze();Sl();S();Sr();Q2=Bo(bR,"Cloud")});var Hq,V2=f(()=>{"use strict";a();bu();Oi();ze();Ho();Qo();$();S();Sr();Hq=Eo(function({find:e,setModule:t,setError:o}){let r=bs(e),i=Object.keys(r),s=i.length;s===0?o("No match. Perhaps that module is lazy loaded?"):s!==1?o("Multiple matches. Please refine your filter"):t([i[0],r[i[0]]])})});var ex,tx=f(()=>{"use strict";a();cy();Sr();ex=Bo(ly,"Plugins")});var ox=f(()=>{});function Mn(e){let{Icon:t,action:o,text:r,disabled:i}=e;return n("button",{className:my("pill"),onClick:o,disabled:i},n(t,{className:my("img")}),r)}function up(e){return n(Zt,{className:my("card")},e.children)}var my,fy=f(()=>{"use strict";a();ox();He();S();my=ue("vc-settings-quickActions-")});function xR({link:e}){let[t,o,r]=St(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(b.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function TR({themeLinks:e}){return e.length?n(m,null,n(b.FormTitle,{className:F.top20,tag:"h5"},"Validator"),n(b.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>{let{label:o,link:r}=(()=>{let i=/^@(light|dark) (.*)/.exec(t);if(!i)return{label:t,link:t};let[,s,l]=i;return{label:`[${s} mode only] ${l}`,link:l}})();return n(Zt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:r},n(b.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},o),n(xR,{link:r}))}))):null}function wR({theme:e,enabled:t,onChange:o,onDelete:r}){return n(Ou,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(ge,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(it,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(it,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&Fi(e.invite).catch(()=>Je("Invalid or expired invite"))}},"Discord Server"))})}function MR(){let e=Ot(["themeLinks","enabledThemes"]),t=Mt(null),[o,r]=K(0),[i,s]=K(e.themeLinks.join(`
|
|
`)),[l,c]=K(null),[u,,d]=St(VencordNative.themes.getThemesDir);le(()=>{g()},[]);async function g(){let N=await VencordNative.themes.getThemesList();c(N)}function h(N,A){if(A){if(e.enabledThemes.includes(N))return;e.enabledThemes=[...e.enabledThemes,N]}else e.enabledThemes=e.enabledThemes.filter(L=>L!==N)}async function v(N){if(N.stopPropagation(),N.preventDefault(),!N.currentTarget?.files?.length)return;let{files:A}=N.currentTarget,L=Array.from(A,U=>{let{name:H}=U;if(H.endsWith(".css"))return new Promise((X,re)=>{let te=new FileReader;te.onload=()=>{VencordNative.themes.uploadTheme(H,te.result).then(X).catch(re)},te.readAsText(U)})});await Promise.all(L),g()}function C(){return n(m,null,n(Zt,{className:"vc-settings-card"},n(b.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(it,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(it,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(b.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(b.FormSection,{title:"Local Themes"},n(up,null,n(m,null,n(Mn,{text:"Open Themes Folder",action:()=>Au(u),disabled:d,Icon:ul}),n(Mn,{text:"Load missing Themes",action:g,Icon:pl}),n(Mn,{text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor(),Icon:dl}),j.plugins.ClientTheme.enabled&&n(Mn,{text:"Edit ClientTheme",action:()=>Jr(je.ClientTheme),Icon:Fh}))),n("div",{className:SR("grid")},l?.map(N=>n(wR,{key:N.fileName,enabled:e.enabledThemes.includes(N.fileName),onChange:A=>h(N.fileName,A),onDelete:async()=>{h(N.fileName,!1),await VencordNative.themes.deleteTheme(N.fileName),g()},theme:N})))))}function w(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(N=>N.trim()).filter(Boolean))]}function x(){return n(m,null,n(Zt,{className:"vc-settings-card vc-text-selectable"},n(b.FormTitle,{tag:"h5"},"Paste links to css files here"),n(b.FormText,null,"One link per line"),n(b.FormText,null,"You can prefix lines with @light or @dark to toggle them based on your Discord theme"),n(b.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(b.FormSection,{title:"Online Themes",tag:"h5"},n(ou,{value:i,onChange:s,className:"vc-settings-theme-links",placeholder:"Theme Links",spellCheck:!1,onBlur:w,rows:10}),n(TR,{themeLinks:e.themeLinks})))}return n(Xo,{title:"Themes"},n(xo,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(xo.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(xo.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&C(),o===1&&x())}var TK,SR,nx,rx=f(()=>{"use strict";a();_();He();jt();At();_o();Cl();Pe();ze();gr();wt();$();S();$n();C1();fy();Sr();TK=kt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),SR=ue("vc-settings-theme-");nx=Bo(MR,"Themes")});function ix(e,t){return async()=>{e(!0);try{await t()}catch(o){Wi.error("Failed to update",o);let r;if(!o)r=`An unknown error occurred (error is undefined).
|
|
Please try again.`;else if(o.code&&o.cmd){let{code:i,path:s,cmd:l,stderr:c}=o;i==="ENOENT"?r=`Command \`${s}\` not found.
|
|
Please install it and try again`:(r=`An error occurred while running \`${l}\`:
|
|
`,r+=c||`Code \`${i}\`. See the console for more info`)}else r="An unknown error occurred. See the console for more info.";rt.show({title:"Oops!",body:n(wo,null,r.split(`
|
|
`).map((i,s)=>n("div",{key:s},Ee.parse(i))))})}finally{e(!1)}}}function sx({repo:e,hash:t,disabled:o=!1}){return n(it,{href:`${e}/commit/${t}`,disabled:o},t)}function ax({updates:e,repo:t,repoPending:o}){return n(Zt,{style:{padding:"0 0.5em"}},e.map(({hash:r,author:i,message:s})=>n("div",{key:r,style:{marginTop:"0.5em",marginBottom:"0.5em"}},n("code",null,n(sx,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function PR(e){let[t,o]=W.useState(Xr),[r,i]=W.useState(!1),[s,l]=W.useState(!1),c=(t?.length??0)>0;return n(m,null,!t&&Hs?n(m,null,n(b.FormText,null,"Failed to check updates. Check the console for more info"),n(wo,{style:{padding:"1em"}},n("p",null,Hs.stderr||Hs.stdout||"An unknown error occurred"))):n(b.FormText,{className:F.bottom8},c?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),c&&n(ax,{updates:t,...e}),n(ge,{className:z(F.bottom8,F.top8)},c&&n(I,{size:I.Sizes.SMALL,disabled:s||r,onClick:ix(l,async()=>{await Vr()&&(o([]),await new Promise(u=>{rt.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){Co(),u()},onCancel:u})}))})},"Update Now"),n(I,{size:I.Sizes.SMALL,disabled:s||r,onClick:ix(i,async()=>{await br()?o(Xr):(o([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function IR(e){return n(m,null,n(b.FormText,{className:F.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(ax,{...e,updates:Xr}))}function lx(){let e=Ot(["autoUpdate","autoUpdateNotification"]),[t,o,r]=St(k1,{fallbackValue:"Loading..."});W.useEffect(()=>{o&&Wi.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(Xo,{title:"Vencord Updater"},n(b.FormTitle,{tag:"h5"},"Updater Settings"),n(fo,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(fo,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(b.FormTitle,{tag:"h5"},"Repo"),n(b.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(it,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(sx,{hash:xn,repo:t,disabled:r}),")"),n(b.FormDivider,{className:F.top8+" "+F.bottom8}),n(b.FormTitle,{tag:"h5"},"Updates"),kl?n(IR,{...i}):n(PR,{...i}))}var cx,pp,dp=f(()=>{"use strict";a();_();Ei();jt();_o();ze();me();Ke();gr();wt();qi();S();$s();Sr();cx=Bo(lx,"Updater"),pp=function(){let e=Bo(lx,"Updater");try{he(Bo(t=>n(ve,{...t,size:"medium"},n(we,{className:"vc-updater-modal"},n(pt,{onClick:t.onClose,className:"vc-updater-modal-close-button"}),n(e,null))),"UpdaterModal"))}catch{A1()}}});var ux=f(()=>{});function mp({title:e,subtitle:t,description:o,cardImage:r,backgroundImage:i,backgroundColor:s,buttonTitle:l,buttonOnClick:c,children:u}){let d={backgroundColor:s||"#9c85ef",backgroundImage:`url(${i||""})`};return n(Zt,{className:Pn("card","card-special"),style:d},n("div",{className:Pn("card-flex")},n("div",{className:Pn("card-flex-main")},n(b.FormTitle,{className:Pn("title"),tag:"h5"},e),n(b.FormText,{className:Pn("subtitle")},t),n(b.FormText,{className:Pn("text")},o),u),r&&n("div",{className:Pn("image-container")},n("img",{role:"presentation",src:r,alt:"",className:Pn("image")}))),l&&n(m,null,n(b.FormDivider,{className:Pn("seperator")}),n(er,{onClick:c,className:Pn("hyperlink")},n(b.FormText,{className:Pn("hyperlink-text")},l))))}var Pn,px=f(()=>{"use strict";a();ux();He();S();Pn=ue("vc-special-")});function DR(){let[e,,t]=St(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=Ot(),r=W.useMemo(()=>Math.random()>.5?CR:kR,[]),i=navigator.platform.toLowerCase().startsWith("win"),l=navigator.platform.toLowerCase().startsWith("mac"),c=D.getCurrentUser(),u=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},i?{key:"winNativeTitleBar",title:"Use Windows' native title bar instead of Discord's custom one",note:"Requires a full restart"}:{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},{key:"transparent",title:"Enable window transparency.",note:"You need a theme that supports transparency or this will do nothing. WILL STOP THE WINDOW FROM BEING RESIZABLE!! Requires a full restart"},i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},{key:"disableMinSize",title:"Disable minimum window size",note:"Requires a full restart"}];return n(Xo,{title:"Vencord Settings"},LR(c?.id)?n(mp,{title:"Donations",subtitle:"Thank you for donating!",description:"You can manage your perks at any time by messaging @vending.machine.",cardImage:NR,backgroundImage:dx,backgroundColor:"#ED87A9"},n(mx,null)):n(mp,{title:"Support the Project",description:"Please consider supporting the development of Vencord by donating!",cardImage:r,backgroundImage:dx,backgroundColor:"#c3a3ce"},n(mx,null)),fn(c?.id)&&n(mp,{title:"Contributions",subtitle:"Thank you for contributing!",description:"Since you've contributed to Vencord you now have a cool new badge!",cardImage:AR,backgroundImage:RR,backgroundColor:"#EDCC87",buttonTitle:"See what you've contributed to",buttonOnClick:()=>Gs(c)}),n(b.FormSection,{title:"Quick Actions"},n(up,null,n(Mn,{Icon:Bh,text:"Notification Log",action:gl}),n(Mn,{Icon:dl,text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),n(Mn,{Icon:pl,text:"Relaunch Discord",action:Co}),n(Mn,{Icon:ul,text:"Open Settings Folder",action:()=>Au(e)}),n(Mn,{Icon:ml,text:"View Source Code",action:()=>VencordNative.native.openExternal("https://github.com/"+Hi)}))),n(b.FormDivider,null),n(b.FormSection,{className:F.top16,title:"Settings",tag:"h5"},n(b.FormText,{className:F.bottom20,style:{color:"var(--text-muted)"}},"Hint: You can change the position of this settings section in the"," ",n(I,{look:I.Looks.BLANK,style:{color:"var(--text-link)",display:"inline-block"},onClick:()=>Jr(Vencord.Plugins.plugins.Settings)},"settings of the Settings plugin"),"!"),u.map(d=>d&&n(fo,{key:d.key,value:o[d.key],onChange:g=>o[d.key]=g,note:d.note},d.title))),l&&n(m,null,n(b.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(nn,{className:F.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:d=>o.macosVibrancyStyle=d,isSelected:d=>o.macosVibrancyStyle===d,serialize:Ns})),n(b.FormSection,{className:F.top16,title:"Vencord Notifications",tag:"h5"},n(ge,null,n(I,{onClick:wu},"Notification Settings"),n(I,{onClick:gl},"View Notification Log"))))}function mx(){return n(Va,{look:I.Looks.FILLED,color:I.Colors.WHITE,style:{marginTop:"1em"}})}function LR(e){let t=Ws.getDonorBadges(e);return Re.getMember(Ya,e)?.roles.includes(Za)||!!t}var fY,CR,kR,NR,AR,dx,RR,fx,gx=f(()=>{"use strict";a();Pu();_();He();du();Eu();Cl();T1();M();ze();me();gr();wt();S();py();Es();Wh();fy();Sr();px();fY=ue("vc-settings-"),CR="https://cdn.discordapp.com/emojis/1026533090627174460.png",kR="https://media.discordapp.net/stickers/1039992459209490513.png",NR="https://cdn.discordapp.com/emojis/1238120638020063377.png",AR="https://cdn.discordapp.com/emojis/1026533070955872337.png",dx="https://media.discordapp.net/stickers/1311070116305436712.png?size=2048",RR="https://media.discordapp.net/stickers/1311070166481895484.png?size=2048";fx=Bo(DR,"Vencord Settings")});var qs,gy=f(()=>{"use strict";a();_();Y2();X2();V2();tx();rx();dp();gx();M();Pe();T();$s();qs=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,patches:[{find:".versionHash",replacement:[{match:/\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},$self.makeInfoElements(${t}, ${o})`)},{match:/copyValue:\i\.join\(" "\)/,replace:"$& + $self.getInfoString()"}]},{find:".SEARCH_NO_RESULTS&&0===",replacement:[{match:/(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/,replace:(e,t,o,r,i)=>`${o} $self.addSettings(${r}, ${i}, ${t}) ${o}`},{match:/({(?=.+?function (\i).{0,160}(\i)=\i\.useMemo.{0,140}return \i\.useMemo\(\(\)=>\i\(\3).+?(?:function\(\){return |\(\)=>))\2/,replace:(e,t,o)=>`${t}$self.wrapSettingsHook(${o})`}]},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",replacement:{match:/(?<=function\((\i),\i\)\{)(?=let \i=Object.values\(\i.\i\).*?(\i\.\i)\.open\()/,replace:"$2.open($1);return;"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:fx,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:ex,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:nx,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:cx,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:Q2,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:K2,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},isRightSpot({header:e,settings:t}){let o=t?.[0];if(o==="LOGOUT"||o==="SOCIAL_LINKS")return!0;let{settingsLocation:r}=j.plugins.Settings;if(r==="bottom")return o==="LOGOUT";if(r==="belowActivity")return o==="CHANGELOG";if(e)try{let i={top:Me("USER_SETTINGS"),aboveNitro:Me("BILLING_SETTINGS"),belowNitro:Me("APP_SETTINGS"),aboveActivity:Me("ACTIVITY_SETTINGS")};return!i[r]||i[r].endsWith("_SETTINGS")?o==="PREMIUM":e===i[r]}catch{return o==="PREMIUM"}},patchedSettings:new WeakSet,addSettings(e,t,o){this.patchedSettings.has(e)||!this.isRightSpot(t)||(this.patchedSettings.add(e),e.push(...this.makeSettingsCategories(o)))},wrapSettingsHook(e){return(...t)=>{let o=e(...t);return this.patchedSettings.has(o)||o.unshift(...this.makeSettingsCategories({HEADER:"HEADER",DIVIDER:"DIVIDER",CUSTOM:"CUSTOM"})),o}},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro",default:!0},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity"},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}]}},get electronVersion(){return VencordNative.native.getVersions().electron||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" (Standalone)"},getInfoRows(){let{electronVersion:e,chromiumVersion:t,additionalInfo:o}=this,r=[`Vencord ${xn}${o}`];return e&&r.push(`Electron ${e}`),t&&r.push(`Chromium ${t}`),r},getInfoString(){return`
|
|
`+this.getInfoRows().join(`
|
|
`)},makeInfoElements(e,t){return this.getInfoRows().map((o,r)=>n(e,{key:r,...t},o))}})});var yy={};lt(yy,{UserSettings:()=>hy,getUserSetting:()=>hx,getUserSettingLazy:()=>Ao});function hx(e,t){if(!Vencord.Plugins.isPluginEnabled("UserSettingsAPI"))throw new Error("Cannot use UserSettingsAPI without setting as dependency.");for(let o in hy){let r=hy[o];if(r.userSettingsAPIGroup===e&&r.userSettingsAPIName===t)return r}}function Ao(e,t){return Dt(()=>hx(e,t))}var hy,wr=f(()=>{"use strict";a();So();Ae();$();hy=mo(()=>{let e=an('"textAndImages","renderSpoilers"');return e==null?new V("UserSettingsAPI ").error("Didn't find settings module."):ht(e)})});async function vx(){let e=await br();return e&&(await Vr(),Co()),e}async function bx(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=`Discord Desktop v${DiscordNative.app.getVersion()}`,o={Vencord:`v1.11.8 \u2022 [${xn}](<https://github.com/Vendicated/Vencord/commit/${xn}>)${qs.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1743814506359)}`,Client:`${e} ~ ${t}`,Platform:window.navigator.platform};o["Last Crash Reason"]=(await uu(()=>DiscordNative.processUtils.getLastCrash(),void 0))?.rendererCrashReason??"N/A";let r={"NoRPC enabled":Vencord.Plugins.isPluginEnabled("NoRPC"),"Activity Sharing disabled":uu(()=>!FR.getSetting(),!1),"Vencord DevBuild":!1,"Has UserPlugins":Object.values(zs).some(s=>s.userPlugin),"More than two weeks out of date":1743814506359<Date.now()-12096e5},i=`>>> ${Object.entries(o).map(([s,l])=>`**${s}**: ${l}`).join(`
|
|
`)}`;return i+=`
|
|
`+Object.entries(r).filter(([,s])=>s).map(([s])=>`\u26A0\uFE0F ${s}`).join(`
|
|
`),i.trim()}function Sx(){let e=s=>s.endsWith("API")||je[s].required,t=Object.keys(je).filter(s=>Vencord.Plugins.isPluginEnabled(s)&&!e(s)),o=t.filter(s=>!zs[s].userPlugin),r=t.filter(s=>zs[s].userPlugin),i=`**Enabled Plugins (${o.length}):**
|
|
${zi(o.join(", "))}`;return r.length&&(i+=`**Enabled UserPlugins (${r.length}):**
|
|
${zi(r.join(", "))}`),i}var ER,OR,_R,BR,FR,yx,UR,$R,fp,xx=f(()=>{"use strict";a();_();wr();ne();jt();_o();dp();M();Pe();Ae();ze();me();gr();Al();Qo();T();qi();S();$s();$n();gy();ER=/```js\n(.+?)```/s,OR=["1024286218801926184"],_R=[ph,dh,Za],BR=async function(){}.constructor,FR=Ao("status","showCurrentGame"),yx=e=>e.parent_id===Cs||OR.includes(e.id);UR=Ki(br),$R=P({}).withPrivateSettings(),fp=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["UserSettingsAPI"],settings:$R,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=>fn(D.getCurrentUser()?.id)||yx(e.channel),execute:async()=>({content:await bx()})},{name:"vencord-plugins",description:"Send Vencord plugin list",predicate:e=>fn(D.getCurrentUser()?.id)||yx(e.channel),execute:()=>({content:Sx()})}],flux:{async CHANNEL_SELECT({channelId:e}){if(!(e===cu||ie.getChannel(e)?.parent_id===Cs))return;let o=D.getCurrentUser()?.id;if(!o||fn(o))return;if(await UR().catch(()=>{}),ji)return rt.show({title:"Hold on!",body:n("div",null,n(b.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(b.FormText,{className:F.top8},"Please first update before asking for support!")),onCancel:()=>pp(),cancelText:"View Updates",confirmText:"Update & Restart Now",onConfirm:vx,secondaryConfirmText:"I know what I'm doing or I can't update"});let r=Re.getSelfMember(Ya)?.roles;!r||_R.some(i=>r.includes(i))}},renderMessageAccessory(e){let t=[];if((e.channel.id===mh||e.channel.parent_id===Cs&&e.message.author.id===lu)&&e.message.content?.includes("update")&&t.push(n(I,{key:"vc-update",color:I.Colors.GREEN,onClick:async()=>{try{await vx()?Je("Success! Restarting...",ee.Type.SUCCESS):Je("Already up to date!",ee.Type.MESSAGE)}catch(r){new V(this.name).error("Error while updating:",r),Je("Failed to update :(",ee.Type.FAILURE)}}},"Update Now")),e.channel.parent_id===Cs&&Be.can(ke.SEND_MESSAGES,e.channel)&&((e.message.content.includes("/vencord-debug")||e.message.content.includes("/vencord-plugins"))&&t.push(n(I,{key:"vc-dbg",onClick:async()=>Ls(e.channel.id,{content:await bx()})},"Run /vencord-debug"),n(I,{key:"vc-plg-list",onClick:async()=>Ls(e.channel.id,{content:Sx()})},"Run /vencord-plugins")),e.message.author.id===lu)){let r=ER.exec(e.message.content||e.message.embeds[0]?.rawDescription||"");r&&t.push(n(I,{key:"vc-run-snippet",onClick:async()=>{try{await BR(r[1])(),Je("Success!",ee.Type.SUCCESS)}catch(i){new V(this.name).error("Error while running snippet:",i),Je("Failed to run snippet :(",ee.Type.FAILURE)}}},"Run Snippet"))}return t.length?n(ge,null,t):null},renderContributorDmWarningCard:k.wrap(({channel:e})=>{let t=e.getRecipientId();return!fn(t)||Fe.isFriend(t)||fn(D.getCurrentUser()?.id)?null:n(Zt,{className:`vc-plugins-restart-card ${F.top8}`},"Please do not private message Vencord plugin developers for support!",n("br",null),"Instead, use the Vencord support channel: ",Ee.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),!ie.getChannel(cu)&&" (Click the link to join)")},{noop:!0})})});var GR,zR,gp,ql,HR,Kl,hp,Tx=f(()=>{"use strict";a();_();ne();M();Pe();T();$();S();GR=se("UserProfilePopoutWrapper: user cannot be undefined"),zR=R("accountProfilePopoutWrapper"),gp=!1,ql={current:null},HR=k.wrap(()=>{let{prioritizeServerProfile:e}=Kl.use(["prioritizeServerProfile"]);return n(E.Menu,{navId:"vc-ap-server-profile",onClose:Et.closeContextMenu},n(E.MenuItem,{id:"vc-ap-view-alternate-popout",label:e?"View Account Profile":"View Server Profile",disabled:Ko()?.getGuildId()==null,action:t=>{gp=!0,ql.current?.props.onMouseDown(),ql.current?.props.onClick(t)}}),n(E.MenuCheckboxItem,{id:"vc-ap-prioritize-server-profile",label:"Prioritize Server Profile",checked:e,action:()=>Kl.store.prioritizeServerProfile=!e}))},{noop:!0}),Kl=P({prioritizeServerProfile:{type:3,description:"Prioritize Server Profile when left clicking your account panel",default:!1}}),hp=y({name:"AccountPanelServerProfile",description:"Right click your account panel in the bottom left to view your profile in the current server",authors:[p.Nuckyz,p.relitrix],settings:Kl,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",group:!0,replacement:[{match:/let{speaking:\i/,replace:"$self.useAccountPanelRef();$&"},{match:/(\.AVATAR,children:.+?renderPopout:(\i)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/,replace:(e,t,o,r,i)=>`${t}$self.UserProfile({popoutProps:${o},currentUser:${i},originalRenderPopout:()=>{${r}}})`},{match:/\.AVATAR,children:.+?onRequestClose:\(\)=>\{/,replace:"$&$self.onPopoutClose();"},{match:/(?<=#{intl::SET_STATUS}\),)/,replace:"ref:$self.accountPanelRef,onContextMenu:$self.openAccountPanelContextMenu,"}]}],get accountPanelRef(){return ql},useAccountPanelRef(){return le(()=>()=>{ql.current=null},[]),ql=Mt(null)},openAccountPanelContextMenu(e){Et.openContextMenu(e,HR)},onPopoutClose(){gp=!1},UserProfile:k.wrap(({popoutProps:e,currentUser:t,originalRenderPopout:o})=>{if(Kl.store.prioritizeServerProfile&&gp||!Kl.store.prioritizeServerProfile&&!gp)return o();let r=Ko();return r?.getGuildId()==null?o():n("div",{className:zR.accountProfilePopoutWrapper},n(GR,{...e,userId:t.id,guildId:r.getGuildId(),channelId:r.id}))},{noop:!0})})});var yp,wx=f(()=>{"use strict";a();M();T();yp=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[p.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?([,}].*?\))/g,replace:(e,t)=>t.match(/}=.+/)==null?`canAnimate:!0${t}`:e}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(\.CUSTOM_STATUS.+?animate:)\i/,replace:"$1!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(\.headerContent.+?guildBanner:\i,animate:)\i/,replace:"$1!0"}}]})});var vp,Mx=f(()=>{"use strict";a();_();M();T();hr("AlwaysExpandRoles","ShowAllRoles");vp=y({name:"AlwaysExpandRoles",description:"Always expands the role list in profile popouts",authors:[p.surgedevs],patches:[{find:'action:"EXPAND_ROLES"',replacement:[{match:/(roles:\i(?=.+?(\i)\(!0\)[,;]\i\({action:"EXPAND_ROLES"}\)).+?\[\i,\2\]=\i\.useState\()!1\)/,replace:(e,t,o)=>`${t}!0)`},{match:/(?<=useLayoutEffect\(\(\)=>{if\()\i/,replace:e=>"false"}]}]})});var vy,bp,Px=f(()=>{"use strict";a();_();M();T();vy=P({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}}),bp=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt,p.Trwy],patches:[{find:'="MaskedLinkStore",',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>vy.store.domain},{find:"bitbucket.org",replacement:{match:/function \i\(\i\){(?=.{0,30}pathname:\i)/,replace:"$&return null;"},predicate:()=>vy.store.file}],settings:vy})});var jR,WR,qR,oi,Sp,Ix=f(()=>{"use strict";a();_();ne();M();T();$();jR=Ce(".actionBarIcon)"),WR=R("popFirstFile","update"),qR=/\.tar\.\w+$/,oi=P({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:()=>oi.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>oi.store.method!==1}}),Sp=y({name:"AnonymiseFileNames",authors:[p.fawn],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:",replacement:{match:/uploadFiles:(\i),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),"}},{find:'addFilesTo:"message.attachments"',replacement:{match:/(\i.uploadFiles\((\i),)/,replace:"$2.forEach(f=>f.filename=$self.anonymise(f)),$1"}},{find:"#{intl::ATTACHMENT_UTILITIES_SPOILER}",replacement:{match:/(?<=children:\[)(?=.{10,80}tooltip:.{0,100}#{intl::ATTACHMENT_UTILITIES_SPOILER})/,replace:"arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null,"}}],settings:oi,renderIcon:k.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??oi.store.anonymiseByDefault;return n(jR,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,WR.update(t,e.id,o,{})}},r?n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M17.06 13C15.2 13 13.64 14.33 13.24 16.1C12.29 15.69 11.42 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C19.23 21 21 19.21 21 17C21 14.79 19.23 13 17.06 13M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17S5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17S8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17S15.5 14.14 17.06 14.14C18.62 14.14 19.88 15.42 19.88 17S18.61 19.86 17.06 19.86M22 10.5H2V12H22V10.5M15.53 2.63C15.31 2.14 14.75 1.88 14.22 2.05L12 2.79L9.77 2.05L9.72 2.04C9.19 1.89 8.63 2.17 8.43 2.68L6 9H18L15.56 2.68L15.53 2.63Z"})):n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{transform:"scale(-1,1)"}},n("path",{fill:"currentColor",d:"M22.11 21.46L2.39 1.73L1.11 3L6.31 8.2L6 9H7.11L8.61 10.5H2V12H10.11L13.5 15.37C13.38 15.61 13.3 15.85 13.24 16.1C12.29 15.69 11.41 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C17.66 21 18.22 20.86 18.72 20.61L20.84 22.73L22.11 21.46M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17C4.13 15.42 5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17C9.75 18.58 8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17C14.25 16.74 14.29 16.5 14.36 16.25L17.84 19.73C17.59 19.81 17.34 19.86 17.06 19.86M22 12H15.2L13.7 10.5H22V12M17.06 13C19.23 13 21 14.79 21 17C21 17.25 20.97 17.5 20.93 17.73L19.84 16.64C19.68 15.34 18.66 14.32 17.38 14.17L16.29 13.09C16.54 13.03 16.8 13 17.06 13M12.2 9L7.72 4.5L8.43 2.68C8.63 2.17 9.19 1.89 9.72 2.04L9.77 2.05L12 2.79L14.22 2.05C14.75 1.88 15.32 2.14 15.54 2.63L15.56 2.68L18 9H12.2Z"})))},{noop:!0}),anonymise(e){if((e.anonymise??oi.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=qR.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(oi.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:oi.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return oi.store.consistent+i;case 2:return Date.now()+i}}})});function YR(e){G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"AppleMusic"})}function Yl(e,t){return e.replaceAll("{name}",t.name).replaceAll("{album}",t.album??"").replaceAll("{artist}",t.artist??"")}function Cx(e,t){let o=e==="Album"?t.albumArtwork:t.artistArtwork;if(o)return Di.fetchAssetIds(kx,[o]).then(r=>r[0])}var KR,kx,Fo,xp,Nx=f(()=>{"use strict";a();_();M();T();S();KR=VencordNative.pluginHelpers.AppleMusicRichPresence,kx="1239490006054207550";Fo=P({activityType:{type:4,description:"Which type of activity",options:[{label:"Playing",value:0,default:!0},{label:"Listening",value:2}]},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}"}});xp=y({name:"AppleMusicRichPresence",description:"Discord rich presence for your Apple Music!",authors:[p.RyanCaoDev],hidden:!navigator.platform.startsWith("Mac"),reporterTestable:2,settingsAboutComponent(){return n(m,null,n(b.FormText,null,"For the customizable activity format strings, you can use several special strings to include track data in activities!"," ",n("code",null,"{name}")," is replaced with the track name; ",n("code",null,"{artist}")," is replaced with the artist(s)' name(s); and ",n("code",null,"{album}")," is replaced with the album name."))},settings:Fo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},Fo.store.refreshInterval*1e3)},stop(){clearInterval(this.updateInterval),G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null})},updatePresence(){this.getActivity().then(e=>{YR(e)})},async getActivity(){let e=await KR.fetchTrackData();if(!e)return null;let[t,o]=await Promise.all([Cx(Fo.store.largeImageType,e),Cx(Fo.store.smallImageType,e)]),r={},i=Number.isNaN(e.duration)&&e.playerPosition===0;Fo.store.largeImageType!=="Disabled"&&(r.large_image=t,i||(r.large_text=Yl(Fo.store.largeTextString,e))),Fo.store.smallImageType!=="Disabled"&&(r.small_image=o,i||(r.small_text=Yl(Fo.store.smallTextString,e)));let s=[];return Fo.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:kx,name:Yl(Fo.store.nameString,e),details:Yl(Fo.store.detailsString,e),state:i?void 0:Yl(Fo.store.stateString,e),timestamps:e.playerPosition&&e.duration&&Fo.store.enableTimestamps?{start:Date.now()-e.playerPosition*1e3,end:Date.now()-e.playerPosition*1e3+e.duration*1e3}:void 0,assets:r,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:Fo.store.activityType,flags:1}}})});var Ax,Tp,Rx=f(()=>{"use strict";a();_();M();T();Ax=P({source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}),Tp=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[p.Xinto,p.Glitch],settings:Ax,patches:[{find:"#{intl::BAN_CONFIRM_TITLE}",replacement:{match:/src:\i\("?\d+"?\)/g,replace:"src:$self.source"}}],get source(){return Ax.store.source}})});var Dx=f(()=>{});var Lx,ZR,Ex,Ox=f(()=>{"use strict";a();ne();$();S();by();Lx=be("ChannelRTCStore"),ZR=se('("guildsnav")'),Ex=k.wrap(e=>{let t=Se([Ks],()=>Ks.getExpandedFolders()),o=Se([Lx],()=>Lx.isFullscreenInContext()),r=n(ZR,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:o?"none":"flex",gridArea:"betterFoldersSidebar"};return!s||!$t.store.sidebarAnim?i?n("div",{style:l},r):null:n(ru.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(ru.animated.div,{style:{...c,...l}},r))},{noop:!0})});function XR(e){return JR.getGuildFolders().find(t=>t.guildIds.includes(e))}function xy(){for(let e of Ks.getExpandedFolders())Ty.toggleGuildFolderExpand(e)}var Ks,JR,QR,Ty,_x,Sy,$t,wp,by=f(()=>{"use strict";a();Dx();_();M();Pe();T();$();S();Ox();Ks=be("ExpandedGuildFolderStore"),JR=be("SortedGuildStore"),QR=kt(e=>e.prototype?.moveNextTo),Ty=R("move","toggleGuildFolderExpand"),_x=null,Sy=!1;$t=P({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}}),wp=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN,p.Nuckyz],settings:$t,patches:[{find:'("guildsnav")',predicate:()=>$t.store.sidebar,replacement:[{match:/let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i,)/,replace:"$&,isBetterFolders"},{match:/\[(\i)\]=(\(0,\i\.\i\).{0,40}getGuildsTree\(\).+?}\))(?=,)/,replace:(e,t,o)=>`[betterFoldersOriginalTree]=${o},${t}=$self.getGuildTree(!!arguments[0]?.isBetterFolders,betterFoldersOriginalTree,arguments[0]?.betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?}\)(?::null)?\](?=}\))/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0]?.isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0]?.isBetterFolders))"},{match:/switch\(\i\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,/,replace:'$&isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".toggleGuildFolderExpand(",predicate:()=>$t.store.sidebar&&$t.store.showFolderIcon!==1,replacement:[{match:/(\],\(\)=>)(\i\.\i)\.isFolderExpanded\(\i\)\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders())`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".expandedFolderBackground,",predicate:()=>$t.store.sidebar,replacement:[{predicate:()=>$t.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0]?.isBetterFolders&&${t};`},{predicate:()=>!$t.store.keepIcons,match:/(?=,\{from:\{height)/,replace:"&&$self.shouldShowTransition(arguments[0])"},{predicate:()=>!$t.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}$self.shouldRenderContents(arguments[0],${t})?null:`},{predicate:()=>$t.store.showFolderIcon!==1,match:/\.isExpanded\),.{0,30}children:\[/,replace:"$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&"},{predicate:()=>$t.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:"},{predicate:()=>!$t.store.keepIcons,match:/(?=className:.{0,50}folderIcon)/,replace:"style:arguments[0]?.isBetterFolders?{}:{marginBottom:0},"}]},{find:"APPLICATION_LIBRARY,render:",predicate:()=>$t.store.sidebar,group:!0,replacement:[{match:/(?<=[[,])((?:!?\i&&)+)\(.{0,50}({className:\i\.guilds,themeOverride:\i})\)/g,replace:(e,t,o)=>`${e},${t}$self.FolderSideBar(${o})`},{match:/(?<=className:)(\i\.base)(?=,)/,replace:"`${$self.gridStyle} ${$1}`"}]},{find:"#{intl::DISCODO_DISABLED}",predicate:()=>$t.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!$t.store.closeAllFolders&&!$t.store.forceOpen)&&_x!==e.guildId){_x=e.guildId;let t=XR(e.guildId);t?.folderId?$t.store.forceOpen&&!Ks.isFolderExpanded(t.folderId)&&Ty.toggleGuildFolderExpand(t.folderId):$t.store.closeAllFolders&&xy()}},TOGGLE_GUILD_FOLDER_EXPAND(e){$t.store.closeOthers&&!Sy&&(Sy=!0,G.wait(()=>{let t=Ks.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&Ty.toggleGuildFolderExpand(o);Sy=!1}))},LOGOUT(){xy()}},gridStyle:"vc-betterFolders-sidebar-grid",getGuildTree(e,t,o){return $e(()=>{if(!e||o==null)return t;let r=new QR;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},[e,t,o])},makeGuildsBarGuildListFilter(e){return t=>{if(!e)return!0;try{return t?.props?.["aria-label"]===Me("SERVERS")}catch(o){console.error(o)}return!0}},makeGuildsBarTreeFilter(e){return t=>e?t?.props?.className?.includes("itemsContainer")&&t.props.children!=null?(t.props.children=t.props.children.filter(o=>o?.props?.onScroll!=null),!0):!1:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch($t.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},shouldShowTransition(e){return e?.folderNode?.id===1?!0:!!e?.isBetterFolders},shouldRenderContents(e,t){return e?.folderNode?.id===1?!1:!e?.isBetterFolders&&t},FolderSideBar:Ex,closeFolders:xy})});var Mp,Bx=f(()=>{"use strict";a();M();T();Mp=y({name:"BetterGifAltText",authors:[p.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:'"onCloseImage",',replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:"#{intl::GIF}",replacement:{match:/alt:(\i)=(\i\.\i\.string\(\i\.\i#{intl::GIF}\))(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var Pp,Fx=f(()=>{"use strict";a();M();T();Pp=y({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[p.Samwich],patches:[{find:'"state",{resultType:',replacement:[{match:/(?<="state",{resultType:)null/,replace:'"Favorites"'}]}]})});var wy,Ip,Ux=f(()=>{"use strict";a();_();M();Ho();T();wy=P({hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>j.plugins.BetterNotesBox.hide,default:!1}}),Ip=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],settings:wy,patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>wy.store.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>{if(t.match(/}=.+/)){let r=e.match(Lt(/hideNote:(\i)=!?\d/));return r?`hideNote:${r[1]}=!0`:e}return"hideNote:!0"}}},{find:"#{intl::NOTE_PLACEHOLDER}",replacement:{match:/#{intl::NOTE_PLACEHOLDER}\),/,replace:"$&spellCheck:!$self.noSpellCheck,"}}],get noSpellCheck(){return wy.store.noSpellCheck}})});function eD(){return n("svg",{role:"img",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z"}))}function tD(){return n("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M 12,0 C 5.3733333,0 0,5.3733333 0,12 c 0,6.626667 5.3733333,12 12,12 1.106667,0 2,-0.893333 2,-2 0,-0.52 -0.2,-0.986667 -0.52,-1.346667 -0.306667,-0.346666 -0.506667,-0.813333 -0.506667,-1.32 0,-1.106666 0.893334,-2 2,-2 h 2.36 C 21.013333,17.333333 24,14.346667 24,10.666667 24,4.7733333 18.626667,0 12,0 Z M 4.6666667,12 c -1.1066667,0 -2,-0.893333 -2,-2 0,-1.1066667 0.8933333,-2 2,-2 1.1066666,0 2,0.8933333 2,2 0,1.106667 -0.8933334,2 -2,2 z M 8.666667,6.6666667 c -1.106667,0 -2.0000003,-0.8933334 -2.0000003,-2 0,-1.1066667 0.8933333,-2 2.0000003,-2 1.106666,0 2,0.8933333 2,2 0,1.1066666 -0.893334,2 -2,2 z m 6.666666,0 c -1.106666,0 -2,-0.8933334 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.1066666 -0.893333,2 -2,2 z m 4,5.3333333 c -1.106666,0 -2,-0.893333 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.106667 -0.893333,2 -2,2 z"}))}var $x,VR,Gx,Cp,zx=f(()=>{"use strict";a();_();wr();At();M();Pe();T();$();S();$x=R("open","selectRole","updateGuild"),VR=Ao("appearance","developerMode");Gx=P({roleIconFileFormat:{type:4,description:"File format to use when viewing role icons",options:[{label:"png",value:"png",default:!0},{label:"webp",value:"webp"},{label:"jpg",value:"jpg"}]}}),Cp=y({name:"BetterRoleContext",description:"Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile",authors:[p.Ven,p.goodbee],dependencies:["UserSettingsAPI"],settings:Gx,start(){VR.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=ar();if(!o)return;let r=ce.getRole(o.id,t);r&&(r.colorString&&e.unshift(n(E.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>Ht.copy(r.colorString),icon:tD})),Be.getGuildPermissionProps(o).canManageRoles&&e.unshift(n(E.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await $x.open(o.id,"ROLES"),$x.selectRole(t)},icon:eD})),r.icon&&e.push(n(E.MenuItem,{id:"vc-view-role-icon",label:"View Role Icon",action:()=>{Yo({url:`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${r.id}/${r.icon}.${Gx.store.roleIconFileFormat}`,height:128,width:128})},icon:yn})))}}})});var kp,Hx=f(()=>{"use strict";a();_();M();T();S();kp=y({name:"BetterRoleDot",authors:[p.Ven,p.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:()=>j.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:"#{intl::ADD_ROLE_A11Y_LABEL}",all:!0,predicate:()=>j.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!j.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",all:!0,predicate:()=>j.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!j.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){Ht.copy(e),ee.show({message:"Copied to Clipboard!",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})}})});var jx,Wx,qx,Kx,Yx,Zx,Jx,Qx,Xx,Vx=f(()=>{"use strict";a();wt();$();jx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"})),Wx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M188.8,255.93A67.2,67.2,0,1,0,256,188.75,67.38,67.38,0,0,0,188.8,255.93Z"}),n("path",{d:"M476.75,217.79s0,0,0,.05a206.63,206.63,0,0,0-7-28.84h-.11a202.16,202.16,0,0,1,7.07,29h0a203.5,203.5,0,0,0-7.07-29H314.24c19.05,17,31.36,40.17,31.36,67.05a86.55,86.55,0,0,1-12.31,44.73L231,478.45a2.44,2.44,0,0,1,0,.27V479h0v-.26A224,224,0,0,0,256,480c6.84,0,13.61-.39,20.3-1a222.91,222.91,0,0,0,29.78-4.74C405.68,451.52,480,362.4,480,255.94A225.25,225.25,0,0,0,476.75,217.79Z"}),n("path",{d:"M256,345.5c-33.6,0-61.6-17.91-77.29-44.79L76,123.05l-.14-.24A224,224,0,0,0,207.4,474.55l0-.05,77.69-134.6A84.13,84.13,0,0,1,256,345.5Z"}),n("path",{d:"M91.29,104.57l77.35,133.25A89.19,89.19,0,0,1,256,166H461.17a246.51,246.51,0,0,0-25.78-43.94l.12.08A245.26,245.26,0,0,1,461.17,166h.17a245.91,245.91,0,0,0-25.66-44,2.63,2.63,0,0,1-.35-.26A223.93,223.93,0,0,0,91.14,104.34l.14.24Z"})),qx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 24 24"},n("path",{d:"M21.86 17.86q.14 0 .25.12.1.13.1.25t-.11.33l-.32.46-.43.53-.44.5q-.21.25-.38.42l-.22.23q-.58.53-1.34 1.04-.76.51-1.6.91-.86.4-1.74.64t-1.67.24q-.9 0-1.69-.28-.8-.28-1.48-.78-.68-.5-1.22-1.17-.53-.66-.92-1.44-.38-.77-.58-1.6-.2-.83-.2-1.67 0-1 .32-1.96.33-.97.87-1.8.14.95.55 1.77.41.82 1.02 1.5.6.68 1.38 1.21.78.54 1.64.9.86.36 1.77.56.92.2 1.8.2 1.12 0 2.18-.24 1.06-.23 2.06-.72l.2-.1.2-.05zm-15.5-1.27q0 1.1.27 2.15.27 1.06.78 2.03.51.96 1.24 1.77.74.82 1.66 1.4-1.47-.2-2.8-.74-1.33-.55-2.48-1.37-1.15-.83-2.08-1.9-.92-1.07-1.58-2.33T.36 14.94Q0 13.54 0 12.06q0-.81.32-1.49.31-.68.83-1.23.53-.55 1.2-.96.66-.4 1.35-.66.74-.27 1.5-.39.78-.12 1.55-.12.7 0 1.42.1.72.12 1.4.35.68.23 1.32.57.63.35 1.16.83-.35 0-.7.07-.33.07-.65.23v-.02q-.63.28-1.2.74-.57.46-1.05 1.04-.48.58-.87 1.26-.38.67-.65 1.39-.27.71-.42 1.44-.15.72-.15 1.38zM11.96.06q1.7 0 3.33.39 1.63.38 3.07 1.15 1.43.77 2.62 1.93 1.18 1.16 1.98 2.7.49.94.76 1.96.28 1 .28 2.08 0 .89-.23 1.7-.24.8-.69 1.48-.45.68-1.1 1.22-.64.53-1.45.88-.54.24-1.11.36-.58.13-1.16.13-.42 0-.97-.03-.54-.03-1.1-.12-.55-.1-1.05-.28-.5-.19-.84-.5-.12-.09-.23-.24-.1-.16-.1-.33 0-.15.16-.35.16-.2.35-.5.2-.28.36-.68.16-.4.16-.95 0-1.06-.4-1.96-.4-.91-1.06-1.64-.66-.74-1.52-1.28-.86-.55-1.79-.89-.84-.3-1.72-.44-.87-.14-1.76-.14-1.55 0-3.06.45T.94 7.55q.71-1.74 1.81-3.13 1.1-1.38 2.52-2.35Q6.68 1.1 8.37.58q1.7-.52 3.58-.52Z"})),Kx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M130.22 127.548C130.38 127.558 130.3 127.558 130.22 127.548V127.548ZM481.64 172.898C471.03 147.398 449.56 119.898 432.7 111.168C446.42 138.058 454.37 165.048 457.4 185.168C457.405 185.306 457.422 185.443 457.45 185.578C429.87 116.828 383.098 89.1089 344.9 28.7479C329.908 5.05792 333.976 3.51792 331.82 4.08792L331.7 4.15792C284.99 30.1109 256.365 82.5289 249.12 126.898C232.503 127.771 216.219 131.895 201.19 139.035C199.838 139.649 198.736 140.706 198.066 142.031C197.396 143.356 197.199 144.87 197.506 146.323C197.7 147.162 198.068 147.951 198.586 148.639C199.103 149.327 199.76 149.899 200.512 150.318C201.264 150.737 202.096 150.993 202.954 151.071C203.811 151.148 204.676 151.045 205.491 150.768L206.011 150.558C221.511 143.255 238.408 139.393 255.541 139.238C318.369 138.669 352.698 183.262 363.161 201.528C350.161 192.378 326.811 183.338 304.341 187.248C392.081 231.108 368.541 381.784 246.951 376.448C187.487 373.838 149.881 325.467 146.421 285.648C146.421 285.648 157.671 243.698 227.041 243.698C234.541 243.698 255.971 222.778 256.371 216.698C256.281 214.698 213.836 197.822 197.281 181.518C188.434 172.805 184.229 168.611 180.511 165.458C178.499 163.75 176.392 162.158 174.201 160.688C168.638 141.231 168.399 120.638 173.51 101.058C148.45 112.468 128.96 130.508 114.8 146.428H114.68C105.01 134.178 105.68 93.7779 106.25 85.3479C106.13 84.8179 99.022 89.0159 98.1 89.6579C89.5342 95.7103 81.5528 102.55 74.26 110.088C57.969 126.688 30.128 160.242 18.76 211.318C14.224 231.701 12 255.739 12 263.618C12 398.318 121.21 507.508 255.92 507.508C376.56 507.508 478.939 420.281 496.35 304.888C507.922 228.192 481.64 173.82 481.64 172.898Z"})),Yx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z"})),Zx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 496 512"},n("path",{d:"M313.9 32.7c-170.2 0-252.6 223.8-147.5 355.1 36.5 45.4 88.6 75.6 147.5 75.6 36.3 0 70.3-11.1 99.4-30.4-43.8 39.2-101.9 63-165.3 63-3.9 0-8 0-11.9-.3C104.6 489.6 0 381.1 0 248 0 111 111 0 248 0h.8c63.1.3 120.7 24.1 164.4 63.1-29-19.4-63.1-30.4-99.3-30.4zm101.8 397.7c-40.9 24.7-90.7 23.6-132-5.8 56.2-20.5 97.7-91.6 97.7-176.6 0-84.7-41.2-155.8-97.4-176.6 41.8-29.2 91.2-30.3 132.9-5 105.9 98.7 105.5 265.7-1.2 364z"})),Jx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"})),Qx=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{fillRule:"evenodd",d:"M4.475 5.458c-.284 0-.514-.237-.47-.517C4.28 3.24 5.576 2 7.825 2c2.25 0 3.767 1.36 3.767 3.215 0 1.344-.665 2.288-1.79 2.973-1.1.659-1.414 1.118-1.414 2.01v.03a.5.5 0 0 1-.5.5h-.77a.5.5 0 0 1-.5-.495l-.003-.2c-.043-1.221.477-2.001 1.645-2.712 1.03-.632 1.397-1.135 1.397-2.028 0-.979-.758-1.698-1.926-1.698-1.009 0-1.71.529-1.938 1.402-.066.254-.278.461-.54.461h-.777ZM7.496 14c.622 0 1.095-.474 1.095-1.09 0-.618-.473-1.092-1.095-1.092-.606 0-1.087.474-1.087 1.091S6.89 14 7.496 14Z"})),Xx=gt(()=>_a("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"))});function Jl(e){return`${e.os} \xB7 ${e.platform}`}function Ql(){return It.set(eT(),Uo)}async function tT(){(await It.get(eT())||new Map).forEach((t,o)=>{Uo.set(o,t)})}function oT(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 nT(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return jx;case"Android Chrome":case"Chrome iOS":case"Chrome":return Wx;case"Edge":return qx;case"Firefox":return Kx;case"Internet Explorer":return Yx;case"Opera Mini":case"Opera":return Zx;case"Mobile Safari":case"Safari":return Jx;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return Xx;default:return Qx}}var eT,Uo,My=f(()=>{"use strict";a();Mr();S();Vx();eT=()=>`BetterSessions_savedSessions_${D.getCurrentUser().id}`,Uo=new Map});function rT({props:e,session:t,state:o}){let[r,i]=o,[s,l]=W.useState(Uo.get(t.id_hash)?.name??"");function c(){Uo.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:Jl(t.client_info)),Ql(),e.onClose()}return n(ve,{...e},n(Ne,null,n(b.FormTitle,{tag:"h4"},"Rename")),n(we,null,n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),n(ct,{style:{marginBottom:"10px"},placeholder:Jl(t.client_info),value:s,onChange:l,onKeyDown:u=>{u.key==="Enter"&&c()}}),n(I,{style:{marginBottom:"20px",paddingLeft:"1px",paddingRight:"1px",opacity:.6},look:I.Looks.LINK,color:I.Colors.LINK,size:I.Sizes.NONE,onClick:()=>l("")},"Reset Name")),n(ut,null,n(I,{color:I.Colors.BRAND,onClick:c},"Save"),n(I,{color:I.Colors.TRANSPARENT,look:I.Looks.LINK,onClick:()=>e.onClose()},"Cancel")))}var iT=f(()=>{"use strict";a();Ke();S();My()});function sT({session:e,state:t}){return n(I,{look:I.Looks.LINK,color:I.Colors.LINK,size:I.Sizes.NONE,style:{paddingTop:"0px",paddingBottom:"0px",top:"-2px"},onClick:()=>he(o=>n(rT,{props:o,session:e,state:t}))},"Rename")}var aT=f(()=>{"use strict";a();Ke();S();iT()});var oD,nD,lT,rD,iD,Py,Np,cT=f(()=>{"use strict";a();pr();_();ne();M();T();$();S();aT();My();oD=be("AuthSessionsStore"),nD=R("saveAccountChanges","open"),lT=R("timestampTooltip","blockquoteContainer"),rD=R("sessionIcon"),iD=se("!1,lowerBadgeSize:"),Py=P({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=y({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:[p.amia],settings:Py,patches:[{find:"#{intl::AUTH_SESSIONS_SESSION_LOG_OUT}",replacement:[{match:/({variant:"eyebrow",className:\i\.sessionInfoRow,children:).{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:\i\[\d+\]}\)\]}\)\]/,replace:"$1$self.renderName(arguments[0])"},{match:/({variant:"text-sm\/medium",className:\i\.sessionInfoRow,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/,replace:"$1$self.renderTimestamp({ ...arguments[0], timeLabel: $2 })}"},{match:/\.currentSession:null\),children:\[(?<=,icon:(\i)\}.+?)/,replace:"$& $self.renderIcon({ ...arguments[0], DeviceIcon: $1 }), false &&"}]}],renderName:k.wrap(({session:e})=>{let t=Uo.get(e.id_hash),o=W.useState(t?.name?`${t.name}*`:Jl(e.client_info)),[r,i]=o;return n(m,null,n("span",null,r),(t==null||t.isNew)&&n("div",{className:"vc-plugins-badge",style:{backgroundColor:"#ED4245",marginLeft:"2px"}},"NEW"),n(sT,{session:e,state:o}))},{noop:!0}),renderTimestamp:k.wrap(({session:e,timeLabel:t})=>n(oe,{text:e.approx_last_used_time.toLocaleString(),tooltipClassName:lT.timestampTooltip},o=>n("span",{...o,className:lT.timestamp},t)),{noop:!0}),renderIcon:k.wrap(({session:e,DeviceIcon:t})=>{let o=nT(e.client_info.platform);return n(iD,{style:{cursor:"unset"},selected:!1,lowerBadge:n("div",{style:{width:"20px",height:"20px",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"50%",backgroundColor:"var(--interactive-normal)",color:"var(--background-secondary)"}},n(o,{width:14,height:14})),lowerBadgeSize:{width:20,height:20}},n("div",{className:rD.sessionIcon,style:{backgroundColor:oT(e.client_info.os)}},n(t,{width:28,height:28,color:"currentColor"})))},{noop:!0}),async checkNewSessions(){let e=await bt.get({url:Pt.Endpoints.AUTH_SESSIONS});for(let t of e.body.user_sessions)Uo.has(t.id_hash)||(Uo.set(t.id_hash,{name:"",isNew:!0}),Ye({title:"BetterSessions",body:`New session:
|
|
${t.client_info.os} \xB7 ${t.client_info.platform} \xB7 ${t.client_info.location}`,permanent:!0,onClick:()=>nD.open("Sessions")}));Ql()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=oD.getSessions().map(t=>t.id_hash);e.forEach(t=>{Uo.has(t)||Uo.set(t,{name:"",isNew:!1})}),e.length>0&&Uo.forEach((t,o)=>{e.includes(o)||Uo.delete(o)}),Uo.forEach(t=>{t.isNew=!1}),Ql()}},async start(){await tT(),this.checkNewSessions(),Py.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,Py.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}})});function sD(){rt.show({title:"Restart required",body:n("p",null,"You have changed settings that require a restart."),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})}function Iy(){let e=$e(()=>Object.values(je).sort((l,c)=>l.name.localeCompare(c.name)),[]),[t,o]=K(""),r=t.toLowerCase(),i=l=>Vencord.Plugins.isPluginEnabled(l.name)&&l.options&&!nr(l.options)&&(l.name.toLowerCase().includes(r)||l.description.toLowerCase().includes(r)||l.tags?.some(c=>c.toLowerCase().includes(r))),s=e.filter(i);return n(m,null,n(E.MenuControlItem,{id:"vc-plugins-search",control:(l,c)=>n(E.MenuSearchControl,{...l,query:t,onChange:o,ref:c,placeholder:Me("SEARCH")})}),!!s.length&&n(E.MenuSeparator,null),s.map(l=>n(E.MenuItem,{key:l.name,id:l.name,label:l.name,action:()=>Jr(l,sD)})))}var uT=f(()=>{"use strict";a();Cl();Pe();me();S();$n()});function lD({mode:e,baseLayer:t=!1,...o}){let r=e==="HIDDEN",i=Mt(null);le(()=>()=>{On.dispatch("LAYER_POP_START"),On.dispatch("LAYER_POP_COMPLETE")},[]);let s=n("div",{ref:i,"aria-hidden":r,className:aD({[Ap.layer]:!0,[Ap.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(nu,{containerRef:i},s)}var aD,Ap,Ys,Rp,pT=f(()=>{"use strict";a();_();He();M();Pe();Ae();T();$();S();uT();aD=ue("");Xe(["animating","baseLayer","bg","layer","layers"],e=>Ap=e);Ys=P({disableFade:{description:"Disable the crossfade animation",type:3,default:!0,restartNeeded:!0},organizeMenu:{description:"Organizes the settings cog context menu into categories",type:3,default:!0},eagerLoad:{description:"Removes the loading delay when opening the menu for the first time",type:3,default:!0,restartNeeded:!0}});Rp=y({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[p.Kyuuhachi],settings:Ys,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=\((\i),"contextType",\i\.\i\);)/,replace:"$1=$self.Layer;",predicate:()=>Ys.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>Ys.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:()=>Ys.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:()=>Ys.store.eagerLoad},{find:"#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",replacement:[{match:/(EXPERIMENTS:.+?)(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/,replace:"$1$self.wrapMenu($2)"},{match:/case \i\.\i\.DEVELOPER_OPTIONS:return \i;/,replace:"$&case 'VencordPlugins':return $self.PluginsSubmenu();"}]}],PluginsSubmenu:Iy,Layer(e){try{[nu.$$vencordInternal(),On,Ap].forEach(t=>t.test)}catch{return new V("BetterSettings").error("Failed to find some components"),e.children}return n(lD,{...e})},wrapMenu(e){if(!Ys.store.organizeMenu)return e;let t=[{label:null,items:[]}];for(let o of e)o.section==="HEADER"?t.push({label:o.label,items:[]}):o.section==="DIVIDER"?t.push({label:Me("OTHER_OPTIONS"),items:[]}):t.at(-1).items.push(o);return{filter(o){for(let r of t)r.items=r.items.filter(o);return this},map(o){return t.filter(r=>r.items.length>0).map(({label:r,items:i})=>{let s=i.map(o);return r?n(E.MenuItem,{key:r,id:r.replace(/\W/,"_"),label:r,action:s[0].props.action},s):s})}}}})});var Dp,dT=f(()=>{"use strict";a();M();T();Dp=y({name:"BetterUploadButton",authors:[p.fawn,p.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:'"ChannelAttachButton"',replacement:[{match:/\.attachButtonInner,"aria-label":.{0,50},onDoubleClick:(.+?:void 0),.{0,30}?\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,",noWarn:!0},{match:/\.attachButtonInner,"aria-label":.{0,50},onDoubleClick:(.+?:void 0),.{0,100}\},(\i)\).{0,100}children:\i/,replace:"$&,onClick:$1,onContextMenu:$2.onClick,"}]}]})});var mT,fT,gT=f(()=>{"use strict";a();$();mT=be("ApplicationStreamPreviewStore"),fT=be("ApplicationStreamingStore")});var cD,hT,uD,pD,Lp,yT=f(()=>{"use strict";a();At();M();Pe();T();S();gT();cD=async({guildId:e,channelId:t,ownerId:o})=>{let r=await mT.getPreviewURL(e,t,o);r&&Yo({url:r,height:720,width:1280})},hT=(e,{userId:t})=>{let o=fT.getAnyStreamForUser(t);if(!o)return;let r=n(E.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Dh,action:()=>o&&cD(o),disabled:!o});e.push(n(E.MenuSeparator,null),r)},uD=(e,{stream:t})=>hT(e,{userId:t.ownerId}),pD=(e,{user:t})=>{if(t)return hT(e,{userId:t.id})},Lp=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],contextMenus:{"user-context":pD,"stream-context":uD}})});function vT(){Xl.textContent=`
|
|
.vc-nsfw-img [class^=imageContainer],
|
|
.vc-nsfw-img [class^=wrapperPaused] {
|
|
filter: blur(${j.plugins.BlurNSFW.blurAmount}px);
|
|
transition: filter 0.2s;
|
|
|
|
&:hover {
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
`}var Xl,Ep,bT=f(()=>{"use strict";a();_();M();T();Ep=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.container/,replace:"$&+(this.props.channel.nsfw? ' vc-nsfw-img': '')"}]}],options:{blurAmount:{type:1,description:"Blur Amount (in pixels)",default:10,onChange:vT}},start(){Xl=document.createElement("style"),Xl.id="VcBlurNsfw",document.head.appendChild(Xl),vT()},stop(){Xl?.remove()}})});function dD(e){let t=j.plugins.CallTimer.format==="human",o=g=>t?g:g.toString().padStart(2,"0"),r=g=>t?g:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),d="";return s&&(d+=`${s}d `),(l||d)&&(d+=`${o(l)}${r("h")}${i}`),(c||d||!t)&&(d+=`${o(c)}${r("m")}${i}`),d+=`${o(u)}${r("s")}`,d}var Op,ST=f(()=>{"use strict";a();_();ne();M();wt();T();Op=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(renderConnectionStatus\(\){.+\.channel,children:)(.+?}\):\i)(?=}\))/,replace:"$1[$2,$self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(k,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Qa({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},dD(t)))}})});var xT,TT=f(()=>{"use strict";a();xT=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@*.youtube.com","kw@*.youtube.com","si@*.youtube.com","pp@*.youtube.com","si@*.youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","igsh","share_id@reddit.com","si@soundcloud.com"]});var wT,mD,_p,MT=f(()=>{"use strict";a();M();T();TT();wT=/[\\^$.*+?()[\]{}|]/g,mD=RegExp(wT.source),_p=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],start(){this.createRules()},onBeforeMessageSend(e,t){return this.onSend(t)},onBeforeMessageEdit(e,t,o){return this.onSend(o)},escapeRegExp(e){return e&&mD.test(e)?e.replace(wT,"\\$&"):e||""},createRules(){let e=xT;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{o.test(t.hostname)&&this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))}})});var PT=f(()=>{});function kT(e){let t=e.toString(16).padStart(6,"0");Vl.store.color=t,NT(t)}function IT(e){hD({theme:e})}function yD(){let e=Se([pn],()=>pn.theme),t=e==="light",o=t?"dark":"light",i=Se([CT],()=>CT.gradientPreset)!==void 0,s=ID(Vl.store.color),l=!1,c=!0;return(t&&s<.26||!t&&s>.12)&&(l=!0),s<.26&&s>.12&&(c=!1),t&&s>.65&&(l=!0,c=!1),n("div",{className:ts("settings")},n("div",{className:ts("container")},n("div",{className:ts("settings-labels")},n(b.FormTitle,{tag:"h3"},"Theme Color"),n(b.FormText,null,"Add a color to your Discord client theme")),n(fD,{color:parseInt(Vl.store.color,16),onChange:kT,showEyeDropper:!1,suggestedColors:gD})),(l||i)&&n(m,null,n(b.FormDivider,{className:z(F.top8,F.bottom8)}),n("div",{className:`client-theme-contrast-warning ${l?t?"theme-dark":"theme-light":""}`},n("div",{className:ts("warning")},n(b.FormText,{className:ts("warning-text")},"Warning, your theme won't look good:"),l&&n(b.FormText,{className:ts("warning-text")},"Selected color won't contrast well with text"),i&&n(b.FormText,{className:ts("warning-text")},"Nitro themes aren't supported")),l&&c&&n(I,{onClick:()=>IT(o),color:I.Colors.RED},"Switch to ",o," mode"),i&&n(I,{onClick:()=>IT(e),color:I.Colors.RED},"Disable Nitro Theme"))))}function Bp(e,t,o){return Object.entries(e).filter(([r])=>t==null||r.search(t)>-1).map(([r,i])=>{let s=i-e[o],l=s>=0?"+":"-";return`${r}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${l} ${Math.abs(s).toFixed(2)}%);`}).join(`
|
|
`)}function TD(e){let t={},o={};for(let[,r,i]of e.matchAll(bD))t[r]=parseFloat(i);for(let[,r,i]of e.matchAll(vD))o[r]=parseFloat(i);Cy("clientThemeOffsets",[`.theme-light {
|
|
${Bp(t,SD,"--primary-345-hsl")}
|
|
}`,`.theme-dark {
|
|
${Bp(t,xD,"--primary-600-hsl")}
|
|
}`,`.visual-refresh.theme-light {
|
|
${Bp(o,null,"--neutral-2-hsl")}
|
|
}`,`.visual-refresh.theme-dark {
|
|
${Bp(o,null,"--neutral-69-hsl")}
|
|
}`].join(`
|
|
|
|
`))}function wD(e){let t=/\.theme-light[^{]*\{[^}]*var\(--white-500\)[^}]*}/gm,o=[...e.matchAll(t)].flat(),r=/^([^{]*)\{background:var\(--white-500\)/m,i=/^([^{]*)\{background-color:var\(--white-500\)/m,s=Up(o,w=>Fp(w,r)).join(`,
|
|
`),l=Up(o,w=>Fp(w,i)).join(`,
|
|
`),c=`${s} {
|
|
background: var(--primary-100)
|
|
}`,u=`${l} {
|
|
background-color: var(--primary-100)
|
|
}`,d=/\.theme-light\{([^}]*--[^:}]*(?:background|bg)[^:}]*:var\(--white-500\)[^}]*)\}/m,g=/^(--[^:]*(?:background|bg)[^:]*):var\(--white-500\)/m,h=Up(o,w=>Fp(w,d)).map(w=>w.split(";")).flat(),C=`.theme-light {
|
|
${Up(h,w=>Fp(w,g)).map(w=>`${w}: var(--primary-100);`).join(`
|
|
`)}
|
|
}`;Cy("clientThemeLightModeFixes",[c,u,C].join(`
|
|
|
|
`))}function Fp(e,t){let o=e.match(t);return o===null?null:o[1]}function Up(e,t){return e.map(t).filter(Boolean)}function NT(e){let{hue:t,saturation:o,lightness:r}=PD(e),i=document.getElementById("clientThemeVars");i||(i=Cy("clientThemeVars")),i.textContent=`:root {
|
|
--theme-h: ${t};
|
|
--theme-s: ${o}%;
|
|
--theme-l: ${r}%;
|
|
}`}function Cy(e,t=""){let o=document.createElement("style");return o.setAttribute("id",e),o.textContent=t.split(`
|
|
`).map(r=>r.trim()).join(`
|
|
`),document.body.appendChild(o),o}async function MD(){let e="",t=document.querySelectorAll('link[rel="stylesheet"]');for(let o of t){let r=o.getAttribute("href");if(!r)continue;let i=await fetch(r);e+=await i.text()}return e}function PD(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,c,u,d;return d=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*d-1)),i===t?c=(o-r)/l%6:i===o?c=(r-t)/l+2:c=(t-o)/l+4,c*=60,c<0&&(c+=360)),u*=100,d*=100,{hue:c,saturation:u,lightness:d}}function ID(e){let t=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4,o=t(parseInt(e.substring(0,2),16)/255),r=t(parseInt(e.substring(2,4),16)/255),i=t(parseInt(e.substring(4,6),16)/255);return o*.2126+r*.7152+i*.0722}var ts,fD,gD,hD,CT,Vl,$p,vD,bD,SD,xD,AT=f(()=>{"use strict";a();PT();_();He();M();ze();me();T();$();S();ts=ue("vc-clientTheme-"),fD=se("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),gD=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];hD=Ce('type:"UNSYNCED_USER_SETTINGS_UPDATE','"system"===');CT=be("ClientThemesBackgroundStore");Vl=P({color:{type:6,default:"313338",component:yD},resetColor:{type:6,component:()=>n(I,{onClick:()=>kT(3224376)},"Reset Theme Color")}}),$p=y({name:"ClientTheme",authors:[p.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:Vl,startAt:"DOMContentLoaded",async start(){NT(Vl.store.color);let e=await MD();TD(e),wD(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove(),document.getElementById("clientThemeLightModeFixes")?.remove()}}),vD=/(--neutral-\d{1,3}-hsl):.*?(\S*)%;/g,bD=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,SD=/^--primary-[1-5]\d{2}-hsl/g,xD=/^--primary-[5-9]\d{2}-hsl/g});var Gp,RT=f(()=>{"use strict";a();M();T();Gp=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[p.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'$1status_$:$2="online"'}}]})});function kD({settingKey:e}){let{allowLevel:t}=ns.use(["allowLevel"]),o=t[e];return n(th,{value:o,onChange:(r,i)=>ns.store.allowLevel[e]=i,size:20},n(Q,{variant:"text-sm/normal"},e[0].toUpperCase()+e.slice(1)))}var In,CD,os,ND,ns,zp,DT=f(()=>{"use strict";a();_();Es();M();ze();T();S();In=()=>{},CD={logDangerously:In,log:In,verboseDangerously:In,verbose:In,info:In,warn:In,error:In,trace:In,time:In,fileOnly:In},os=new Set;ND=k.wrap(()=>n(b.FormSection,null,n(b.FormTitle,{tag:"h3"},"Filter List"),n(b.FormText,{className:F.bottom8,type:b.FormText.Types.DESCRIPTION},"Always allow loggers of these types"),n(ge,{flexDirection:"row"},Object.keys(ns.store.allowLevel).map(e=>n(kD,{key:e,settingKey:e}))))),ns=P({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){os.clear(),e.split(";").map(t=>t.trim()).forEach(os.add.bind(os))}},allowLevel:{type:6,component:ND,default:{error:!0,warn:!1,trace:!1,log:!1,info:!1,debug:!1}}}),zp=y({name:"ConsoleJanitor",description:"Disables annoying console messages/errors",authors:[p.Nuckyz,p.sadan],settings:ns,startAt:"Init",start(){os.clear(),this.settings.store.whitelistedLoggers?.split(";").map(e=>e.trim()).forEach(os.add.bind(os))},Noop:In,NoopLogger:()=>CD,shouldLog(e,t){return os.has(e)||ns.store.allowLevel[t]===!0},patches:[{find:"https://github.com/highlightjs/highlight.js/issues/2277",replacement:{match:/\(console.log\(`Deprecated.+?`\),/,replace:"("}},{find:'The "interpolate" function is deprecated in v10 (use "to" instead)',replacement:{match:/,console.warn\(\i\+'The "interpolate" function is deprecated in v10 \(use "to" instead\)'\)/,replace:""}},{find:'console.warn("Window state not initialized"',replacement:{match:/console\.warn\("Window state not initialized",\i\),/,replace:""}},{find:"is not a valid locale.",replacement:{match:/\i\.error(?=\(""\.concat\(\i," is not a valid locale."\)\))/,replace:"$self.Noop"}},{find:'"AppCrashedFatalReport: getLastCrash not supported."',replacement:{match:/console\.log(?=\("AppCrashedFatalReport: getLastCrash not supported\."\))/,replace:"$self.Noop"}},{find:"RPCServer:WSS",replacement:{match:/\i\.error\("Error: "\.concat\((\i)\.message/,replace:'!$1.message.includes("EADDRINUSE")&&$&'}},{find:"Tried getting Dispatch instance before instantiated",replacement:{match:/null==\i&&\i\.warn\("Tried getting Dispatch instance before instantiated"\),/,replace:""}},{find:"Unable to determine render window for element",replacement:{match:/console\.warn\("Unable to determine render window for element",\i\),/,replace:""}},{find:"failed to send analytics events",replacement:{match:/console\.error\("\[analytics\] failed to send analytics events query: "\.concat\(\i\)\)/,replace:""}},{find:"Slow dispatch on",replacement:{match:/\i\.totalTime>\i&&\i\.verbose\("Slow dispatch on ".+?\)\);/,replace:""}},{find:"\u03A3:",predicate:()=>ns.store.disableLoggers,replacement:{match:/(?<=&&)(?=console)/,replace:"$self.shouldLog(arguments[0],arguments[1])&&"}},{find:'("Spotify")',predicate:()=>ns.store.disableSpotifyLogger,replacement:{match:/new \i\.\i\("Spotify"\)/,replace:"$self.NoopLogger()"}}]})});var LT=f(()=>{"use strict";a();Ae();Ho();$();$()});function ky(){function e(i){let s=new Map;return function(...l){let c=String(l);if(s.has(c))return s.get(c);let u=Gr(i(...l)),d=(()=>{switch(u.length){case 0:return null;case 1:return u[0];default:let g=[...new Set(u)];return g.length>1&&console.warn(`Warning: This filter matches ${g.length} exports. Make it more specific!
|
|
`,g),u[0]}})();return d&&c&&s.set(c,d),d}}let t,o=e(i=>i),r=e(B.byProps);return{...Object.fromEntries(Object.keys(Is).map(i=>[i,{getter:()=>Is[i]}])),wp:eu,wpc:{getter:()=>tn},wreq:{getter:()=>ht},wpPatcher:{getter:()=>Vencord.WebpackPatcher},wpInstances:{getter:()=>Vencord.WebpackPatcher.allWebpackInstances},wpsearch:bs,wpex:Ba,wpexs:i=>Ba(an(i)),loadLazyChunks:()=>{throw new Error("loadLazyChunks is dev only.")},find:o,findAll:Gr,findByProps:r,findAllByProps:(...i)=>Gr(B.byProps(...i)),findByCode:e(B.byCode),findAllByCode:i=>Gr(B.byCode(i)),findComponentByCode:e(B.componentByCode),findAllComponentsByCode:(...i)=>Gr(B.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(B.byStoreName),PluginsApi:{getter:()=>Vencord.Plugins},plugins:{getter:()=>Vencord.Plugins.plugins},Settings:{getter:()=>Vencord.Settings},Api:{getter:()=>Vencord.Api},Util:{getter:()=>Vencord.Util},reload:()=>location.reload(),restart:Co,canonicalizeMatch:Lt,canonicalizeReplace:Na,canonicalizeReplacement:bi,runtimeHashMessageKey:Ln,fakeRender:(i,s)=>{let l=t?.deref(),c=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(c),c.focus();let u=c.document;u.body.style.margin="1em",c.prepared||(c.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(g=>{let h=g.cloneNode(!0);g.parentElement?.tagName==="HEAD"?u.head.append(h):h.id?.startsWith("vencord-")||h.id?.startsWith("vcd-")?u.documentElement.append(h):u.body.append(h)}));let d=Ci.createRoot(u.body.appendChild(document.createElement("div")));d.render(W.createElement(i,s)),u.addEventListener("close",()=>d.unmount(),{once:!0})},preEnable:i=>(Vencord.Settings.plugins[i]??={enabled:!0}).enabled=!0,channel:{getter:()=>Ko(),preload:!1},channelId:{getter:()=>Le.getChannelId(),preload:!1},guild:{getter:()=>ar(),preload:!1},guildId:{getter:()=>jo.getGuildId(),preload:!1},me:{getter:()=>D.getCurrentUser(),preload:!1},meId:{getter:()=>D.getCurrentUser().id,preload:!1},messages:{getter:()=>Jt.getMessages(Le.getChannelId()),preload:!1},openModal:{getter:()=>tl.openModal},openModalLazy:{getter:()=>tl.openModalLazy},Stores:xi,setExperiment:(i,s)=>{G.dispatch({type:"EXPERIMENT_OVERRIDE_BUCKET",experimentId:i,experimentBucket:s})}}}function ET(e,t,o){let r=t.getter();if(!r||t.preload===!1)return r;function i(l){if(l[sn])o?r[sn]():r[Zn];else if(l.$$vencordInternal)return o?l.$$vencordInternal():l;return l}let s=i(r);if(typeof s=="object"&&s!==null){let l=Object.getOwnPropertyDescriptors(s);for(let c in l){if(s[c]==null)continue;let u=l[c];if(u.writable===!0||u.set!=null){let d=s[c],g=i(d);g!=null&&d!==g&&(s[c]=g)}}}return s!=null&&(Hp(window.shortcutList,e,{value:s}),Hp(window,e,{value:s})),s}var Hp,jp,OT=f(()=>{"use strict";a();M();Pe();vs();So();Ke();gr();Ho();T();$();$();S();LT();Hp=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));jp=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],patches:[{find:'this,"_changeCallbacks",',replacement:{match:/\i\(this,"_changeCallbacks",/,replace:"Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&"}}],startAt:"Init",start(){let e=ky();window.shortcutList={};for(let[t,o]of Object.entries(e))"getter"in o?(Hp(window.shortcutList,t,{get:()=>ET(t,o,!0)}),Hp(window,t,{get:()=>window.shortcutList[t]})):(window.shortcutList[t]=o,window[t]=o);Ti.then(()=>{setTimeout(()=>this.eagerLoad(!1),1e3),VencordNative.pluginHelpers.ConsoleShortcuts.initDevtoolsOpenEagerLoad()})},async eagerLoad(e){await Ti;let t=ky();for(let[o,r]of Object.entries(t))if(!(!Object.hasOwn(r,"getter")||r.preload===!1))try{ET(o,r,e)}catch{}},stop(){delete window.shortcutList;for(let e in ky())delete window[e]}})});function RD(e,t){let{id:o,name:r}=e.dataset;if(!o)return t?AD(r):`:${r}:`;let i=new URL(e.firstChild.src),s=i.searchParams.get("animated")==="true",l=i.pathname.endsWith(".gif");return`<${s||l?"a":""}:${r.replace(/~\d+$/,"")}:${o}>`}var AD,_T,Wp,BT=f(()=>{"use strict";a();_();M();me();T();$();S();({convertNameToSurrogate:AD}=R("convertNameToSurrogate"));_T=P({copyUnicode:{type:3,description:"Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",default:!0}}),Wp=y({name:"CopyEmojiMarkdown",description:"Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",authors:[p.HappyEnderman,p.Vishnya],settings:_T,contextMenus:{"expression-picker"(e,{target:t}){t.dataset.type==="emoji"&&e.push(n(E.MenuItem,{id:"vc-copy-emoji-markdown",label:"Copy Emoji Markdown",action:()=>{Xt(RD(t,_T.store.copyUnicode),"Success! Copied emoji markdown.")}}))}}})});var FT=f(()=>{});var DD,qp,UT=f(()=>{"use strict";a();FT();ne();At();M();me();T();S();DD=()=>n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21.7 5.3a1 1 0 0 1 0 1.4l-12 12a1 1 0 0 1-1.4 0l-6-6a1 1 0 1 1 1.4-1.4L9 16.58l11.3-11.3a1 1 0 0 1 1.4 0Z"})),qp=y({name:"CopyFileContents",description:"Adds a button to text file attachments to copy their contents",authors:[p.Obsidian,p.Nuckyz],patches:[{find:"#{intl::PREVIEW_BYTES_LEFT}",replacement:{match:/\.footerGap.+?url:\i,fileName:\i,fileSize:\i}\),(?<=fileContents:(\i),bytesLeft:(\i).+?)/g,replace:"$&$self.addCopyButton({fileContents:$1,bytesLeft:$2}),"}}],addCopyButton:k.wrap(({fileContents:e,bytesLeft:t})=>{let[o,r]=K(!1);return n(oe,{text:o?"Copied!":t>0?"File too large to copy":"Copy File Contents"},i=>n("div",{...i,className:"vc-cfc-button",role:"button",onClick:()=>{!o&&t<=0&&(Xt(e),r(!0),setTimeout(()=>r(!1),2e3))}},o?n(DD,null):t>0?n(cl,{color:"var(--channel-icon)"}):n($i,null)))},{noop:!0})})});var LD,Kp,$T=f(()=>{"use strict";a();At();M();T();S();LD=(e,{user:t})=>{t&&e.push(n(E.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Ht.copy(`<https://discord.com/users/${t.id}>`),icon:Ui}))},Kp=y({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":LD}})});var Cn,ED,OD,Ny,GT,Ay,Ry,Yp,zT=f(()=>{"use strict";a();pr();_();M();Ae();Ke();T();qi();$();S();Cn=new V("CrashHandler"),{ModalStack:ED,DraftManager:OD}=mo(()=>{let[e,t]=zr(B.byProps("pushLazy","popAll"),B.byProps("clearDraft","saveDraft"));return{ModalStack:e,DraftManager:t}}),Ny=P({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}}),GT=!1,Ay=!1,Ry=!0,Yp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:Ny,patches:[{find:"#{intl::ERRORS_UNEXPECTED_CRASH}",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!Ay&&(Ay=!0,setTimeout(()=>{try{if(!Ry){try{Ye({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}Ry=!1,setTimeout(()=>Ry=!0,1e3)}catch{}try{GT||(GT=!0,Nl("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{Ny.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){Cn.error("Failed to handle crash",o)}},1))},handlePreventCrash(e){try{Ye({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=Le.getChannelId();for(let o in no)Number.isNaN(Number(o))&&OD.clearDraft(t,no[o])}catch(t){Cn.debug("Failed to clear drafts.",t)}try{Ka.closeExpressionPicker()}catch(t){Cn.debug("Failed to close expression picker.",t)}try{G.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){Cn.debug("Failed to close open context menu.",t)}try{ED.popAll()}catch(t){Cn.debug("Failed to close old modals.",t)}try{Bn()}catch(t){Cn.debug("Failed to close all open modals.",t)}try{G.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){Cn.debug("Failed to close user popout.",t)}try{G.dispatch({type:"LAYER_POP_ALL"})}catch(t){Cn.debug("Failed to pop all layers.",t)}try{G.dispatch({type:"DEV_TOOLS_SETTINGS_UPDATE",settings:{displayTools:!1,lastOpenTabId:"analytics"}})}catch(t){Cn.debug("Failed to close DevTools.",t)}if(Ny.store.attemptToNavigateToHome)try{or.transitionToGuild("@me")}catch(t){Cn.debug("Failed to navigate to home",t)}setImmediate(()=>Ay=!1);try{e.setState({error:null,info:null})}catch(t){Cn.debug("Failed to update crash handler component.",t)}}})});var Zp,HT=f(()=>{"use strict";a();_();M();T();Zp=y({name:"CtrlEnterSend",authors:[p.UlyssesZhan],description:"Use Ctrl+Enter to send messages (customizable)",settings:P({submitRule:{description:"The way to send a message",type:4,options:[{label:"Ctrl+Enter (Enter or Shift+Enter for new line) (cmd+enter on macOS)",value:"ctrl+enter"},{label:"Shift+Enter (Enter for new line)",value:"shift+enter"},{label:"Enter (Shift+Enter for new line; Discord default)",value:"enter"}],default:"ctrl+enter"},sendMessageInTheMiddleOfACodeBlock:{description:"Whether to send a message in the middle of a code block",type:3,default:!0}}),patches:[{find:".selectPreviousCommandOption(",replacement:{match:/(?<=(\i)\.which(?:!==|===)\i\.\i.ENTER(\|\||&&)).{0,100}(\(0,\i\.\i\)\(\i\)).{0,100}(?=(?:\|\||&&)\(\i\.preventDefault)/,replace:(e,t,o,r)=>`${o==="||"?"!":""}$self.shouldSubmit(${t},${r})`}},{find:"!this.hasOpenCodeBlock()",replacement:{match:/!(\i).shiftKey&&!(this.hasOpenCodeBlock\(\))&&\(.{0,100}?\)/,replace:"$self.shouldSubmit($1, $2)"}}],shouldSubmit(e,t){let o=!1;switch(this.settings.store.submitRule){case"shift+enter":o=e.shiftKey;break;case"ctrl+enter":o=navigator.platform.includes("Mac")?e.metaKey:e.ctrlKey;break;case"enter":o=!e.shiftKey&&!e.ctrlKey;break}return this.settings.store.sendMessageInTheMiddleOfACodeBlock||(o&&=!t),o}})});function Jp(e){return!!e}function Pr(e){return e!=null}var Zs=f(()=>{"use strict";a()});async function WT(e){return(await Di.fetchAssetIds(Js.store.appID,[e]))[0]}function uo(){Qp(!0),j.plugins.CustomRPC.enabled&&Qp()}function YT(){return Js.store.type!==1}function FD(e){return!YT()&&!/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 qT(){return Js.store.timestampMode!==3}function KT(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//.test(e)?"Don't use a Discord link. Use an Imgur image link instead.":/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image (e.g. https://i.imgur.com/...). Right click the image and click 'Copy image address'":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image (e.g. https://media.tenor.com/...). Right click the GIF and click 'Copy image address'":!0}async function ZT(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:d,imageSmall:g,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:C,buttonTwoText:w,buttonTwoURL:x}=Js.store;if(!t)return;let N={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1};switch(i===1&&(N.url=s),Js.store.timestampMode){case 1:N.timestamps={start:Date.now()};break;case 2:N.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(l||c)&&(N.timestamps={},l&&(N.timestamps.start=l),c&&(N.timestamps.end=c));break;case 0:default:break}v&&(N.buttons=[v,w].filter(Jp),N.metadata={button_urls:[C,x].filter(Jp)}),u&&(N.assets={large_image:await WT(u),large_text:d||void 0}),g&&(N.assets={...N.assets,small_image:await WT(g),small_text:h||void 0});for(let A in N){if(A==="type")continue;let L=N[A];(!L||L.length===0)&&delete N[A]}return N}async function Qp(e){let t=await ZT();G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var _D,BD,jT,Js,Xp,JT=f(()=>{"use strict";a();_();wr();Ei();jt();_o();M();Zs();ze();me();wt();T();$();S();_D=Ce("profileThemeStyle:","--profile-gradient-primary-color"),BD=se(".party?(0",".card"),jT=Ao("status","showCurrentGame");Js=P({appID:{type:0,description:"Application ID (required)",onChange:uo,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:uo,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:uo,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:uo,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:uo,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:uo,disabled:YT,isValid:FD},timestampMode:{type:4,description:"Timestamp mode",onChange:uo,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time (not reset after 24h)",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp in milliseconds (only for custom timestamp mode)",onChange:uo,disabled:qT,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp in milliseconds (only for custom timestamp mode)",onChange:uo,disabled:qT,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:uo,isValid:KT},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:uo,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:uo,isValid:KT},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:uo,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:uo,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:uo},buttonTwoText:{type:0,description:"Button 2 text",onChange:uo,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:uo}});Xp=y({name:"CustomRPC",description:"Add a fully customisable Rich Presence (Game status) to your Discord profile",authors:[p.captain,p.AutumnVN,p.nin0dev],dependencies:["UserSettingsAPI"],start:Qp,stop:()=>Qp(!0),settings:Js,patches:[{find:".party?(0",all:!0,replacement:{match:/\i\.id===\i\.id\?null:/,replace:""}}],settingsAboutComponent:()=>{let e=St(ZT),t=jT.useSetting(),{profileThemeStyle:o}=_D({});return n(m,null,!t&&n(wo,{className:z(F.top16,F.bottom16),style:{padding:"1em"}},n(b.FormTitle,null,"Notice"),n(b.FormText,null,"Activity Sharing isn't enabled, people won't be able to see your custom rich presence!"),n(I,{color:I.Colors.TRANSPARENT,className:F.top8,onClick:()=>jT.updateSetting(!0)},"Enable")),n(ge,{flexDirection:"column",style:{gap:".5em"},className:F.top16},n(b.FormText,null,"Go to the ",n(it,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(b.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(b.FormText,null,"If you want to use an image link, download your image and reupload the image to ",n(it,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and selecting "Copy image address".'),n(b.FormText,null,"You can't see your own buttons on your profile, but everyone else can see it fine."),n(b.FormText,null,'Some weird unicode text ("fonts" \u{1D591}\u{1D58E}\u{1D590}\u{1D58A} \u{1D599}\u{1D58D}\u{1D58E}\u{1D598}) may cause the rich presence to not show up, try using normal letters instead.')),n(b.FormDivider,{className:F.top8}),n("div",{style:{width:"284px",...o,marginTop:8,borderRadius:8,background:"var(--bg-mod-faint)"}},e[0]&&n(BD,{activity:e[0],user:D.getCurrentUser(),currentUser:D.getCurrentUser()})))}})});var Dy,Vp,QT=f(()=>{"use strict";a();Mr();_();vr();M();T();S();Dy=P({idleTimeout:{description:"Minutes before Discord goes idle (0 to disable auto-idle)",type:5,markers:Vt(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}}),Vp=y({name:"CustomIdle",description:"Allows you to set the time before Discord goes idle (or disable auto-idle)",authors:[p.newwares],settings:Dy,patches:[{find:'type:"IDLE",idle:',replacement:[{match:/(?<=Date\.now\(\)-\i>)\i\.\i\|\|/,replace:"$self.getIdleTimeout()||"},{match:/Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,replace:"$1"},{match:/\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,replace:"$self.handleOnline()"}]}],handleOnline(){if(!Dy.store.remainInIdle){G.dispatch({type:"IDLE",idle:!1});return}let e="Welcome back! Click the button to go online. Click the X to stay idle until reload.";Ir.currentNotice?.[1]===e||Ir.noticesQueue.some(([,t])=>t===e)||Ir.showNotice(e,"Exit idle",()=>{Ir.popNotice(),G.dispatch({type:"IDLE",idle:!1})})},getIdleTimeout(){let{idleTimeout:e}=Dy.store;return e===0?1/0:e*6e4}})});var XT=f(()=>{});async function $D(){try{let{embed:e}=this.props,{replaceElements:t,dearrowByDefault:o}=ed.store;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let r=UD.exec(e.video.url)?.[1];if(!r)return;let i=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${r}`);if(!i.ok)return;let{titles:s,thumbnails:l}=await i.json(),c=s[0]?.votes>=0,u=l[0]?.votes>=0&&!l[0].original;if(!c&&!u)return;if(e.dearrow={enabled:o},c&&t!==2){let d=s[0].title.replace(/(^|\s)>(\S)/g,"$1$2");e.dearrow.oldTitle=o?e.rawTitle:d,o&&(e.rawTitle=d)}if(u&&t!==1){let d=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${r}&time=${l[0].timestamp}`;e.dearrow.oldThumb=o?e.thumbnail.proxyURL:d,o&&(e.thumbnail.proxyURL=d)}this.forceUpdate()}catch(e){new V("Dearrow").error("Failed to dearrow embed",e)}}function GD({component:e}){let{embed:t}=e.props;return t?.dearrow?n(oe,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;ed.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()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow",className:"vc-dearrow-icon"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var UD,ed,td,VT=f(()=>{"use strict";a();XT();_();ne();M();Ae();T();S();UD=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;ed=P({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}}),td=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[p.Ven],settings:ed,embedDidMount:$D,renderButton(e){return n(k,{noop:!0},n(GD,{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:()=>!ed.store.hideButton}]}]})});var ew=f(()=>{});var zD,ni,tw,ow,nw,rs,od,Qs,ec,Ly,ri=f(()=>{"use strict";a();zD="https://decor.fieryflames.dev",ni=zD+"/api",tw=ni+"/authorize",ow="https://ugc.decor.fieryflames.dev",nw="1096966363416899624",rs="100101099111114",od="11497119",Qs="1096357702931841148",ec="dXp2SdxDcP",Ly=1e3*60*60*4});var HD,ii,tc=f(()=>{"use strict";a();Mr();So();Ae();Ke();S();ri();HD={async getItem(e){return It.get(e).then(t=>t??null)},async setItem(e,t){await It.set(e,t)},async removeItem(e){await It.del(e)}},ii=Dt(()=>Li(lh((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[D.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[D.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>he(i=>n(Pi,{...i,scopes:["identify"],responseType:"code",redirectUri:tw,permissions:0n,clientId:nw,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&&(Je(`Failed to authorize: ${l.message}`,ee.Type.FAILURE),new V("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",storage:HD,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function nd(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${ii.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var rw,iw,sw,Ey,aw,lw,rd=f(()=>{"use strict";a();ri();tc();rw=async e=>{if(e?.length===0)return{};let t=new URL(ni+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},iw=async(e="@me")=>nd(ni+`/users/${e}/decorations`).then(t=>t.json()),sw=async(e="@me")=>nd(ni+`/users/${e}/decoration`).then(t=>t.json()),Ey=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"),nd(ni+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},aw=async e=>{await nd(ni+`/decorations/${e}`,{method:"DELETE"})},lw=async()=>fetch(ni+"/decorations/presets").then(e=>e.json())});function Oy(e){return`${e.animated?"a_":""}${e.hash}`}function id(e){return{asset:Oy(e),skuId:rs}}var sd=f(()=>{"use strict";a();ri()});function cw(e){try{let[t,o]=K(e?Cr.getState().getAsset(e.id)??null:null);return le(()=>{let r=(()=>{try{return Cr.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);s&&t!==s&&o(s)})}catch{return()=>{}}})();try{if(e){let{fetch:i}=Cr.getState();i(e.id)}}catch{}return r},[]),t?{asset:t,skuId:rs}:null}catch(t){console.error(t)}return null}var Cr,_y=f(()=>{"use strict";a();Oi();So();S();rd();ri();Cr=Dt(()=>Li((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:Eo(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=[...o],s=await rw(i),l=new Map(r),c=new Date;for(let u of i){let d=s[u]??null;l.set(u,{asset:d,fetchedAt:c})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:c}=i.get(o)??{};c&&!r&&Date.now()-c.getTime()<Ly||(e({fetchQueue:new Set(s).add(o)}),l())},async fetchMany(o){if(!o.length)return;let{usersDecorations:r,fetchQueue:i,bulkFetch:s}=t(),l=new Set(i),c=Date.now();for(let u of o){let{fetchedAt:d}=r.get(u)??{};d&&c-d.getTime()<Ly||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,r){let{usersDecorations:i}=t(),s=new Map(i);s.set(o,{asset:r,fetchedAt:new Date}),e({usersDecorations:s})}})))});var jn,Xs=f(()=>{"use strict";a();So();S();rd();sd();_y();jn=Dt(()=>Li((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await iw(),r=await sw();e({decorations:o,selectedDecoration:r})},async create(o){let r=await Ey(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await aw(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(c=>c.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),Ey(o),Cr.getState().set(D.getCurrentUser().id,o?Oy(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Qe,Vs,ea,uw,si=f(()=>{"use strict";a();He();$();Qe=ue("vc-decor-"),Vs=R("modalFooterShopButton"),ea=Xn([".COLLECTIBLES_SHOP_FULLSCREEN&&"]),uw=Xn(["stickerInspected]:"])});var oc,pw,ad,By,dw,is=f(()=>{"use strict";a();$();S();pw=e=>oc=e,ad=Zc(()=>{let e=Jc(".shopPreviewBanner");return W.memo(e)}),dw=e=>By=e});function Fy(e){return n(oc,{...e,isSelected:!1},n(Eh,null),n(Q,{variant:"text-xs/normal",color:"header-primary"},Me("CREATE")))}var mw=f(()=>{"use strict";a();At();Pe();S();is()});function Uy(e){return n(oc,{...e},n(cl,null),n(Q,{variant:"text-xs/normal",color:"header-primary"},Me("NONE")))}var fw=f(()=>{"use strict";a();At();Pe();S();is()});function $y({decoration:e}){let{delete:t}=jn();return n(E.Menu,{navId:Qe("decoration-context-menu"),onClose:Et.closeContextMenu,"aria-label":"Decoration Options"},n(E.MenuItem,{id:Qe("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:$i,action:()=>Ht.copy(e.hash)}),e.authorId===D.getCurrentUser().id&&n(E.MenuItem,{id:Qe("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Gi,action:()=>rt.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Qe("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var gw=f(()=>{"use strict";a();At();S();Xs();si()});function Gy(e){let{decoration:t}=e;return n(By,{...e,onContextMenu:o=>{Et.openContextMenu(o,()=>n($y,{decoration:t}))},avatarDecoration:id(t)})}var hw=f(()=>{"use strict";a();S();sd();is();gw()});function zy({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Qe("sectioned-grid-list-grid")},r.map(i=>n(W.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var yw=f(()=>{"use strict";a();S();si()});function Hy(e){return n("div",{className:z(Qe("sectioned-grid-list-container"),jD.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Qe("sectioned-grid-list-section")},e.renderSectionHeader(t),n(zy,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var jD,vw=f(()=>{"use strict";a();me();$();si();yw();jD=R("managedReactiveScroller")});function qD(e){let[t,o]=K(null);return le(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function KD(e){let[t,o]=K(""),[r,i]=K(null),[s,l]=K(!1),[c,u]=K(null);le(()=>{c&&u(null)},[r]);let{create:d}=jn(),g=qD(r),h=$e(()=>g?{asset:g,skuId:od}:null,[g]);return n(ve,{...e,size:"medium",className:Vs.modal},n(Ne,{separator:!1,className:Qe("modal-header")},n(Q,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(pt,{onClick:e.onClose})),n(we,{className:Qe("create-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(bw,{messageType:Sw.WARNING},"Make sure your decoration does not violate ",n(it,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:Qe("create-decoration-modal-form-preview-container")},n("div",{className:Qe("create-decoration-modal-form")},c!==null&&n(Q,{color:"text-danger",variant:"text-xs/normal"},c.message),n(b.FormSection,{title:"File"},n(WD,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(b.FormText,{type:"description",className:F.top8},"File should be APNG or PNG.")),n(b.FormSection,{title:"Name"},n(ct,{placeholder:"Companion Cube",value:t,onChange:o}),n(b.FormText,{type:"description",className:F.top8},"This name will be used when referring to this decoration."))),n("div",null,n(ad,{avatarDecorationOverride:h,user:D.getCurrentUser()}))),n(bw,{messageType:Sw.INFO,className:F.bottom8},"To receive updates on your decoration's review, join ",n(it,{href:`https://discord.gg/${ec}`,onClick:async v=>{v.preventDefault(),ce.getGuild(Qs)?(Bn(),G.dispatch({type:"LAYER_POP_ALL"}),or.transitionToGuild(Qs)):await Fi(ec)&&(Bn(),G.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server")," and allow direct messages."))),n(ut,{className:Qe("modal-footer")},n(I,{onClick:()=>{l(!0),d({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),u(v)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(I,{onClick:e.onClose,color:I.Colors.PRIMARY,look:I.Looks.LINK},"Cancel")))}var WD,bw,Sw,ld,jy=f(()=>{"use strict";a();ne();_o();Pe();ze();Ke();$();S();ri();Xs();si();is();WD=se("fileUploadInput,"),{HelpMessage:bw,HelpMessageTypes:Sw}=Ze('POSITIVE="positive',{HelpMessageTypes:B.byProps("POSITIVE","WARNING","INFO"),HelpMessage:B.byCode(".iconDiv")});ld=()=>Promise.all([ea(),uw()]).then(()=>he(e=>n(KD,{...e})))});function YD(e){return n(ve,{...e,size:"small",className:Vs.modal},n(Ne,{separator:!1,className:Qe("modal-header")},n(Q,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(pt,{onClick:e.onClose})),n(we,{scrollbarType:"none"},n(b.FormText,null,"By submitting a decoration, you agree to ",n(it,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines"),". Not reading these guidelines may get your account suspended from creating more decorations in the future.")),n(ut,{className:Qe("modal-footer")},n(I,{onClick:()=>{ta.store.agreedToGuidelines=!0,e.onClose(),ld()}},"Continue"),n(I,{onClick:e.onClose,color:I.Colors.PRIMARY,look:I.Looks.LINK},"Go Back")))}var xw,Tw=f(()=>{"use strict";a();_o();Ke();S();cd();si();jy();xw=()=>ea().then(()=>he(e=>n(YD,{...e})))});function JD(){let[e,t]=K([]);return le(()=>{lw().then(t)},[]),e}function XD({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=K([]);return le(()=>{QD.push(async()=>{if(e.authorIds)for(let s of e.authorIds){let l=D.getUser(s)??await go.getUser(s).catch(()=>null);l!=null&&i(c=>[...c,l])}})},[e.authorIds]),n("div",null,n(ge,null,n(b.FormTitle,{style:{flexGrow:1}},e.title),o&&n(ZD,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:F.bottom8})),t&&n(b.FormText,{type:"description",className:F.bottom8},e.subtitle))}function VD(e){let[t,o]=K(void 0),r=typeof t<"u",i=t!=null?id(t):t,{decorations:s,selectedDecoration:l,fetch:c,select:u}=jn();le(()=>{c()},[]);let d=r?t:l,g=typeof d?.authorId<"u",h=s.some(L=>L.reviewed===!1),v=JD(),C=v.flatMap(L=>L.decorations),w=v.find(L=>L.id===d?.presetId),x=typeof w<"u",A=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(L=>!C.some(U=>U.hash===L.hash)),"create"]},...v.map(L=>({title:L.name,subtitle:L.description||void 0,sectionKey:`preset-${L.id}`,items:L.decorations,authorIds:L.authorIds}))];return n(ve,{...e,size:"dynamic",className:Vs.modal},n(Ne,{separator:!1,className:Qe("modal-header")},n(Q,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(pt,{onClick:e.onClose})),n(we,{className:Qe("change-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(Hy,{renderItem:L=>{if(typeof L=="string")switch(L){case"none":return n(Uy,{className:Qe("change-decoration-modal-decoration"),isSelected:d===null,onSelect:()=>o(null)});case"create":return n(oe,{text:"You already have a decoration pending review",shouldShow:h},U=>n(Fy,{className:Qe("change-decoration-modal-decoration"),...U,onSelect:h?()=>{}:ta.store.agreedToGuidelines?ld:xw}))}else return n(oe,{text:"Pending review",shouldShow:L.reviewed===!1},U=>n(Gy,{...U,className:Qe("change-decoration-modal-decoration"),onSelect:L.reviewed!==!1?()=>o(L):()=>{},isSelected:d?.hash===L.hash,decoration:L}))},getItemKey:L=>typeof L=="string"?L:L.hash,getSectionKey:L=>L.sectionKey,renderSectionHeader:L=>n(XD,{section:L}),sections:A}),n("div",{className:Qe("change-decoration-modal-preview")},n(ad,{avatarDecorationOverride:i,user:D.getCurrentUser()}),x&&n(b.FormTitle,{className:""},"Part of the ",w.name," Preset"),typeof d=="object"&&n(Q,{variant:"text-sm/semibold",color:"header-primary"},d?.alt),g&&n(Q,{key:`createdBy-${d.authorId}`},"Created by ",Ee.parse(`<@${d.authorId}>`)),x&&n(I,{onClick:()=>Xt(w.id)},"Copy Preset ID")))),n(ut,{className:z(Qe("change-decoration-modal-footer",Qe("modal-footer")))},n("div",{className:Qe("change-decoration-modal-footer-btn-container")},n(I,{onClick:()=>{u(t).then(e.onClose)},disabled:!r},"Apply"),n(I,{onClick:e.onClose,color:I.Colors.PRIMARY,look:I.Looks.LINK},"Cancel")),n("div",{className:Qe("change-decoration-modal-footer-btn-container")},n(I,{onClick:()=>rt.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Qe("danger-btn"),cancelText:"Cancel",onConfirm(){ii.getState().remove(D.getCurrentUser().id),e.onClose()}}),color:I.Colors.PRIMARY,look:I.Looks.LINK},"Log Out"),n(oe,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},L=>n(I,{...L,onClick:async()=>{ce.getGuild(Qs)?(e.onClose(),G.dispatch({type:"LAYER_POP_ALL"}),or.transitionToGuild(Qs)):await Fi(ec)&&(Bn(),G.dispatch({type:"LAYER_POP_ALL"}))},color:I.Colors.PRIMARY,look:I.Looks.LINK},"Discord Server")))))}var ZD,QD,Wy,ww=f(()=>{"use strict";a();ne();jt();Pe();ze();me();Ke();qr();$();S();rd();ri();tc();Xs();sd();cd();si();is();mw();fw();hw();vw();jy();Tw();ZD=se("defaultRenderUser","showDefaultAvatarsForNullUsers");QD=new Mo;Wy=()=>ea().then(()=>he(e=>n(VD,{...e})))});function nc({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=ii(),{selectedDecoration:i,select:s,fetch:l}=jn();return le(()=>{r.isAuthorized()&&l()},[r.token]),n(eL,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Qe("section-remove-margin")},n(ge,null,n(I,{onClick:()=>{r.isAuthorized()?Wy():r.authorize().then(Wy).catch(()=>{})},size:I.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(I,{onClick:()=>s(null),color:I.Colors.PRIMARY,size:I.Sizes.SMALL,look:I.Looks.LINK},"Remove Decoration")))}var eL,qy=f(()=>{"use strict";a();jt();$();S();tc();Xs();si();ww();eL=se(".customizationSectionBackground")});var ta,cd=f(()=>{"use strict";a();_();_o();ze();me();Ke();T();S();qy();ta=P({changeDecoration:{type:6,component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(nc,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(b.FormText,{type:"description",className:z(F.top8,F.bottom8)},"You can also access Decor decorations from the ",n(it,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),Bn(),G.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(b.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 ud,Mw=f(()=>{"use strict";a();ew();ne();M();T();S();ri();tc();Xs();_y();cd();is();qy();ud=y({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[p.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<=#{intl::USER_SETTINGS_AVATAR_DECORATION}\)},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem,",replacement:[{match:/(?<==)\i=>{let{children.{20,200}decorationGridItem/,replace:"$self.DecorationGridItem=$&",noWarn:!0},{match:/(?<==)\i=>{let{user:\i,avatarDecoration/,replace:"$self.DecorationGridDecoration=$&",noWarn:!0},{match:/(?<==)\i=>{var{children.{20,200}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{var{user:\i,avatarDecoration/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.\i\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).+?)/,replace:"||$1.skuId===$self.SKU_ID"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i,guildId:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:[{match:/(?<=\i\)\({avatarDecoration:)(\i)(?=,)(?<=currentUser:(\i).+?)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:ta,flux:{CONNECTION_OPEN:()=>{ii.getState().init(),jn.getState().clear(),Cr.getState().fetch(D.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{Cr.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){pw(e)},set DecorationGridDecoration(e){dw(e)},SKU_ID:rs,useUserDecorAvatarDecoration:cw,async start(){Cr.getState().fetch(D.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===rs){let o=e.asset.split("_");return e.asset.startsWith("a_")&&!t&&o.shift(),`${ow}/${o.join("_")}.png`}else if(e?.skuId===od)return e.asset},DecorSection:k.wrap(nc)})});var pd,Pw=f(()=>{"use strict";a();M();T();pd=y({name:"DisableCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",authors:[p.Nuckyz],patches:[{find:"#{intl::BOT_CALL_IDLE_DISCONNECT_2}",replacement:{match:/,?(?=\i\(this,"idleTimeout",new \i\.\i\))/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]})});var dd,Iw=f(()=>{"use strict";a();M();T();S();dd=y({name:"DontRoundMyTimestamps",authors:[p.Lexi],description:"Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",start(){jr.relativeTimeRounding(Math.floor)},stop(){jr.relativeTimeRounding(Math.round)}})});function Ky(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}.${rL[e.format_type]}?size=4096&lossless=true`}async function Cw(e){let t=tL.getStickerById(e);if(t)return t;let{body:o}=await bt.get({url:Pt.Endpoints.STICKER(e)});return G.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function iL(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 kw(Ky(t)));let{body:r}=await bt.post({url:Pt.Endpoints.GUILD_STICKER_PACKS(e),body:o});G.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:D.getCurrentUser()}})}async function sL(e,t){let o=await kw(Ky(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return oL({guildId:e,name:t.name.split("~")[0],image:r})}function aL(e){let t=D.getCurrentUser().id;return Object.values(ce.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Be.getGuildPermissions({id:o.id})&ke.CREATE_GUILD_EXPRESSIONS)===ke.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=nL(o),{emojis:l}=un.getGuilds()[o.id],c=0;for(let u of l)u.animated===i&&!u.managed&&c++;return c<s}).sort((o,r)=>o.name.localeCompare(r.name))}async function kw(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function lL(e,t){try{t.t==="Sticker"?await iL(e,t):await sL(e,t),ee.show({message:`Successfully cloned ${t.name} to ${ce.getGuild(e)?.name??"your server"}!`,type:ee.Type.SUCCESS,id:ee.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new V("EmoteCloner").error("Failed to clone",t.name,"to",e,o),ee.show({message:"Failed to clone: "+r,type:ee.Type.FAILURE,id:ee.genId()})}}function pL({data:e}){let[t,o]=W.useState(!1),[r,i]=W.useState(e.name),[s,l]=W.useReducer(u=>u+1,0),c=W.useMemo(()=>aL(e),[e.id,s]);return n(m,null,n(b.FormTitle,{className:F.top20},"Custom Name"),n(nl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&uL.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>n(oe,{key:u.id,text:u.name},({onMouseLeave:d,onMouseEnter:g})=>n("div",{onMouseLeave:d,onMouseEnter:g,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),lL(u.id,e).finally(()=>{l(),o(!1)})}},u.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):n(b.FormText,{style:{fontSize:cL(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function md(e,t){return n(E.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>ol(async()=>{let o=await t(),r={t:e,...o},i=Ky(r);return s=>n(ve,{...s},n(Ne,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(b.FormText,null,"Clone ",r.name)),n(we,null,n(pL,{data:r})))})})}function Nw(e){let t=new URL(e);return t.pathname.endsWith(".gif")||t.searchParams.get("animated")==="true"}var tL,oL,nL,rL,cL,uL,dL,mL,fd,Aw=f(()=>{"use strict";a();No();vu();M();Ae();ze();Ke();T();$();S();tL=be("StickersStore"),oL=Ce(".GUILD_EMOJIS(","EMOJI_UPLOAD_START"),nL=Ce(".additionalEmojiSlots"),rL=[,"png","png","json","gif"];cL=e=>[20,20,18,18,16,14,12][e.length]??4,uL=/^\w+$/i;dL=(e,t)=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${o}>|https://cdn\\.discordapp\\.com/emojis/${o}\\.`)),u=t.message.reactions.find(h=>h.emoji.id===o);if(!c&&!u)return;let d=(c&&c[1])??u?.emoji.name??"FakeNitroEmoji";return md("Emoji",()=>({id:o,name:d,isAnimated:Nw(r??i)}));case"sticker":return t.message.stickerItems.find(h=>h.id===o)?.format_type===3?void 0:md("Sticker",()=>Cw(o))}})();l&&dt("copy-link",e)?.push(l)},mL=(e,t)=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(md("Emoji",()=>({id:o,name:r,isAnimated:s&&Nw(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(md("Sticker",()=>Cw(o)))},fd=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[p.Ven,p.Nuckyz],contextMenus:{message:dL,"expression-picker":mL}})});var Yy,Rw=f(()=>{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});Yy="src/plugins/experiments/hideBugReport.css"});var gd,fL,Dw,hd,Lw=f(()=>{"use strict";a();_();He();ne();Ei();M();ze();T();$();S();Rw();gd=R("key","combo"),fL=kt(e=>e?.definition?.id==="2024-09_bug_reporter"),Dw=P({toolbarDevMenu:{type:3,description:"Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",default:!1,restartNeeded:!0}}),hd=y({name:"Experiments",description:"Enable Access to Experiments & other dev-only features in Discord!",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons,p.Nuckyz],settings:Dw,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}},{find:"toolbar:function",replacement:{match:/hasBugReporterAccess:(\i)/,replace:"_hasBugReporterAccess:$1=true"},predicate:()=>Dw.store.toolbarDevMenu},{find:"useCanFavoriteChannel",replacement:{match:/\i\.isDM\(\)\|\|\i\.isThread\(\)/,replace:"false"}},{find:"isDecoupledGameClippingEnabled(){",replacement:{match:/\i\.isStaff\(\)/,replace:"true"}}],start:()=>!fL.getCurrentConfig().hasBugReporterAccess&&Io(Yy),stop:()=>qo(Yy),settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(W.Fragment,null,n(b.FormTitle,{tag:"h3"},"More Information"),n(b.FormText,{variant:"text-md/normal"},"You can open Discord's DevTools via "," ",n("div",{className:gd.combo,style:{display:"inline-flex"}},n("kbd",{className:gd.key},t)," +"," ",n("kbd",{className:gd.key},o)," +"," ",n("kbd",{className:gd.key},"O")," ")))},WarningCard:k.wrap(()=>n(wo,{id:"vc-experiments-warning-card",className:F.bottom16},n(b.FormTitle,{tag:"h2"},"Hold on!!"),n(b.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(b.FormText,{className:F.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know."),n(b.FormText,{className:F.top8},'No, you cannot use server-side features like checking the "Send to Client" box.')),{noop:!0})})});var yd,Ew=f(()=>{"use strict";a();M();T();yd=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[p.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var _w=vi((yre,Ow)=>{"use strict";a();var kr=Ow.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var d=typeof hs=="function"&&hs;if(!u&&d)return d(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var g=o[c]={exports:{}};t[c][0].call(g.exports,function(h){var v=t[c][1][h];return i(v||h)},g,g.exports,e,t,o,r)}return o[c].exports}for(var s=typeof hs=="function"&&hs,l=0;l<r.length;l++)i(r[l]);return i})({1:[function(e,t,o){(function(r,i){var s,l;s=this,l=function(){"use strict";function c(O){return typeof O=="function"}var u=Array.isArray?Array.isArray:function(O){return Object.prototype.toString.call(O)==="[object Array]"},d=0,g=void 0,h=void 0,v=function(O,J){U[d]=O,U[d+1]=J,(d+=2)===2&&(h?h(H):Z())},C=typeof window<"u"?window:void 0,w=C||{},x=w.MutationObserver||w.WebKitMutationObserver,N=typeof kr>"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",A=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function L(){var O=setTimeout;return function(){return O(H,1)}}var U=new Array(1e3);function H(){for(var O=0;O<d;O+=2)(0,U[O])(U[O+1]),U[O]=void 0,U[O+1]=void 0;d=0}var X,re,te,Y,Z=void 0;function ae(O,J){var ye=this,de=new this.constructor(xt);de[xe]===void 0&&Kn(de);var De=ye._state;if(De){var nt=arguments[De-1];v(function(){return Tt(De,de,nt,ye._result)})}else io(ye,de,O,J);return de}function fe(O){if(O&&typeof O=="object"&&O.constructor===this)return O;var J=new this(xt);return Ie(J,O),J}Z=N?function(){return r.nextTick(H)}:x?(re=0,te=new x(H),Y=document.createTextNode(""),te.observe(Y,{characterData:!0}),function(){Y.data=re=++re%2}):A?((X=new MessageChannel).port1.onmessage=H,function(){return X.port2.postMessage(0)}):C===void 0&&typeof e=="function"?function(){try{var O=Function("return this")().require("vertx");return(g=O.runOnLoop||O.runOnContext)!==void 0?function(){g(H)}:L()}catch{return L()}}():L();var xe=Math.random().toString(36).substring(2);function xt(){}var qe=void 0,Ue=1,ot=2;function Ge(O,J,ye){v(function(de){var De=!1,nt=function(to,Yn,yi,jN){try{to.call(Yn,yi,jN)}catch(WN){return WN}}(ye,J,function(to){De||(De=!0,J!==to?Ie(de,to):Ct(de,to))},function(to){De||(De=!0,at(de,to))},de._label);!De&&nt&&(De=!0,at(de,nt))},O)}function _e(O,J,ye){J.constructor===O.constructor&&ye===ae&&J.constructor.resolve===fe?function(de,De){De._state===Ue?Ct(de,De._result):De._state===ot?at(de,De._result):io(De,void 0,function(nt){return Ie(de,nt)},function(nt){return at(de,nt)})}(O,J):ye===void 0?Ct(O,J):c(ye)?Ge(O,J,ye):Ct(O,J)}function Ie(O,J){if(O===J)at(O,new TypeError("You cannot resolve a promise with itself"));else if(function(de){var De=typeof de;return de!==null&&(De=="object"||De=="function")}(J)){var ye=void 0;try{ye=J.then}catch(de){return void at(O,de)}_e(O,J,ye)}else Ct(O,J)}function Lo(O){O._onerror&&O._onerror(O._result),so(O)}function Ct(O,J){O._state===qe&&(O._result=J,O._state=Ue,O._subscribers.length!==0&&v(so,O))}function at(O,J){O._state===qe&&(O._state=ot,O._result=J,v(Lo,O))}function io(O,J,ye,de){var De=O._subscribers,nt=De.length;O._onerror=null,De[nt]=J,De[nt+Ue]=ye,De[nt+ot]=de,nt===0&&O._state&&v(so,O)}function so(O){var J=O._subscribers,ye=O._state;if(J.length!==0){for(var de=void 0,De=void 0,nt=O._result,to=0;to<J.length;to+=3)de=J[to],De=J[to+ye],de?Tt(ye,de,De,nt):De(nt);O._subscribers.length=0}}function Tt(O,J,ye,de){var De=c(ye),nt=void 0,to=void 0,Yn=!0;if(De){try{nt=ye(de)}catch(yi){Yn=!1,to=yi}if(J===nt)return void at(J,new TypeError("A promises callback cannot return that same promise."))}else nt=de;J._state!==qe||(De&&Yn?Ie(J,nt):Yn===!1?at(J,to):O===Ue?Ct(J,nt):O===ot&&at(J,nt))}var zo=0;function Kn(O){O[xe]=zo++,O._state=void 0,O._result=void 0,O._subscribers=[]}var $r=(Rn.prototype._enumerate=function(O){for(var J=0;this._state===qe&&J<O.length;J++)this._eachEntry(O[J],J)},Rn.prototype._eachEntry=function(O,J){var ye=this._instanceConstructor,de=ye.resolve;if(de===fe){var De=void 0,nt=void 0,to=!1;try{De=O.then}catch(yi){to=!0,nt=yi}if(De===ae&&O._state!==qe)this._settledAt(O._state,J,O._result);else if(typeof De!="function")this._remaining--,this._result[J]=O;else if(ye===eo){var Yn=new ye(xt);to?at(Yn,nt):_e(Yn,O,De),this._willSettleAt(Yn,J)}else this._willSettleAt(new ye(function(yi){return yi(O)}),J)}else this._willSettleAt(de(O),J)},Rn.prototype._settledAt=function(O,J,ye){var de=this.promise;de._state===qe&&(this._remaining--,O===ot?at(de,ye):this._result[J]=ye),this._remaining===0&&Ct(de,this._result)},Rn.prototype._willSettleAt=function(O,J){var ye=this;io(O,void 0,function(de){return ye._settledAt(Ue,J,de)},function(de){return ye._settledAt(ot,J,de)})},Rn);function Rn(O,J){this._instanceConstructor=O,this.promise=new O(xt),this.promise[xe]||Kn(this.promise),u(J)?(this.length=J.length,this._remaining=J.length,this._result=new Array(this.length),this.length===0?Ct(this.promise,this._result):(this.length=this.length||0,this._enumerate(J),this._remaining===0&&Ct(this.promise,this._result))):at(this.promise,new Error("Array Methods must be provided an Array"))}var eo=(Dn.prototype.catch=function(O){return this.then(null,O)},Dn.prototype.finally=function(O){var J=this.constructor;return c(O)?this.then(function(ye){return J.resolve(O()).then(function(){return ye})},function(ye){return J.resolve(O()).then(function(){throw ye})}):this.then(O,O)},Dn);function Dn(O){this[xe]=zo++,this._result=this._state=void 0,this._subscribers=[],xt!==O&&(typeof O!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof Dn?function(J,ye){try{ye(function(de){Ie(J,de)},function(de){at(J,de)})}catch(de){at(J,de)}}(this,O):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return eo.prototype.then=ae,eo.all=function(O){return new $r(this,O).promise},eo.race=function(O){var J=this;return u(O)?new J(function(ye,de){for(var De=O.length,nt=0;nt<De;nt++)J.resolve(O[nt]).then(ye,de)}):new J(function(ye,de){return de(new TypeError("You must pass an array to race."))})},eo.resolve=fe,eo.reject=function(O){var J=new this(xt);return at(J,O),J},eo._setScheduler=function(O){h=O},eo._setAsap=function(O){v=O},eo._asap=v,eo.polyfill=function(){var O=void 0;if(i!==void 0)O=i;else if(typeof kr<"u")O=kr;else try{O=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var J=O.Promise;if(J){var ye=null;try{ye=Object.prototype.toString.call(J.resolve())}catch{}if(ye==="[object Promise]"&&!J.cast)return}O.Promise=eo},eo.Promise=eo},typeof o=="object"&&t!==void 0?t.exports=l():typeof define=="function"&&define.amd?define(l):s.ES6Promise=l()}).call(this,e("VCmEsw"),typeof kr<"u"?kr:typeof window<"u"?window:{})},{VCmEsw:2}],2:[function(e,t,o){var r=t.exports={};function i(){}r.nextTick=function(){var s=typeof window<"u"&&window.setImmediate,l=typeof window<"u"&&window.postMessage&&window.addEventListener;if(s)return function(u){return window.setImmediate(u)};if(l){var c=[];return window.addEventListener("message",function(u){var d=u.source;d!==window&&d!==null||u.data!=="process-tick"||(u.stopPropagation(),0<c.length&&c.shift()())},!0),function(u){c.push(u),window.postMessage("process-tick","*")}}return function(u){setTimeout(u,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(s){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(s){throw new Error("process.chdir is not supported")}},{}],3:[function(e,t,o){"use strict";t.exports=function(){this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[],this.play=function(){c||u||(this.rewind(),c=!0,requestAnimationFrame(g))},this.rewind=function(){s=i=0,l=null,u=c=!1},this.addContext=function(v){if(0<d.length){var C=d[0].getImageData(0,0,this.width,this.height);v.putImageData(C,0,0)}d.push(v),v._apng_animation=this},this.removeContext=function(v){var C=d.indexOf(v);C!==-1&&(d.splice(C,1),d.length===0&&this.rewind(),"_apng_animation"in v&&delete v._apng_animation)},this.isPlayed=function(){return c},this.isFinished=function(){return u};var r=this,i=0,s=0,l=null,c=!1,u=!1,d=[],g=function(v){for(;c&&i<=v;)h(v);c&&requestAnimationFrame(g)},h=function(v){var C=s++%r.frames.length,w=r.frames[C];if(r.numPlays==0||s/r.frames.length<=r.numPlays){for(C==0&&(d.forEach(function(x){x.clearRect(0,0,r.width,r.height)}),l=null,w.disposeOp==2&&(w.disposeOp=1)),l&&l.disposeOp==1?d.forEach(function(x){x.clearRect(l.left,l.top,l.width,l.height)}):l&&l.disposeOp==2&&d.forEach(function(x){x.putImageData(l.iData,l.left,l.top)}),(l=w).iData=null,l.disposeOp==2&&(l.iData=d[0].getImageData(w.left,w.top,w.width,w.height)),w.blendOp==0&&d.forEach(function(x){x.clearRect(w.left,w.top,w.width,w.height)}),d.forEach(function(x){x.drawImage(w.img,w.left,w.top)}),i==0&&(i=v);v>i+r.playTime;)i+=r.playTime;i+=w.delay}else u=!(c=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,d){for(var g=-1,h=u=u||0,v=u+(d=d||c.length-u);h<v;h++)g=g>>>8^r[255&(g^c[h])];return-1^g}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(d){return s(d)};var u={};c.parseURL=function(d){return d in u||(u[d]=l(d).then(s)),u[d]},c.animateContext=function(d,g){return c.parseURL(d).then(function(h){return h.addContext(g),h.play(),h})},c.animateImage=function(d){return d.setAttribute("data-is-apng","progress"),c.parseURL(d.src).then(function(g){d.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=g.width,h.height=g.height,Array.prototype.slice.call(d.attributes).forEach(function(A){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(A.nodeName)==-1&&h.setAttributeNode(A.cloneNode(!1))}),h.setAttribute("data-apng-src",d.src),d.alt!=""&&h.appendChild(document.createTextNode(d.alt));var v="",C="",w=0,x="";d.style.width!=""&&d.style.width!="auto"?v=d.style.width:d.hasAttribute("width")&&(v=d.getAttribute("width")+"px"),d.style.height!=""&&d.style.height!="auto"?C=d.style.height:d.hasAttribute("height")&&(C=d.getAttribute("height")+"px"),v!=""&&C==""&&(w=parseFloat(v),x=v.match(/\D+$/)[0],C=Math.round(h.height*w/h.width)+x),C!=""&&v==""&&(w=parseFloat(C),x=C.match(/\D+$/)[0],v=Math.round(h.width*w/h.height)+x),h.style.width=v,h.style.height=C;var N=d.parentNode;N.insertBefore(h,d),N.removeChild(d),g.addContext(h.getContext("2d")),g.play()},function(){d.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(d){var g=d.getContext("2d");"_apng_animation"in g&&g._apng_animation.removeContext(g)}}).call(this,typeof kr<"u"?kr:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(x){var N=new Uint8Array(x);return new r(function(A,L){for(var U=0;U<l.length;U++)if(l[U]!=N[U])return void L("Not a PNG file (invalid file signature)");var H=!1;if(c(N,function(Ge){return Ge!="acTL"||!(H=!0)}),H){var X=[],re=[],te=null,Y=null,Z=new i;if(c(N,function(Ge,_e,Ie,Lo){switch(Ge){case"IHDR":te=_e.subarray(Ie+8,Ie+8+Lo),Z.width=u(_e,Ie+8),Z.height=u(_e,Ie+12);break;case"acTL":Z.numPlays=u(_e,Ie+8+4);break;case"fcTL":Y&&Z.frames.push(Y),(Y={}).width=u(_e,Ie+8+4),Y.height=u(_e,Ie+8+8),Y.left=u(_e,Ie+8+12),Y.top=u(_e,Ie+8+16);var Ct=d(_e,Ie+8+20),at=d(_e,Ie+8+22);at==0&&(at=100),Y.delay=1e3*Ct/at,Y.delay<=10&&(Y.delay=100),Z.playTime+=Y.delay,Y.disposeOp=g(_e,Ie+8+24),Y.blendOp=g(_e,Ie+8+25),Y.dataParts=[];break;case"fdAT":Y&&Y.dataParts.push(_e.subarray(Ie+8+4,Ie+8+Lo));break;case"IDAT":Y&&Y.dataParts.push(_e.subarray(Ie+8,Ie+8+Lo));break;case"IEND":re.push(h(_e,Ie,12+Lo));break;default:X.push(h(_e,Ie,12+Lo))}}),Y&&Z.frames.push(Y),Z.frames.length!=0)for(var ae=0,fe=new Blob(X),xe=new Blob(re),xt=0;xt<Z.frames.length;xt++){Y=Z.frames[xt];var qe=[];qe.push(l),te.set(C(Y.width),0),te.set(C(Y.height),4),qe.push(w("IHDR",te)),qe.push(fe);for(var Ue=0;Ue<Y.dataParts.length;Ue++)qe.push(w("IDAT",Y.dataParts[Ue]));qe.push(xe);var ot=URL.createObjectURL(new Blob(qe,{type:"image/png"}));delete Y.dataParts,qe=null,Y.img=document.createElement("img"),Y.img.onload=function(){URL.revokeObjectURL(this.src),++ae==Z.frames.length&&A(Z)},Y.img.onerror=function(){L("Image creation error")},Y.img.src=ot}else L("Not an animated PNG")}else L("Not an animated PNG")})};var c=function(x,N){var A=8;do{var L=u(x,A),U=v(x,A+4,4),H=N(U,x,A,L);A+=12+L}while(H!==!1&&U!="IEND"&&A<x.length)},u=function(x,N){var A=0;A+=x[0+N]<<24>>>0;for(var L=1;L<4;L++)A+=x[L+N]<<8*(3-L);return A},d=function(x,N){for(var A=0,L=0;L<2;L++)A+=x[L+N]<<8*(1-L);return A},g=function(x,N){return x[N]},h=function(x,N,A){var L=new Uint8Array(A);return L.set(x.subarray(N,N+A)),L},v=function(x,N,A){var L=Array.prototype.slice.call(x.subarray(N,N+A));return String.fromCharCode.apply(String,L)},C=function(x){return[x>>>24&255,x>>>16&255,x>>>8&255,255&x]},w=function(x,N){var A=x.length+N.length,L=new Uint8Array(new ArrayBuffer(A+8));L.set(C(N.length),0),L.set(function(H){for(var X=[],re=0;re<H.length;re++)X.push(H.charCodeAt(re));return X}(x),4),L.set(N,8);var U=s(L,4,A);return L.set(C(U),A+4),L}},{"./animation":3,"./crc32":4,"es6-promise":1}],8:[function(e,t,o){(function(r){"use strict";var i,s,l=l||e("es6-promise").Promise,c=(i=function(u){var d=document.createElement("canvas"),g={TypedArrays:"ArrayBuffer"in r,BlobURLs:"URL"in r,requestAnimationFrame:"requestAnimationFrame"in r,pageProtocol:location.protocol=="http:"||location.protocol=="https:",canvas:"getContext"in document.createElement("canvas"),APNG:!1};if(g.canvas){var h=new Image;h.onload=function(){var v=d.getContext("2d");v.drawImage(h,0,0),g.APNG=v.getImageData(0,0,1,1).data[3]===0,u(g)},h.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}else u(g)},s=null,function(u){return s=s||new l(i),u&&s.then(u),s});t.exports={checkNativeFeatures:c,ifNeeded:function(u){return u===void 0&&(u=!1),c().then(function(d){if(d.APNG&&!u)reject();else{var g=!0;for(var h in d)d.hasOwnProperty(h)&&h!="APNG"&&(g=g&&d[h])}})}}}).call(this,typeof kr<"u"?kr:typeof window<"u"?window:{})},{"es6-promise":1}]},{},[5])});var Bw,Fw,Uw,$w,vd=f(()=>{"use strict";a();So();Bw=en(()=>_w().APNG),Fw="https://cdn.jsdelivr.net/npm/@vap/shiki-worker@0.0.8/dist/index.min.js",Uw="https://cdn.jsdelivr.net/npm/@vap/shiki@0.10.3/dist/onig.wasm",$w=en(()=>import("https://cdn.jsdelivr.net/npm/stegcloak-dist@1.0.0/index.js"))});var Vy=vi(Xy=>{a();var jw=Object.defineProperty,gL=e=>jw(e,"__esModule",{value:!0}),hL=(e,t)=>{for(var o in t)jw(e,o,{get:t[o],enumerable:!0})};gL(Xy);hL(Xy,{GIFEncoder:()=>Qw,applyPalette:()=>PL,default:()=>OL,nearestColor:()=>NL,nearestColorIndex:()=>Zw,nearestColorIndexWithDistance:()=>Jw,prequantize:()=>ML,quantize:()=>TL,snapColorsToPalette:()=>kL});var yL={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 Ww(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c<l;c++)o[t++]=i[c+s]},writeBytesView(i,s=0,l=i.byteLength){r(t+l),o.set(i.subarray(s,s+l),t),t+=l}};function r(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 Zy=12,Gw=5003,vL=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function bL(e,t,o,r,i=Ww(512),s=new Uint8Array(256),l=new Int32Array(Gw),c=new Int32Array(Gw)){let u=l.length,d=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let g=0,h=0,v=d+1,C=v,w=!1,x=C,N=(1<<x)-1,A=1<<v-1,L=A+1,U=A+2,H=0,X=o[0],re=0;for(let Z=u;Z<65536;Z*=2)++re;re=8-re,i.writeByte(d),Y(A);let te=o.length;for(let Z=1;Z<te;Z++)e:{let ae=o[Z],fe=(ae<<Zy)+X,xe=ae<<re^X;if(l[xe]===fe){X=c[xe];break e}let xt=xe===0?1:u-xe;for(;l[xe]>=0;)if(xe-=xt,xe<0&&(xe+=u),l[xe]===fe){X=c[xe];break e}Y(X),X=ae,U<1<<Zy?(c[xe]=U++,l[xe]=fe):(l.fill(-1),U=A+2,w=!0,Y(A))}return Y(X),Y(L),i.writeByte(0),i.bytesView();function Y(Z){for(g&=vL[h],h>0?g|=Z<<h:g=Z,h+=x;h>=8;)s[H++]=g&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),g>>=8,h-=8;if((U>N||w)&&(w?(x=C,N=(1<<x)-1,w=!1):(++x,N=x===Zy?1<<x:(1<<x)-1)),Z==L){for(;h>0;)s[H++]=g&255,H>=254&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0),g>>=8,h-=8;H>0&&(i.writeByte(H),i.writeBytesView(s,0,H),H=0)}}}var SL=bL;function qw(e,t,o){return e<<8&63488|t<<2&992|o>>3}function Kw(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function Yw(e,t,o){return e>>4<<8|t&240|o>>4}function bd(e,t,o){return e<t?t:e>o?o:e}function rc(e){return e*e}function zw(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,d=s.gc,g=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let C=e[h],w=C.cnt,x=l*w/(l+w);if(!(x>=i)){var v=0;o&&(v+=x*rc(C.ac-c),v>=i)||(v+=x*rc(C.rc-u),!(v>=i)&&(v+=x*rc(C.gc-d),!(v>=i)&&(v+=x*rc(C.bc-g),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Jy(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function xL(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s<i;++s){let l=e[s],c=l>>24&255,u=l>>16&255,d=l>>8&255,g=l&255,h=Kw(g,d,u,c),v=h in r?r[h]:r[h]=Jy();v.rc+=g,v.gc+=d,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,d=l&255,g=Yw(d,u,c),h=g in r?r[g]:r[g]=Jy();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,d=l&255,g=qw(d,u,c),h=g in r?r[g]:r[g]=Jy();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}return r}function TL(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),d=o.useSqrt!==!1,g=r==="rgba4444",h=xL(u,r),v=h.length,C=v-1,w=new Uint32Array(v+1);for(var x=0,A=0;A<v;++A){let Ue=h[A];if(Ue!=null){var N=1/Ue.cnt;g&&(Ue.ac*=N),Ue.rc*=N,Ue.gc*=N,Ue.bc*=N,h[x++]=Ue}}rc(t)/x<.022&&(d=!1);for(var A=0;A<x-1;++A)h[A].fw=A+1,h[A+1].bk=A,d&&(h[A].cnt=Math.sqrt(h[A].cnt));d&&(h[A].cnt=Math.sqrt(h[A].cnt));var L,U,H;for(A=0;A<x;++A){zw(h,A,!1);var X=h[A].err;for(U=++w[0];U>1&&(H=U>>1,!(h[L=w[H]].err<=X));U=H)w[U]=L;w[U]=A}var re=x-t;for(A=0;A<re;){for(var te;;){var Y=w[1];if(te=h[Y],te.tm>=te.mtm&&h[te.nn].mtm<=te.tm)break;te.mtm==C?Y=w[1]=w[w[0]--]:(zw(h,Y,!1),te.tm=A);var X=h[Y].err;for(U=1;(H=U+U)<=w[0]&&(H<w[0]&&h[w[H]].err>h[w[H+1]].err&&H++,!(X<=h[L=w[H]].err));U=H)w[U]=L;w[U]=Y}var Z=h[te.nn],ae=te.cnt,fe=Z.cnt,N=1/(ae+fe);g&&(te.ac=N*(ae*te.ac+fe*Z.ac)),te.rc=N*(ae*te.rc+fe*Z.rc),te.gc=N*(ae*te.gc+fe*Z.gc),te.bc=N*(ae*te.bc+fe*Z.bc),te.cnt+=Z.cnt,te.mtm=++A,h[Z.bk].fw=Z.fw,h[Z.fw].bk=Z.bk,Z.mtm=C}let xe=[];var xt=0;for(A=0;;++xt){let qe=bd(Math.round(h[A].rc),0,255),Ue=bd(Math.round(h[A].gc),0,255),ot=bd(Math.round(h[A].bc),0,255),Ge=255;g&&(Ge=bd(Math.round(h[A].ac),0,255),c&&(Ge=Ge<=(typeof c=="number"?c:127)?0:255),i&&Ge<=l&&(qe=Ue=ot=s,Ge=0));let _e=g?[qe,Ue,ot,Ge]:[qe,Ue,ot];if(wL(xe,_e)||xe.push(_e),(A=h[A].fw)==0)break}return xe}function wL(e,t){for(let o=0;o<e.length;o++){let r=e[o],i=r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2],s=r.length>=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function xd(e,t){var o=0,r;for(r=0;r<e.length;r++){let i=e[r]-t[r];o+=i*i}return o}function Sd(e,t){return t>1?Math.round(e/t)*t:e}function ML(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s<i.length;s++){let l=i[s],c=l>>24&255,u=l>>16&255,d=l>>8&255,g=l&255;c=Sd(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),g=Sd(g,t),d=Sd(d,t),u=Sd(u,t),i[s]=c<<24|u<<16|d<<8|g<<0}}function PL(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=o==="rgba4444";if(o==="rgba4444")for(let d=0;d<i;d++){let g=r[d],h=g>>24&255,v=g>>16&255,C=g>>8&255,w=g&255,x=Kw(w,C,v,h),N=x in c?c[x]:c[x]=IL(w,C,v,h,t);l[d]=N}else{let d=o==="rgb444"?Yw:qw;for(let g=0;g<i;g++){let h=r[g],v=h>>16&255,C=h>>8&255,w=h&255,x=d(w,C,v),N=x in c?c[x]:c[x]=CL(w,C,v,t);l[g]=N}}return l}function IL(e,t,o,r,i){let s=0,l=1e100;for(let c=0;c<i.length;c++){let u=i[c],d=u[3],g=ss(d-r);if(g>l)continue;let h=u[0];if(g+=ss(h-e),g>l)continue;let v=u[1];if(g+=ss(v-t),g>l)continue;let C=u[2];g+=ss(C-o),!(g>l)&&(l=g,s=c)}return s}function CL(e,t,o,r){let i=0,s=1e100;for(let l=0;l<r.length;l++){let c=r[l],u=c[0],d=ss(u-e);if(d>s)continue;let g=c[1];if(d+=ss(g-t),d>s)continue;let h=c[2];d+=ss(h-o),!(d>s)&&(s=d,i=l)}return i}function kL(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;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=Jw(r,c.slice(0,3),xd),d=u[0],g=u[1];g>0&&g<=i&&(e[d]=c)}}function ss(e){return e*e}function Zw(e,t,o=xd){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<r&&(r=c,i=s)}return i}function Jw(e,t,o=xd){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=o(t,l);c<r&&(r=c,i=s)}return[i,r]}function NL(e,t,o=xd){return e[Zw(e,t,o)]}function Qw(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,r=Ww(t),i=5003,s=new Uint8Array(256),l=new Int32Array(i),c=new Int32Array(i),u=!1;return{reset(){r.reset(),u=!1},finish(){r.writeByte(yL.trailer)},bytes(){return r.bytes()},bytesView(){return r.bytesView()},get buffer(){return r.buffer},get stream(){return r},writeHeader:d,writeFrame(g,h,v,C={}){let{transparent:w=!1,transparentIndex:x=0,delay:N=0,palette:A=null,repeat:L=0,colorDepth:U=8,dispose:H=-1}=C,X=!1;if(o?u||(X=!0,d(),u=!0):X=!!C.first,h=Math.max(0,Math.floor(h)),v=Math.max(0,Math.floor(v)),X){if(!A)throw new Error("First frame must include a { palette } option");RL(r,h,v,A,U),Hw(r,A),L>=0&&DL(r,L)}let re=Math.round(N/10);AL(r,H,re,w,x);let te=!!A&&!X;LL(r,h,v,te?A:null),te&&Hw(r,A),EL(r,g,h,v,U,s,l,c)}};function d(){Xw(r,"GIF89a")}}function AL(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2,e.writeByte(0|l|0|s),ai(e,o),e.writeByte(i||0),e.writeByte(0)}function RL(e,t,o,r,i=8){let c=Qy(r.length)-1,u=128|i-1<<4|0|c,d=0,g=0;ai(e,t),ai(e,o),e.writeBytes([u,d,g])}function DL(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),Xw(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),ai(e,t),e.writeByte(0)}function Hw(e,t){let o=1<<Qy(t.length);for(let r=0;r<o;r++){let i=[0,0,0];r<t.length&&(i=t[r]),e.writeByte(i[0]),e.writeByte(i[1]),e.writeByte(i[2])}}function LL(e,t,o,r){if(e.writeByte(44),ai(e,0),ai(e,0),ai(e,t),ai(e,o),r){let l=Qy(r.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function EL(e,t,o,r,i=8,s,l,c){SL(o,r,t,i,e,s,l,c)}function ai(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function Xw(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function Qy(e){return Math.max(Math.ceil(Math.log2(e)),1)}var OL=Qw});function oM(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function Pd(e,t){let o=ie.getChannel(e);return!o||o.isPrivate()?!0:Be.can(t,o)}function $L(){return{find:"canUseCustomStickersEverywhere:",replacement:[{func:"canUseCustomStickersEverywhere",predicate:()=>et.store.enableStickerBypass},{func:"canUseHighVideoUploadQuality",predicate:()=>et.store.enableStreamQualityBypass},{func:"canStreamQuality",predicate:()=>et.store.enableStreamQualityBypass},{func:"canUseClientThemes"},{func:"canUseCustomNotificationSounds"},{func:"canUsePremiumAppIcons"}].map(({func:t,predicate:o})=>({match:new RegExp(String.raw`(?<=${t}:)\i`),replace:"() => true",predicate:o}))}}var oa,as,Td,Vw,Md,ls,e0,_L,ic,t0,o0,wd,eM,et,BL,FL,tM,UL,Id,nM=f(()=>{"use strict";a();Ul();_();M();vd();Pe();Ae();T();$();S();oa=zc(Vy()),as=be("StickersStore"),Td=be("UserSettingsProtoStore"),Vw=R("readerFactory");Md=mo(()=>Wa.PreloadedUserSettingsActionCreators),ls=mo(()=>oM("appearance",Md.ProtoClass)),e0=mo(()=>oM("clientThemeSettings",ls)),_L=Ce(".getUserIsAdmin("),ic="[3,4].includes(fakeNitroIntention)",t0=/\/emojis\/(\d+?)\.(png|webp|gif)/,o0=/\/stickers\/(\d+?)\./,wd=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,eM=/\[.+?\]\((https?:\/\/.+?)\)/,et=P({enableEmojiBypass:{description:"Allows sending fake emojis (also bypasses missing permission to use custom emojis)",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allows sending fake stickers (also bypasses missing permission to use stickers)",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0},useHyperLinks:{description:"Whether to use hyperlinks when sending fake emojis and stickers",type:3,default:!0},hyperLinkText:{description:"What text the hyperlink should use. {{NAME}} will be replaced with the emoji/sticker name.",type:0,default:"{{NAME}}"},disableEmbedPermissionCheck:{description:"Whether to disable the embed permission check when sending fake emojis and stickers",type:3,default:!1}});BL=e=>Pd(e,ke.USE_EXTERNAL_EMOJIS),FL=e=>Pd(e,ke.USE_EXTERNAL_STICKERS),tM=e=>Pd(e,ke.EMBED_LINKS),UL=e=>Pd(e,ke.ATTACH_FILES);Id=y({name:"FakeNitro",authors:[p.Arjix,p.D3SOX,p.Ven,p.fawn,p.captain,p.Nuckyz,p.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers, use client themes and custom Discord notifications.",dependencies:["MessageEventsAPI"],settings:et,patches:[$L(),{find:"emojiItemDisabled]",predicate:()=>et.store.enableEmojiBypass,replacement:{match:/CHAT/,replace:"STATUS"}},{find:".GUILD_SUBSCRIPTION_UNAVAILABLE;",group:!0,predicate:()=>et.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}&&!${ic}`},{match:/!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,replace:e=>`${e}&&!${ic}`},{match:/(!)?(\i\.\i\.canUseEmojisEverywhere\(\i\))/,replace:(e,t)=>t?`(${e}&&!${ic})`:`(${e}||${ic})`},{match:/(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/,replace:e=>`(${e}||${ic})`}]},{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:()=>et.store.enableStickerBypass,replacement:{match:/\i\.available\?/,replace:"true?"}},{find:"#{intl::STREAM_FPS_OPTION}",predicate:()=>et.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:'"UserSettingsProtoStore"',replacement:[{match:/function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/,replace:(e,t,o)=>`${e}$self.handleProtoChange(${o}.userSettingsProto,${o}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>et.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>et.store.transformEmojis||et.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"}renderEmbeds(",replacement:[{predicate:()=>et.store.transformEmojis||et.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\(\((\i),\i\)?=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>et.store.transformStickers,match:/renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;/,replace:(e,t,o)=>`${e}${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>et.store.transformStickers,match:/renderAttachments\(\i\){.+?{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:"#{intl::STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION}",predicate:()=>et.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,270}sticker:\i,channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(0,${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>et.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:()=>et.store.transformEmojis,replacement:{match:/(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,replace:(e,t,o)=>`$self.addFakeNotice(1,${t},!!${o}?.fakeNitroNode?.fake)`}},{find:"?24:30,",replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}},{find:'type:"GUILD_SOUNDBOARD_SOUND_CREATE"',replacement:{match:/(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g,replace:"true"}}],get guildId(){return ar()?.id},get canUseEmotes(){return(D.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(D.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){try{if(e==null||typeof e=="string")return;if((t?.premium_type??D?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=ls.create(),Td.settings.appearance?.theme!=null){let r=ls.create({theme:Td.settings.appearance.theme});e.appearance.theme=r.theme}if(Td.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=e0.create({backgroundGradientPresetId:{value:Td.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}}catch(o){new V("FakeNitro").error(o)}},handleGradientThemeSelect(e,t,o){if((D?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!Md||!ls||!e0||!Vw)return;let i=Md.getCurrentValue().appearance,s=i!=null?ls.fromBinary(ls.toBinary(i),Vw):ls.create();s.theme=t;let l=e0.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=Md.ProtoClass.create();c.appearance=s,G.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"?(e[0]=t.trimStart(),e[0]||e.shift()):typeof t?.props?.children=="string"&&(t.props.children=t.props.children.trimStart(),t.props.children||e.shift());let o=e.length-1,r=e[o];typeof r=="string"?(e[o]=r.trimEnd(),e[o]||e.pop()):typeof r?.props?.children=="string"&&(r.props.children=r.props.children.trimEnd(),r.props.children||e.pop())},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!et.store.transformCompoundSentence)return e;let o=e.length,r=c=>{if(et.store.transformEmojis){let u=c.props.href.match(t0);if(u){let d=null;try{d=new URL(c.props.href)}catch{}let g=un.getCustomEmojiById(u[1])?.name??d?.searchParams.get("name")??"FakeNitroEmoji";return Ee.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:g,fake:!0},void 0,{key:String(o++)})}}if(et.store.transformStickers){if(o0.test(c.props.href))return null;let u=c.props.href.match(wd);if(u&&as.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let d=!1;for(let[g,h]of u.props.children.entries()){if(h==null){delete u.props.children[g];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?d=!0:delete u.props.children[g]}if(!d)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,d]of c.entries())c[u]=s(d);return c=this.clearEmptyArrayItems(c),c};try{let c=l(Ai.cloneDeep(e));return this.trimContent(c),c}catch(c){return new V("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);et.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!et.store.transformCompoundSentence&&!i.startsWith("http")&&!eM.test(i))continue;let s=i.match(o0);if(s){let c=null;try{c=new URL(i)}catch{}let u=as.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(wd);if(l){if(!as.getStickerById(l[1]))continue;let c=as.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!et.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!et.store.transformCompoundSentence&&!o.some(r=>r===e.url||r.match(eM)?.[1]===e.url))return!1;if(et.store.transformEmojis&&t0.test(e.url))return!0;if(et.store.transformStickers){if(o0.test(e.url))return!0;let r=e.url.match(wd);if(r&&as.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(wd);return!(o&&as.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&t0.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=${et.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=Bw(),{frames:i,width:s,height:l}=await r(e),c=(0,oa.GIFEncoder)(),u=et.store.stickerSize,d=document.createElement("canvas");d.width=u,d.height=u;let g=d.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);g.scale(h,h);let v;for(let w of i){let{left:x,top:N,width:A,height:L,img:U,delay:H,blendOp:X,disposeOp:re}=w;v=g.getImageData(x,N,A,L),X===0&&g.clearRect(x,N,A,L),g.drawImage(U,x,N,A,L);let{data:te}=g.getImageData(0,0,u,u),Y=(0,oa.quantize)(te,256),Z=(0,oa.applyPalette)(te,Y);c.writeFrame(Z,u,u,{transparent:!0,palette:Y,delay:H}),re===1?g.clearRect(x,N,A,L):re===2&&g.putImageData(v,x,N)}c.finish();let C=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});qa.promptToUpload([C],ie.getChannel(o),no.ChannelMessage)},canUseEmote(e,t){if(e.type===0)return!0;if(e.available===!1||_L(e,this.guildId,!0))return!1;let o=!1;if(e.managed&&e.guildId){let r=Re.getSelfMember(e.guildId)?.roles??[];o=e.roles.some(i=>r.includes(i))}return this.canUseEmotes||o?e.guildId===this.guildId||BL(t):!e.animated&&e.guildId===this.guildId},start(){let e=et.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(r,i){return!r[i]||/\s/.test(r[i])?"":" "}function o(){return new Promise(r=>{rt.show({title:"Hold on!",body:n("div",null,n(b.FormText,null,"You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."),n(b.FormText,{type:b.FormText.Types.DESCRIPTION},"You can disable this notice in the plugin settings.")),confirmText:"Send Anyway",cancelText:"Cancel",secondaryConfirmText:"Do not show again",onConfirm:()=>r(!0),onCloseCallback:()=>setImmediate(()=>r(!1)),onConfirmSecondary(){et.store.disableEmbedPermissionCheck=!0,r(!0)}})})}this.preSend=Xi(async(r,i,s)=>{let{guildId:l}=this,c=!1;e:{if(!e.enableStickerBypass)break e;let u=as.getStickerById(s.stickers?.[0]);if(!u||"pack_id"in u)break e;let d=this.canUseStickers&&FL(r);if(u.available!==!1&&(d||u.guild_id===l))break e;let g=this.getStickerLink(u.id);if(u.format_type===4&&g.includes(".png")&&(g=g.replace(".png",".gif")),u.format_type===2)return UL(r)?this.sendAnimatedSticker(g,u.id,r):rt.show({title:"Hold on!",body:n("div",null,n(b.FormText,null,"You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."))}),{cancel:!0};{c=!0;let h=new URL(g);h.searchParams.set("name",u.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${v}](${h})`:h}`,s.stickers.length=0}}if(e.enableEmojiBypass)for(let u of i.validNonShortcutEmojis){if(this.canUseEmote(u,r))continue;c=!0;let d=`<${u.animated?"a":""}:${u.originalName||u.name}:${u.id}>`,g=new URL(xu(u.id,u.animated,e.emojiSize));g.searchParams.set("size",e.emojiSize.toString()),g.searchParams.set("name",u.name);let h=e.hyperLinkText.replaceAll("{{NAME}}",u.name);i.content=i.content.replace(d,(v,C,w)=>`${t(w,C-1)}${e.useHyperLinks?`[${h}](${g})`:g}${t(w,C+v.length)}`)}return c&&!e.disableEmbedPermissionCheck&&!tM(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=Bl(async(r,i,s)=>{if(!e.enableEmojiBypass)return;let l=!1;return s.content=s.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,d,g)=>{let h=un.getCustomEmojiById(u);if(h==null||this.canUseEmote(h,r))return c;l=!0;let v=new URL(xu(h.id,h.animated,e.emojiSize));v.searchParams.set("size",e.emojiSize.toString()),v.searchParams.set("name",h.name);let C=e.hyperLinkText.replaceAll("{{NAME}}",h.name);return`${t(g,d-1)}${e.useHyperLinks?`[${C}](${v})`:v}${t(g,d+c.length)}`}),l&&!e.disableEmbedPermissionCheck&&!tM(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){Vi(this.preSend),Fl(this.preEdit)}})});var rM=f(()=>{});function GL(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var iM,sM=f(()=>{a();iM=GL});function aM(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function lM(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 cM,uM,zL,HL,Cd,pM=f(()=>{"use strict";a();rM();_();ne();M();ze();me();wt();T();$();S();sM();cM=P({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),uM=se("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),zL=se("isTryItOutFlow:","pendingThemeColors:","pendingAvatarDecoration:","EDIT_PROFILE_BANNER"),HL=Xn(["#{intl::USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON}"],/createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/),Cd=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[p.Alyxia,p.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(.+?)(?=})/,replace:"$self.colorDecodeHook($1)"}},{find:"#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",replacement:{match:/#{intl::USER_SETTINGS_RESET_PROFILE_THEME}\)}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>{let e=lM(Qt.getUserProfile(D.getCurrentUser().id).bio)??[0,0],[t,o]=K(e[0]),[r,i]=K(e[1]),[,,s]=St(HL);return n(b.FormSection,null,n(b.FormTitle,{tag:"h3"},"Usage"),n(b.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins."," ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 use the color pickers below to choose your colors"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n(b.FormDivider,{className:z(F.top8,F.bottom8)}),n(b.FormTitle,{tag:"h3"},"Color pickers"),!s&&n(Ts,{direction:Ts.Direction.HORIZONTAL,style:{gap:"1rem"}},n(uM,{color:t,label:n(Q,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Primary"),onChange:l=>{o(l)}}),n(uM,{color:r,label:n(Q,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Accent"),onChange:l=>{i(l)}}),n(I,{onClick:()=>{let l=aM(t,r);Xt(l)},color:I.Colors.PRIMARY,size:I.Sizes.XLARGE},"Copy 3y3")),n(b.FormDivider,{className:z(F.top8,F.bottom8)}),n(b.FormTitle,{tag:"h3"},"Preview"),n("div",{className:"vc-fpt-preview"},n(zL,{user:D.getCurrentUser(),pendingThemeColors:[t,r],onAvatarChange:()=>{},onBannerChange:()=>{},canUsePremiumCustomization:!0,hideExampleButton:!0,hideFakeActivity:!0,isTryItOutFlow:!0}))))},settings:cM,colorDecodeHook(e){if(e){if(cM.store.nitroFirst&&e.themeColors)return e;let t=lM(e.bio);if(t)return iM(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:k.wrap(function({primary:e,accent:t}){return n(I,{onClick:()=>{let o=aM(e,t);Xt(o)},color:I.Colors.PRIMARY,size:I.Sizes.XLARGE,className:F.left16},"Copy 3y3")},{noop:!0})})});var kd,dM=f(()=>{"use strict";a();M();T();S();kd=y({name:"FavoriteEmojiFirst",authors:[p.Aria,p.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"numLockedEmojiResults:",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(Math\.max\(\i,\i(?:-\i\.length){2}\))\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=un.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??1/0)}})});function WL({instance:e,SearchBarComponent:t}){let[o,r]=K(""),i=Mt(null),s=iu(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(d=>({score:qL(l.toLowerCase(),fM(d.url??d.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:d})).filter(d=>d.score!=null);u.sort((d,g)=>g.score-d.score),c.favorites=u.map(d=>d.gif),e.forceUpdate()},[e.state]);return le(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:jL.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function fM(e){let t;try{t=new URL(e)}catch{return e}switch(mM.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 qL(e,t){let o=0,r=0;for(let i=0;i<t.length;i++)if(t[i]===e[o]?(r++,o++):r--,o===e.length)return r;return null}var jL,mM,Nd,gM=f(()=>{"use strict";a();_();ne();M();T();$();S();jL=R("searchBar","searchBarFullRow"),mM=P({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}]}}),Nd=y({name:"FavoriteGifSearch",authors:[p.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:mM,getTargetString:fM,instance:null,renderSearchBar(e,t){return this.instance=e,n(k,{noop:!0},n(WL,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var Ad,hM=f(()=>{"use strict";a();M();T();Ad=y({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[p.Grzesiek11],patches:[{find:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]})});var Rd,yM=f(()=>{"use strict";a();M();T();Rd=y({name:"FixImagesQuality",description:"Prevents images from being loaded as webp, which can cause quality loss",authors:[p.Nuckyz],patches:[{find:".handleImageLoad)",replacement:{match:/(?<=null;return )\i\.\i&&\(\i\|\|!\i\.isAnimated.+?:(?=\i&&\(\i="png"\))/,replace:""}}]})});var Dd,vM=f(()=>{"use strict";a();_();vr();M();T();Dd=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[p.Ven],settings:P({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:Vt(0,100,10),stickToMarkers:!1,default:10}})})});var Ld,bM=f(()=>{"use strict";a();M();T();Ld=y({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[p.coolelectronics]})});var Ed,SM=f(()=>{"use strict";a();M();T();S();Ed=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return ce.getGuild(t)?.ownerId===o}})});var n0,Od,xM=f(()=>{"use strict";a();rn();M();T();$();n0=R("createFriendInvite"),Od=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[p.afn,p.Dziurwa],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:0,execute:async(e,t)=>{let o=await n0.createFriendInvite();mt(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 r=(await n0.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," "));mt(t.channel.id,{content:r.join(`
|
|
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:0,execute:async(e,t)=>{await n0.revokeFriendInvites(),mt(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var KL,YL,TM,wM,ZL,_d,MM=f(()=>{"use strict";a();ne();M();Pe();T();$();S();KL=R("memberSinceWrapper"),YL=R("memberSince"),TM=Ce('month:"short",day:"numeric"'),wM=R("getLocale"),ZL=se('"auto":"smooth"',".section"),_d=y({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[p.Elvyra,p.Antti],patches:[{find:".PANEL}),nicknameIcons",replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"}},{find:'action:"PRESS_APP_CONNECTION"',replacement:{match:/#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,replace:"$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),"}}],FriendsSinceComponent:k.wrap(({userId:e,isSidebar:t})=>{if(!Fe.isFriend(e))return null;let o=Fe.getSince(e);return o?n(ZL,{heading:"Friends Since"},t?n(Q,{variant:"text-sm/normal"},TM(o,wM.getLocale())):n("div",{className:KL.memberSinceWrapper},n("div",{className:YL.memberSince},!!Ko()?.guild_id&&n("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--interactive-normal)"},n("path",{d:"M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),n("path",{d:"M3 5v-.75C3 3.56 3.56 3 4.25 3s1.24.56 1.33 1.25C6.12 8.65 9.46 12 13 12h1a8 8 0 0 1 8 8 2 2 0 0 1-2 2 .21.21 0 0 1-.2-.15 7.65 7.65 0 0 0-1.32-2.3c-.15-.2-.42-.06-.39.17l.25 2c.02.15-.1.28-.25.28H9a2 2 0 0 1-2-2v-2.22c0-1.57-.67-3.05-1.53-4.37A15.85 15.85 0 0 1 3 5Z"})),n(Q,{variant:"text-sm/normal"},TM(o,wM.getLocale()))))):null},{noop:!0})})});function QL({message:e,channel:t,onHeightUpdate:o}){let r=e.author&&!(e.author.id===D.getCurrentUser().id||e.author.system);return JL({navId:"message-actions",ariaLabel:Me("MESSAGE_UTILITIES_A11Y_LABEL"),message:e,channel:t,canReport:r,onHeightUpdate:o,onClose:()=>Et.closeContextMenu(),textSelection:"",favoriteableType:null,favoriteableId:null,favoriteableName:null,itemHref:void 0,itemSrc:void 0,itemSafeSrc:void 0,itemTextContent:void 0,isFullSearchContextMenu:!0})}var JL,PM,XL,Bd,IM=f(()=>{"use strict";a();No();_();M();Pe();wt();T();$();S();JL=Ce(".MESSAGE,commandTargetId:"),PM=yh;Xe(B.componentByCode('"devmode-copy-id-".concat'),e=>PM=e);XL=(e,t)=>{if(t?.isFullSearchContextMenu==null)return;dt("devmode-copy-id",e,!0)?.push(PM({id:t.message.author.id,label:Me("COPY_ID_AUTHOR")}))};hr("FullSearchContext","SearchReply");Bd=y({name:"FullSearchContext",description:"Makes the message context menu in message search results have all options you'd expect",authors:[p.Ven,p.Aria],patches:[{find:"onClick:this.handleMessageClick,",replacement:{match:/this(?=\.handleContextMenu\(\i,\i\))/,replace:"$self"}}],handleContextMenu(e,t){let o=ie.getChannel(t.channel_id);o&&(e.stopPropagation(),Et.openContextMenu(e,r=>n(QL,{message:t,channel:o,onHeightUpdate:r.onHeightUpdate})))},contextMenus:{"message-actions":XL}})});var VL,Fd,CM=f(()=>{"use strict";a();ne();M();T();$();S();VL=se(".USER_MENTION)"),Fd=y({name:"FullUserInChatbox",description:"Makes the user mention in the chatbox have more functionalities, like left/right clicking",authors:[p.sadan],patches:[{find:':"text":',replacement:{match:/(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/,replace:"$1return $self.UserMentionComponent({...arguments[0],originalComponent:()=>{$2}});"}}],UserMentionComponent:k.wrap(e=>Se([D],()=>D.getUser(e.id))==null?e.originalComponent():n(VL,{className:"mention",userId:e.id,channelId:e.channelId}),{fallback:({wrappedProps:{originalComponent:e}})=>e()})})});var kM,NM=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class^="panels"] [class^="avatarWrapper"] {
|
|
min-width: 88px;
|
|
}
|
|
`,classNames:{},dom:null});kM="src/plugins/gameActivityToggle/style.css"});function t8(e){let{oldIcon:t}=RM.use(["oldIcon"]),o=t?"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z":"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",r=t?"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z":"M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z";return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:!e&&!t?"var(--status-danger)":"currentColor",mask:e?void 0:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(m,null,n("path",{fill:"var(--status-danger)",d:o}),n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:r}))))}}function o8(){let e=AM.useSetting();return n(e8,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:t8(e),role:"switch","aria-checked":!e,redGlow:!e,onClick:()=>AM.updateSetting(t=>!t)})}var e8,AM,RM,Ud,DM=f(()=>{"use strict";a();_();wr();ne();M();T();$();NM();e8=se(".NONE,disabled:",".PANEL_BUTTON"),AM=Ao("status","showCurrentGame");RM=P({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),Ud=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz,p.RuukuLada],dependencies:["UserSettingsAPI"],settings:RM,managedStyle:kM,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:{match:/className:\i\.buttons,.{0,50}children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:k.wrap(o8,{noop:!0})})});var $d,LM=f(()=>{"use strict";a();M();Pe();T();S();$d=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[p.Ven],patches:[{find:'"handleSelectGIF",',replacement:{match:/"handleSelectGIF",(\i)=>\{/,replace:'"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);'}}],handleSelect(e){e&&(lr(e.url+" "),Ka.closeExpressionPicker())}})});function OM(e,t,o){let r=Wo.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Gd.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Wo._sendMessage(e.id,i,r)}else Wo.sendGreetMessage(e.id,o[0],r)}function n8({channel:e,message:t}){let o=Gd.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(E.Menu,{navId:"greet-sticker-picker",onClose:()=>G.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(E.MenuGroup,{label:"Greet Mode"},Object.values(_M).map(s=>n(E.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(E.MenuSeparator,null),n(E.MenuGroup,{label:"Greet Stickers"},EM.map(s=>n(E.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>OM(e,t,[s.id])}))),Gd.store.unholyMultiGreetEnabled?n(m,null,n(E.MenuSeparator,null),n(E.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},EM.map(s=>{let l=i.some(c=>c===s.id);return n(E.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),n(E.MenuSeparator,null),n(E.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>OM(e,t,i),disabled:i.length===0}))):null)}var _M,Gd,EM,zd,BM=f(()=>{"use strict";a();_();M();T();$();S();_M=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(_M||{}),Gd=P({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(),EM=kt(e=>Array.isArray(e)&&e[0]?.name==="Wave");zd=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[p.Ven],settings:Gd,patches:[{find:"#{intl::WELCOME_CTA_LABEL}",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Et.openContextMenu(e,()=>n(n8,{...t}))}})});var FM=f(()=>{});var r0={};lt(r0,{updateMessage:()=>Nr});function Nr(e,t,o){let r=au.getOrCreate(e);if(!r.has(t))return;let i=r.update(t,s=>o?s.merge(o):new s.constructor(s));au.commit(i),Jt.emitChange()}var na=f(()=>{"use strict";a();S()});async function UM(){return sc=await co($M)??new Set,sc}var $M,sc,r8,Hd,GM=f(()=>{"use strict";a();FM();_n();na();_();At();M();me();T();S();$M="HideAttachments_HiddenIds",sc=new Set;r8=e=>hn($M,e);hr("HideMedia","HideAttachments");Hd=y({name:"HideMedia",description:"Hide attachments and embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessageUpdaterAPI"],patches:[{find:"this.renderAttachments(",replacement:{match:/(?<=\i=)this\.render(?:Attachments|Embeds|StickersAccessories)\((\i)\)/g,replace:"$self.shouldHide($1?.id)?null:$&"}}],renderMessagePopoverButton(e){let t=e.messageSnapshots.some(r=>r?.message.attachments.length);if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length&&!t)return null;let o=sc.has(e.id);return{label:o?"Show Media":"Hide Media",icon:o?sl:al,message:e,channel:ie.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.channel_id,e.id)}},renderMessageAccessory({message:e}){return this.shouldHide(e.id)?n("span",{className:z("vc-hideAttachments-accessory",!e.content&&"vc-hideAttachments-no-content")},"Media Hidden"):null},async start(){await UM()},stop(){sc.clear()},shouldHide(e){return sc.has(e)},async toggleHide(e,t){let o=await UM();o.delete(t)||o.add(t),await r8(o),Nr(e,t)}})});var jd,zM=f(()=>{"use strict";a();M();T();jd=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:0x40000000|(?:1<<30|1073741824))\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function WM(e,t,o,r){return n(oe,{text:t},i=>n("button",{...i,onClick:s=>l8(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function jM(e,t=!1){let o=Gt.use(["ignoredActivities"]),{ignoredActivities:r}=o;return r.some(i=>i.id===e.id)?a8(e,"var(--status-danger)"):s8(e,t?"var(--green-300)":"var(--primary-400)")}function l8(e,t){e.stopPropagation();let o=Gt.store.ignoredActivities.findIndex(r=>r.id===t.id);o===-1?Gt.store.ignoredActivities.push(t):Gt.store.ignoredActivities.splice(o,1)}function li(){i8.updateSetting(e=>e)}function c8(){return n(ge,{flexDirection:"column"},n(b.FormText,{type:b.FormText.Types.DESCRIPTION},"Import the application id of the CustomRPC plugin to the filter list"),n("div",null,n(I,{onClick:()=>{let e=j.plugins.CustomRPC?.appID;if(!e)return Je("CustomRPC application ID is not set.",ee.Type.FAILURE);i0?.(e)&&Je("CustomRPC application ID is already added.",ee.Type.FAILURE)}},"Import CustomRPC ID")))}function u8(e){let[t,o]=K(Gt.store.idsList??"");i0=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},le(()=>()=>{i0=null},[]);function r(i){o(i),e.setValue(i)}return n(b.FormSection,null,n(b.FormTitle,{tag:"h3"},"Filter List"),n(b.FormText,{className:F.bottom8,type:b.FormText.Types.DESCRIPTION},"Comma separated list of activity IDs to filter (Useful for filtering specific RPC activities and CustomRPC"),n(ct,{type:"text",value:t,onChange:r,placeholder:"235834946571337729, 343383572805058560"}))}function p8(e,t){if(t&&Gt.store.idsList.includes(t))return Gt.store.listMode===1;switch(e){case 0:return Gt.store.ignorePlaying;case 1:return Gt.store.ignoreStreaming;case 2:return Gt.store.ignoreListening;case 3:return Gt.store.ignoreWatching;case 5:return Gt.store.ignoreCompeting}return!1}var HM,i8,s8,a8,i0,Gt,Wd,qM=f(()=>{"use strict";a();_();wr();ne();jt();M();ze();T();$();S();HM=be("RunningGameStore"),i8=Ao("status","showCurrentGame");s8=(e,t)=>WM(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),a8=(e,t)=>WM(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);i0=null;Gt=P({importCustomRPC:{type:6,component:c8},listMode:{type:4,description:"Change the mode of the filter list",options:[{label:"Whitelist",value:0,default:!0},{label:"Blacklist",value:1}],onChange:li},idsList:{type:6,default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));Gt.store.idsList=Array.from(t).join(", "),li()},component:e=>n(u8,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1,onChange:li},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1,onChange:li},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1,onChange:li},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1,onChange:li},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1,onChange:li},ignoredActivities:{type:7,default:[],onChange:li}});Wd=y({name:"IgnoreActivities",authors:[p.Nuckyz,p.Kylie],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are specifically ignored from the Registered Games and Activities tabs, or use the general settings below",dependencies:["UserSettingsAPI"],settings:Gt,patches:[{find:'"LocalActivityStore"',replacement:[{match:/\.LISTENING.+?(?=!?\i\(\)\(\i,\i\))(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:'"ActivityTrackingStore"',replacement:{match:/getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`}},{find:"#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",replacement:{match:/#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".promotedLabelWrapperNonBanner,children",replacement:{match:/\.appDetailsHeaderContainer.+?children:\i.*?}\),(?<=application:(\i).+?)/,replace:(e,t)=>`${e}$self.renderToggleActivityButton(${t}),`}}],async start(){if(Gt.store.ignoredActivities.length!==0){let e=HM.getGamesSeen();for(let[t,o]of Gt.store.ignoredActivities.entries())o.type===0&&(e.some(r=>r.id===o.id||r.exePath===o.id)||Gt.store.ignoredActivities.splice(t,1))}},isActivityNotIgnored(e){if(p8(e.type,e.application_id))return!1;if(e.application_id!=null)return!Gt.store.ignoredActivities.some(t=>t.id===e.application_id)||Gt.store.listMode===0&&Gt.store.idsList.includes(e.application_id);{let t=HM.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!Gt.store.ignoredActivities.some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return n(k,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},jM({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(k,{noop:!0},jM({id:e.id,name:e.name,type:1}))}})});var qd,KM=f(()=>{"use strict";a();M();T();qd=y({name:"ImageLink",description:"Never hide image links in messages, even if it's the only content",authors:[p.Kyuuhachi,p.Sqaaakoi],patches:[{find:"unknownUserMentionPlaceholder:",replacement:{match:/\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/,replace:"false"}}]})});var ra,s0=f(()=>{"use strict";a();ra="vc-imgzoom-magnify-modal"});function a0(e,t){e()?t():requestAnimationFrame(()=>a0(e,t))}var YM=f(()=>{"use strict";a()});var ZM,l0,JM=f(()=>{"use strict";a();He();ne();S();s0();c0();YM();ZM=ue("vc-imgzoom-"),l0=k.wrap(({instance:e,size:t,zoom:o})=>{let[r,i]=K(!1),[s,l]=K({x:0,y:0}),[c,u]=K({x:0,y:0}),[d,g]=K(0),h=Mt(!1),v=Mt(o),C=Mt(t),w=Mt(null),x=Mt(null),N=Mt(null),A=Mt(null);if(Ii(()=>{let U=ae=>{ae.key==="Shift"&&(h.current=!0)},H=ae=>{ae.key==="Shift"&&(h.current=!1)},X=()=>{x.current&&N.current&&(x.current.currentTime=N.current.currentTime)},re=ae=>{if(w.current)if(e.state.mouseOver&&e.state.mouseDown){let fe=C.current/2,xe={x:ae.pageX,y:ae.pageY},xt=-((xe.x-w.current.getBoundingClientRect().left)*v.current-fe),qe=-((xe.y-w.current.getBoundingClientRect().top)*v.current-fe);l({x:ae.x-fe,y:ae.y-fe}),u({x:xt,y:qe}),g(1)}else g(0)},te=ae=>{e.state.mouseOver&&ae.button===0&&(v.current=yt.store.zoom,C.current=yt.store.size,document.getElementById("image-context")&&G.dispatch({type:"CONTEXT_MENU_CLOSE"}),re(ae),g(1))},Y=()=>{g(0),yt.store.saveZoomValues&&(yt.store.zoom=v.current,yt.store.size=C.current)},Z=async ae=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let fe=v.current+ae.deltaY/100*(yt.store.invertScroll?-1:1)*yt.store.zoomSpeed;v.current=fe<=1?1:fe,re(ae)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let fe=C.current+ae.deltaY*(yt.store.invertScroll?-1:1)*yt.store.zoomSpeed;C.current=fe<=50?50:fe,re(ae)}};return a0(()=>e.state.readyState==="READY",()=>{let ae=document.getElementById(ra);w.current=ae,ae.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(N.current=ae.querySelector("video"),N.current.addEventListener("timeupdate",X)),i(!0)}),document.addEventListener("keydown",U),document.addEventListener("keyup",H),document.addEventListener("mousemove",re),document.addEventListener("mousedown",te),document.addEventListener("mouseup",Y),document.addEventListener("wheel",Z),()=>{document.removeEventListener("keydown",U),document.removeEventListener("keyup",H),document.removeEventListener("mousemove",re),document.removeEventListener("mousedown",te),document.removeEventListener("mouseup",Y),document.removeEventListener("wheel",Z)}},[]),Ii(()=>()=>{yt.store.saveZoomValues&&(yt.store.zoom=v.current,yt.store.size=C.current)}),!r)return null;let L=w.current?.getBoundingClientRect();return L?n("div",{className:ZM("lens",{"nearest-neighbor":yt.store.nearestNeighbour,square:yt.store.square}),style:{opacity:d,width:C.current+"px",height:C.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:x,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${L.width*v.current}px`,height:`${L.height*v.current}px`,poster:e.props.src,src:N.current?.src??e.props.src,autoPlay:!0,loop:!0,muted:!0}):n("img",{className:ZM("image"),ref:A,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${L.width*v.current}px`,height:`${L.height*v.current}px`,src:e.props.src,alt:""})):null},{noop:!0})});var QM,XM=f(()=>{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});QM="src/plugins/imageZoom/styles.css"});var yt,d8,Kd,c0=f(()=>{"use strict";a();_();vr();Oi();M();T();S();JM();s0();XM();yt=P({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:Vt(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Vt(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Vt(.1,5,.2),default:.5,stickToMarkers:!1}}),d8=(e,t)=>{if("href"in t||t.target?.classList?.contains("emoji"))return;let{square:o,nearestNeighbour:r}=yt.use(["square","nearestNeighbour"]);e.push(n(E.MenuGroup,{id:"image-zoom"},n(E.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:o,action:()=>{yt.store.square=!o}}),n(E.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:r,action:()=>{yt.store.nearestNeighbour=!r}}),n(E.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(i,s)=>n(E.MenuSliderControl,{ref:s,...i,minValue:1,maxValue:50,value:yt.store.zoom,onChange:Eo(l=>yt.store.zoom=l,100)})}),n(E.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(i,s)=>n(E.MenuSliderControl,{ref:s,...i,minValue:50,maxValue:1e3,value:yt.store.size,onChange:Eo(l=>yt.store.size=l,100)})}),n(E.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(i,s)=>n(E.MenuSliderControl,{ref:s,...i,minValue:.1,maxValue:5,value:yt.store.zoomSpeed,onChange:Eo(l=>yt.store.zoomSpeed=l,100),renderValue:l=>`${l.toFixed(3)}x`})})))},Kd=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[p.Aria],tags:["ImageUtilities"],managedStyle:QM,patches:[{find:".contain,SCALE_DOWN:",replacement:{match:/imageClassName:/,replace:`id:"${ra}",$&`}},{find:".dimensionlessImage,",replacement:[{match:/className:\i\.media,/,replace:`id:"${ra}",$&`},{match:/\.zoomed]:.+?,(?=children:)/,replace:"$&onClick:()=>{},"},{match:/className:\i\(\)\(\i\.wrapper,.+?}\),/,replace:""}]},{find:'="FOCUS_SENSITIVE",',replacement:{match:/(?<=\.hidden]:)\i/,replace:"false"}},{find:".handleImageLoad)",replacement:[{match:/placeholderVersion:\i,(?=.{0,50}children:)/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"},{match:/componentDidUpdate\(\i\){/,replace:"$&$self.updateMagnifier(this);"}]}],settings:yt,contextMenus:{"image-context":d8},currentMagnifierElement:null,element:null,Magnifier:l0,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===ra&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(l0,{size:yt.store.size,zoom:yt.store.zoom,instance:e}),this.root=Ci.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},updateMagnifier(e){this.unMountMagnifier(),this.renderMagnifier(e)},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){this.root&&this.root.unmount(),this.element?.remove()}})});var VM,Yd,eP=f(()=>{"use strict";a();_();M();T();$();S();tP();VM=be("UserAffinitiesStore"),Yd=y({name:"ImplicitRelationships",description:"Shows your implicit relationships in the Friends tab.",authors:[p.Dolfies],patches:[{find:"#{intl::FRIENDS_ALL_HEADER}",replacement:{match:/toString\(\)\}\);case (\i\.\i)\.PENDING/,replace:'toString()});case $1.IMPLICIT:return "Implicit \u2014 "+arguments[1];case $1.BLOCKED'}},{find:"FriendsEmptyState: Invalid empty state",replacement:{match:/case (\i\.\i)\.ONLINE:(?=return (\i)\.SECTION_ONLINE)/,replace:"case $1.ONLINE:case $1.IMPLICIT:"}},{find:"#{intl::FRIENDS_SECTION_ONLINE}",replacement:{match:/,{id:(\i\.\i)\.PENDING,show:.+?className:(\i\.item)/,replace:(e,t,o)=>`,{id:${t}.IMPLICIT,show:true,className:${o},content:"Implicit"}${e}`}},{find:'"FriendsStore"',replacement:{match:/(?<=case (\i\.\i)\.SUGGESTIONS:return \d+===(\i)\.type)/,replace:";case $1.IMPLICIT:return $2.type===5"}},{find:'"FriendsStore',replacement:{match:/(\i\.\i)\.fetchRelationships\(\)/,replace:"$1.fetchRelationships(),$self.fetchImplicitRelationships()"}},{find:"getRelationshipCounts(){",replacement:{predicate:()=>j.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:P({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?-(VM.getUserAffinity(t.user.id)?.affinity??0):e(t)},async refreshUserAffinities(){try{await bt.get({url:"/users/@me/affinities/users",retries:3}).then(({body:e})=>{G.dispatch({type:"LOAD_USER_AFFINITIES_SUCCESS",affinities:e})})}catch{}},async fetchImplicitRelationships(){await this.refreshUserAffinities();let e=VM.getUserAffinitiesUserIds(),t=Fe.getRelationships(),o=Array.from(e).filter(u=>!Fe.getRelationshipType(u));o.forEach(u=>{t[u]=5}),Fe.emitChange();let r=o.filter(u=>!D.getUser(u)),i=Object.keys(ce.getGuilds()),s=To.fromTimestamp(Date.now()),l=i.length*Math.ceil(r.length/100),c=({chunks:u})=>{let d=u.filter(g=>g.nonce===s).length;d!==0&&(l-=d,Fe.emitChange(),l<=0&&G.unsubscribe("GUILD_MEMBERS_CHUNK_BATCH",c))};G.subscribe("GUILD_MEMBERS_CHUNK_BATCH",c);for(let u=0;u<r.length;u+=100)G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:i,userIds:r.slice(u,u+100),presences:!0,nonce:s})},start(){Pt.FriendsSections.IMPLICIT="IMPLICIT"}})});function m8(e){let t=e?.message?.content,[o,r]=W.useState("password");return n(ve,{...e},n(Ne,null,n(b.FormTitle,{tag:"h4"},"Decrypt Message")),n(we,null,n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(ct,{defaultValue:t,disabled:!0}),n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(ct,{style:{marginBottom:"20px"},onChange:r})),n(ut,null,n(I,{color:I.Colors.GREEN,onClick:()=>{let i=u0(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(I,{color:I.Colors.TRANSPARENT,look:I.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function oP(e){he(t=>n(m8,{...t,...e}))}var nP=f(()=>{"use strict";a();Ke();S();Zd()});function f8(e){let[t,o]=W.useState(""),[r,i]=W.useState(""),[s,l]=W.useState("password"),[c,u]=W.useState(!1),d=t&&(c||r&&r.trim().split(" ").length>1);return n(ve,{...e},n(Ne,null,n(b.FormTitle,{tag:"h4"},"Encrypt Message")),n(we,null,n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(ct,{onChange:g=>{o(g)}}),n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(ct,{disabled:c,onChange:g=>{i(g)}}),n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(ct,{style:{marginBottom:"20px"},defaultValue:"password",onChange:g=>{l(g)}}),n(fo,{value:c,onChange:g=>{u(g)}},"Don't use a Cover")),n(ut,null,n(I,{color:I.Colors.GREEN,disabled:!d,onClick:()=>{if(!d)return;let g=sP(t,s,c?"d d":r),h=c?g.replaceAll("d",""):g;h&&(lr(h),e.onClose())}},"Send"),n(I,{color:I.Colors.TRANSPARENT,look:I.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function rP(){he(e=>n(f8,{...e}))}var iP=f(()=>{"use strict";a();Pe();Ke();S();Zd()});function g8(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function h8(){return n(oe,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function sP(e,t,o){return p0.hide(e+"\u200B",t,o)}function u0(e,t,o){let r=p0.reveal(e,t);return o?r.replace("\u200B",""):r}function v8(e){return e.endsWith("\u200B")}async function b8(e){let t=aP.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r<t.length;r++){let i=u0(o,t[r],!1);if(v8(i))return i}return!1}var p0,y8,aP,Jd,Zd=f(()=>{"use strict";a();xr();na();_();ne();M();vd();T();S();nP();iP();y8=({isMainChat:e})=>e?n(Vo,{tooltip:"Encrypt Message",onClick:()=>rP(),buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":!0,role:"img",width:"20",height:"20",viewBox:"0 0 64 64",style:{scale:"1.39",translate:"0 -1px"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))):null,aP=P({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),Jd=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessageUpdaterAPI"],reporterTestable:8,settings:aP,patches:[{find:"#{intl::MESSAGE_EDITED}",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),async start(){let{default:e}=await $w();p0=new e(!0,!1)},renderMessagePopoverButton(e){return this.INV_REGEX.test(e?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:e,channel:ie.getChannel(e.channel_id),onClick:async()=>{let t=await b8(e);t?this.buildEmbed(e,t):oP({message:e})}}:null},renderChatBarButton:y8,colorCodeFromNumber(e){return`#${[e>>16,e>>8,e].map(t=>(t&255).toString(16)).join("")}`},async getEmbed(e){let{body:t}=await bt.post({url:Pt.Endpoints.UNFURL_EMBED_URLS,body:{urls:[e]}});return t.embeds[0].color=this.colorCodeFromNumber(t.embeds[0].color),await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",rawTitle:"Decrypted Message",color:"#45f5f5",rawDescription:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}Nr(e.channel_id,e.id,{embeds:e.embeds})},popOverIcon:()=>n(g8,null),indicator:k.wrap(h8,{noop:!0})})});function lP(e){let{lightness:t}=cs.use(["lightness"]),o=$e(()=>e?jc(e):null,[e]);return o&&`hsl(${o%360n}, 100%, ${t}%)`}var cs,Qd,cP=f(()=>{"use strict";a();_();Zg();M();T();S();cs=P({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}}),Qd=y({name:"IrcColors",description:"Makes username colors in chat unique, like in IRC clients",authors:[p.Grzesiek11,p.jamesbt365],settings:cs,patches:[{find:'="SYSTEM_TAG"',replacement:{match:/\i.gradientClassName]\),style:/,replace:"$&{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"}},{find:"#{intl::GUILD_OWNER}),children:",replacement:{match:/(typingIndicatorRef:.+?},)(\i=.+?)color:null!=.{0,50}?(?=,)/,replace:(e,t,o)=>`${t}ircColor=$self.calculateNameColorForListContext(arguments[0]),${o}color:ircColor`},predicate:()=>cs.store.memberListColors}],calculateNameColorForMessageContext(e){let t=e?.message?.author?.id,o=e?.author?.colorString,r=lP(t);return e?.message?.channel_id==="1337"&&t==="313337"||cs.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!cs.store.applyColorOnlyToUsersWithoutColor||!o?r:o},calculateNameColorForListContext(e){let t=e?.user?.id,o=e?.colorString,r=lP(t);return cs.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!cs.store.applyColorOnlyToUsersWithoutColor||!o?r:o}})});var Xd,kn,Vd,uP=f(()=>{"use strict";a();_n();M();T();S();Xd=!1,Vd=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[p.Nuckyz],patches:[{find:'"Switching accounts"',replacement:{match:/goHomeAfterSwitching:\i/,replace:"goHomeAfterSwitching:!1"}}],flux:{LOGOUT(e){({isSwitchingAccount:Xd}=e)},CONNECTION_OPEN(){Xd&&(Xd=!1,kn?.channelId&&(ie.hasChannel(kn.channelId)?Ps.transitionToChannel(kn.channelId):or.transitionToGuild("@me")))},async CHANNEL_SELECT({guildId:e,channelId:t}){Xd||(kn={guildId:e,channelId:t},await hn("KeepCurrentChannel_previousData",kn))}},async start(){kn=await co("KeepCurrentChannel_previousData"),kn?kn.channelId&&Ps.transitionToChannel(kn.channelId):(kn={guildId:jo.getGuildId(),channelId:Le.getChannelId()??null},await hn("KeepCurrentChannel_previousData",kn))}})});async function d0(e){return(await Di.fetchAssetIds(em,[e]))[0]}function x8(e){G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var em,S8,pP,dP,yo,tm,mP=f(()=>{"use strict";a();_();_o();M();Ae();T();$();S();em="1108588077900898414",S8="2a96cbd8b46e442fc41c2b86b821562f",pP=new V("LastFMRichPresence"),dP=R("getLocalPresence");yo=P({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},shareSong:{description:"show link to song on last.fm",type:3,default:!0},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},hideWithActivity:{description:"Hide Last.fm presence if you have any other presence",type:3,default:!1},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"},{label:"Use album name (falls back to custom status text if song has no album)",value:"album"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]},showLastFmLogo:{description:"show the Last.fm logo by the album cover",type:3,default:!0}}),tm=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn,p.RuiNtD,p.blahajZip,p.archeruwu],settingsAboutComponent:()=>n(m,null,n(b.FormTitle,{tag:"h3"},"How to get an API key"),n(b.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(it,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:yo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!yo.store.username||!yo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:yo.store.apiKey,user:yo.store.username,limit:"1",format:"json"}),t=await 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 pP.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return pP.error("Failed to query Last.fm API",e),null}},async updatePresence(){x8(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(S8))return e.imageUrl;if(yo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(yo.store.hideWithActivity&&dP.getActivities().some(s=>s.application_id!==em)||yo.store.hideWithSpotify&&dP.getActivities().some(s=>s.type===2&&s.application_id!==em))return null;let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await d0(t),large_text:e.album||void 0,...yo.store.showLastFmLogo&&{small_image:await d0("lastfm-small"),small_text:"Last.fm"}}:{large_image:await d0("lastfm-large"),large_text:e.album||void 0},r=[];yo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${yo.store.username}`}),yo.store.shareSong&&r.push({label:"View Song",url:e.url});let i=(()=>{switch(yo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;case"album":return e.album||yo.store.statusName;default:return yo.store.statusName}})();return{application_id:em,name:i,details:e.name,state:e.artist,assets:o,buttons:r.length?r.map(s=>s.label):void 0,metadata:{button_urls:r.map(s=>s.url)},type:yo.store.useListeningStatus?2:0,flags:1}}})});var fP,gP=f(()=>{a();fP=`# 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 T8,w8,m0,om,hP=f(()=>{"use strict";a();_();M();Ae();T();gP();T8=fP.split(`
|
|
`).map(e=>/^\s*[^#\s]/.test(e)&&e.trim()).filter(Boolean),w8="Did you really disable all loading quotes? What a buffoon you are...",m0=P({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:"|"}}),om=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72,p.UlyssesZhan],settings:m0,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:()=>m0.store.replaceEvents}]}],mutateQuotes(e){try{let{enableDiscordPresetQuotes:t,additionalQuotes:o,additionalQuotesDelimiter:r,enablePluginPresetQuotes:i}=m0.store;t||(e.length=0),i&&e.push(...T8),e.push(...o.split(r).filter(Boolean)),e.length||e.push(w8)}catch(t){new V("LoadingQuotes").error("Failed to mutate quotes",t)}}})});var yP=f(()=>{});var nm,vP=f(()=>{"use strict";a();So();me();qr();S();nm=Dt(()=>{let e=new Mo,t=new Map;class o extends Mi.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await za.preload(i,tr.getDefaultChannel(i).id)}ensureCount(i){!i||t.has(i)||e.push(()=>this._ensureCount(i).then(()=>mn(200),()=>mn(200)))}}return new o(G,{GUILD_MEMBER_LIST_UPDATE({guildId:r,groups:i}){t.set(r,i.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0))},ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId:r,count:i}){t.set(r,i)}})})});function y0({isTooltip:e,tooltipGuildId:t}){let o=Se([Le],()=>Ko()),r=e?t:o?.guild_id,i=Se([f0],()=>f0.getMemberCount(r)),s=Se([nm],()=>nm.getCount(r)),{groups:l}=Se([g0],()=>g0.getProps(r,o?.id)),c=Se([h0],()=>h0.getMemberListSections(o?.id));if(!e&&(l.length>=1||l[0].id!=="unknown")&&(s=l.reduce((d,g)=>d+(g.id==="offline"?0:g.count),0)),!e&&c&&!nr(c)&&(s=Object.values(c).reduce((d,g)=>d+(g.sectionId==="offline"?0:g.userIds.length),0)),le(()=>{nm.ensureCount(r)},[r]),i==null)return null;let u=s!=null?rm(s):"?";return n("div",{className:ia("widget",{tooltip:e,"member-list":!e})},n(oe,{text:`${u} online in this channel`,position:"bottom"},d=>n("div",{...d},n("span",{className:ia("online-dot")}),n("span",{className:ia("online")},u))),n(oe,{text:`${rm(i)} total server members`,position:"bottom"},d=>n("div",{...d},n("span",{className:ia("total-dot")}),n("span",{className:ia("total")},rm(i)))))}var bP=f(()=>{"use strict";a();Pe();me();S();v0();vP()});var f0,g0,h0,b0,M8,rm,ia,im,v0=f(()=>{"use strict";a();yP();_();He();ne();M();T();$();bP();f0=be("GuildMemberCountStore"),g0=be("ChannelMemberStore"),h0=be("ThreadMemberListStore"),b0=P({toolTip:{type:3,description:"If the member count should be displayed on the server tooltip",default:!0,restartNeeded:!0},memberList:{type:3,description:"If the member count should be displayed on the member list",default:!0,restartNeeded:!0}}),M8=new Intl.NumberFormat,rm=e=>M8.format(e),ia=ue("vc-membercount-"),im=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[p.Ven,p.Commandtechno],settings:b0,patches:[{find:"{isSidebarVisible:",replacement:[{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2",noWarn:!0},{match:/(?<=var\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}],predicate:()=>b0.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/#{intl::VIEW_AS_ROLES_MENTIONS_WARNING}.{0,100}(?=])/,replace:"$&,$self.renderTooltip(arguments[0].guild)"},predicate:()=>b0.store.toolTip}],render:k.wrap(y0,{noop:!0}),renderTooltip:k.wrap(e=>n(y0,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var SP=f(()=>{});function P8(){return n("svg",{className:"vc-mentionAvatars-icon vc-mentionAvatars-role-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M14 8.00598C14 10.211 12.206 12.006 10 12.006C7.795 12.006 6 10.211 6 8.00598C6 5.80098 7.794 4.00598 10 4.00598C12.206 4.00598 14 5.80098 14 8.00598ZM2 19.006C2 15.473 5.29 13.006 10 13.006C14.711 13.006 18 15.473 18 19.006V20.006H2V19.006Z"}),n("path",{d:"M20.0001 20.006H22.0001V19.006C22.0001 16.4433 20.2697 14.4415 17.5213 13.5352C19.0621 14.9127 20.0001 16.8059 20.0001 19.006V20.006Z"}),n("path",{d:"M14.8834 11.9077C16.6657 11.5044 18.0001 9.9077 18.0001 8.00598C18.0001 5.96916 16.4693 4.28218 14.4971 4.0367C15.4322 5.09511 16.0001 6.48524 16.0001 8.00598C16.0001 9.44888 15.4889 10.7742 14.6378 11.8102C14.7203 11.8418 14.8022 11.8743 14.8834 11.9077Z"}))}function xP(e){return TP.store.showAtSymbol?`@${e}`:e}var TP,sm,wP=f(()=>{"use strict";a();SP();_();ne();M();T();S();TP=P({showAtSymbol:{type:3,description:"Whether the the @ symbol should be displayed on user mentions",default:!0}});sm=y({name:"MentionAvatars",description:"Shows user avatars and role icons inside mentions",authors:[p.Ven,p.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:TP,renderUsername:k.wrap(e=>{let{user:t,username:o}=e,[r,i]=K(!1);return t?n("span",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},n("img",{src:t.getAvatarURL(jo.getGuildId(),16,r),className:"vc-mentionAvatars-icon",style:{borderRadius:"50%"}}),xP(o)):n(m,null,xP(o))},{noop:!0}),renderRoleIcon:k.wrap(({roleId:e,guildId:t})=>{if(!e)return null;let o=ce.getRole(t,e);return o?.icon?n("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`}):n(P8,null)})})});var MP,I8,S0,PP,IP,sa,am,CP=f(()=>{"use strict";a();_();M();T();$();S();MP=R("deleteMessage","startEditMessage"),I8=R("isEditing","isEditingAny"),S0=!1,PP=e=>e.key==="Backspace"&&(S0=!0),IP=e=>e.key==="Backspace"&&(S0=!1),sa=P({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),am=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],settings:sa,start(){document.addEventListener("keydown",PP),document.addEventListener("keyup",IP)},stop(){document.removeEventListener("keydown",PP),document.removeEventListener("keyup",IP)},onMessageClick(e,t,o){let r=e.author.id===D.getCurrentUser().id;if(S0)sa.store.enableDeleteOnClick&&(r||Be.can(ke.MANAGE_MESSAGES,t))&&(e.deleted?G.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:e.id,mlDeleted:!0}):MP.deleteMessage(t.id,e.id),o.preventDefault());else{if(o.detail<2||sa.store.requireModifier&&!o.ctrlKey&&!o.shiftKey||t.guild_id&&!Be.can(ke.SEND_MESSAGES,t)||e.deleted===!0)return;if(r){if(!sa.store.enableDoubleClickToEdit||I8.isEditing(t.id,e.id)||e.state!=="SENT")return;MP.startEditMessage(t.id,e.id,e.content),o.preventDefault()}else{if(!sa.store.enableDoubleClickToReply||e.hasFlag(64))return;let s=o.shiftKey&&!sa.store.requireModifier,l=Vencord.Plugins.plugins.NoReplyMention,c=Vencord.Plugins.isPluginEnabled("NoReplyMention")?l.shouldMention(e,s):!s;G.dispatch({type:"CREATE_PENDING_REPLY",channel:t,message:e,shouldMention:c,showMentionToggle:t.guild_id!==null})}}}})});var kP,C8,lm,NP=f(()=>{"use strict";a();_();ne();M();Zs();T();$();S();kP=1471228928,C8=se(".hiddenVisually]:"),lm=y({name:"MessageLatency",description:"Displays an indicator for messages that took \u2265n seconds to send",authors:[p.arHSM],settings:P({latency:{type:1,description:"Threshold in seconds for latency indicator",default:2},detectDiscordKotlin:{type:3,description:"Detect old Discord Android clients",default:!0},showMillis:{type:3,description:"Show milliseconds",default:!1}}),patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(message:(\i),avatar:\i,username:\(0,\i.jsxs\)\(\i.Fragment,\{children:\[)(\i&&)/,replace:"$1$self.Tooltip()({ message: $2 }),$3"}}],stringDelta(e,t){let o={days:Math.floor(e/864e5),hours:Math.floor(e/36e5%24),minutes:Math.floor(e/6e4%60),seconds:Math.floor(e/1e3%60),milliseconds:Math.floor(e%1e3)},r=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=r(c);return l+(Pr(u)?(l!==""?(t?c==="milliseconds":c==="seconds")?" and ":" ":"")+u:"")},"")||"0 seconds"},latencyTooltipData(e){let{latency:t,detectDiscordKotlin:o,showMillis:r}=this.settings.store,{id:i,nonce:s}=e;if(!Pr(s)||e.bot)return null;let l=!1,c=To.extractTimestamp(i)-To.extractTimestamp(s);r||(c=Math.round(c/1e3)*1e3),-c>=kP-864e5&&(l=o,c+=kP);let u=Math.abs(c),d=u!==c,g=t*1e3,h=u>=g?this.stringDelta(u,r):null,v=2*60*1e3,C=l?["status-positive","status-positive","text-muted"]:c>=v||d?["text-muted","text-muted","text-muted"]:c>=g*2?["status-danger","text-muted","text-muted"]:["status-warning","status-warning","text-muted"];return u>=g||l?{delta:h,ahead:d,fill:C,isDiscordKotlin:l}:null},Tooltip(){return k.wrap(({message:e})=>{let t=this.latencyTooltipData(e);if(!Pr(t))return null;let o;return t.delta?o=(t.ahead?`This user's clock is ${t.delta} ahead.`:`This message was sent with a delay of ${t.delta}.`)+(t.isDiscordKotlin?" User is suspected to be on an old Discord Android client.":""):o="User is suspected to be on an old Discord Android client",n(oe,{text:o,position:"top"},r=>n(m,null,n(this.Icon,{delta:t.delta,fill:t.fill,props:r}),n(C8,null,"Delayed Message")))},{noop:!0})},Icon({delta:e,fill:t,props:o}){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"12",height:"12",role:"img",fill:"none",style:{marginRight:"8px",verticalAlign:-1},"aria-label":e??"Old Discord Android client","aria-hidden":"false",...o},n("path",{fill:`var(--${t[0]})`,d:"M4.8001 12C4.8001 11.5576 4.51344 11.2 4.16023 11.2H2.23997C1.88676 11.2 1.6001 11.5576 1.6001 12V13.6C1.6001 14.0424 1.88676 14.4 2.23997 14.4H4.15959C4.5128 14.4 4.79946 14.0424 4.79946 13.6L4.8001 12Z"}),n("path",{fill:`var(--${t[1]})`,d:"M9.6001 7.12724C9.6001 6.72504 9.31337 6.39998 8.9601 6.39998H7.0401C6.68684 6.39998 6.40011 6.72504 6.40011 7.12724V13.6727C6.40011 14.0749 6.68684 14.4 7.0401 14.4H8.9601C9.31337 14.4 9.6001 14.0749 9.6001 13.6727V7.12724Z"}),n("path",{fill:`var(--${t[2]})`,d:"M14.4001 2.31109C14.4001 1.91784 14.1134 1.59998 13.7601 1.59998H11.8401C11.4868 1.59998 11.2001 1.91784 11.2001 2.31109V13.6888C11.2001 14.0821 11.4868 14.4 11.8401 14.4H13.7601C14.1134 14.4 14.4001 14.0821 14.4001 13.6888V2.31109Z"}))}})});async function D8(e,t){let o=aa.get(t);if(o)return o.message;aa.set(t,{fetched:!1});let i=(await bt.get({url:Pt.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 aa.set(s.id,{message:s,fetched:!0}),s}function L8(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!DP.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function E8(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 O8(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||DP.test(t.url))))}function _8(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 B8(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function F8({message:e}){let t=e.vencordEmbeddedBy??[],o=[];for(let[r,i,s]of e.content.matchAll(T0)){if(t.includes(s)||t.length>2)continue;let l=ie.getChannel(i);if(!l||!l.isPrivate()&&!Be.can(ke.VIEW_CHANNEL,l))continue;let{listMode:c,idList:u}=cm.store,d=[l.guild_id,i,e.author.id].some(C=>C&&u.includes(C));if(c==="blacklist"&&d||c==="whitelist"&&!d)continue;let g=aa.get(s)?.message;if(!g)if(g??=Jt.getMessage(i,s),g)aa.set(s,{message:g,fetched:!0});else{R8.unshift(()=>D8(i,s).then(C=>C&&Nr(e.channel_id,e.id)));continue}let h={message:B8(g,[...t,e.id]),channel:l},v=cm.store.automodEmbeds;o.push(v==="always"||v==="prefer"&&!O8(g)?n($8,{...h}):n(U8,{...h}))}return o.length?n(m,null,o):null}function LP(e){return e.isDM()?["Direct Message",Ft.getUserAvatarURL(D.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",Ft.getChannelIconURL(e)]:["Server",Ft.getGuildIconURL(ce.getGuild(e.guild_id))]}function U8({message:e,channel:t}){let o=RP.useSetting(),r=D.getUser(ie.getChannel(t.id).recipients?.[0]),[i,s]=LP(t);return n(k8,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(Q,{variant:"text-xs/medium",tag:"span"},n("span",null,i," - "),Ee.parse(t.isDM()?`<@${r.id}>`:`<#${t.id}>`)),iconProxyURL:s}},renderDescription:()=>n("div",{key:e.id,className:z(AP.message,cm.store.messageBackgroundColor&&AP.searchResult)},n(A8,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1,compact:o}))})}function $8(e){let{message:t,channel:o}=e,r=RP.useSetting(),i=L8(t),{parse:s}=Ee,[l,c]=LP(o);return n(N8,{channel:o,childrenAccessories:n(Q,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${x0.embedAuthor} ${x0.embedMargin}`},c&&n("img",{src:c,className:x0.embedAuthorIcon,alt:""}),n("span",null,n("span",null,l," - "),o.isDM()?Ee.parse(`<@${ie.getChannel(o.id).recipients[0]}>`):Ee.parse(`<#${o.id}>`))),compact:r,content:n(m,null,t.content||t.attachments.length<=i.length?s(t.content):[E8(t.attachments.length,t.embeds.length)],i.map((u,d)=>{let{width:g,height:h}=_8(u.width,u.height);return n("div",{key:d},n("img",{src:u.url,width:g,height:h}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var aa,k8,N8,A8,AP,x0,RP,T0,DP,R8,cm,um,EP=f(()=>{"use strict";a();$u();na();_();wr();ne();M();me();qr();T();$();S();aa=new Map,k8=se(".inlineMediaEmbed"),N8=se(".withFooter]:","childrenMessageContent:"),A8=se("childrenExecutedCommand:",".hideAccessories"),AP=R("message","searchResult"),x0=R("embedAuthorIcon","embedAuthor","embedAuthor"),RP=Ao("textAndImages","messageDisplayCompact"),T0=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(?:\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,DP=/^https:\/\/(?:www\.)?tenor\.com\//,R8=new Mo,cm=P({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:()=>n(I,{onClick:()=>aa.clear()},"Clear the linked message cache")}});um=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[p.TheSun,p.Ven,p.RyanCaoDev],dependencies:["MessageAccessoriesAPI","MessageUpdaterAPI","UserSettingsAPI"],settings:cm,start(){El("messageLinkEmbed",e=>T0.test(e.message.content)?(T0.lastIndex=0,n(k,null,n(F8,{message:e.message}))):null,4)},stop(){Ol("messageLinkEmbed")}})});var OP=f(()=>{});var w0,_P=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
|
|
background-color: hsla(var(--red-430-hsl, 0 85% 61%) / 15%) !important;
|
|
}
|
|
`,classNames:{},dom:null});w0="src/plugins/messageLogger/deleteStyleOverlay.css"});var M0,BP=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`.messagelogger-deleted {
|
|
--text-normal: var(--status-danger, #f04747);
|
|
--interactive-normal: var(--status-danger, #f04747);
|
|
--text-muted: var(--status-danger, #f04747);
|
|
--embed-title: var(--red-460, #be3535);
|
|
--text-link: var(--red-460, #be3535);
|
|
--header-primary: var(--red-460, #be3535);
|
|
}
|
|
`,classNames:{},dom:null});M0="src/plugins/messageLogger/deleteStyleText.css"});function FP(e){he(t=>n(k,null,n(H8,{modalProps:t,message:e})))}function H8({modalProps:e,message:t}){let[o,r]=K(t.editHistory.length),i=[t.firstEditTimestamp,...t.editHistory.map(l=>l.timestamp)],s=[...t.editHistory.map(l=>l.content),t.content];return n(ve,{...e,size:"large"},n(Ne,{className:ac("head")},n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Message Edit History"),n(pt,{onClick:e.onClose})),n(we,{className:ac("contents")},n(xo,{type:"top",look:"brand",className:z("vc-settings-tab-bar",ac("tab-bar")),selectedItem:o,onItemSelect:r},t.firstEditTimestamp.getTime()!==t.timestamp.getTime()&&n(Vn,{text:"This edit state was not logged so it can't be displayed."},n(xo.Item,{className:"vc-settings-tab-bar-item",id:-1,disabled:!0},n(lo,{className:ac("timestamp"),timestamp:t.timestamp,isEdited:!0,isInline:!1}))),i.map((l,c)=>n(xo.Item,{key:c,className:"vc-settings-tab-bar-item",id:c},n(lo,{className:ac("timestamp"),timestamp:l,isEdited:!0,isInline:!1})))),n("div",{className:z(G8.markup,z8.messageContent,F.top20)},P0(s[o],t))))}var G8,z8,ac,UP=f(()=>{"use strict";a();He();ne();ze();me();Ke();$();S();I0();G8=R("markup","codeContainer"),z8=R("messageContent","markupRtl"),ac=ue("vc-ml-modal-")});function $P(){j.plugins.MessageLogger.deleteStyle==="text"?(Io(M0),qo(w0)):(qo(M0),Io(w0))}function P0(e,t){return Ee.parse(e,!0,{channelId:t.channel_id,messageId:t.id,allowLinks:!0,allowHeading:!0,allowList:!0,allowEmojiLinks:!0,viewingChannelId:Le.getChannelId()})}var j8,GP,zP,W8,pm,dm,I0=f(()=>{"use strict";a();OP();No();na();_();He();ne();M();Pe();Ae();me();T();$();S();_P();BP();UP();j8=R("edited","communicationDisabled","isSystemMessage");GP="ml-remove-history",zP="ml-toggle-style",W8=(e,t)=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!(!r&&!i?.length)){e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(n(E.MenuItem,{id:zP,key:zP,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(E.MenuItem,{id:GP,key:GP,label:"Remove Message History",color:"danger",action:()=>{r?G.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))}},pm=(e,{channel:t})=>{let o=Jt.getMessages(t?.id);if(!o?.some(i=>i.deleted||i.editHistory?.length))return;(dt("mark-channel-read",e)??e).push(n(E.MenuItem,{id:"vc-ml-clear-channel",label:"Clear Message Log",color:"danger",action:()=>{o.forEach(i=>{i.deleted?G.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:i.id,mlDeleted:!0}):Nr(t.id,i.id,{editHistory:[]})})}}))};dm=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven,p.AutumnVN,p.Nickyux,p.Kyuuhachi],dependencies:["MessageUpdaterAPI"],contextMenus:{message:W8,"channel-context":pm,"thread-context":pm,"user-context":pm,"gdm-context":pm},start(){$P()},renderEdits:k.wrap(({message:{id:e,channel_id:t}})=>{let o=Se([Jt],()=>Jt.getMessage(t,e),null,(r,i)=>r?.editHistory===i?.editHistory);return j.plugins.MessageLogger.inlineEdits&&n(m,null,o.editHistory?.map((r,i)=>n("div",{key:i,className:"messagelogger-edited"},P0(r.content,o),n(lo,{timestamp:r.timestamp,isEdited:!0,isInline:!1},n("span",{className:j8.edited}," ","(",Me("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:()=>$P()},logDeletes:{type:3,description:"Whether to log deleted messages",default:!0},collapseDeleted:{type:3,description:"Whether to collapse deleted messages, similar to blocked messages",default:!1,restartNeeded:!0},logEdits:{type:3,description:"Whether to log edited messages",default:!0},inlineEdits:{type:3,description:"Whether to display edit history as part of message content",default:!0},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(d=>(d.deleted=!0,d))))};o?t.ids.forEach(r):r(t.id)}catch(r){new V("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e,t=!1){let{ignoreBots:o,ignoreSelf:r,ignoreUsers:i,ignoreChannels:s,ignoreGuilds:l,logEdits:c,logDeletes:u}=j.plugins.MessageLogger,d=D.getCurrentUser().id;return o&&e.author?.bot||r&&e.author?.id===d||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(ie.getChannel(e.channel_id)?.parent_id)||(t?!c:!u)||l.includes(ie.getChannel(e.channel_id)?.guild_id)||e.channel_id==="1026515880080842772"&&e.author?.id==="1017176847865352332"},EditMarker({message:e,className:t,children:o,...r}){return n("span",{...r,className:z("messagelogger-edit-marker",t),onClick:()=>FP(e),role:"button"},o)},DELETED_MESSAGE_COUNT:()=>({ast:[[6,"count",{"=0":["No deleted messages"],one:[[1,"count"]," deleted message"],other:[[1,"count"]," deleted messages"]},0,"cardinal"]]}),patches:[{find:'"MessageStore"',replacement:[{match:/function (?=.+?MESSAGE_DELETE:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,replace:"function $1($2){ var cache = $3getOrCreate($2.channelId); cache = $self.handleDelete(cache, $2, false); $3commit(cache);}"},{match:/function (?=.+?MESSAGE_DELETE_BULK:(\i))\1\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function)/,replace:"function $1($2){ var cache = $3getOrCreate($2.channelId); cache = $self.handleDelete(cache, $2, true); $3commit(cache);}"},{match:/(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/,replace:"$1.update($4,m => (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m : $3.message.edited_timestamp && $3.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) : m).update($4"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],this.firstEditTimestamp = $1.firstEditTimestamp || this.editedTimestamp || this.timestamp,"}]},{find:"THREAD_STARTER_MESSAGE?null==",replacement:[{match:/(?<=null!=\i\.edited_timestamp\)return )\i\(\i,\{reactions:(\i)\.reactions.{0,50}\}\)/,replace:"Object.assign($&,{ deleted:$1.deleted, editHistory:$1.editHistory, firstEditTimestamp:$1.firstEditTimestamp })"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory,firstEditTimestamp: new Date(arguments[1]?.firstEditTimestamp ?? $2.editedTimestamp ?? $2.timestamp)"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeMosaicItemHoverButton",replacement:[{match:/\[\i\.obscured\]:.+?,(?<=item:(\i).+?)/,replace:'$&"messagelogger-deleted-attachment":$1.originalItem?.deleted,'}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:"#{intl::MESSAGE_EDITED}",replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (!!arguments[0].message.editHistory?.length && $self.renderEdits(arguments[0])),"},{match:/"span",\{(?=className:\i\.edited,)/,replace:"$self.EditMarker,{message:arguments[0].message,"}]},{find:'"ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:\i,/,replace:"MESSAGE_DELETE:()=>{},"},{match:/MESSAGE_DELETE_BULK:\i,/,replace:"MESSAGE_DELETE_BULK:()=>{},"}]},{find:".MESSAGE,commandTargetId:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]},{find:"NON_COLLAPSIBLE.has(",replacement:{match:/if\((\i)\.blocked\)return \i\.\i\.MESSAGE_GROUP_BLOCKED;/,replace:'$&else if($1.deleted) return"MESSAGE_GROUP_DELETED";'},predicate:()=>j.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:()=>j.plugins.MessageLogger.collapseDeleted}]})});function jP(){return us.store.tagsList}function mm(e){return us.store.tagsList[e]??null}function K8(e){us.store.tagsList[e.name]=e}function Y8(e){delete us.store.tagsList[e]}function WP(e){Us({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>mm(e.name)?(us.store.clyde&&mt(o.channel.id,{content:`${ci} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
|
|
`)}):(mt(o.channel.id,{content:`${ci} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[q8]:!0},"CustomTags")}var ci,HP,q8,us,fm,qP=f(()=>{"use strict";a();rn();_n();_();M();T();ci="<:luna:1035316192220553236>",HP="MessageTags_TAGS",q8=Symbol("MessageTags");us=P({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:{}}}),fm=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],settings:us,async start(){let e=await co(HP);e!=null&&(us.store.tagsList=Object.fromEntries(e.map(o=>(delete o.enabled,[o.name,o]))),await Kr(HP));let t=jP();for(let o in t)WP(t[o])},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=qt(e[0].options,"tag-name",""),r=qt(e[0].options,"message","");if(mm(o))return mt(t.channel.id,{content:`${ci} A Tag with the name **${o}** already exists!`});let i={name:o,message:r};WP(i),K8(i),mt(t.channel.id,{content:`${ci} Successfully created the tag **${o}**!`});break}case"delete":{let o=qt(e[0].options,"tag-name","");if(!mm(o))return mt(t.channel.id,{content:`${ci} A Tag with the name **${o}** does not exist!`});Il(o),Y8(o),mt(t.channel.id,{content:`${ci} Successfully deleted the tag **${o}**!`});break}case"list":{mt(t.channel.id,{embeds:[{title:"All Tags:",description:Object.values(jP()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
|
|
`)||`${ci} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=qt(e[0].options,"tag-name",""),r=mm(o);if(!r)return mt(t.channel.id,{content:`${ci} A Tag with the name **${o}** does not exist!`});mt(t.channel.id,{content:r.message.replaceAll("\\n",`
|
|
`)});break}default:{mt(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function Z8(e){let t="";for(let o=0;o<e.length;o++)t+=o%2?e[o].toUpperCase():e[o].toLowerCase();return t}var gm,KP=f(()=>{"use strict";a();rn();M();T();gm=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[zn],inputType:3,execute:(e,t)=>{let o=qt(e,"message","");mt(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[zn],execute:e=>({content:qt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Pl],execute:e=>({content:Z8(qt(e,"message",""))})}]})});var hm,YP=f(()=>{"use strict";a();rn();M();T();hm=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:"\u0CA0_\u0CA0"},{name:"happy",description:"\u30FD(\xB4\u25BD`)/"},{name:"crying",description:"\u0CA5_\u0CA5"},{name:"angry",description:"\u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:"\u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:"<(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[zn],execute:t=>({content:qt(t,"message","")+" "+e.description})}))})});function X8(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function V8(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function t6(e){let t=X8(e,k0)+V8(e,e6);return Math.min(t,10)}function C0(){if(!ui.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=ui.store.quality==="HD"?Q8:J8,e.volume=ui.store.volume,e.play()}var k0,J8,Q8,ui,ym,e6,ZP=f(()=>{"use strict";a();_();M1();M();me();T();S();k0="\u{1F5FF}",J8="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Q8="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",ui=P({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:Vt(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),ym=y({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:ui,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||ui.store.ignoreBots&&o.author?.bot||ui.store.ignoreBlocked&&Fe.isBlocked(o.author?.id)||!o.content||r!==Le.getChannelId())return;let i=t6(o.content);for(let s=0;s<i;s++)C0(),await mn(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:o,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||ui.store.ignoreBots&&D.getUser(r)?.bot||ui.store.ignoreBlocked&&Fe.isBlocked(i)||o!==Le.getChannelId())return;let l=s.name.toLowerCase();l!==k0&&!l.includes("moyai")&&!l.includes("moai")||C0()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==k0&&!t.includes("moyai")&&!t.includes("moai")||C0()}}});e6=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});function s6(e){return e.name||e.recipients.map(D.getUser).filter(Pr).map(t=>Fe.getNickname(t.id)||n6.getName(t)).join(", ")}function l6(e){let t=vm(e.id).length;return`${t===0?"No":t} Mutual Group${t!==1?"s":""}`}function JP(e,t){return e.map(o=>n(er,{key:o.id,className:pi.listRow,onClick:()=>{t(),o6.selectPrivateChannel(o.id)}},n(Fa,{src:Ft.getChannelIconURL({id:o.id,icon:o.icon,size:32}),size:"SIZE_40",className:pi.listAvatar}),n("div",{className:pi.listRowContent},n("div",{className:pi.listName},s6(o)),n("div",{className:i6.guildNick},o.recipients.length+1," Members"))))}var o6,n6,pi,r6,i6,vm,a6,QP,bm,XP=f(()=>{"use strict";a();ne();M();Zs();Ae();T();$();S();o6=R("selectPrivateChannel"),n6=R("getGlobalName"),pi=R("emptyIconFriends","emptyIconGuilds"),r6=se('"PRESS_SECTION"'),i6=R("guildNick","guildAvatarWithoutIcon");vm=e=>ie.getSortedPrivateChannels().filter(t=>t.isGroupDM()&&t.recipients.includes(e)),a6=e=>e.bot||e.id===D.getCurrentUser().id;QP=Symbol("MutualGroupDMs.Patched"),bm=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[p.amia],patches:[{find:".MUTUAL_FRIENDS?(",replacement:[{match:/\i\.useEffect.{0,100}(\i)\[0\]\.section/,replace:"$self.pushSection($1,arguments[0].user);$&"},{match:/\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,replace:"$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&"}]},{find:'section:"MUTUAL_FRIENDS"',replacement:[{match:/\i\|\|\i(?=\?\(0,\i\.jsxs?\)\(\i\.\i\.Overlay,)/,replace:"$&||$self.getMutualGroupDms(arguments[0].user.id).length>0"},{match:/\.openUserProfileModal.+?\)}\)}\)(?<=,(\i)&&(\i)&&(\(0,\i\.jsxs?\)\(\i\.\i,{className:(\i)\.divider}\)).+?)/,replace:(e,t,o,r,i)=>`${e},$self.renderDMPageList({user:arguments[0].user,hasDivider:${t}||${o},Divider:${r},listStyle:${i}.list})`}]}],getMutualGroupDms(e){try{return vm(e)}catch(t){new V("MutualGroupDMs").error("Failed to get mutual group dms:",t)}return[]},pushSection(e,t){try{if(a6(t)||e[QP])return;e[QP]=!0,e.push({section:"MUTUAL_GDMS",text:l6(t)})}catch(o){new V("MutualGroupDMs").error("Failed to push mutual group dms section:",o)}},renderMutualGDMs:k.wrap(({user:e,onClose:t})=>{let o=$e(()=>vm(e.id),[e.id]),r=JP(o,t);return n(Hr,{className:pi.listScroller,fade:!0,onClose:t},r.length>0?r:n("div",{className:pi.empty},n("div",{className:pi.emptyIconFriends}),n("div",{className:pi.emptyText},"No group dms in common")))}),renderDMPageList:k.wrap(({user:e,hasDivider:t,Divider:o,listStyle:r})=>{let i=vm(e.id);return i.length===0?null:n(m,null,t&&o,n(r6,{listClassName:r,header:"Mutual Groups",isLoading:!1,items:JP(i,()=>{})}))})})});function tI(e){e==="@me"||e==="null"||e==null||(VP(e,{muted:Ar.store.guild,suppress_everyone:Ar.store.everyone,suppress_roles:Ar.store.role,mute_scheduled_events:Ar.store.events,notify_highlights:Ar.store.highlights?1:0}),Ar.store.messages!==3&&VP(e,{message_notifications:Ar.store.messages}),Ar.store.showAllChannels&&u6(e)&&c6(e))}var VP,c6,u6,Ar,eI,Sm,oI=f(()=>{"use strict";a();No();_();At();M();T();$();S();({updateGuildNotificationSettings:VP}=R("updateGuildNotificationSettings")),{toggleShowAllChannels:c6}=Ze(".onboardExistingMember(",{toggleShowAllChannels:e=>{let t=String(e);return t.length<100&&!t.includes("onboardExistingMember")&&!t.includes("getOptedInChannels")}}),u6=Ce(".COMMUNITY)||",".isOptInEnabled("),Ar=P({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}}),eI=e=>(t,{guild:o})=>{if(!o)return;dt("privacy",t)?.push(n(E.MenuItem,{label:"Apply NewGuildSettings",id:"vc-newguildsettings-apply",icon:e?ll:void 0,action:()=>tI(o.id)}))};Sm=y({name:"NewGuildSettings",description:"Automatically mute new servers and change various other settings upon joining",tags:["MuteNewGuild","mute","server"],authors:[p.Glitch,p.Nuckyz,p.carince,p.Mopi,p.GabiRP],contextMenus:{"guild-context":eI(!1),"guild-header-popout":eI(!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:Ar,applyDefaultSettings:tI})});var nI,xm,Tm,rI=f(()=>{"use strict";a();_();M();vs();Ae();T();$();S();nI=R("getRelationships","isBlocked");l1("NoBlockedMessages","ignoreBlockedMessages","ignoreMessages");xm=P({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}}),Tm=y({name:"NoBlockedMessages",description:"Hides all blocked/ignored messages from chat completely",authors:[p.rushii,p.Samu,p.jamesbt365],settings:xm,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:()=>xm.store.ignoreMessages,replacement:[{match:/(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,replace:(t,o,r)=>`if($self.shouldIgnoreMessage(${r}.message))return;`}]}))],shouldIgnoreMessage(e){try{return nI.isBlocked(e.author.id)?!0:xm.store.applyToIgnoredUsers&&nI.isIgnored(e.author.id)}catch(t){return new V("NoBlockedMessages").error("Failed to check if user is blocked or ignored:",t),!1}},shouldHide(e){try{let t=e.collapsedReason(),o=dn.t[Ln("BLOCKED_MESSAGE_COUNT")](),r=xm.store.applyToIgnoredUsers?dn.t[Ln("IGNORED_MESSAGE_COUNT")]():null;return t===o||t===r}catch(t){return console.error(t),!1}}})});var wm,iI=f(()=>{"use strict";a();M();T();wm=y({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[p.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var Mm,sI=f(()=>{"use strict";a();M();T();Mm=y({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Pm,aI=f(()=>{"use strict";a();M();T();Pm=y({name:"NoMaskedUrlPaste",authors:[p.CatNoir],description:"Pasting a link while having text selected will not paste as masked URL",patches:[{find:".selection,preventEmojiSurrogates:",replacement:{match:/if\(null!=\i.selection&&\i.\i.isExpanded\(\i.selection\)\)/,replace:"if(false)"}}]})});var lI,Im,cI=f(()=>{"use strict";a();_();M();T();lI=P({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),Im=y({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord image mosaic",tags:["image","mosaic","media"],settings:lI,patches:[{find:'=>"IMAGE"===',replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/,replace:(e,t)=>t!=null?`=>${t};`:"=>false;"}},{find:"renderAttachments(",predicate:()=>lI.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]})});var Cm,uI=f(()=>{"use strict";a();M();T();Cm=y({name:"NoOnboardingDelay",description:"Skips the slow and annoying onboarding delay",authors:[p.nekohaxx],patches:[{find:"#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}",replacement:{match:"3e3",replace:"0"}}]})});var p6,lc,km,pI=f(()=>{"use strict";a();_();M();T();$();p6=R("getMessageRequestsCount"),lc=P({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}}),km=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:lc,patches:[{find:"getPendingCount(){",predicate:()=>lc.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>lc.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount();return",predicate:()=>lc.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>lc.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,300}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return p6.getMessageRequestChannelIds().size}})});var Nm,dI=f(()=>{"use strict";a();M();T();S();Nm=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes from everyone but yourself",authors:[p.TheKodeToad],patches:[{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&$self.isCurrentUser(this.userId)&&"}}],isCurrentUser:e=>e===D.getCurrentUser()?.id})});var Am,mI=f(()=>{"use strict";a();M();T();Am=y({name:"NoRPC",description:"Disables Discord's RPC server.",authors:[p.Cyn],patches:[{find:'.ensureModule("discord_rpc")',replacement:{match:/\.ensureModule\("discord_rpc"\)\.then\(\(.+?\)}\)}/,replace:'.ensureModule("discord_rpc")}'}}]})});var Rm,Dm,fI=f(()=>{"use strict";a();_();M();T();Rm=P({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),Dm=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:Rm,shouldMention(e,t){let o=Rm.store.userList.includes(e.author.id),r=Rm.store.shouldPingListed?o:!o;return Rm.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var N0,Lm,gI=f(()=>{"use strict";a();_();M();T();N0=P({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"}]}}),Lm=y({name:"NoServerEmojis",authors:[p.UlyssesZhan],description:"Do not show server emojis in the autocomplete menu.",settings:N0,patches:[{find:"}searchWithoutFetchingLatest(",replacement:{match:/searchWithoutFetchingLatest.{20,300}get\((\i).{10,40}?reduce\(\((\i),(\i)\)=>\{/,replace:"$& if ($self.shouldSkip($1, $3)) return $2;"}}],shouldSkip(e,t){return t.type!==1?!1:N0.store.shownEmojis==="onlyUnicode"?!0:N0.store.shownEmojis==="currentServer"?t.guildId!==e:!1}})});var Em,hI=f(()=>{"use strict";a();M();T();Em=y({name:"NoSystemBadge",description:"Disables the taskbar and system tray unread count badge.",authors:[p.rushii],patches:[{find:",setSystemTrayApplications",replacement:[{match:/setBadge\(\i\).+?},/,replace:"setBadge(){},"},{match:/setSystemTrayIcon\(\i\).+?},/,replace:"setSystemTrayIcon(){},"}]}]})});var Om,yI=f(()=>{"use strict";a();M();T();Om=y({name:"NoTypingAnimation",authors:[p.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var _m,vI=f(()=>{"use strict";a();M();T();_m=y({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[p.dzshn],patches:[{find:'.id,"Search Results"',replacement:[{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,replace:"if(false)$1"},{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,replace:"if(false)$1"}]},{find:"renderJumpButton()",replacement:[{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,replace:"if(false)$1"},{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,replace:"if(false)$1"}]},{find:'("interactionUsernameProfile',replacement:[{match:/.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,replace:"false?$1"},{match:/.\?(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,replace:"false?$1"}]}]})});var Bm,bI=f(()=>{"use strict";a();M();T();Bm=y({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[p.bb010g],patches:[{find:"#{intl::COPY_MESSAGE_LINK}",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var d6,Fm,SI=f(()=>{"use strict";a();_();M();T();d6=P({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),Fm=y({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[p.philipbry],settings:d6,patches:[{find:"ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,replace:"$self.settings.store.notificationVolume/100*"}}]})});var Um,xI=f(()=>{"use strict";a();M();T();Um=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[p.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:[{match:/(?<=\.nsfwAllowed=)null!=.+?(?=[,;])/,replace:"true"},{match:/(?<=\.ageVerificationStatus=)null!=.+?(?=[,;])/,replace:"3"}]}]})});var cc,$m,TI=f(()=>{"use strict";a();_();M();T();S();cc=P({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}}),$m=y({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:[p.ProffDea],settings:cc,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,soundpack:\i,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=ie.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&cc.store.channelToAffect==="group_dm"||t===3&&cc.store.channelToAffect==="user_dm"||cc.store.allowMentions&&e.mentions.some(o=>o.id===D.getCurrentUser().id)||cc.store.allowEveryone&&e.mention_everyone?!0:ki.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Gm,wI=f(()=>{"use strict";a();M();T();Gm=y({name:"oneko",description:"cat follow mouse (real)",authors:[p.Ven,p.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()}})});var R0,A0,m6,zm,MI=f(()=>{"use strict";a();_();M();T();S();R0={spotify:{match:/^https:\/\/open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|artist|playlist|user|episode|prerelease)\/(.+)(?:\?.+?)?$/,replace:(e,t,o)=>`spotify://${t}/${o}`,description:"Open Spotify links in the Spotify app",shortlinkMatch:/^https:\/\/spotify\.link\/.+$/,accountViewReplace:e=>`spotify:user:${e}`},steam:{match:/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,replace:e=>`steam://openurl/${e}`,description:"Open Steam links in the Steam app",shortlinkMatch:/^https:\/\/s.team\/.+$/,accountViewReplace:e=>`steam://openurl/https://steamcommunity.com/profiles/${e}`},epic:{match:/^https:\/\/store\.epicgames\.com\/(.+)$/,replace:(e,t)=>`com.epicgames.launcher://store/${t}`,description:"Open Epic Games links in the Epic Games Launcher"},tidal:{match:/^https:\/\/tidal\.com\/browse\/(track|album|artist|playlist|user|video|mix)\/(.+)(?:\?.+?)?$/,replace:(e,t,o)=>`tidal://${t}/${o}`,description:"Open Tidal links in the Tidal app"},itunes:{match:/^https:\/\/(?:geo\.)?music\.apple\.com\/([a-z]{2}\/)?(album|artist|playlist|song|curator)\/([^/?#]+)\/?([^/?#]+)?(?:\?.*)?(?:#.*)?$/,replace:(e,t,o,r,i)=>i?`itunes://music.apple.com/us/${o}/${r}/${i}`:`itunes://music.apple.com/us/${o}/${r}`,description:"Open Apple Music links in the iTunes app"}},A0=P(Object.entries(R0).reduce((e,[t,o])=>(e[t]={type:3,description:o.description,default:!0},e),{})),m6=VencordNative.pluginHelpers.OpenInApp,zm=y({name:"OpenInApp",description:"Open links in their respective apps instead of your browser",authors:[p.Ven,p.surgedevs],settings:A0,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:()=>!1,replacement:[{match:/\i\.\i\.isProtocolRegistered\(\)/g,replace:"true"},{match:/(!)?\(0,\i\.isDesktop\)\(\)/,replace:(e,t)=>t?"false":"true"}]},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:(\i)=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"if($self.handleAccountView($1,$2.type,$2.id)) return;"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;if(!o)return!1;for(let[r,i]of Object.entries(R0))if(A0.store[r]&&(i.shortlinkMatch?.test(o)&&(t?.preventDefault(),o=await m6.resolveRedirect(o)),i.match.test(o))){Je("Opened link in native app",ee.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 r=R0[t];if(r?.accountViewReplace&&A0.store[t])return VencordNative.native.openExternal(r.accountViewReplace(o)),e.preventDefault(),!0}})});var D0,Hm,PI=f(()=>{"use strict";a();_();M();T();D0=P({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"}}),Hm=y({name:"OverrideForumDefaults",description:"Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",authors:[p.Inbestigator],patches:[{find:"getDefaultLayout(){",replacement:[{match:/getDefaultLayout\(\){/,replace:"$&return $self.getLayout();"},{match:/getDefaultSortOrder\(\){/,replace:"$&return $self.getSortOrder();"}]}],getLayout:()=>D0.store.defaultLayout,getSortOrder:()=>D0.store.defaultSortOrder,settings:D0})});function CI(e){G.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function kI(e){let t={screenshakeEnabledLocations:{0:!0,1:!0,2:!0},shakeIntensity:1,confettiSize:16,confettiCount:5,combosRequiredCount:1};switch(e){case 0:{Object.assign(t,{screenshakeEnabledLocations:{0:!0,1:!1,2:!1},combosRequiredCount:5});break}case 1:{Object.assign(t,{confettiSize:12,confettiCount:8});break}case 2:{Object.assign(t,{shakeIntensity:20,confettiSize:25,confettiCount:15});break}}G.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var II,jm,NI=f(()=>{"use strict";a();_();M();T();S();II=P({superIntensePartyMode:{description:"Party intensity",type:4,options:[{label:"Normal",value:0,default:!0},{label:"Better",value:1},{label:"Project X",value:2}],restartNeeded:!1,onChange:kI}}),jm=y({name:"PartyMode",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],reporterTestable:2,settings:II,start(){CI(!0),kI(II.store.superIntensePartyMode)},stop(){CI(!1)}})});function f6(e){let t=ce.getGuild(e);return t?!t.hasFeature("INVITES_DISABLED")&&Be.getGuildPermissionProps(t).canManageRoles:!1}function g6(e){let o=[...ce.getGuild(e).features,"INVITES_DISABLED"];bt.patch({url:Pt.Endpoints.GUILD(e),body:{features:o}})}var Wm,AI=f(()=>{"use strict";a();ne();M();Pe();T();S();Wm=y({name:"PauseInvitesForever",tags:["DisableInvitesForever"],description:"Brings back the option to pause invites indefinitely that stupit Discord removed.",authors:[p.Dolfies,p.amia],patches:[{find:"#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}",group:!0,replacement:[{match:/children:\i\.\i\.string\(\i\.\i#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}\)/,replace:"children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})"},{match:/\.INVITES_DISABLED\)(?=.+?#{intl::INVITES_PERMANENTLY_DISABLED_TIP}.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,replace:"$&,setChecked=$2"}]}],renderInvitesLabel:k.wrap(({guildId:e,setChecked:t})=>n("div",null,Me("GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION"),f6(e)&&n("a",{role:"button",onClick:()=>{t(!0),g6(e)}}," Pause Indefinitely.")))})});var L0,qm,RI=f(()=>{"use strict";a();_();M();Ho();T();L0=P({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}}),qm=y({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[p.lewisakura],patches:[{find:"#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>L0.store.lockout},{find:"#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}",replacement:[{match:/{(?:\i:(?:function\(\){return |\(\)=>)\i}?,?){2}}/,replace:e=>e.replaceAll(Lt(/(function\(\){return |\(\)=>)\i/g),"$1()=>Promise.resolve(true)")}],predicate:()=>L0.store.onboarding}],settings:L0})});var DI=f(()=>{});function Ym({id:e},t){let o=ce.getRoles(e);return[...t.roles,e].map(r=>o[r]).sort((r,i)=>i.position-r.position)}function LI(e){switch(di.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 Zm(e,t){let o=ce.getRoles(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=o[r.id];return o[i.id].position-s.position})}var Km,ft,uc=f(()=>{"use strict";a();He();$();S();dc();pc();({getGuildPermissionSpecMap:Km}=R("getGuildPermissionSpecMap")),ft=ue("vc-permviewer-")});function E0(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Denied"),n("path",{fill:"var(--status-danger)",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"}))}function O0(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Allowed"),n("path",{fill:"var(--text-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function OI(){return n("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},n("g",null,n("title",null,"Not overwritten"),n("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var _I=f(()=>{"use strict";a()});function v6(e){let t=y6(e,20);if(!t)return;let{customIconSrc:o,unicodeEmoji:r}=t;return o??r?.url}function b6({permissions:e,guild:t,modalProps:o,header:r}){let i=$e(()=>Km(t),[t.id]);Se([Re],()=>Re.getMemberIds(t.id),null,(d,g)=>d.length===g.length),le(()=>{e.sort((d,g)=>d.type-g.type)},[e]),le(()=>{let d=e.filter(g=>g.type===1&&!Re.isMember(t.id,g.id)).map(({id:g})=>g);G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:d})},[]);let[s,l]=K(0),c=e[s],u=ce.getRoles(t.id);return n(ve,{...o,size:"large"},n(Ne,null,n(Q,{className:ft("modal-title"),variant:"heading-lg/semibold"},r," permissions:"),n(pt,{onClick:o.onClose})),n(we,{className:ft("modal-content")},!c&&n("div",{className:ft("modal-no-perms")},n(Q,{variant:"heading-lg/normal"},"No permissions to display!")),c&&n("div",{className:ft("modal-container")},n(Hr,{className:ft("modal-list"),orientation:"auto"},e.map((d,g)=>{let h=D.getUser(d.id??""),v=u[d.id??""],C=v!=null?v6(v):void 0;return n("div",{key:g,className:ft("modal-list-item-btn"),onClick:()=>l(g),role:"button",tabIndex:0},n("div",{className:ft("modal-list-item",{"modal-list-item-active":s===g}),onContextMenu:w=>{d.type===0?Et.openContextMenu(w,()=>n(S6,{guild:t,roleId:d.id,onClose:o.onClose})):d.type===1&&Et.openContextMenu(w,()=>n(x6,{userId:d.id}))}},(d.type===0||d.type===2)&&n("span",{className:ft("modal-role-circle"),style:{backgroundColor:v?.colorString??"var(--primary-300)"}}),d.type===0&&C!=null&&n("img",{className:ft("modal-role-image"),src:C}),d.type===1&&h!=null&&n("img",{className:ft("modal-user-img"),src:h.getAvatarURL(void 0,void 0,!1)}),n(Q,{variant:"text-md/normal",className:ft("modal-list-item-text")},d.type===0?v?.name??"Unknown Role":d.type===1?(h!=null&&cr(h))??"Unknown User":n(ge,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(Rh,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:ft("modal-divider")}),n(Hr,{className:ft("modal-perms"),orientation:"auto"},Object.values(ke).map(d=>n("div",{key:d,className:ft("modal-perms-item")},n("div",{className:ft("modal-perms-item-icon")},(()=>{let{permissions:g,overwriteAllow:h,overwriteDeny:v}=c;return g?(g&d)===d?O0():E0():h&&(h&d)===d?O0():v&&(v&d)===d?E0():OI()})()),n(Q,{variant:"text-md/normal"},i[String(d)].title),n(oe,{text:(()=>{let{description:g}=i[String(d)];return typeof g=="function"?dn.intl.format(g,{}):g})()},g=>n(il,{...g}))))))))}function S6({guild:e,roleId:t,onClose:o}){return n(E.Menu,{navId:ft("role-context-menu"),onClose:Et.closeContextMenu,"aria-label":"Role Options"},n(E.MenuItem,{id:ft("copy-role-id"),label:Me("COPY_ID_ROLE"),action:()=>{Ht.copy(t)}}),di.store.unsafeViewAsRole&&n(E.MenuItem,{id:ft("view-as-role"),label:Me("VIEW_AS_ROLE"),action:()=>{let r=ce.getRole(e.id,t);r&&(o(),G.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}function x6({userId:e}){return n(E.Menu,{navId:ft("user-context-menu"),onClose:Et.closeContextMenu,"aria-label":"User Options"},n(E.MenuItem,{id:ft("copy-user-id"),label:Me("COPY_ID_USER"),action:()=>{Ht.copy(e)}}))}function ps(e,t,o){return he(r=>n(T6,{modalProps:r,permissions:e,guild:t,header:o}))}var y6,T6,pc=f(()=>{"use strict";a();ne();jt();At();Pe();Ke();$();S();dc();uc();_I();y6=Ce("convertSurrogateToName","customIconSrc","unicodeEmoji");T6=k.wrap(b6)});function BI({text:e,color:t,...o}){return n("div",{...o,className:z(mc.role)},n("div",{className:mc.roleRemoveButton},n("span",{className:z(M6.roleCircle,mc.roleCircle),style:{backgroundColor:t}})),n("div",{className:mc.roleName},n(Q,{className:mc.roleNameOverflow,variant:"text-xs/medium"},e)))}function P6({roleName:e,roleColor:t}){return n(m,null,n(Q,{variant:"text-sm/medium"},"Granted By"),n(BI,{text:e,color:t}))}function I6({guild:e,guildMember:t,closePopout:o}){let{permissionsSortOrder:r}=di.use(["permissionsSortOrder"]),i=$e(()=>Km(e),[e.id]),[s,l]=$e(()=>{let c=[],u=Ym(e,t),d=u.map(g=>({type:0,...g}));if(e.ownerId===t.userId){d.push({type:2,permissions:Object.values(ke).reduce((h,v)=>h|v,0n)});let g=Me("GUILD_OWNER")??"Server Owner";c.push({permission:g,roleName:"Owner",roleColor:"var(--primary-300)",rolePosition:1/0})}LI(u);for(let g of Object.values(ke))for(let{permissions:h,colorString:v,position:C,name:w}of u)if((h&g)===g){c.push({permission:i[String(g)].title,roleName:w,roleColor:v||"var(--primary-300)",rolePosition:C});break}return c.sort((g,h)=>h.rolePosition-g.rolePosition),[d,c]},[r]);return n("div",null,n("div",{className:ft("user-header-container")},n(Q,{variant:"eyebrow"},"Permissions"),n("div",{className:ft("user-header-btns")},n(oe,{text:`Sorting by ${r===0?"Highest Role":"Lowest Role"}`},c=>n("div",{...c,className:ft("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{di.store.permissionsSortOrder=r===0?1:0}},n("svg",{width:"24",height:"24",viewBox:"0 96 960 960",transform:r===0?"scale(1 1)":"scale(1 -1)"},n("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"})))),n(oe,{text:"Role Details"},c=>n("div",{...c,className:ft("user-header-btn"),role:"button",tabIndex:0,onClick:()=>{o(),ps(s,e,t.nick||D.getUser(t.userId).username)}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))))),l.length>0&&n("div",{className:z(w6.root)},l.map(({permission:c,roleColor:u,roleName:d})=>n(oe,{key:c,text:n(P6,{roleName:d,roleColor:u}),tooltipClassName:ft("granted-by-container"),tooltipContentClassName:ft("granted-by-content")},g=>n(BI,{...g,text:c,color:u})))))}var w6,mc,M6,FI,UI=f(()=>{"use strict";a();ne();Pe();me();$();S();dc();uc();pc();({RoleRootClasses:w6,RoleClasses:mc,RoleBorderClasses:M6}=mo(()=>{let[e,t,o]=zr(B.byProps("root","expandButton","collapseButton"),B.byProps("role","roleCircle","roleName"),B.byProps("roleCircle","dot","dotBorderColor"));return{RoleRootClasses:e,RoleClasses:t,RoleBorderClasses:o}}));FI=k.wrap(I6,{noop:!0})});function _0(e,t,o){return o===0&&!Re.isMember(e,t)?null:n(E.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=ce.getGuild(e),{permissions:i,header:s}=Ms(o).returnType().with(0,()=>{let l=Re.getMember(e,t),c=Ym(r,l).map(u=>({type:0,...u}));return r.ownerId===t&&c.push({type:2,permissions:Object.values(ke).reduce((u,d)=>u|d,0n)}),{permissions:c,header:l.nick??D.getUser(l.userId).username}}).with(1,()=>{let l=ie.getChannel(t);return{permissions:Zm(Object.values(l.permissionOverwrites).map(({id:u,allow:d,deny:g,type:h})=>({type:h,id:u,overwriteAllow:d,overwriteDeny:g})),e),header:l.name}}).otherwise(()=>({permissions:Object.values(ce.getRoles(r.id)).map(c=>({type:0,...c})),header:r.name}));ps(i,r,s)}})}function Qm(e,t){return(o,r)=>{if(!r||t===0&&!r.user||t===2&&!r.guild||t===1&&(!r.channel||!r.guild))return;let i=dt(e,o),s=Ms(t).with(0,()=>_0(r.guildId,r.user.id,t)).with(1,()=>_0(r.guild.id,r.channel.id,t)).with(2,()=>_0(r.guild.id)).otherwise(()=>null);if(s!=null){if(i)return i.push(s);e==="roles"&&r.guildId&&o.splice(-1,0,n(E.MenuGroup,null,s))}}}var C6,Jm,di,Xm,dc=f(()=>{"use strict";a();DI();No();_();ne();At();M();me();T();$();S();pc();UI();uc();C6=R("container","scroller","list"),Jm=R("button","buttonInner","icon","banner"),di=P({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}]}});Xm=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:di,patches:[{find:"#{intl::VIEW_ALL_ROLES}",replacement:{match:/\.expandButton,.+?null,/,replace:"$&$self.ViewPermissionsButton(arguments[0]),"}}],ViewPermissionsButton:k.wrap(({guild:e,guildMember:t})=>n(xs,{position:"bottom",align:"center",renderPopout:({closePopout:o})=>n(nh,{className:C6.container,style:{width:"500px"}},n(FI,{guild:e,guildMember:t,closePopout:o}))},o=>n(Vn,{text:"View Permissions"},n(I,{...o,color:I.Colors.CUSTOM,look:I.Looks.FILLED,size:I.Sizes.NONE,innerClassName:z(Jm.buttonInner,Jm.icon),className:z(Jm.button,Jm.icon,"vc-permviewer-role-button")},n(Oh,{height:"16",width:"16"})))),{noop:!0}),contextMenus:{"user-context":Qm("roles",0),"channel-context":Qm(["mute-channel","unmute-channel"],1),"guild-context":Qm("privacy",2),"guild-header-popout":Qm("privacy",2)}})});function $I(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),r(s)},s.onerror=(l,c,u,d,g)=>i(g||l),s.crossOrigin="Anonymous",s.src=o})}async function D6(e,t,o){for(let r of e)switch(r.name){case"image":let i=R6.getUpload(t.channel.id,r.name,no.SlashCommand);if(i){if(!i.isImage)throw Ri.clearAll(t.channel.id,no.SlashCommand),"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await go.getUser(r.value)).getAvatarURL(o?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user
|
|
`,s),Ri.clearAll(t.channel.id,no.SlashCommand),"Failed to fetch user. Check the console for more info."}}return Ri.clearAll(t.channel.id,no.SlashCommand),null}var la,k6,N6,Vm,A6,R6,ef,GI=f(()=>{"use strict";a();rn();M();So();T();$();S();la=zc(Vy()),k6=20,N6=128,Vm=10,A6=en(()=>Promise.all(Array.from({length:Vm},(e,t)=>$I(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),R6=R("getUploads");ef=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.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 A6(),r=qt(e,"no-server-pfp",!1);try{var i=await D6(e,t,r);if(!i)throw"No Image specified!"}catch(v){Ri.clearAll(t.channel.id,no.SlashCommand),mt(t.channel.id,{content:String(v)});return}let s=await $I(i),l=qt(e,"delay",k6),c=qt(e,"resolution",N6),u=(0,la.GIFEncoder)(),d=document.createElement("canvas");d.width=d.height=c;let g=d.getContext("2d");Ri.clearAll(t.channel.id,no.SlashCommand);for(let v=0;v<Vm;v++){g.clearRect(0,0,d.width,d.height);let C=v<Vm/2?v:Vm-v,w=.8+C*.02,x=.8-C*.05,N=(1-w)*.5+.1,A=1-x-.08;g.drawImage(s,N*c,A*c,w*c,x*c),g.drawImage(o[v],0,0,c,c);let{data:L}=g.getImageData(0,0,c,c),U=(0,la.quantize)(L,256),H=(0,la.applyPalette)(L,U);u.writeFrame(H,c,c,{transparent:!0,palette:U,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>qa.promptToUpload([h],t.channel,no.ChannelMessage),10)}}]})});var zI=f(()=>{});var HI,tf,jI=f(()=>{"use strict";a();zI();_();ne();M();T();S();HI=P({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),tf=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Lumap],settings:HI,patches:[{find:".removeMosaicItemHoverButton),",replacement:{match:/(\.nonMediaMosaicItem\]:.{0,40}children:)(\i.slice\(\i\))(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/,replace:(e,t,o,r,i)=>`${t}[${r}&&${i}&&$self.PictureInPictureButton(),...${o}]`}}],PictureInPictureButton:k.wrap(()=>n(oe,{text:"Toggle Picture in Picture"},e=>n("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let o=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(o.cloneNode(!0));r.loop=HI.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=o.currentTime,r.requestPictureInPicture(),o.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},n("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});var WI=f(()=>{});async function B0(){await _6();let e=D.getCurrentUser()?.id;e!=null&&(Ut=ro.store.userBasedCategoryList[e]??=[],KI?.())}function YI(){KI=rr(),ro.use(["pinOrder","canCollapseDmSection","dmSectionCollapsed","userBasedCategoryList"])}function ZI(e){return Ut.find(t=>t.id===e)}function gc(e){return Ut[e]}function JI(e){Ut.push(e)}function QI(e,t){let o=Ut.find(r=>r.id===t);o!=null&&(o.channels.includes(e)||o.channels.push(e))}function XI(e){let t=Ut.find(o=>o.channels.includes(e));t!=null&&(t.channels=t.channels.filter(o=>o!==e))}function VI(e){let t=Ut.findIndex(o=>o.id===e);t!==-1&&Ut.splice(t,1)}function e4(e,t=!0){let o=Ut.find(r=>r.id===e);o!=null&&(o.collapsed=t)}function hc(e){return Ut.some(t=>t.channels.includes(e))}function of(){return Ut.length}function t4(){if(ro.store.pinOrder===0){let e=G0.getPrivateChannelIds();return Ut.filter(t=>!t.collapsed).flatMap(t=>e.filter(o=>t.channels.includes(o)))}return Ut.filter(e=>!e.collapsed).flatMap(e=>e.channels)}function o4(){return Ut.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}function i4(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}function U0(e,t){let o=Ut.findIndex(i=>i.id===e),r=o+t;i4(Ut,o,r)}function $0(e,t){let o=Ut.find(s=>s.channels.includes(e));if(o==null)return;let r=o.channels.indexOf(e),i=r+t;i4(o.channels,r,i)}async function _6(){j.plugins.PinDMs.dmSectioncollapsed!=null&&(ro.store.dmSectionCollapsed=j.plugins.PinDMs.dmSectioncollapsed,delete j.plugins.PinDMs.dmSectioncollapsed);let t=(await Mh()).map(o=>String(o)).filter(o=>o.startsWith(qI));if(t.length!==0){for(let o of t){let r=await co(o);if(r==null)continue;let i=o.replace(qI,"");ro.store.userBasedCategoryList[i]=r,await Kr(o)}await Promise.all([Kr(L6),Kr(E6),Kr(O6)])}}var qI,L6,E6,O6,KI,Ut,n4,fc,r4,F0,nf=f(()=>{"use strict";a();_n();_();wt();S();rf();qI="PinDMsCategories-",L6="PinDMsMigratedPinDMs",E6="PinDMsMigratedOldCategories",O6="BetterPinDMsCategories-",Ut=[];n4=(e,t,o)=>{let r=e[t],i=e[t+o];return r&&i},fc=(e,t)=>{let o=Ut.findIndex(r=>r.id===e);return n4(Ut,o,t)},r4=e=>fc(e,-1)||fc(e,1),F0=(e,t)=>{let o=Ut.find(i=>i.channels.includes(e));if(o==null)return!1;let r=o.channels.indexOf(e);return n4(o.channels,r,t)}});var s4,z0=f(()=>{"use strict";a();s4=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306]});function G6(e,t){return $e(()=>{if(e)return ZI(e);if(t)return{id:ee.genId(),name:`Pin Category ${of()+1}`,color:10070709,collapsed:!1,channels:[t]}},[e,t])}function z6({categoryId:e,modalProps:t,initialChannelId:o}){let r=G6(e,o);if(!r)return null;let[i,s]=K(r.name),[l,c]=K(r.color),u=d=>{d.preventDefault(),r.name=i,r.color=l,e||JI(r),t.onClose()};return n(ve,{...t},n(Ne,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),n("form",{onSubmit:u},n(we,{className:$6("content")},n(b.FormSection,null,n(b.FormTitle,null,"Name"),n(ct,{value:i,onChange:d=>s(d)})),n(b.FormDivider,null),n(b.FormSection,null,n(b.FormTitle,null,"Color"),n(U6,{key:r.id,defaultColor:10070709,colors:s4,onChange:d=>c(d),value:l,renderDefaultButton:()=>null,renderCustomButton:()=>n(F6,{color:l,onChange:d=>c(d),key:r.id,showEyeDropper:!1})}))),n(ut,null,n(I,{type:"submit",onClick:u,disabled:!i},e?"Save":"Create"))))}var F6,U6,H0,$6,sf,j0=f(()=>{"use strict";a();He();Ke();$();S();z0();nf();F6=se("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),U6=se('id:"color-picker"'),H0=Xn(['name:"UserSettings"'],/createPromise:.{0,20}(\i\.\i\("?.+?"?\).*?).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/),$6=ue("vc-pindms-modal-");sf=(e,t)=>ol(async()=>(await H0(),o=>n(z6,{categoryId:e,modalProps:o,initialChannelId:t})))});function l4(e){let t=hc(e);return n(E.MenuItem,{id:"pin-dm",label:"Pin DMs"},!t&&n(m,null,n(E.MenuItem,{id:"vc-add-category",label:"Add Category",color:"brand",action:()=>sf(null,e)}),n(E.MenuSeparator,null),Ut.map(o=>n(E.MenuItem,{key:o.id,id:`pin-category-${o.id}`,label:o.name,action:()=>QI(e,o.id)}))),t&&n(m,null,n(E.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>XI(e)}),ro.store.pinOrder===1&&F0(e,-1)&&n(E.MenuItem,{id:"move-up",label:"Move Up",action:()=>$0(e,-1)}),ro.store.pinOrder===1&&F0(e,1)&&n(E.MenuItem,{id:"move-down",label:"Move Down",action:()=>$0(e,1)})))}var H6,j6,c4,u4=f(()=>{"use strict";a();No();S();nf();rf();j0();H6=(e,t)=>{dt("leave-channel",e)?.unshift(l4(t.channel.id))},j6=(e,t)=>{let o=dt("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,l4(t.channel.id))}},c4={"gdm-context":H6,"user-context":j6}});var p4,G0,q6,ro,af,rf=f(()=>{"use strict";a();WI();_();ne();M();me();T();$();S();u4();j0();z0();nf();p4=R("privateChannelsHeaderContainer"),G0=be("PrivateChannelSortStore"),ro=P({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:{}}}),af=y({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:[p.Ven,p.Aria],settings:ro,contextMenus:c4,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,q6=e},startAt:"WebpackReady",start:B0,flux:{CONNECTION_OPEN:B0},usePinnedDms:YI,isPinned:hc,categoryLen:of,getSections:o4,getAllUncollapsedChannels:t4,requireSettingsMenu:H0,makeProps(e,{sections:t}){return this._instance=e,this.sections=t,this.sections.splice(1,0,...this.getSections()),this.instance?.props?.privateChannelIds?.length===0&&(this.sections[this.sections.length-1]=0),{sections:this.sections,chunkSize:this.getChunkSize()}},makeSpanProps(){return ro.store.canCollapseDmSection?{onClick:()=>this.collapseDMList(),role:"button",style:{cursor:"pointer"}}:void 0},getChunkSize(){let e=this.getSections();return(e.length*40+e.reduce((o,r)=>o+=r+44,0)+256)*1.5},isCategoryIndex(e){return this.sections&&e>0&&e<this.sections.length-1},isChannelIndex(e,t){if(ro.store.canCollapseDmSection&&ro.store.dmSectionCollapsed&&e!==0)return!0;let o=gc(e-1);return this.isCategoryIndex(e)&&(o?.channels?.length===0||o?.channels[t])},collapseDMList(){ro.store.dmSectionCollapsed=!ro.store.dmSectionCollapsed},isChannelHidden(e,t){if(e===0)return!1;if(ro.store.canCollapseDmSection&&ro.store.dmSectionCollapsed&&this.getSections().length+1===e)return!0;if(!this.instance||!this.isChannelIndex(e,t))return!1;let o=gc(e-1);return o?o.collapsed&&this.instance.props.selectedChannelId!==this.getCategoryChannels(o)[t]:!1},getScrollOffset(e,t,o,r,i){return hc(e)?t*(this.getAllUncollapsedChannels().indexOf(e)+r)+o:(t+o)*2+t*this.getAllUncollapsedChannels().length+i},renderCategory:k.wrap(({section:e})=>{let t=gc(e-1);return t?n(er,{onClick:()=>e4(t.id,!t.collapsed),onContextMenu:o=>{Et.openContextMenu(o,()=>n(E.Menu,{navId:"vc-pindms-header-menu",onClose:()=>G.dispatch({type:"CONTEXT_MENU_CLOSE"}),color:"danger","aria-label":"Pin DMs Category Menu"},n(E.MenuItem,{id:"vc-pindms-edit-category",label:"Edit Category",action:()=>sf(t.id,null)}),r4(t.id)&&n(m,null,fc(t.id,-1)&&n(E.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>U0(t.id,-1)}),fc(t.id,1)&&n(E.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>U0(t.id,1)})),n(E.MenuSeparator,null),n(E.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>VI(t.id)})))}},n("h2",{className:z(p4.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`}},n("span",{className:p4.headerText},t?.name??"uh oh"),n("svg",{className:"vc-pindms-collapse-icon","aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"})))):null},{noop:!0}),renderChannel(e,t,o){return k.wrap(()=>{let{channel:r,category:i}=this.getChannel(e,t,this.instance.props.channels);return!r||!i||this.isChannelHidden(e,t)?null:n(o,{channel:r,selected:this.instance.props.selectedChannelId===r.id},r.id)},{noop:!0})},getChannel(e,t,o){let r=gc(e-1);if(!r)return{channel:null,category:null};let i=this.getCategoryChannels(r)[t];return{channel:o[i],category:r}},getCategoryChannels(e){return e.channels.length===0?[]:ro.store.pinOrder===0?G0.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}})});var lf,d4=f(()=>{"use strict";a();M();T();lf=y({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[p.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\i\|\|\i\)&&(\(.{0,40}\(\i\.animated)/,replace:"$1"},{match:/\(\i\|\|!\i\)&&(\(.{0,40}\(\i\.animated)/,replace:"false&&$1"}]}]})});var m4=f(()=>{});function cf(e,t){return({color:o,tooltip:r,small:i})=>n(oe,{text:r},s=>n("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:o},n("path",{d:e})))}function v4(e){if(e.id===D.getCurrentUser().id){let t=K6.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),r=Object.values(o).reduce((s,l)=>(l.clientInfo.client!=="unknown"&&(s[l.clientInfo.client]=l.status),s),{}),{clientStatuses:i}=cn.getState();i[D.getCurrentUser().id]=r}}function Z6({userId:e}){let t=D.getUser(e);if(!t||t.bot)return[];v4(t);let o=cn.getState()?.clientStatuses?.[t.id];return o?Object.entries(o).map(([r,i])=>({component:()=>n("span",{className:"vc-platform-indicator"},n(y4,{key:r,platform:r,status:i,small:!1})),key:`vc-platform-indicator-${r}`})):[]}var K6,f4,Y6,y4,g4,h4,W0,uf,b4=f(()=>{"use strict";a();m4();Wl();Ll();_l();_();ne();M();T();$();S();K6=be("SessionsStore");f4={desktop:cf("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:cf("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:cf("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:cf("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:Y6}=Ze(".concat(.5625*",{useStatusFillColor:B.byCode(".hex")}),y4=({platform:e,status:t,small:o})=>{let r=e==="embedded"?"Console":e[0].toUpperCase()+e.slice(1),i=f4[e]??f4.desktop;return n(i,{color:Y6(t),tooltip:r,small:o})};g4=({user:e,small:t=!1})=>{if(!e||e.bot)return null;v4(e);let o=cn.getState()?.clientStatuses?.[e.id];if(!o)return null;let r=Object.entries(o).map(([i,s])=>n(y4,{key:i,platform:i,status:s,small:t}));return r.length?n("span",{className:"vc-platform-indicator",style:{gap:"2px"}},r):null},h4={getBadges:Z6,position:0},W0={list:{description:"In the member list",onEnable:()=>Yi("platform-indicator",e=>n(k,{noop:!0},n(g4,{user:e.user,small:!0}))),onDisable:()=>Zi("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Hl(h4),onDisable:()=>jl(h4)},messages:{description:"Inside messages",onEnable:()=>Ji("platform-indicator",e=>n(k,{noop:!0},n(g4,{user:e.message?.author}))),onDisable:()=>Qi("platform-indicator")}},uf=y({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo,p.TheSun,p.Nuckyz,p.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=j.plugins.PlatformIndicators,{displayMode:t}=e;t&&(t!=="both"?e[t]=!0:(e.list=!0,e.badges=!0),e.messages=!0,delete e.displayMode),Object.entries(W0).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(W0).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>j.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:()=>j.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:()=>j.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(W0).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});var x4,S4,J6,Q6,X6,pf,T4=f(()=>{"use strict";a();xr();rn();M();T();$();S();x4=R("getUploads"),S4=e=>ja.getDraft(e,no.ChannelMessage),J6=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),Q6=async e=>await Promise.all(x4.getUploads(e,no.ChannelMessage).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:Ml(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let u=await J6(l);if(!u)return c;c.width=u.width,c.height=u.height}return c})),X6=({isMainChat:e,isEmpty:t,type:{attachments:o}})=>{let r=Le.getChannelId(),i=Se([ja],()=>S4(r));if(!e)return null;let s=o&&x4.getUploads(r,no.ChannelMessage).length>0;return!(!t&&i?.length>0)&&!s?null:n(Vo,{tooltip:"Preview Message",onClick:async()=>mt(r,{content:S4(r),author:D.getCurrentUser(),attachments:s?await Q6(r):void 0}),buttonProps:{style:{translate:"0 2px"}}},n("svg",{fill:"currentColor",fillRule:"evenodd",width:"20",height:"20",viewBox:"0 0 24 24",style:{scale:"1.096",translate:"0 -1px"}},n("path",{d:"M22.89 11.7c.07.2.07.4 0 .6C22.27 13.9 19.1 21 12 21c-7.11 0-10.27-7.11-10.89-8.7a.83.83 0 0 1 0-.6C1.73 10.1 4.9 3 12 3c7.11 0 10.27 7.11 10.89 8.7Zm-4.5-3.62A15.11 15.11 0 0 1 20.85 12c-.38.88-1.18 2.47-2.46 3.92C16.87 17.62 14.8 19 12 19c-2.8 0-4.87-1.38-6.39-3.08A15.11 15.11 0 0 1 3.15 12c.38-.88 1.18-2.47 2.46-3.92C7.13 6.38 9.2 5 12 5c2.8 0 4.87 1.38 6.39 3.08ZM15.56 11.77c.2-.1.44.02.44.23a4 4 0 1 1-4-4c.21 0 .33.25.23.44a2.5 2.5 0 0 0 3.32 3.32Z"})))},pf=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[p.Aria],startAt:"Init",renderChatBarButton:X6})});var df,w4=f(()=>{"use strict";a();M();Pe();T();S();df=y({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",renderMessagePopoverButton(e){let t=ie.getChannel(e.channel_id);return t.guild_id&&!Be.can(ke.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>lr(`<@${e.author.id}> `)}},Icon:()=>n("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function C4(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function t7({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=D.getCurrentUser().id,i=Jt.getMessages(e)._array.filter(s=>s.author.id===r);ff=C4(i,t)}function o7({message:e,_isQuickReply:t}){t||(mf=C4(Jt.getMessages(e.channel_id)._array,e.id))}function M4(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!n7(e)||r7(e)||(e.preventDefault(),e.shiftKey?a7(t):s7(t))}function k4(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=o.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&V6.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function N4(e,t){let o=Jt.getMessages(Le.getChannelId())._array;if(!t){let l=D.getCurrentUser().id;o=o.filter(c=>c.author.id===l)}Vencord.Plugins.isPluginEnabled("NoBlockedMessages")&&(o=o.filter(l=>!e7.isBlocked(l.author.id)));let r=l=>e?Math.min(o.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&o[o.length-l-1]?.deleted===!0);return l},s;return t?mf=s=i(mf):ff=s=i(ff),s===-1?void 0:o[o.length-s-1]}function i7(e){let{enabled:t,userList:o,shouldPingListed:r}=j.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(I4.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function s7(e){let t=ie.getChannel(Le.getChannelId());if(t.guild_id&&!Be.can(ke.SEND_MESSAGES,t))return;let o=N4(e,!0);if(!o)return void G.dispatch({type:"DELETE_PENDING_REPLY",channelId:Le.getChannelId()});let r=ie.getChannel(o.channel_id),i=D.getCurrentUser().id;G.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:i7(o),showMentionToggle:!r.isPrivate()&&o.author.id!==i,_isQuickReply:!0}),On.dispatchToLastSubscribed("TEXTAREA_FOCUS"),k4(r.id,o.id)}function a7(e){let t=ie.getChannel(Le.getChannelId());if(t.guild_id&&!Be.can(ke.SEND_MESSAGES,t))return;let o=N4(e,!1);if(!o)return G.dispatch({type:"MESSAGE_END_EDIT",channelId:Le.getChannelId()});G.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),k4(o.channel_id,o.id)}var V6,e7,P4,mf,ff,I4,gf,n7,r7,A4=f(()=>{"use strict";a();_();M();T();$();S();V6=R("jumpToMessage"),e7=R("getRelationships","isBlocked"),P4=navigator.platform.includes("Mac"),mf=-1,ff=-1,I4=P({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),gf=y({name:"QuickReply",authors:[p.fawn,p.Ven,p.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:I4,start(){document.addEventListener("keydown",M4)},stop(){document.removeEventListener("keydown",M4)},flux:{DELETE_PENDING_REPLY(){mf=-1},MESSAGE_END_EDIT(){ff=-1},MESSAGE_START_EDIT:t7,CREATE_PENDING_REPLY:o7}});n7=e=>P4?e.metaKey:e.ctrlKey,r7=e=>e.altKey||!P4&&e.metaKey});var q0,hf,R4=f(()=>{"use strict";a();M();T();S();hf=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn,p.maisymoe],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,o)=>`${t}{var decoded=$self.decodeError.apply(null, arguments);if(decoded)return decoded;${o}}`}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${W.version}/scripts/error-codes/codes.json`;q0=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
|
|
`,t))},stop(){q0=void 0},decodeError(e,...t){let o=0;return q0?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var D4=f(()=>{});var Y0={};lt(Y0,{ServerListRenderPosition:()=>yf,addServerListElement:()=>yc,removeServerListElement:()=>vc,renderAll:()=>u7});function K0(e){return e===0?l7:c7}function yc(e,t){K0(e).add(t)}function vc(e,t){K0(e).delete(t)}var yf,l7,c7,u7,vf=f(()=>{"use strict";a();ne();yf=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(yf||{}),l7=new Set,c7=new Set;u7=e=>Array.from(K0(e),(t,o)=>n(k,{noop:!0,key:o},n(t,null)))});function d7(){let e=[];Object.values(ce.getGuilds()).forEach(t=>{tr.getChannels(t.id).SELECTABLE.concat(tr.getChannels(t.id).VOCAL).concat(Object.values(p7.getActiveJoinedThreadsForGuild(t.id)).flatMap(o=>Object.values(o))).forEach(o=>{ki.hasUnread(o.channel.id)&&e.push({channelId:o.channel.id,messageId:ki.lastMessageId(o.channel.id),readStateType:0})})}),G.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var p7,m7,bf,L4=f(()=>{"use strict";a();D4();vf();ne();M();T();$();S();p7=be("ActiveJoinedThreadsStore");m7=()=>n(I,{onClick:d7,size:I.Sizes.MIN,color:I.Colors.CUSTOM,className:"vc-ranb-button"},"Read All"),bf=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:k.wrap(m7,{noop:!0}),start(){yc(0,this.renderReadAllButton)},stop(){vc(0,this.renderReadAllButton)}})});var $o,Sf=f(()=>{"use strict";a();_();T();$o=P({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Z0=f(()=>{"use strict";a()});async function h7(){It.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function Q0(){if(await h7(),D.getCurrentUser()==null)return;let[e,t,o]=await It.getMany([E4(),O4(),_4()]);if(await Promise.all([xf(),Tf(),bc()]),$o.store.offlineRemovals){if($o.store.groups&&t?.size)for(let[r,i]of t)ua.has(r)||Rr(`You are no longer in the group ${i.name}.`,i.iconURL);if($o.store.servers&&e?.size)for(let[r,i]of e)!ca.has(r)&&!J0.isUnavailable(r)&&Rr(`You are no longer in the server ${i.name}.`,i.iconURL);if($o.store.friends&&o?.friends.length)for(let r of o.friends){if(ds.friends.includes(r))continue;let i=await go.getUser(r).catch(()=>{});i&&Rr(`You are no longer friends with ${cr(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Zo(i.id))}if($o.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(ds.requests.includes(r)||[1,2,4].includes(Fe.getRelationshipType(r)))continue;let i=await go.getUser(r).catch(()=>{});i&&Rr(`Friend request from ${cr(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Zo(i.id))}}}function Rr(e,t,o){$o.store.notices&&Ir.showNotice(e,"OK",()=>Ir.popNotice()),Ye({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function B4(e){return ca.get(e)}function X0(e){ca.delete(e),xf()}async function xf(){ca.clear();let e=D.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(ce.getGuilds()))Re.isMember(t,e)&&ca.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await It.set(E4(),ca)}function F4(e){return ua.get(e)}function V0(e){ua.delete(e),Tf()}async function Tf(){ua.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of ie.getSortedPrivateChannels())e===3&&ua.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await It.set(O4(),ua)}async function bc(){ds.friends=[],ds.requests=[];let e=Fe.getRelationships();for(let t in e)switch(e[t]){case 1:ds.friends.push(t);break;case 3:ds.requests.push(t);break}await It.set(_4(),ds)}var J0,ca,ua,ds,E4,O4,_4,ev=f(()=>{"use strict";a();Mr();pr();Pe();$();S();Sf();Z0();J0=be("GuildAvailabilityStore"),ca=new Map,ua=new Map,ds={friends:[],requests:[]},E4=()=>`relationship-notifier-guilds-${D.getCurrentUser().id}`,O4=()=>`relationship-notifier-groups-${D.getCurrentUser().id}`,_4=()=>`relationship-notifier-friends-${D.getCurrentUser().id}`});async function z4({relationship:{type:e,id:t}}){if(tv===t){tv=void 0;return}let o=await go.getUser(t).catch(()=>null);if(o)switch(e){case 1:$o.store.friends&&Rr(`${cr(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Zo(o.id));break;case 3:$o.store.friendRequestCancels&&Rr(`A friend request from ${cr(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Zo(o.id));break}}function H4({guild:{id:e,unavailable:t}}){if(!$o.store.servers||t||J0.isUnavailable(e))return;if(ov===e){X0(e),ov=void 0;return}let o=B4(e);o&&(X0(e),Rr(`You were removed from the server ${o.name}.`,o.iconURL))}function j4({channel:{id:e,type:t}}){if(!$o.store.groups||t!==3)return;if(nv===e){V0(e),nv=void 0;return}let o=F4(e);o&&(V0(e),Rr(`You were removed from the group ${o.name}.`,o.iconURL))}var tv,ov,nv,U4,$4,G4,W4=f(()=>{"use strict";a();Pe();S();Sf();Z0();ev();U4=e=>tv=e,$4=e=>ov=e,G4=e=>nv=e});var wf,q4=f(()=>{"use strict";a();M();T();W4();Sf();ev();wf=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:$o,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:xf,GUILD_DELETE:H4,CHANNEL_CREATE:Tf,CHANNEL_DELETE:j4,RELATIONSHIP_ADD:bc,RELATIONSHIP_UPDATE:bc,RELATIONSHIP_REMOVE(e){z4(e),bc()},CONNECTION_OPEN:Q0},async start(){setTimeout(()=>{Q0()},5e3)},removeFriend:U4,removeGroup:G4,removeGuild:$4})});function v7(e,t){open(t+encodeURIComponent(e.trim()),"_blank")}function b7(e){let t={};return Sc.store.customEngineName&&Sc.store.customEngineURL&&(t[Sc.store.customEngineName]=Sc.store.customEngineURL),t={...t,...y7},n(E.MenuItem,{label:"Search Text",key:"search-text",id:"vc-search-text"},Object.keys(t).map(o=>{let r="vc-search-content-"+o;return n(E.MenuItem,{key:r,id:r,label:n(Ts,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:"50%"},"aria-hidden":"true",height:16,width:16,src:`https://www.google.com/s2/favicons?domain=${t[o]}&sz=64`}),o),action:()=>v7(e,t[o])})}))}var y7,Sc,S7,Mf,K4=f(()=>{"use strict";a();No();_();M();T();S();y7={Google:"https://www.google.com/search?q=",DuckDuckGo:"https://duckduckgo.com/?q=",Brave:"https://search.brave.com/search?q=",Bing:"https://www.bing.com/search?q=",Yahoo:"https://search.yahoo.com/search?p=",Yandex:"https://yandex.com/search/?text=",GitHub:"https://github.com/search?q=",Reddit:"https://www.reddit.com/search?q=",Wikipedia:"https://wikipedia.org/w/index.php?search="},Sc=P({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="}});S7=(e,t)=>{let o=document.getSelection()?.toString();if(!o)return;let r=dt("search-google",e);if(r){let i=r.findIndex(s=>s?.props?.id==="search-google");i!==-1&&(r[i]=b7(o))}},Mf=y({name:"ReplaceGoogleSearch",description:"Replaces the Google search with different Engines",authors:[p.Moxxie,p.Ethan],settings:Sc,contextMenus:{message:S7}})});var Y4=f(()=>{});function Z4(e){return n("i",{className:x7.separator,"aria-hidden":!0,...e})}function T7({referencedMessage:e,baseMessage:t}){if(e.state!==0)return null;let o=e.message.timestamp,r=t.timestamp;return n(lo,{className:"vc-reply-timestamp",compact:Wr.isSameDay(o,r),timestamp:o,isInline:!1},n(Z4,null,"["),Wr.isSameDay(o,r)?Wr.dateFormat(o,"LT"):Wr.calendarFormat(o),n(Z4,null,"]"))}var x7,Pf,J4=f(()=>{"use strict";a();Y4();ne();M();T();$();S();x7=R("separator","latin24CompactTimeStamp");Pf=y({name:"ReplyTimestamp",description:"Shows a timestamp on replied-message previews",authors:[p.Kyuuhachi],patches:[{find:"#{intl::REPLY_QUOTE_MESSAGE_BLOCKED}",replacement:{match:/\.onClickReply,.+?}\),(?=\i,\i,\i\])/,replace:"$&$self.ReplyTimestamp(arguments[0]),"}}],ReplyTimestamp:k.wrap(T7,{noop:!0})})});var w7,M7,If,Q4=f(()=>{"use strict";a();M();T();$();w7=R("spoilerContent"),M7=R("messagesWrapper","navigationDescription"),If=y({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[p.whqwert],patches:[{find:".removeObscurity,",replacement:{match:/(?<="removeObscurity",(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:o,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=w7,{messagesWrapper:l}=M7,c=o?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function X4(e,t){open(t+encodeURIComponent(e),"_blank")}function V4(e){return n(E.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Cf).map((t,o)=>{let r="search-image-"+t;return n(E.MenuItem,{key:r,id:r,label:n(ge,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:o>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Cf[t]).toString().replace("lens.","")}),t),action:()=>X4(e,Cf[t])})}),n(E.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(ge,{style:{alignItems:"center",gap:"0.5em"}},n(ur,{height:16,width:16}),"All"),action:()=>Object.values(Cf).forEach(t=>X4(e,t))}))}var Cf,P7,I7,kf,eC=f(()=>{"use strict";a();No();jt();At();M();T();S();Cf={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};P7=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;dt("copy-link",e)?.push(V4(o))},I7=(e,t)=>{if(!t?.src)return;(dt("copy-native-link",e)??e).push(V4(t.src))},kf=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[p.Ven,p.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:P7,"image-context":I7}})});var tC=f(()=>{});async function rv(){_t=await nC()??{}}async function nC(){return(await It.get(oC))?.[D.getCurrentUser()?.id]}async function Dr(){return(await nC())?.token}async function xc(e){return It.update(oC,t=>(t??={},_t=t[D.getCurrentUser().id]??={},e.token&&(_t.token=e.token),e.user&&(_t.user=e.user),t))}function pa(e){he(t=>n(Pi,{...t,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async o=>{try{let r=new URL(o.location);r.searchParams.append("clientMod","vencord");let i=await fetch(r,{headers:{Accept:"application/json"}});if(!i.ok){let{message:l}=await i.json();Je(l||"An error occured while authorizing",ee.Type.FAILURE);return}let{token:s}=await i.json();xc({token:s}),Je("Successfully logged in!",ee.Type.SUCCESS),e?.()}catch(r){new V("ReviewDB").error("Failed to authorize",r)}}}))}var oC,_t,Lr=f(()=>{"use strict";a();Mr();Ae();Ke();S();oC="rdb-auth",_t={}});var da=f(()=>{"use strict";a()});function rC(e,t){let o=D.getCurrentUser().id;return o===e||t.sender.discordID===o||_t.user?.type===1}function iC(e,t){let o=D.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function sC(e){return e.sender.discordID!==D.getCurrentUser().id}function vo(e,t=ee.Type.MESSAGE){ee.show({id:ee.genId(),message:e,type:t,options:{position:ee.Position.BOTTOM}})}var Rt,Er=f(()=>{"use strict";a();He();S();Lr();da();Rt=ue("vc-rdb-")});function C7(e){return n(oe,{text:"Unblock user"},t=>n("div",{...t,role:"button",onClick:e.onClick,className:Rt("block-modal-unblock")},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"var(--status-danger)"},n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}function k7({user:e,isBusy:t,setIsBusy:o}){let[r,i]=K(!1);return r?null:n("div",{className:Rt("block-modal-row")},n("img",{className:Rt("block-modal-avatar"),src:e.profilePhoto,alt:""}),n(b.FormText,{className:Rt("block-modal-username")},e.username),n(C7,{onClick:t?void 0:async()=>{o(!0);try{await Af(e.discordID),i(!0)}finally{o(!1)}}}))}function N7(){let[e,t]=K(!1),[o,r,i]=St(aC,{onError:s=>new V("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:r?n(b.FormText,null,"Failed to fetch blocks: $",String(r)):o.length?n(m,null,o.map(s=>n(k7,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):n(b.FormText,null,"No blocked users.")}function Nf(){he(e=>n(ve,{...e},n(Ne,{className:Rt("block-modal-header")},n(b.FormTitle,{style:{margin:0}},"Blocked Users"),n(pt,{onClick:e.onClose})),n(we,{className:Rt("block-modal")},_t.token?n(N7,null):n(b.FormText,null,"You are not logged into ReviewDB!"))))}var iv=f(()=>{"use strict";a();Ae();Ke();wt();S();Lr();ma();Er()});var Or,Tc=f(()=>{"use strict";a();_();T();S();Lr();iv();Er();Or=P({authorize:{type:6,component:()=>n(I,{onClick:()=>pa()},"Authorize with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0},showWarning:{type:3,description:"Display warning to be respectful at the top of the reviews list",default:!0},hideTimestamps:{type:3,description:"Hide timestamps on reviews",default:!1},hideBlockedUsers:{type:3,description:"Hide reviews from blocked users",default:!0},buttons:{type:6,component:()=>n("div",{className:Rt("button-grid")},n(I,{onClick:Nf},"Manage Blocked Users"),n(I,{color:I.Colors.GREEN,onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),n(I,{onClick:async()=>{let e="https://reviewdb.mantikafasi.dev",t=await Dr();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),n(I,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server"))}}).withPrivateSettings()});async function ms(e,t={}){return fetch(lC+e,{...t,headers:{...t.headers,Authorization:await Dr()||""}})}async function cC(e,t=0){let o=0;Or.store.showWarning||(o|=A7);let r=new URLSearchParams({flags:String(o),offset:String(t)}),i=await fetch(`${lC}/users/${e}/reviews?${r}`),s=i.ok?await i.json():{message:i.status===429?"You are sending requests too fast. Wait a few seconds and try again.":"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return i.ok?s:(vo(s.message,ee.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 uC(e){return await Dr()?await ms(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let r=await o.json();return vo(r.message),o.ok?r:null}):(vo("Please authorize to add a review."),pa(),null)}async function pC(e){return await ms(`/users/${e}/reviews`,{method:"DELETE",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(async t=>{let o=await t.json();return vo(o.message),t.ok?o:null})}async function dC(e){let t=await ms("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());vo(t.message)}async function mC(e,t){if(!(await ms("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)vo(`Failed to ${e} user`,ee.Type.FAILURE);else if(vo(`Successfully ${e}ed user`,ee.Type.SUCCESS),_t?.user?.blockedUsers){let r=e==="block"?[..._t.user.blockedUsers,t]:_t.user.blockedUsers.filter(i=>i!==t);xc({user:{..._t.user,blockedUsers:r}})}}async function aC(){let e=await ms("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function gC(e){return ms("/users",{method:"POST"}).then(t=>t.json())}async function hC(e){return ms(`/notifications?id=${e}`,{method:"PATCH"})}var lC,Rf,A7,fC,Af,ma=f(()=>{"use strict";a();S();Lr();da();Tc();Er();lC="https://manti.vendicated.dev/api/reviewdb",Rf=50,A7=2;fC=e=>mC("block",e),Af=e=>mC("unblock",e)});function yC({onClick:e}){return n(oe,{text:"Delete Review"},t=>n("div",{...t,className:z(Df.button,Df.dangerous),onClick:e,role:"button"},n(Gi,{width:"20",height:"20"})))}function vC({onClick:e}){return n(oe,{text:"Report Review"},t=>n("div",{...t,className:Df.button,onClick:e,role:"button"},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"}))))}function bC({onClick:e,isBlocked:t}){return n(oe,{text:`${t?"Unblock":"Block"} user`},o=>n("div",{...o,className:Df.button,onClick:e,role:"button"},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"currentColor"},t?n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"}):n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}var Df,SC=f(()=>{"use strict";a();At();me();$();S();Df=R("button","wrapper","disabled","separator")});function Lf(e){let t=e.redirectURL?Ga:o=>n("span",{...o,role:"button"},o.children);return n(oe,{text:e.name},({onMouseEnter:o,onMouseLeave:r})=>n(t,{className:Rt("blocked-badge"),href:e.redirectURL,onClick:e.onClick},n("img",{className:Rt("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:r,src:e.icon,alt:e.description})))}var xC=f(()=>{"use strict";a();S();Er()});var Ef,av=f(()=>{"use strict";a();Pe();me();wt();$();S();Lr();da();ma();Tc();Er();iv();SC();xC();Ef=gt(()=>{let e=B.byProps,[{cozyMessage:t,buttons:o,message:r,buttonsInner:i,groupStart:s},{container:l,isHeader:c},{avatar:u,clickable:d,username:g,wrapper:h,cozy:v},C,w]=zr(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTagRegular")),x=new Intl.DateTimeFormat;return function({review:A,refetch:L,profileId:U}){let[H,X]=K(!1);function re(){Zo(A.sender.discordID)}function te(){rt.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await Dr())pC(A.id).then(fe=>{fe&&L()});else return vo("You must be logged in to delete reviews.")}})}function Y(){rt.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await Dr())dC(A.id);else return vo("You must be logged in to report reviews.")}})}let Z=_t?.user?.blockedUsers?.includes(A.sender.discordID)??!1;function ae(){if(Z)return Af(A.sender.discordID);rt.show({title:"Are you sure?",body:"Do you really you want to block this user? They will be unable to leave further reviews on your profile. You can unblock users in the plugin settings.",confirmText:"Block",cancelText:"Nevermind",onConfirm:async()=>{if(await Dr())fC(A.sender.discordID);else return vo("You must be logged in to block users.")}})}return n("div",{className:z(Rt("review"),t,h,r,s,v),style:{marginLeft:"0px",paddingLeft:"52px"}},n("img",{className:z(u,d),onClick:re,src:A.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px",zIndex:0}}),n("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},n("span",{className:z(d,g),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>re()},A.sender.username),A.type===3&&n("span",{className:z(w.botTagVerified,w.botTagRegular,w.px,w.rem),style:{marginLeft:"4px"}},n("span",{className:w.botText},"System"))),Z&&n(Lf,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>Nf()}),A.sender.badges.map((fe,xe)=>n(Lf,{key:xe,...fe})),!Or.store.hideTimestamps&&A.type!==3&&n(lo,{timestamp:new Date(A.timestamp*1e3)},x.format(A.timestamp*1e3)),n("div",{className:Rt("review-comment")},A.comment.length>200&&!H?n(m,null,Ee.parseGuildEventDescription(A.comment.substring(0,200)),"...",n("br",null),n("a",{onClick:()=>X(!0)},"Read more"),"]"):Ee.parseGuildEventDescription(A.comment)),A.id!==0&&n("div",{className:z(l,c,o),style:{padding:"0px"}},n("div",{className:z(C.wrapper,i)},sC(A)&&n(vC,{onClick:Y}),iC(U,A)&&n(bC,{isBlocked:Z,onClick:ae}),rC(U,A)&&n(yC,{onClick:te}))))}})});function lv({discordId:e,name:t,onFetchReviews:o,refetchSignal:r,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:c=!1,type:u}){let[d,g]=rr(!0),[h]=St(()=>cC(e,(s-1)*Rf),{fallbackValue:null,deps:[r,d,s],onSuccess:v=>{Or.store.hideBlockedUsers&&(v.reviews=v.reviews?.filter(C=>!Fe.isBlocked(C.sender.discordID))),i?.(),o(v)}});return h?n(m,null,n(O7,{refetch:g,reviews:h.reviews,hideOwnReview:c,profileId:e,type:u}),l&&n(cv,{name:t,discordId:e,refetch:g,isAuthor:h.reviews?.some(v=>v.sender.discordID===D.getCurrentUser().id)})):null}function O7({refetch:e,reviews:t,hideOwnReview:o,profileId:r,type:i}){let s=D.getCurrentUser().id;return n("div",{className:Rt("view")},t?.map(l=>(l.sender.discordID!==s||!o)&&n(Ef,{key:l.id,review:l,refetch:e,profileId:r})),t?.length===0&&n(b.FormText,{className:Rt("placeholder")},"Looks like nobody reviewed this ",i===0?"user":"server"," yet. You could be the first!"))}function cv({discordId:e,isAuthor:t,refetch:o,name:r,modalKey:i}){let{token:s}=_t,l=Mt(null),c=D7.FORM;c.disableAutoFocus=!0;let u=E7({id:"0",type:1});return n(m,null,n("div",{onClick:()=>{s||(vo("Opening authorization window..."),pa())}},n(L7,{className:Rt("input"),channel:u,placeholder:s?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",type:c,disableThemedBackground:!0,setEditorRef:d=>l.current=d,parentModalKey:i,textValue:"",onSubmit:async d=>{if(await uC({userid:e,comment:d.value})){o();let h=l.current.ref.current.getSlateEditor();R7.delete(h,{at:{anchor:TC.start(h,[]),focus:TC.end(h,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}var R7,TC,D7,L7,E7,wC=f(()=>{"use strict";a();wt();$();S();Lr();da();ma();Tc();Er();av();R7=R("insertNodes","textToText"),TC=R("start","end","toSlateRange"),D7=R("FORM"),L7=se("disableThemedBackground","CHANNEL_TEXT_AREA"),E7=Ce(".GUILD_TEXT])","fromServer)")});function _7({modalProps:e,modalKey:t,discordId:o,name:r,type:i}){let[s,l]=K(),[c,u]=rr(!0),[d,g]=K(1),h=Mt(null),v=s?.reviewCount,C=s?.reviews.find(w=>w.sender.discordID===_t.user?.discordID);return n(k,null,n(ve,{...e,size:"medium"},n(Ne,null,n(Q,{variant:"heading-lg/semibold",className:Rt("modal-header")},r,"'s Reviews",!!v&&n("span",null," (",v," Reviews)")),n(pt,{onClick:e.onClose})),n(we,{scrollerRef:h},n("div",{className:Rt("modal-reviews")},n(lv,{discordId:o,name:r,page:d,refetchSignal:c,onFetchReviews:l,scrollToTop:()=>h.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0,type:i}))),n(ut,{className:Rt("modal-footer")},n("div",{className:Rt("modal-footer-wrapper")},C&&n(Ef,{refetch:u,review:C,profileId:o}),n(cv,{isAuthor:C!=null,discordId:o,name:r,refetch:u,modalKey:t}),!!v&&n(rh,{currentPage:d,maxVisiblePages:5,pageSize:Rf,totalCount:v,onPageChange:g})))))}function Of(e,t,o){let r="vc-rdb-modal-"+Date.now();he(i=>n(_7,{modalKey:r,modalProps:i,discordId:e,name:t,type:o}),{modalKey:r})}var MC=f(()=>{"use strict";a();ne();Ke();wt();S();Lr();ma();Er();av();wC()});var fs,PC,uv,_f,IC=f(()=>{"use strict";a();tC();ne();At();M();me();T();$();S();Lr();MC();da();ma();Tc();Er();fs=R("button","buttonInner","icon","banner"),PC=(e,{guild:t})=>{t&&e.push(n(E.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:ur,action:()=>Of(t.id,t.name,1)}))},uv=(e,{user:t})=>{t&&e.push(n(E.MenuItem,{label:"View Reviews",id:"vc-rdb-user-reviews",icon:ur,action:()=>Of(t.id,t.username,0)}))},_f=y({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[p.mantikafasi,p.Ven],settings:Or,contextMenus:{"guild-header-popout":PC,"guild-context":PC,"user-context":uv,"user-profile-actions":uv,"user-profile-overflow-menu":uv},patches:[{find:".BITE_SIZE,user:",replacement:{match:/{profileType:\i\.\i\.BITE_SIZE,children:\[/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}},{find:".FULL_SIZE,user:",replacement:{match:/{profileType:\i\.\i\.FULL_SIZE,children:\[/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}},{find:'location:"UserProfilePanel"',replacement:{match:/{profileType:\i\.\i\.PANEL,children:\[/,replace:"$&$self.BiteSizeReviewsButton({user:arguments[0].user}),"}}],flux:{CONNECTION_OPEN:rv},async start(){let e=Or.store,{lastReviewId:t,notifyReviews:o}=e;await rv(),setTimeout(async()=>{if(!_t.token)return;let r=await gC(_t.token);if(xc({user:r}),o&&t&&t<r.lastReviewID&&(e.lastReviewId=r.lastReviewID,r.lastReviewID!==0&&vo("You have new reviews on your profile!")),r.notification){let i=r.notification.type===1?{cancelText:"Appeal",confirmText:"Ok",onCancel:async()=>VencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:_t.token,page:"dashboard/appeal"}))}:{};rt.show({title:r.notification.title,body:Ee.parse(r.notification.content,!1),...i}),hC(r.notification.id)}},4e3)},BiteSizeReviewsButton:k.wrap(({user:e})=>n(Vn,{text:"View Reviews"},n(I,{onClick:()=>Of(e.id,e.username,0),look:I.Looks.FILLED,size:I.Sizes.NONE,color:fs.bannerColor,className:z(fs.button,fs.icon,fs.banner),innerClassName:z(fs.buttonInner,fs.icon,fs.banner)},n(_h,{height:16,width:16}))),{noop:!0})})});var B7,Wn,Bf,CC=f(()=>{"use strict";a();_();ne();vr();M();Ae();T();$();S();B7=Ce('"Result cannot be null because the message is not null"'),Wn=P({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:Vt(0,100,10),default:30}}),Bf=y({name:"RoleColorEverywhere",authors:[p.KingFish,p.lewisakura,p.AutumnVN,p.Kyuuhachi,p.jamesbt365],description:"Adds the top role color anywhere possible",settings:Wn,patches:[{find:".USER_MENTION)",replacement:[{match:/onContextMenu:\i,color:\i,\.\.\.\i(?=,children:)(?<=user:(\i),channel:(\i).{0,500}?)/,replace:"$&,color:$self.getColorInt($1?.id,$2?.id)",noWarn:!0},{match:/(?<=onContextMenu:\i,color:)\i(?=\},\i\),\{children)(?<=user:(\i),channel:(\i).{0,500}?)/,replace:"$self.getColorInt($1?.id,$2?.id)"}],predicate:()=>Wn.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:\i,channelId:(\i)[^}]*\}.*?\.\i,{(?=children)/,replace:"$&color:$self.getColorInt($1,$2),"}],predicate:()=>Wn.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/null,\i," — ",\i\]/,replace:"null,$self.RoleGroupColor(arguments[0])]"}],predicate:()=>Wn.store.memberList},{find:"#{intl::THREAD_BROWSER_PRIVATE}",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.RoleGroupColor(arguments[0])]"}],predicate:()=>Wn.store.memberList},{find:".usernameSpeaking]:",replacement:[{match:/\.usernameSpeaking\]:.+?,(?=children)(?<=guildId:(\i),.+?user:(\i).+?)/,replace:"$&style:$self.getColorStyle($2.id,$1),"}],predicate:()=>Wn.store.voiceUsers},{find:".reactorDefault",replacement:{match:/,onContextMenu:\i=>.{0,15}\((\i),(\i),(\i)\).{0,250}tag:"strong"/,replace:"$&,style:$self.getColorStyle($2?.id,$1?.channel?.id)"},predicate:()=>Wn.store.reactorsList},{find:",reactionVoteCounts",replacement:{match:/\.nickname,(?=children:)/,replace:"$&style:$self.getColorStyle(arguments[0]?.user?.id,arguments[0]?.channel?.id),"},predicate:()=>Wn.store.pollResults},{find:"#{intl::MESSAGE_EDITED}",replacement:{match:/(?<=isUnsupported\]:(\i)\.isUnsupported\}\),)(?=children:\[)/,replace:"style:$self.useMessageColorsStyle($1),"},predicate:()=>Wn.store.colorChatMessages}],getColorString(e,t){try{let o=ie.getChannel(t)?.guild_id??ce.getGuild(t)?.id;return o==null?null:Re.getMember(o,e)?.colorString??null}catch(o){new V("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}=Wn.use(["messageSaturation"]),o=B7(e);if(o.colorString!=null&&t!==0){let r=`color-mix(in oklab, ${o.colorString} ${t}%, var({DEFAULT}))`;return{color:r.replace("{DEFAULT}","--text-normal"),"--header-primary":r.replace("{DEFAULT}","--header-primary"),"--text-muted":r.replace("{DEFAULT}","--text-muted")}}}catch(t){new V("RoleColorEverywhere").error("Failed to get message color",t)}return null},RoleGroupColor:k.wrap(({id:e,count:t,title:o,guildId:r,label:i})=>{let s=ce.getRole(r,e);return n("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},{noop:!0})})});var kC,Ff,NC=f(()=>{"use strict";a();_();M();T();kC=P({onlySnow:{type:3,description:"Only play the Snow Halation Theme",default:!1,restartNeeded:!0}}),Ff=y({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[p.AndrewDLO,p.FieryFlames,p.RamziAH],settings:kC,patches:[{find:'"call_ringing_beat"',replacement:[{match:/500!==\i\(\)\.random\(1,1e3\)/,replace:"false"},{predicate:()=>kC.store.onlySnow,match:/"call_ringing_beat",/,replace:""}]}]})});var F7,U7,AC,Uf,RC=f(()=>{"use strict";a();Mr();_();M();T();$();S();F7=R("allSummaries","findSummary"),U7=Ce(".people)),startId:",".type}"),AC=P({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}}),Uf=y({name:"Summaries",description:"Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",authors:[p.mantikafasi],settings:AC,patches:[{find:"SUMMARIZEABLE.has",replacement:{match:/\i\.hasFeature\(\i\.\i\.SUMMARIES_ENABLED\w+?\)/g,replace:"true"}},{find:"RECEIVE_CHANNEL_SUMMARY(",replacement:{match:/shouldFetch\((\i),\i\){/,replace:"$& if(!$self.shouldFetch($1)) return false;"}}],flux:{CONVERSATION_SUMMARY_UPDATE(e){let t=e.summaries.map(o=>({...U7(o),time:Date.now()}));It.update("summaries-data",o=>(o??={},o[e.channel_id]?o[e.channel_id].unshift(...t):o[e.channel_id]=t,o[e.channel_id].length>50&&(o[e.channel_id]=o[e.channel_id].slice(0,50)),o))}},async start(){await It.update("summaries-data",e=>{e??={};for(let t of Object.keys(e)){for(let o=e[t].length-1;o>=0;o--)e[t][o].time<Date.now()-1e3*60*60*24*AC.store.summaryExpiryThresholdDays&&e[t].splice(o,1);e[t].length===0&&delete e[t]}return Object.assign(F7.allSummaries(),e),e})},shouldFetch(e){let t=ie.getChannel(e);return ce.getGuild(t.guild_id).hasFeature("SUMMARIES_ENABLED_GA")}})});var DC=f(()=>{});function EC(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>`)}function G7({rootProps:e,close:t}){let[o,r]=K(),[i,s]=K(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(g,h)=>`<t:${g}${h&&`:${h}`}>`,[u,d]=$e(()=>{let g=c(l,i);return[g,Ee.parse(g)]},[l,i]);return n(ve,{...e},n(Ne,{className:mi("modal-header")},n(b.FormTitle,{tag:"h2",className:mi("modal-title")},"Timestamp Picker"),n(pt,{onClick:t,className:mi("modal-close-button")})),n(we,{className:mi("modal-content")},n("input",{className:mi("date-picker"),type:"datetime-local",value:o,onChange:g=>r(g.currentTarget.value),style:{colorScheme:Ds()===2?"light":"dark"}}),n(b.FormTitle,null,"Timestamp Format"),n("div",{className:mi("format-select")},n(nn,{options:$7.map(g=>({label:g,value:g})),isSelected:g=>g===i,select:g=>s(g),serialize:g=>g,renderOptionLabel:g=>n("div",{className:mi("format-label")},Ee.parse(c(l,g.value))),renderOptionValue:()=>d})),n(b.FormTitle,{className:F.bottom8},"Preview"),n(b.FormText,{className:mi("preview-text")},d," (",u,")")),n(ut,null,n(I,{onClick:()=>{lr(u+" "),t()}},"Insert")))}var LC,$7,mi,z7,$f,OC=f(()=>{"use strict";a();DC();xr();_();He();M();Pe();ze();Ke();T();S();LC=P({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});$7=["","t","T","d","D","f","F","R"],mi=ue("vc-st-");z7=({isMainChat:e})=>e?n(Vo,{tooltip:"Insert Timestamp",onClick:()=>{let t=he(o=>n(G7,{rootProps:o,close:()=>sr(t)}))},buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":"true",role:"img",width:"20",height:"20",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("g",{fill:"none",fillRule:"evenodd"},n("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),n("rect",{width:"24",height:"24"})))):null,$f=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[p.Ven,p.Tyler,p.Grzesiek11],settings:LC,renderChatBarButton:z7,onBeforeMessageSend(e,t){LC.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,EC))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(m,null,n(b.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(b.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(b.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",Ee.parse(EC(t)))))))}})});var _C=f(()=>{});function UC(e){he(t=>n(ve,{...t,size:"medium"},n(j7,{guild:e})))}function FC(e){return n(lo,{timestamp:new Date(e)})}function j7({guild:e}){let[t,o]=K(),[r,i]=K(),[s,l]=K();le(()=>{wc.friends=!1,wc.blocked=!1,wc.ignored=!1},[]);let[c,u]=K(0),d=e.banner&&Ft.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),g=e.icon&&Ft.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:po("root")},d&&c===0&&n("img",{className:po("banner"),src:d,alt:"",onClick:()=>Yo({url:d,width:1024})}),n("div",{className:po("header")},g?n("img",{className:po("icon"),src:g,alt:"",onClick:()=>Yo({url:g,height:512,width:512})}):n("div",{"aria-hidden":!0,className:z(BC.childWrapper,BC.acronym)},e.acronym),n("div",{className:po("name-and-description")},n(b.FormTitle,{tag:"h5",className:po("name")},e.name),e.description&&n(b.FormText,null,e.description))),n(xo,{type:"top",look:"brand",className:po("tab-bar"),selectedItem:c,onItemSelect:u},n(xo.Item,{className:po("tab",{selected:c===0}),id:0},"Server Info"),n(xo.Item,{className:po("tab",{selected:c===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n(xo.Item,{className:po("tab",{selected:c===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:""),n(xo.Item,{className:po("tab",{selected:c===3}),id:3},"Ignored Users",s!==void 0?` (${s})`:"")),n("div",{className:po("tab-content")},c===0&&n(q7,{guild:e}),c===1&&n(K7,{guild:e,setCount:o}),c===2&&n(Y7,{guild:e,setCount:i}),c===3&&n(Z7,{guild:e,setCount:l})))}function W7(e,t){let o=Re.getMember(e,t.id)?.avatar,r=o?Ft.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):Ft.getUserAvatarURL(t,!0);return n("div",{className:po("owner")},n("img",{className:po("owner-avatar"),src:r,alt:"",onClick:()=>Yo({url:r,height:512,width:512})}),Ee.parse(`<@${t.id}>`))}function q7({guild:e}){let[t]=St(()=>go.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?W7(e.id,t):"Loading...","Created At":FC(To.extractTimestamp(e.id)),"Joined At":e.joinedAt?FC(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?n("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:tr.getChannels(e.id)?.count-1||"?",Roles:Object.keys(ce.getRoles(e.id)).length-1};return n("div",{className:po("info")},Object.entries(o).map(([r,i])=>n("div",{className:po("server-info-pair"),key:r},n(b.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function K7({guild:e,setCount:t}){return pv("friends",e,Fe.getFriendIDs(),t)}function Y7({guild:e,setCount:t}){let o=Object.keys(Fe.getRelationships()).filter(r=>Fe.isBlocked(r));return pv("blocked",e,o,t)}function Z7({guild:e,setCount:t}){let o=Object.keys(Fe.getRelationships()).filter(r=>Fe.isIgnored(r));return pv("ignored",e,o,t)}function pv(e,t,o,r){let i=[],s=[];for(let l of o)Re.isMember(t.id,l)?s.push(l):i.push(l);return Se([Re],()=>Re.getMemberIds(t.id),null,(l,c)=>l.length===c.length),le(()=>{!wc[e]&&i.length&&(wc[e]=!0,G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),le(()=>r(s.length),[s.length]),n(Hr,{fade:!0,className:po("scroller")},s.map(l=>n(H7,{key:l,user:D.getUser(l),status:cn.getStatus(l)||"offline",onSelect:()=>Zo(l),onContextMenu:()=>{}})))}var BC,H7,po,wc,$C=f(()=>{"use strict";a();_C();He();Pe();me();Ke();wt();$();S();BC=R("icon","acronym","childWrapper"),H7=se(".listName,discriminatorClass"),po=ue("vc-gp-");wc={friends:!1,blocked:!1,ignored:!1}});var GC,Gf,zC=f(()=>{"use strict";a();No();M();T();S();$C();GC=(e,{guild:t})=>{dt("privacy",e)?.push(n(E.MenuItem,{id:"vc-server-info",label:"Server Info",action:()=>UC(t)}))},Gf=y({name:"ServerInfo",description:"Allows you to view info about a server",authors:[p.Ven,p.Nuckyz],dependencies:["DynamicImageModalAPI"],tags:["guild","info","ServerProfile"],contextMenus:{"guild-context":GC,"guild-header-popout":GC}})});function J7(){let e=Se([Fe,cn],()=>{let t=0,o=Fe.getFriendIDs();for(let r of o)(cn.getStatus(r)??"offline")!=="offline"&&t++;return t});return n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},e," online")}function Q7(){let e=Se([ce,HC],()=>{let t=HC.computeGuildIds(),o=ce.getGuilds();return ce.getGuildCount()+t.filter(r=>o[r]==null).length});return n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},e," servers")}var HC,zf,jC=f(()=>{"use strict";a();vf();_();ne();M();T();$();S();HC=be("UserGuildJoinRequestStore");zf=y({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[p.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}=j.plugins.ServerListIndicators;return n(k,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(J7,null),!!(e&1)&&n(Q7,null)))},start(){yc(0,this.renderIndicator)},stop(){vc(0,this.renderIndicator)}})});var WC=f(()=>{});var qC,KC=f(()=>{a();qC=`/* eslint-disable simple-header/header */
|
|
import React from "react";
|
|
|
|
const handleClick = async () =>
|
|
console.log((await import("@webpack/common")).Clipboard.copy("\\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>
|
|
</>;`});var ZC=vi((Kbe,dv)=>{"use strict";a();var X7=Object.prototype.hasOwnProperty,Ro="~";function Mc(){}Object.create&&(Mc.prototype=Object.create(null),new Mc().__proto__||(Ro=!1));function V7(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function YC(e,t,o,r,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new V7(o,r||e,i),l=Ro?Ro+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 Hf(e,t){--e._eventsCount===0?e._events=new Mc:delete e._events[t]}function bo(){this._events=new Mc,this._eventsCount=0}bo.prototype.eventNames=function(){var t=[],o,r;if(this._eventsCount===0)return t;for(r in o=this._events)X7.call(o,r)&&t.push(Ro?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};bo.prototype.listeners=function(t){var o=Ro?Ro+t:t,r=this._events[o];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i<s;i++)l[i]=r[i].fn;return l};bo.prototype.listenerCount=function(t){var o=Ro?Ro+t:t,r=this._events[o];return r?r.fn?1:r.length:0};bo.prototype.emit=function(t,o,r,i,s,l){var c=Ro?Ro+t:t;if(!this._events[c])return!1;var u=this._events[c],d=arguments.length,g,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,o),!0;case 3:return u.fn.call(u.context,o,r),!0;case 4:return u.fn.call(u.context,o,r,i),!0;case 5:return u.fn.call(u.context,o,r,i,s),!0;case 6:return u.fn.call(u.context,o,r,i,s,l),!0}for(h=1,g=new Array(d-1);h<d;h++)g[h-1]=arguments[h];u.fn.apply(u.context,g)}else{var v=u.length,C;for(h=0;h<v;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),d){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,o);break;case 3:u[h].fn.call(u[h].context,o,r);break;case 4:u[h].fn.call(u[h].context,o,r,i);break;default:if(!g)for(C=1,g=new Array(d-1);C<d;C++)g[C-1]=arguments[C];u[h].fn.apply(u[h].context,g)}}return!0};bo.prototype.on=function(t,o,r){return YC(this,t,o,r,!1)};bo.prototype.once=function(t,o,r){return YC(this,t,o,r,!0)};bo.prototype.removeListener=function(t,o,r,i){var s=Ro?Ro+t:t;if(!this._events[s])return this;if(!o)return Hf(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!r||l.context===r)&&Hf(this,s);else{for(var c=0,u=[],d=l.length;c<d;c++)(l[c].fn!==o||i&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:Hf(this,s)}return this};bo.prototype.removeAllListeners=function(t){var o;return t?(o=Ro?Ro+t:t,this._events[o]&&Hf(this,o)):(this._events=new Mc,this._eventsCount=0),this};bo.prototype.off=bo.prototype.removeListener;bo.prototype.addListener=bo.prototype.on;bo.prefixed=Ro;bo.EventEmitter=bo;typeof dv<"u"&&(dv.exports=bo)});var hv=vi(fa=>{"use strict";a();Object.defineProperty(fa,"__esModule",{value:!0});fa.Channel=fa.ChannelPort=void 0;var eE=ZC(),jf="vapIpc",mv=Symbol.for("vapIpc.edgeCreate"),fv=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,o,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(o);l&&l(...r)}}createPipe(t){let o=this.getPipe(t);if(o)return o;let r=this._createListenerMap();this._listeners.set(t,r);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void r.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};fa.ChannelPort=fv;var gv=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new eE.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${jf}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${jf}:message`,o=>{this._handleMessage(t,o)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,o){if(this.id===o.id)return;this._logger?.log(`\u{1F91D} "${o.id}" -> "${this.id}" (edges: [${o.channelIds.join(", ")}])`);let r=this._edges.get(o.id);if(r){let i=o.channelIds.filter(s=>!r?.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:[...r.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(mv,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 r=this._callbacks.get(o.nonce);if(r)return void r(o.data);let i=this._callers.get(o.name);if(i){i(o.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:o.name,source:this.id,destination:o.source,data:s,nonce:o.nonce})});return}}_emitHandshake(t){let o=this.getEdge();t.emit(`${jf}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${jf}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(o=>o.channelIds).flat()].filter((o,r,i)=>i.indexOf(o)===r);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(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(mv,i),r(s.id))};this._emitter.on(mv,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,o={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},o.timeout);this._callbacks.set(r,u=>{this._callbacks.delete(r),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:r}),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(...r)=>await o(...r))}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}};fa.Channel=gv});var bv=vi(ga=>{"use strict";a();Object.defineProperty(ga,"__esModule",{value:!0});ga.RemoteClient=ga.RemoteHost=void 0;var yv=class{channel;constructor(t,o){this.channel=t;for(let[r,i]of Object.entries(o))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};ga.RemoteHost=yv;var vv=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})}};ga.RemoteClient=vv});var XC=vi(ha=>{"use strict";a();Object.defineProperty(ha,"__esModule",{value:!0});ha.WorkerClient=ha.createWorkerHost=void 0;var JC=hv(),QC=bv(),tE=(e,t)=>{let o=new JC.Channel(e);return o.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new QC.RemoteHost(o,t)};ha.createWorkerHost=tE;var Sv=class extends QC.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,r,i={}){let s=new JC.Channel(t);if(super(o,s),this.workerOpts=i,r instanceof Blob){let l=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(l)}else this.url=r}async init(){let t=this.worker=new Worker(this.url,this.workerOpts);this.channel.addPipe({emit:(o,r)=>t.postMessage({event:o,data:r}),listen:(o,r)=>{let i=s=>{let{event:l,data:c}=s.data;l===o&&r(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)}};ha.WorkerClient=Sv});var VC=vi(_r=>{"use strict";a();var oE=_r&&_r.__createBinding||(Object.create?function(e,t,o,r){r===void 0&&(r=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,r,i)}:function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]}),xv=_r&&_r.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&oE(t,e,o)};Object.defineProperty(_r,"__esModule",{value:!0});xv(hv(),_r);xv(bv(),_r);xv(XC(),_r)});function wv(e){Wf.id!==e.id&&(Object.assign(Wf,e),Tv.forEach(t=>t(e)))}var Wf,Tv,e5,Mv=f(()=>{"use strict";a();S();Wf={id:null,theme:null},Tv=new Set,e5=()=>{let[,e]=W.useState(Wf);return W.useEffect(()=>(Tv.add(e),()=>void Tv.delete(e)),[]),Wf}});function gs(e){if(Object.prototype.hasOwnProperty.call(ya,e))return ya[e];let t=Object.values(ya).find(o=>o.aliases?.includes(e));return t?(aE.set(e,t),t):null}var nE,rE,t5,iE,sE,ya,o5,n5,aE,qf=f(()=>{"use strict";a();nE="Vap0r1ze/vapcord",rE="88a7032a59cca40da170926651b08201ea3b965a",t5=`https://raw.githubusercontent.com/${nE}/${rE}/assets/shiki-codeblocks`,iE=e=>`${t5}/${e}`,sE=`${t5}/languages.json`,ya={},o5=async()=>{let e=await fetch(sE).then(o=>o.json()),t=Object.fromEntries(e.map(o=>[o.id,{...o,grammarUrl:iE(o.fileName)}]));Object.assign(ya,t)},n5=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),aE=new Map});var lE,cE,pe,Br,Pv=f(()=>{"use strict";a();lE="shikijs/textmate-grammars-themes",cE="2d87559c7601a928b9f7e0f0dda243d2fb6d4499",pe=e=>`https://raw.githubusercontent.com/${lE}/${cE}/packages/tm-themes/themes/${e}.json`,Br={DarkPlus:pe("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",Andromeeda:pe("andromeeda"),AuroraX:pe("aurora-x"),AyuDark:pe("ayu-dark"),CatppuccinLatte:pe("catppuccin-latte"),CatppuccinFrappe:pe("catppuccin-frappe"),CatppuccinMacchiato:pe("catppuccin-macchiato"),CatppuccinMocha:pe("catppuccin-mocha"),DraculaSoft:pe("dracula-soft"),Dracula:pe("dracula"),EverforestDark:pe("everforest-dark"),EverforestLight:pe("everforest-light"),GithubDarkDefault:pe("github-dark-default"),GithubDarkDimmed:pe("github-dark-dimmed"),GithubDarkHighContrast:pe("github-dark-high-contrast"),GithubDark:pe("github-dark"),GithubLightDefault:pe("github-light-default"),GithubLightHighContrast:pe("github-light-high-contrast"),GithubLight:pe("github-light"),Houston:pe("houston"),KanagawaDragon:pe("kanagawa-dragon"),KanagawaLotus:pe("kanagawa-lotus"),KanagawaWave:pe("kanagawa-wave"),LaserWave:pe("laserwave"),LightPlus:pe("light-plus"),MaterialDarker:pe("material-theme-darker"),MaterialDefault:pe("material-theme"),MaterialLighter:pe("material-theme-lighter"),MaterialOcean:pe("material-theme-ocean"),MaterialPalenight:pe("material-theme-palenight"),MinDark:pe("min-dark"),MinLight:pe("min-light"),Monokai:pe("monokai"),NightOwl:pe("night-owl"),Nord:pe("nord"),OneDarkPro:pe("one-dark-pro"),OneLight:pe("one-light"),Plastic:pe("plastic"),Poimandres:pe("poimandres"),Red:pe("red"),RosePineDawn:pe("rose-pine-dawn"),RosePineMoon:pe("rose-pine-moon"),RosePine:pe("rose-pine"),SlackDark:pe("slack-dark"),SlackOchin:pe("slack-ochin"),SnazzyLight:pe("snazzy-light"),SolarizedDark:pe("solarized-dark"),SolarizedLight:pe("solarized-light"),Synthwave84:pe("synthwave-84"),TokyoNight:pe("tokyo-night"),Vesper:pe("vesper"),VitesseBlack:pe("vitesse-black"),VitesseDark:pe("vitesse-dark"),VitesseLight:pe("vitesse-light")}});var i5,Iv,r5,Oe,Pc=f(()=>{"use strict";a();vd();i5=zc(VC());Mv();qf();Pv();Iv=Object.values(Br),Oe={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:ya,themes:Br,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>r5=e),init:async e=>{let t=await fetch(Fw).then(i=>i.blob()),o=Oe.client=new i5.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let r=e||Iv[0];await o5(),await o.run("setOnigasm",{wasm:Uw}),await o.run("setHighlighter",{theme:r,langs:[]}),Oe.loadedThemes.add(r),await Oe._setTheme(r),r5(o)},_setTheme:async e=>{Oe.currentThemeUrl=e;let{themeData:t}=await Oe.client.run("getTheme",{theme:e});Oe.currentTheme=JSON.parse(t),wv({id:e,theme:Oe.currentTheme})},loadTheme:async e=>{let t=await Oe.clientPromise;Oe.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),Oe.loadedThemes.add(e))},setTheme:async e=>{await Oe.clientPromise,e||=Iv[0],Oe.loadedThemes.has(e)||await Oe.loadTheme(e),await Oe._setTheme(e)},loadLang:async e=>{let t=await Oe.clientPromise,o=gs(e);!o||Oe.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await n5(o)}}),Oe.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await Oe.clientPromise,r=gs(t);return r?(Oe.loadedLangs.has(r.id)||await Oe.loadLang(r.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:Oe.currentThemeUrl??Iv[0]})):[]},destroy(){Oe.currentTheme=null,Oe.currentThemeUrl=null,wv({id:null,theme:null}),Oe.client?.destroy()}}});var Ic,Cv=f(()=>{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.10.1/devicon.min.css");
|
|
`,classNames:{},dom:null});Ic="src/plugins/shikiCodeblocks.desktop/devicon.css"});var Cc=f(()=>{"use strict";a()});var pE,fi,kv=f(()=>{"use strict";a();_();He();me();Qo();T();Pc();Pv();Cv();Cc();pE=Object.keys(Br),fi=P({theme:{type:4,description:"Default themes",options:pE.map(e=>({label:ko(g1(e)),value:Br[e],default:Br[e]===Br.DarkPlus})),onChange:Oe.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:Br.MaterialCandy,onChange:e=>{Oe.setTheme(e||fi.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"?qo(Ic):Io(Ic)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,componentProps:{stickToMarkers:!1,onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=fh(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function a5(e,t){let o=fi.use(e),[r,i]=W.useState(!1),s={...o,...t},l=s.customTheme||s.theme;if(t){let c=Oe.currentThemeUrl&&l&&l!==Oe.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),Oe.setTheme(l))}return{...s,isThemeLoading:l!==Oe.currentThemeUrl}}var l5=f(()=>{"use strict";a();S();Pc();kv()});function c5(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))}var u5=f(()=>{"use strict";a()});var Do,p5,kc=f(()=>{"use strict";a();He();S();qf();Cc();Do=ue("vc-shiki-"),p5=({lang:e,tryHljs:t})=>{let o=e?Ni?.getLanguage?.(e):null,i=(e?gs(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}}});function d5(e){let[t,o]=W.useState(!1);function r(i){Ht.copy(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,r]}var m5=f(()=>{"use strict";a();S()});function f5({content:e,...t}){let[o,r]=d5(1e3);return n("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>r(e)},o?"Copied!":"Copy")}var g5=f(()=>{"use strict";a();m5()});function h5({content:e,theme:t}){let o=[];return Ht.SUPPORTS_COPY&&o.push(n(f5,{content:e,className:Do("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),n("div",{className:Do("btns")},o)}var y5=f(()=>{"use strict";a();S();kc();g5()});var v5,b5=f(()=>{"use strict";a();S();kc();v5=({theme:e,useHljs:t,lang:o,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=Ni.highlight(r,{language:o,ignoreIllegals:!0});s=c.split(`
|
|
`).map((u,d)=>n("span",{key:d,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(`
|
|
`).map((c,u)=>n("span",{key:u},c))}else s=(i??r.split(`
|
|
`).map(u=>[{color:e.plainColor,content:u}])).map((u,d)=>u.length===0?n("span",{key:d},`
|
|
`):n(m,null,u.map(({content:g,color:h,fontStyle:v},C)=>n("span",{key:C,style:{color:h,fontStyle:(v??0)&1?"italic":void 0,fontWeight:(v??0)&2?"bold":void 0,textDecoration:(v??0)&4?"underline":void 0}},g))));let l=s.map((c,u)=>n("tr",{className:Do("table-row"),key:u},n("td",{className:Do("table-cell"),style:{color:e.plainColor}},u+1),n("td",{className:Do("table-cell")},c)));return n("table",{className:Do("table")},...l)}});function S5({langName:e,useDevIcon:t,shikiLang:o}){return e?n("div",{className:Do("lang")},t!=="DISABLED"&&o?.devicon&&n("i",{className:`${Do("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):n(m,null)}var x5=f(()=>{"use strict";a();Cc();kc()});var Kf,dE,T5=f(()=>{"use strict";a();ne();wt();S();qf();Pc();l5();Mv();u5();kc();y5();b5();x5();Kf=e=>n("pre",{className:Do("container")},n(k,null,n(dE,{...e}))),dE=({lang:e,content:t,isPreview:o,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=a5(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=e5(),d=e?gs(e):null,g=p5({lang:e,tryHljs:i}),[h,v]=vh(!0),[C]=St(async()=>!d||g||!v?null:await Oe.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,v]}),w={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(g?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},x;return e&&(x=g?Ni?.getLanguage?.(e)?.name:d?.name),n("div",{ref:h,className:Do("root",{plain:!x,preview:o}),style:{backgroundColor:g?w.backgroundColor:`rgba(${c5(w.backgroundColor).concat(l/100).join(", ")})`,color:w.plainColor}},n("code",{className:Do("code")},n(S5,{langName:x,useDevIcon:s,shikiLang:d}),n(v5,{theme:w,useHljs:g,lang:e,content:t,tokens:C}),!o&&n(h5,{content:t,theme:w})))}});var w5,M5,P5=f(()=>{"use strict";a();w5=new Map,M5=()=>{w5.forEach(e=>e.remove()),w5.clear()}});var Yf,I5=f(()=>{"use strict";a();WC();He();M();T();KC();Pc();T5();Cv();kv();Cc();P5();Yf=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],reporterTestable:8,settings:fi,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()=>{fi.store.useDevIcon!=="DISABLED"&&Io(Ic),await Oe.init(fi.store.customTheme||fi.store.theme)},stop:()=>{Oe.destroy(),M5()},settingsAboutComponent:({tempSettings:e})=>Kf({lang:"tsx",content:qC,isPreview:!0,tempSettings:e}),shiki:Oe,createHighlighter:Kf,renderHighlighter:({lang:e,content:t})=>Kf({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var Zf,C5=f(()=>{"use strict";a();M();T();Zf=y({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[p.Nuckyz],patches:[{find:"#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var k5=f(()=>{});function A5(){let e=$a(N5.colors.INTERACTIVE_MUTED).hex(),t=$a(N5.colors.INTERACTIVE_ACTIVE).hex();return n(mE,{color:e,forcedIconColor:t,size:16,tooltipText:Me("CONNECTION_VERIFIED"),className:"vc-sc-tooltip-icon"})}var N5,mE,R5=f(()=>{"use strict";a();Pe();$();S();N5=kt(e=>e.colors?.INTERACTIVE_MUTED?.css),mE=se("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}")});function bE({id:e,theme:t}){let o=Qt.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(ge,{style:{gap:yE(Jf.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(SE,{connection:i,theme:t,key:i.id}))):null}function SE({connection:e,theme:t}){let o=gE.get(fE(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:Jf.store.iconSize,height:Jf.store.iconSize}}),s=r?Ui:$i;return n(oe,{text:n("span",{className:"vc-sc-tooltip"},n("span",{className:"vc-sc-connection-name"},e.name),e.verified&&n(A5,null),n(s,{height:16,width:16,className:"vc-sc-tooltip-icon"})),key:e.id},l=>r?n("a",{...l,className:"vc-user-connection",href:r,target:"_blank",rel:"noreferrer",onClick:c=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(c.currentTarget,c)}},i):n("button",{...l,className:"vc-user-connection",onClick:()=>Xt(e.name)},i))}var fE,gE,hE,yE,Jf,vE,Qf,D5=f(()=>{"use strict";a();k5();_();ne();jt();At();M();me();T();$();S();R5();fE=Ce(".TWITTER_LEGACY:"),gE=R("isSupported","getByUrl"),hE=Ce(".getPreviewThemeColors","primaryColor:"),yE=e=>(e??0)*2+4,Jf=P({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}]}}),vE=k.wrap(e=>n(bE,{...e,id:e.user.id,theme:hE(e).theme}),{noop:!0});Qf=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[p.TheKodeToad],settings:Jf,patches:[{find:".hasAvatarForGuild(null==",replacement:{match:/currentUser:\i,guild:\i}\)(?<=user:(\i),bio:null==(\i)\?.+?)/,replace:"$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2 })"}}],profilePopoutComponent:vE})});var L5=f(()=>{});function AE({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Fr.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,r]=K([]),{type:i,topic:s,lastMessageId:l,defaultForumLayout:c,lastPinTimestamp:u,defaultAutoArchiveDuration:d,availableTags:g,id:h,rateLimitPerUser:v,defaultThreadRateLimitPerUser:C,defaultSortOrder:w,defaultReactionEmoji:x,bitrate:N,rtcRegion:A,videoQualityMode:L,permissionOverwrites:U,guild_id:H}=e;return le(()=>{let X=[],re=ce.getGuild(H).ownerId;Re.getMember(H,re)||X.push(re),Object.values(U).forEach(({type:te,id:Y})=>{te===1&&!Re.getMember(H,Y)&&X.push(Y)}),X.length>0&&G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[H],userIds:X}),j.plugins.PermissionsViewer.enabled&&r(Zm(Object.values(U).map(te=>({type:te.type,id:te.id,overwriteAllow:te.allow,overwriteDeny:te.deny})),H))},[h]),n("div",{className:z(Nv.auto,Nv.customTheme,Nv.managedReactiveScroller)},n("div",{className:Go("container")},n("img",{className:Go("logo"),src:NE}),n("div",{className:Go("heading-container")},n(Q,{variant:"heading-xxl/bold"},"This is a ",Be.can(ke.VIEW_CHANNEL,e)?"locked":"hidden"," ",PE[i]," channel"),e.isNSFW()&&n(oe,{text:"NSFW"},({onMouseLeave:X,onMouseEnter:re})=>n("svg",{onMouseLeave:X,onMouseEnter:re,className:Go("heading-nsfw-icon"),width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},n("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&n(Q,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&s&&s.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&s&&s.length>0&&n("div",{className:Go("topic-container")},Ee.parseTopic(s,!1,{channelId:h})),l&&n(Q,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(lo,{timestamp:new Date(To.extractTimestamp(l))})),u&&n(Q,{variant:"text-md/normal"},"Last message pin: ",n(lo,{timestamp:new Date(u)})),(v??0)>0&&n(Q,{variant:"text-md/normal"},"Slowmode: ",wl(v,"seconds")),(C??0)>0&&n(Q,{variant:"text-md/normal"},"Default thread slowmode: ",wl(C,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&N!=null&&n(Q,{variant:"text-md/normal"},"Bitrate: ",N," bits"),A!==void 0&&n(Q,{variant:"text-md/normal"},"Region: ",A??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(Q,{variant:"text-md/normal"},"Video quality mode: ",kE[L??1]),(d??0)>0&&n(Q,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+wl(d,"minutes")),c!=null&&n(Q,{variant:"text-md/normal"},"Default layout: ",CE[c]),w!=null&&n(Q,{variant:"text-md/normal"},"Default sort order: ",IE[w]),x!=null&&n("div",{className:Go("default-emoji-container")},n(Q,{variant:"text-md/normal"},"Default reaction emoji:"),Ee.defaultRules[x.emojiName?"emoji":"customEmoji"].react({name:x.emojiName?wE.convertSurrogateToName(x.emojiName):un.getCustomEmojiById(x.emojiId)?.name??"",emojiId:x.emojiId??void 0,surrogate:x.emojiName??void 0,src:x.emojiName?ME.getURL(x.emojiName):void 0},void 0,{key:0})),e.hasFlag(16)&&n(Q,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),g&&g.length>0&&n("div",{className:Go("tags-container")},n(Q,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:Go("tags")},g.map(X=>n(TE,{tag:X,key:X.id})))),n("div",{className:Go("allowed-users-and-roles-container")},n("div",{className:Go("allowed-users-and-roles-container-title")},Vencord.Plugins.isPluginEnabled("PermissionsViewer")&&n(oe,{text:"Permission Details"},({onMouseLeave:X,onMouseEnter:re})=>n("button",{onMouseLeave:X,onMouseEnter:re,className:Go("allowed-users-and-roles-container-permdetails-btn"),onClick:()=>ps(o,ce.getGuild(e.guild_id),e.name)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(Q,{variant:"text-lg/bold"},"Allowed users and roles:"),n(oe,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:X,onMouseEnter:re})=>n("button",{onMouseLeave:X,onMouseEnter:re,className:Go("allowed-users-and-roles-container-toggle-btn"),onClick:()=>Fr.store.defaultAllowedUsersAndRolesDropdownState=!t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&n(xE,{channel:e}))))}var Nv,wxe,xE,TE,wE,ME,PE,IE,CE,kE,NE,E5,O5=f(()=>{"use strict";a();_();ne();me();Qo();$();S();pc();uc();Av();Nv=R("auto","managedReactiveScroller"),wxe=R("chat","content","noChat","chatContent"),xE=se("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"),TE=se("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"),wE=R("convertSurrogateToName"),ME=R("getURL","getEmojiColors"),PE={0:"text",5:"announcement",15:"forum",2:"voice",13:"stage"},IE={0:"Latest activity",1:"Creation date"},CE={0:"Not set",1:"List view",2:"Gallery view"},kE={1:"Automatic",2:"720p"},NE="/assets/433e3ec4319a9d11b0cbe39342614982.svg";E5=k.wrap(AE)});function RE(e){return e.channel.id==="null"&&e.channel.name==="Uncategorized"&&e.comparator===-1}var _5,Go,B5,Fr,Xf,Av=f(()=>{"use strict";a();L5();_();He();ne();M();me();Ho();T();$();S();O5();_5=R("modeMuted","modeSelected","unread","icon"),Go=ue("vc-shc-"),B5=1n<<20n,Fr=P({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}});Xf=y({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[p.BigDuck,p.AverageReactEnjoyer,p.D3SOX,p.Ven,p.Nuckyz,p.Nickyux,p.dzshn],settings:Fr,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\[\]}}/,replace:""},{match:/(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(this\.record\)\?{renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,o)=>`${t}${o}`},{match:/(getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:(e,t)=>`${t} `}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\);return\()/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=(\|\||&&)\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t,o)=>t==="||"?`||$self.isHiddenChannel(${o})`:`&&!$self.isHiddenChannel(${o})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".AUDIENCE),{isSubscriptionGated",replacement:{match:/(!)?(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t,o)=>t?`${e}&&!$self.isHiddenChannel(${o})`:`${e}||$self.isHiddenChannel(${o})`}},{find:'tutorialId:"instant-invite"',replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<="renderOpenChatButton",\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:"#{intl::CHANNEL_TOOLTIP_DIRECTORY}",predicate:()=>Fr.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:()=>Fr.store.showMode===1,replacement:[{match:/\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.name,{.{0,140}\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)(if\()?(\i)(?:\)return |\?)(\i\.MUTED)/,replace:(e,t,o,r,i)=>o?`${r}?${i}:"",${t}if(${r})return ""`:`${r}?${i}:"",${t}${r}?""`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Fr.store.hideUnreads===!1&&Fr.store.showMode===1,match:/(?<=\.LOCKED(?:;if\(|:))(?<={channel:(\i).+?)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{predicate:()=>Fr.store.hideUnreads===!0,match:/\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'="ChannelListUnreadsStore",',replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?<=!0\))(?=&&\(0,\i\.\i\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"ignoreRecents:!0",replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/"renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_TEXT:(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`${e}if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/"renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`${e}if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/"renderMobileToolbar",\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,200}?>0\)&&\(0,\i\.\i\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/getState\(\)\.channelId.+?(?=\.map\(\i=>\i\.id)/,replace:"$&.filter(e=>!$self.isHiddenChannel(e))"}},{find:"#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${B5}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${B5}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/forceRoles:.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,o)=>(t=t.replace(Lt(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(Lt(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:'})},"overflow"))',replacement:[{match:/users:\i,maxUsers:\i.+?}=(\i).*?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?"":${e}`}]},{find:"#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",replacement:[{match:/"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}${o}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}(${o}||!$self.isHiddenChannel(${t},true))&&`}]},{find:"#{intl::EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR}",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:"#{intl::STAGE_FULL_MODERATOR_TITLE}",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:'className:"channelMention",children',replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'"GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.*?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??arguments[0]==="@favorites");}`}]},{find:"#{intl::FORM_LABEL_MUTED}",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'"NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){try{return!e||(e.channelId&&(e=ie.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!Be.can(ke.VIEW_CHANNEL,e)||t&&!Be.can(ke.CONNECT,e)}catch(o){return console.error("[ViewHiddenChannels#isHiddenChannel]: ",o),!1}},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){o[r]=i;continue}o[r]??=[];for(let s of i)(RE(s)||s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[r].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>n(E5,{channel:e}),LockIcon:k.wrap(()=>n("svg",{className:_5.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{fill:"currentcolor",fillRule:"evenodd",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:k.wrap(()=>n(oe,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:z(_5.icon,Go("hidden-channel-icon")),width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{fill:"currentcolor",fillRule:"evenodd",d:"m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z"}))),{noop:!0})})});var Rv,va,Vf,F5=f(()=>{"use strict";a();_();M();T();Rv=e=>({type:3,description:e,default:!0,restartNeeded:!0}),va=P({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.")}),Vf=y({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused","ShowModView","DisableDiscoveryFilters"],description:"Displays various hidden & moderator-only things regardless of permissions.",authors:[p.Dolfies],settings:va,patches:[{find:"showCommunicationDisabledStyles",predicate:()=>va.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"INVITES_DISABLED))||",predicate:()=>va.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,replace:"true"}},{find:/,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/,predicate:()=>va.store.showModView,replacement:{match:/return \i\.\i\(\i\.\i\(\{user:\i,context:\i,checkElevated:!1\}\),\i\.\i\)/,replace:"return true"}},{find:"#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}),allowOverflow:",predicate:()=>va.store.showModView,replacement:{match:/(role:)\i(?=,guildId.{0,100}role:(\i\[))/,replace:"$1$2arguments[0].member.highestRoleId]"}},{find:'action:"PRESS_MOD_VIEW",icon:',predicate:()=>va.store.showModView,replacement:{match:/\i(?=\?null)/,replace:"false"}}]})});var U5=f(()=>{});var Nc,eg,$5=f(()=>{"use strict";a();U5();_();ne();M();T();Nc=P({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),eg=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[p.Rini,p.TheKodeToad],patches:[{find:'?"@":""',replacement:{match:/(?<=onContextMenu:\i,children:)\i\+\i/,replace:"$self.renderUsername(arguments[0])"}}],settings:Nc,renderUsername:k.wrap(({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;Nc.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return o&&!Nc.store.inReplies||l.toLowerCase()===c.toLowerCase()?n(m,null,u,c):Nc.store.mode==="user-nick"?n(m,null,u,l," ",n("span",{className:"vc-smyn-suffix"},c)):Nc.store.mode==="nick-user"?n(m,null,u,c," ",n("span",{className:"vc-smyn-suffix"},l)):n(m,null,u,l)}catch{return n(m,null,e?.nick)}},{noop:!0})})});var G5=f(()=>{});function H5(e,t){let o=ie.getChannel(e.channel_id)?.guild_id;if(!o)return null;let r=Re.getMember(o,e.author.id);if(!r?.communicationDisabledUntil)return null;let i=()=>n(LE,{deadline:new Date(r.communicationDisabledUntil),showUnits:!0,stopAtOneSec:!0});return Me("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i}),t?i():Me("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i})}var DE,LE,z5,tg,j5=f(()=>{"use strict";a();G5();_();ne();M();Pe();Ho();T();$();S();DE=Lt("#{intl::MAX_AGE_NEVER}"),LE=Qc(e=>e.prototype?.render?.toString().includes(DE)),z5=P({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}]}});tg=y({name:"ShowTimeoutDuration",description:"Shows how much longer a user's timeout will last, either in the timeout icon tooltip or next to it",authors:[p.Ven,p.Sqaaakoi],settings:z5,patches:[{find:"#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}",replacement:[{match:/\i\.\i,{(text:.{0,30}#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}\))/,replace:"$self.TooltipWrapper,{message:arguments[0].message,$1"}]}],TooltipWrapper:k.wrap(({message:e,children:t,text:o})=>z5.store.displayStyle==="tooltip"?n(oe,{text:H5(e,!1)},t):n("div",{className:"vc-std-wrapper"},n(oe,{text:o},t),n(Q,{variant:"text-md/normal",color:"status-danger"},H5(e,!0)," timeout remaining")),{noop:!0})})});var Dv,Lv,EE,og,W5=f(()=>{"use strict";a();xr();Ul();_();M();T();S();Dv=!1,Lv=P({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Dv=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}}),EE=({isMainChat:e})=>{let[t,o]=K(Dv);function r(i){Lv.store.persistState&&(Dv=i),o(i)}return le(()=>{let i=(s,l)=>{t&&(Lv.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Xi(i),()=>void Vi(i)},[t]),e?n(Vo,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>r(!t)},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#vc-silent-msg-mask)",d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z"}),!t&&n(m,null,n("mask",{id:"vc-silent-msg-mask"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000",strokeWidth:"5.99068",d:"M0 24 24 0"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"})))):null},og=y({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",settings:Lv,renderChatBarButton:EE})});var Nn,OE,_E,ng,q5=f(()=>{"use strict";a();xr();rn();No();_();M();T();S();Nn=P({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}}),OE=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=Nn.use(["isEnabled","showIcon"]),r=()=>Nn.store.isEnabled=!Nn.store.isEnabled;return!e||!o?null:n(Vo,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:r},n("svg",{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#silent-typing-msg-mask)",d:"M18.333 15.556H1.667a1.667 1.667 0 0 1 -1.667 -1.667v-10a1.667 1.667 0 0 1 1.667 -1.667h16.667a1.667 1.667 0 0 1 1.667 1.667v10a1.667 1.667 0 0 1 -1.667 1.667M4.444 6.25V4.861a0.417 0.417 0 0 0 -0.417 -0.417H2.639a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417H5.973a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V4.861a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V6.25a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m-11.667 3.333V8.194a0.417 0.417 0 0 0 -0.417 -0.417H4.306a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417H7.639a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m3.333 0V8.194a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V9.583a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m-11.667 3.333v-1.389a0.417 0.417 0 0 0 -0.417 -0.417H2.639a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417m10 0v-1.389a0.417 0.417 0 0 0 -0.417 -0.417H5.973a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h8.056a0.417 0.417 0 0 0 0.417 -0.417m3.333 0v-1.389a0.417 0.417 0 0 0 -0.417 -0.417h-1.389a0.417 0.417 0 0 0 -0.417 0.417V12.917a0.417 0.417 0 0 0 0.417 0.417h1.389a0.417 0.417 0 0 0 0.417 -0.417",transform:"translate(2, 3)"}),t&&n(m,null,n("mask",{id:"silent-typing-msg-mask"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000",strokeWidth:"5.99068",d:"M0 24 24 0",transform:"translate(-2, -3)"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"}))))},_E=e=>{let{isEnabled:t,contextMenu:o}=Nn.use(["isEnabled","contextMenu"]);if(!o)return;let r=dt("submit-button",e);if(!r)return;let i=r.findIndex(s=>s?.props?.id==="submit-button");r.splice(i+1,0,n(E.MenuCheckboxItem,{id:"vc-silent-typing",label:"Enable Silent Typing",checked:t,action:()=>Nn.store.isEnabled=!Nn.store.isEnabled}))},ng=y({name:"SilentTyping",authors:[p.Ven,p.Rini,p.ImBanana],description:"Hide that you are typing",settings:Nn,contextMenus:{"textarea-context":_E},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)=>{Nn.store.isEnabled=!!qt(e,"value",!Nn.store.isEnabled),mt(t.channel.id,{content:Nn.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){Nn.store.isEnabled||G.dispatch({type:"TYPING_START_LOCAL",channelId:e})},renderChatBarButton:OE})});var K5=f(()=>{});function Y5(e){return new Date(Fe.getSince(e.id))}var BE,Ev,Z5,rg,J5=f(()=>{"use strict";a();K5();_();He();ne();M();T();S();BE=new Intl.DateTimeFormat(void 0,{month:"numeric",day:"numeric",year:"numeric"}),Ev=ue("vc-sortFriendRequests-");Z5=P({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),rg=y({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",settings:Z5,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:"#{intl::FRIEND_REQUEST_CANCEL}",replacement:{predicate:()=>Z5.store.showDates,match:/(?<=\.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?-Y5(t.user):e(t)},WrapperDateComponent:k.wrap(({user:e,children:t})=>{let o=Y5(e);return n("div",{className:Ev("wrapper")},t,!isNaN(o.getTime())&&n(Vn,{text:Wr.dateFormat(o,"LLLL"),tooltipClassName:Ev("tooltip")},n(Q,{variant:"text-xs/normal",className:Ev("date")},BE.format(o))))})})});var Q5,X5=f(()=>{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});Q5="src/plugins/spotifyControls/hoverOnly.css"});var V5=f(()=>{});var ek=f(()=>{});var tt,tk=f(()=>{"use strict";a();_();$();S();tt=mo(()=>{let{Store:e}=Mi,t=Oa("getActiveSocketAndDevice"),o=R("vcSpotifyMarker"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;_start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(c){let u=j.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(d,g)=>g===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this._start),c}set position(c){this.mPosition=c,this._start=Date.now()}prev(){this._req("post","/previous")}next(){this._req("post","/next")}setVolume(c){this._req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this._req("put",c?"/play":"/pause")}setRepeat(c){this._req("put","/repeat",{query:{state:c}})}setShuffle(c){this._req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this._req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}_req(c,u,d={}){this.device?.is_active&&((d.query??={}).device_id=this.device.id);let{socket:g}=t.getActiveSocketAndDevice();return o[c](g.accountId,g.accessToken,{url:r+u,...d})}}let s=new i(G,{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})});function Ov(e){let t=e/1e3/60,o=Math.floor(t),r=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function ba(e,t){return()=>n("svg",{className:st("button-icon",t),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function Ac(e){return n("button",{className:st("button"),...e},e.children)}function jE({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(E.Menu,{navId:`spotify-${e}-menu`,onClose:()=>G.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(E.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>Xt("https://open.spotify.com"+t),icon:Ui}),n(E.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>tt.openExternal(t),icon:ur}))}function WE(e,t){return o=>Et.openContextMenu(o,()=>n(jE,{name:e,path:t}))}function qE(){let[e,t,o]=Se([tt],()=>[tt.isPlaying,tt.shuffle,tt.repeat]),[r,i]=(()=>{switch(o){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${o}`)}})();return n(ge,{className:st("button-row"),style:{gap:0}},n(Ac,{className:z(st("button"),st("shuffle"),st(t?"shuffle-on":"shuffle-off")),onClick:()=>tt.setShuffle(!t)},n(HE,null)),n(Ac,{onClick:()=>{j.plugins.SpotifyControls.previousButtonRestartsTrack&&tt.position>3e3?tt.seek(0):tt.prev()}},n($E,null)),n(Ac,{onClick:()=>tt.setPlaying(!e)},e?n(UE,null):n(FE,null)),n(Ac,{onClick:()=>tt.next()},n(GE,null)),n(Ac,{className:z(st("button"),st("repeat"),st(i)),onClick:()=>tt.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:st("repeat-1")},"1"),n(zE,null)))}function YE(){let{duration:e}=tt.track,[t,o,r]=Se([tt],()=>[tt.mPosition,tt.isSettingPosition,tt.isPlaying]),[i,s]=K(t);return le(()=>{if(r&&!o){s(tt.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,o,r]),n("div",{id:st("progress-bar")},n(b.FormText,{variant:"text-xs/medium",className:st("progress-time")+" "+st("time-left"),"aria-label":"Progress"},Ov(i)),n(E.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{o||(s(l),KE(l))},renderValue:Ov}),n(b.FormText,{variant:"text-xs/medium",className:st("progress-time")+" "+st("time-right"),"aria-label":"Total Duration"},Ov(e)))}function ZE({track:e}){let t=Se([tt],()=>tt.volume);return n(E.Menu,{navId:"spotify-album-menu",onClose:()=>G.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(E.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>tt.openExternal(`/album/${e.album.id}`),icon:ur}),n(E.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Yo(e.album.image),icon:yn}),n(E.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,r)=>n(E.MenuSliderControl,{...o,ref:r,value:t,minValue:0,maxValue:100,onChange:Eo(i=>tt.setVolume(i))})}))}function _v(e,t,o){return t?{role:"link",onClick:()=>tt.openExternal(o),onContextMenu:WE(e,o)}:{}}function JE({track:e}){let t=e?.album?.image,[o,r]=K(!1),i=n(m,null,t&&n("img",{id:st("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Et.openContextMenu(s,()=>n(ZE,{track:e}))}}));return o&&t?n("div",{id:st("album-expanded-wrapper")},i):n("div",{id:st("info-wrapper")},i,n("div",{id:st("titles")},n(b.FormText,{variant:"text-sm/semibold",id:st("song-title"),className:st("ellipoverflow"),title:e.name,..._v("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(b.FormText,{variant:"text-sm/normal",className:st(["ellipoverflow","secondary-song-info"])},n("span",{className:st("song-info-prefix")},"by\xA0"),e.artists.map((s,l)=>n(W.Fragment,{key:s.name},n("span",{className:st("artist"),style:{fontSize:"inherit"},title:s.name,..._v("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&n("span",{className:st("comma")},", ")))),e.album.name&&n(b.FormText,{variant:"text-sm/normal",className:st(["ellipoverflow","secondary-song-info"])},n("span",{className:st("song-info-prefix")},"on\xA0"),n("span",{id:st("album-title"),className:st("album"),style:{fontSize:"inherit"},title:e.album.name,..._v("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function ok(){let e=Se([tt],()=>tt.track,null,(l,c)=>l?.id?l.id===c?.id:l?.name===c?.name),t=Se([tt],()=>tt.device,null,(l,c)=>l?.id===c?.id),o=Se([tt],()=>tt.isPlaying),[r,i]=K(!1);if(W.useEffect(()=>{if(i(!1),!o){let l=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(l)}},[o]),!e||!t?.is_active||r)return null;let s={"--vc-spotify-track-image":`url(${e?.album?.image?.url||""})`};return n("div",{id:st("player"),style:s},n(JE,{track:e}),n(YE,null),n(qE,null))}var st,FE,UE,$E,GE,zE,HE,KE,nk=f(()=>{"use strict";a();V5();ek();_();He();jt();At();Oi();Pe();me();S();tk();st=ue("vc-spotify-");FE=ba("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"),UE=ba("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"),$E=ba("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"),GE=ba("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"),zE=ba("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"),HE=ba("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");KE=Eo(e=>{tt.seek(e)})});function rk(e){(e?Io:qo)(Q5)}var ig,ik=f(()=>{"use strict";a();_();He();ne();M();T();X5();nk();ig=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[p.Ven,p.afn,p.KraXen72,p.Av32000,p.nin0dev],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>rk(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:()=>rk(j.plugins.SpotifyControls.hoverControls),PanelWrapper({VencordOriginal:e,...t}){return n(m,null,n(k,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n(ok,null)),n(e,{...t}))}})});var Bv,sg,sk=f(()=>{"use strict";a();_();M();T();Bv=P({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}}),sg=y({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[p.Cyn,p.Nuckyz],settings:Bv,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:()=>Bv.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>Bv.store.keepSpotifyActivityOnIdle,match:/(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:"$1"}]}]})});function Fv(e,t){return{name:e,description:`Share your current Spotify ${e} in chat`,inputType:0,options:[zn],execute(o,{channel:r}){let i=QE.getTrack();if(!i)return mt(r.id,{content:"You're not listening to any music."});let s=t(i),l=qt(o,"message");Ls(r.id,{content:l?`${l} ${s}`:s},!1,Wo.getSendMessageOptionsForReply(XE.getPendingReply(r.id))).then(()=>{G.dispatch({type:"DELETE_PENDING_REPLY",channelId:r.id})})}}}var QE,XE,ag,ak=f(()=>{"use strict";a();rn();M();Pe();T();$();S();QE=R("getPlayerState"),XE=R("getPendingReply");ag=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[p.katlyn],commands:[Fv("track",e=>`https://open.spotify.com/track/${e.id}`),Fv("album",e=>`https://open.spotify.com/album/${e.album.id}`),Fv("artist",e=>e.artists[0].external_urls.spotify)]})});function VE({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(W.Fragment,null,n("span",null,i.sinceStart.toFixed(3),"s"),n("span",null,i.sinceLast.toFixed(3),"s"),n("span",null,r?.toFixed(0)??""),n("span",null,n("pre",null,e," ",t??" ",o)))}function eO({title:e,logs:t,traceEnd:o}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,d=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:d}});return n(b.FormSection,{title:e,tag:"h1"},n("code",null,o&&n("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),n("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},n("span",null,"Start"),n("span",null,"Interval"),n("span",null,"Delta"),n("span",{style:{marginBottom:5}},"Event"),Rc.logs.map((l,c)=>n(VE,{key:c,...l,instance:s[c]})))))}function tO({trace:e}){let t=e.split(`
|
|
`);return n(b.FormSection,{title:"Server Trace",tag:"h2"},n("code",null,n(ge,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map((o,r)=>n("span",{key:r},o)))))}function oO(){if(!Rc?.logs)return n("div",null,"Loading...");let e=Rc.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(W.Fragment,null,n(eO,{title:"Startup Timings",logs:Rc.logs,traceEnd:Rc.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(tO,{trace:e}))}var Rc,lk,ck=f(()=>{"use strict";a();ne();jt();$();S();Rc=R("markWithDelta","markAndLog","markAt");lk=k.wrap(oO)});var lg,uk=f(()=>{"use strict";a();M();T();ck();lg=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"#{intl::ACTIVITY_SETTINGS}",replacement:[{match:/(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/,replace:(e,t,o,r)=>`${t}${o}?.[0]==="CHANGELOG"&&${r}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`,noWarn:!0},{match:/(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+\)\)\}\))(?=\)\})/,replace:(e,t,o,r)=>`${t}${o}?.[0]==="CHANGELOG"&&${r}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`}]}],StartupTimingPage:lk})});var cg,pk=f(()=>{"use strict";a();M();T();cg=y({name:"StickerPaste",description:"Makes picking a sticker in the sticker picker insert it into the chatbox instead of instantly sending",authors:[p.ImBanana],patches:[{find:".stickers,previewSticker:",replacement:{match:/if\(\i\.\i\.getUploadCount/,replace:"return true;$&"}}]})});function dk({streamKey:e},t){e.endsWith(D.getCurrentUser().id)&&G.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var ug,mk=f(()=>{"use strict";a();M();T();S();ug=y({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[p.Kodarru],flux:{STREAM_CREATE:e=>dk(e,!0),STREAM_DELETE:e=>dk(e,!1)}})});var Dc,pg,fk=f(()=>{"use strict";a();_();M();T();S();Dc=P({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}}}),pg=y({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[p.FieryFlames,p.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"$1!$self.shouldPlayBurstReaction($2)"}},{find:".EMOJI_PICKER_CONSTANTS_EMOJI_CONTAINER_PADDING_HORIZONTAL)",replacement:{match:/(openPopoutType:void 0(?=.+?isBurstReaction:(\i).+?(\i===\i\.\i.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.shouldSuperReactByDefault&&${r})`}}],settings:Dc,shouldPlayBurstReaction(e){return Dc.store.unlimitedSuperReactionPlaying?!0:Dc.store.superReactionPlayingLimit===0?!1:e<=Dc.store.superReactionPlayingLimit},get shouldSuperReactByDefault(){return Dc.store.superReactByDefault&&D.getCurrentUser().premiumType!=null}})});function Sk(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuyv]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function nO(e){try{return Sk(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function Uv({initialValue:e,onChange:t,placeholder:o}){let[r,i]=K(e);return n(ct,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function vk({title:e,rulesArray:t}){let o=e==="Using Regex";async function r(s){s!==t.length-1&&t.splice(s,1)}async function i(s,l,c){l===t.length-1&&t.push(bk()),t[l][c]=s,t[l].find===""&&t[l].replace===""&&t[l].onlyIfIncludes===""&&l!==t.length-1&&t.splice(l,1)}return n(m,null,n(b.FormTitle,{tag:"h4"},e),n(ge,{flexDirection:"column",style:{gap:"0.5em"}},t.map((s,l)=>n(W.Fragment,{key:`${s.find}-${l}`},n(ge,{flexDirection:"row",style:{gap:0}},n(ge,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(Uv,{placeholder:"Find",initialValue:s.find,onChange:c=>i(c,l,"find")}),n(Uv,{placeholder:"Replace",initialValue:s.replace,onChange:c=>i(c,l,"replace")}),n(Uv,{placeholder:"Only if includes",initialValue:s.onlyIfIncludes,onChange:c=>i(c,l,"onlyIfIncludes")})),n(I,{size:I.Sizes.MIN,onClick:()=>r(l),style:{background:"none",color:"var(--status-danger)",...l===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(Gi,null))),o&&nO(s.find)))))}function rO(){let[e,t]=K("");return n(m,null,n(b.FormTitle,{tag:"h4"},"Test Rules"),n(ct,{placeholder:"Type a message",onChange:t}),n(ct,{placeholder:"Message with rules applied",editable:!1,value:xk(e)}))}function xk(e){if(e.length===0)return e;for(let t of Sa.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 Sa.store.regexRules)if(t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=Sk(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
|
|
`))}catch{new V("TextReplace").error(`Invalid regex: ${t.find}`)}return e=e.trim(),e}var gk,hk,bk,yk,Sa,iO,dg,Tk=f(()=>{"use strict";a();Mr();_();jt();At();M();Ae();T();S();gk="TextReplace_rulesString",hk="TextReplace_rulesRegex",bk=()=>({find:"",replace:"",onlyIfIncludes:""}),yk=()=>[bk()],Sa=P({replace:{type:6,component:()=>{let{stringRules:e,regexRules:t}=Sa.use(["stringRules","regexRules"]);return n(m,null,n(vk,{title:"Using String",rulesArray:e}),n(vk,{title:"Using Regex",rulesArray:t}),n(rO,null))}},stringRules:{type:7,default:yk()},regexRules:{type:7,default:yk()}});iO="1102784112584040479",dg=y({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[p.AutumnVN,p.TheKodeToad],settings:Sa,onBeforeMessageSend(e,t){e!==iO&&(t.content=xk(t.content))},async start(){let e=await It.get(gk);e!=null&&(Sa.store.stringRules=e,await It.del(gk));let t=await It.get(hk);t!=null&&(Sa.store.regexRules=t,await It.del(hk))}})});var mg,wk=f(()=>{"use strict";a();M();T();S();mg=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[p.Ven,p.Board],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}},{find:"#{intl::LABEL_WITH_ONLINE_STATUS}",replacement:{match:/src:null!=\i\?(\i).{1,50}"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}},{find:"showCommunicationDisabledStyles",replacement:{match:/src:(\i),"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}}],getAvatarStyles(e){return!e||e.startsWith("data:")?{}:Object.fromEntries([128,256,512,1024,2048,4096].map(t=>[`--avatar-url-${t}`,`url(${e.replace(/\d+$/,String(t))})`]))},getMessageProps(e){let t=e.message?.author,o=t?.id;return{"data-author-id":o,"data-author-username":t?.username,"data-is-self":o&&o===D.getCurrentUser()?.id}}})});var Mk=f(()=>{});function $v(){We.store.service==="google"?(We.store.receivedInput="auto",We.store.receivedOutput="en",We.store.sentInput="auto",We.store.sentOutput="en"):(We.store.receivedInput="",We.store.receivedOutput="en-us",We.store.sentInput="",We.store.sentOutput="en-us")}var We,Lc=f(()=>{"use strict";a();_();T();We=P({receivedInput:{type:0,description:"Language that received messages should be translated from",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Language that received messages should be translated to",default:"en",hidden:!0},sentInput:{type:0,description:"Language that your own messages should be translated from",default:"auto",hidden:!0},sentOutput:{type:0,description:"Language that your own messages should be translated to",default:"en",hidden:!0},showChatBarButton:{type:3,description:"Show translate button in chat bar",default:!0},service:{type:4,description:"Translation service",disabled:()=>!1,options:[{label:"Google Translate",value:"google",default:!0},{label:"DeepL Free",value:"deepl"},{label:"DeepL Pro",value:"deepl-pro"}],onChange:$v},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 Hv(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 Gv,zv,Pk=f(()=>{"use strict";a();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"},zv={"":"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"}});async function Ec(e,t){let o=We.store.service==="google"?kk:lO;try{return await o(t,We.store[`${e}Input`],We.store[`${e}Output`])}catch(r){let i=typeof r=="string"?r:"Something went wrong. If this issue persists, please check the console or ask for help in the support server.";throw Je(i,ee.Type.FAILURE),r instanceof Error?r:new Error(i)}}async function kk(e,t,o){let r="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:t,tl:o,dt:"t",dj:"1",source:"input",q:e}),i=await fetch(r);if(!i.ok)throw new Error(`Failed to translate "${e}" (${t} -> ${o})
|
|
${i.status} ${i.statusText}`);let{src:s,sentences:l}=await i.json();return{sourceLanguage:Gv[s]??s,text:l.map(c=>c?.trans).filter(Boolean).join("")}}function Ik(e,t,o){return kk(e,Hv(t),Hv(o))}async function lO(e,t,o){if(!We.store.deeplApiKey)return Je("DeepL API key is not set. Resetting to Google",ee.Type.FAILURE),We.store.service="google",$v(),Ik(e,t,o);let{status:r,data:i}=await sO.makeDeeplTranslateRequest(We.store.service==="deepl-pro",We.store.deeplApiKey,JSON.stringify({text:[e],target_lang:o,source_lang:t.split("-")[0]}));switch(r){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 aO(),Ik(e,t,o);default:throw new Error(`Failed to translate "${e}" (${t} -> ${o})
|
|
${r} ${i}`)}let{translations:s}=JSON.parse(i),l=s[0].detected_source_language;return{sourceLanguage:zv[l]??l,text:s[0].text}}var An,sO,Ck,aO,Oc=f(()=>{"use strict";a();He();Al();S();Pk();Lc();An=ue("vc-trans-"),sO=VencordNative.pluginHelpers.Translate,Ck=()=>We.store.service==="google"?Gv:zv;aO=Ki(()=>Je("Deepl API quota exceeded. Falling back to Google Translate",ee.Type.FAILURE))});function uO({settingsKey:e,includeAuto:t}){let o=We.use([e])[e],r=$e(()=>{let i=Object.entries(Ck()).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return n("section",{className:F.bottom16},n(b.FormTitle,{tag:"h3"},We.def[e].description),n(oh,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>We.store[e]=i}))}function pO(){let e=We.use(["autoTranslate"]).autoTranslate;return n(fo,{value:e,onChange:t=>We.store.autoTranslate=t,note:We.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Nk({rootProps:e}){return n(ve,{...e},n(Ne,{className:An("modal-header")},n(b.FormTitle,{tag:"h2",className:An("modal-title")},"Translate"),n(pt,{onClick:e.onClose})),n(we,{className:An("modal-content")},cO.map(t=>n(uO,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(b.FormDivider,{className:F.bottom16}),n(pO,null)))}var cO,Ak=f(()=>{"use strict";a();ze();Ke();S();Lc();Oc();cO=["receivedInput","receivedOutput","sentInput","sentOutput"]});function xa({height:e=20,width:t=20,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:z(An("icon"),o)},n("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}var _c,Rk,jv=f(()=>{"use strict";a();xr();me();Ke();S();Lc();Ak();Oc();Rk=({isMainChat:e})=>{let{autoTranslate:t,showChatBarButton:o}=We.use(["autoTranslate","showChatBarButton"]),[r,i]=K(!1);if(le(()=>(_c=i,()=>_c=void 0),[]),!e||!o)return null;let s=()=>{let c=!t;We.store.autoTranslate=c,c&&We.store.showAutoTranslateAlert!==!1&&rt.show({title:"Vencord Auto-Translate Enabled",body:n(m,null,n(b.FormText,null,"You just enabled Auto Translate! Any message ",n("b",null,"will automatically be translated")," before being sent.")),confirmText:"Disable Auto-Translate",cancelText:"Got it",secondaryConfirmText:"Don't show again",onConfirmSecondary:()=>We.store.showAutoTranslateAlert=!1,onConfirm:()=>We.store.autoTranslate=!1,confirmColor:"vc-notification-log-danger-btn"})},l=n(Vo,{tooltip:"Open Translate Modal",onClick:c=>{if(c.shiftKey)return s();he(u=>n(Nk,{rootProps:u}))},onContextMenu:s,buttonProps:{"aria-haspopup":"dialog"}},n(xa,{className:An({"auto-translate":t,"chat-button":!0})}));return r&&We.store.showAutoTranslateTooltip?n(oe,{text:"Auto Translate Enabled",forceOpen:!0},()=>l):l}});function qv(e,t){Wv.get(e)(t)}function dO({onDismiss:e}){return n("button",{onClick:e,className:An("dismiss")},"Dismiss")}function Dk({message:e}){let[t,o]=K();return le(()=>{if(!e.vencordEmbeddedBy)return Wv.set(e.id,o),()=>void Wv.delete(e.id)},[]),t?n("span",{className:An("accessory")},n(xa,{width:16,height:16,className:An("accessory-icon")}),Ee.parse(t.text)," ","(translated from ",t.sourceLanguage," - ",n(dO,{onDismiss:()=>o(void 0)}),")"):null}var Wv,Lk=f(()=>{"use strict";a();S();jv();Oc();Wv=new Map});var mO,Ek,fg,Ok=f(()=>{"use strict";a();Mk();No();M();T();S();Lc();jv();Lk();Oc();mO=(e,{message:t})=>{if(!t.content)return;let o=dt("copy-text",e);o&&o.splice(o.findIndex(r=>r?.props?.id==="copy-text")+1,0,n(E.MenuItem,{id:"vc-trans",label:"Translate",icon:xa,action:async()=>{let r=await Ec("received",t.content);qv(t.id,r)}}))},fg=y({name:"Translate",description:"Translate messages with Google Translate or DeepL",authors:[p.Ven,p.AshtonMemer],settings:We,contextMenus:{message:mO},translate:Ec,renderMessageAccessory:e=>n(Dk,{message:e.message}),renderChatBarButton:Rk,renderMessagePopoverButton(e){return e.content?{label:"Translate",icon:xa,message:e,channel:ie.getChannel(e.channel_id),onClick:async()=>{let t=await Ec("received",e.content);qv(e.id,t)}}:null},async onBeforeMessageSend(e,t){if(!We.store.autoTranslate||!t.content)return;_c?.(!0),clearTimeout(Ek),Ek=setTimeout(()=>_c?.(!1),2e3);let o=await Ec("sent",t.content);t.content=o.text}})});var _k=f(()=>{});var Bk,Fk=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/typingTweaks/style.css",{name:"src/plugins/typingTweaks/style.css",source:`.vc-typing-user [class^="wrapper"] {
|
|
display: inline-block;
|
|
margin-right: 0.25em;
|
|
vertical-align: -4px;
|
|
}
|
|
`,classNames:{},dom:null});Bk="src/plugins/typingTweaks/style.css"});function Kv({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var gg,fO,hg,Yv=f(()=>{"use strict";a();_();ne();M();Pe();T();S();Fk();gg=P({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"}});fO=k.wrap(function({user:e,guildId:t}){return n("strong",{className:"vc-typing-user",role:"button",onClick:()=>{Zo(e.id)},style:{color:gg.store.showRoleColors?Re.getMember(t,e.id)?.colorString:void 0}},gg.store.showAvatars&&n(Fa,{size:"SIZE_16",src:e.getAvatarURL(t,128)}),Re.getNick(t,e.id)||!t&&Fe.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),hg=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[p.zt],settings:gg,managedStyle:Bk,patches:[{find:"#{intl::THREE_USERS_TYPING}",replacement:[{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i(?<=guildId:(\i).+?)/,replace:"$self.renderTypingUsers({ users: $1, guildId: $2, children: $& })"},{match:/\.map\((\i)=>\i\.\i\.getName\(\i,\i\.id,\1\)\)/,replace:""},{match:/(,{a:(\i),b:(\i),c:\i}\):\i\.length>3&&\(\i=)\i\.\i\.string\(\i\.\i#{intl::SEVERAL_USERS_TYPING}\)(?<=(\i)\.length.+?)/,replace:(e,t,o,r,i)=>`${t}$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${i}.length - 2 })`,predicate:()=>gg.store.alternativeFormatting}]}],buildSeveralUsers:Kv,renderTypingUsers:k.wrap(({guildId:e,users:t,children:o})=>{try{if(!Array.isArray(o))return o;let r=0;return o.map(i=>{if(i.type!=="strong"&&!(typeof i!="string"&&!W.isValidElement(i)))return i;let s=t[r++];return n(fO,{key:s.id,guildId:e,user:s})})}catch(r){console.error(r)}return o},{noop:!0})})});function gi(e,t){let o=D.getUser(t);return Re.getNick(e,t)??o.globalName??o.username}function vO({channelId:e,guildId:t}){let o=Se([Uk],()=>({...Uk.getTypingUsers(e)}),null,(c,u)=>{let d=Object.keys(c),g=Object.keys(u);return d.length===g.length&&g.every(h=>c[h]!=null)}),r=Se([Le],()=>Le.getChannelId());if(!Ta.store.includeMutedChannels&&yO.isChannelMuted(t,e)||!Ta.store.includeCurrentChannel&&r===e)return null;let i=D.getCurrentUser()?.id,s=Object.keys(o).filter(c=>c!==i&&!(Fe.isBlocked(c)&&!Ta.store.includeBlockedUsers)),l;switch(s.length){case 0:break;case 1:{l=Me("ONE_USER_TYPING",{a:gi(t,s[0])});break}case 2:{l=Me("TWO_USERS_TYPING",{a:gi(t,s[0]),b:gi(t,s[1])});break}case 3:{l=Me("THREE_USERS_TYPING",{a:gi(t,s[0]),b:gi(t,s[1]),c:gi(t,s[2])});break}default:{l=j.plugins.TypingTweaks.enabled?Kv({a:gi(t,s[0]),b:gi(t,s[1]),count:s.length-2}):Me("SEVERAL_USERS_TYPING");break}}return s.length>0?n(oe,{text:l},c=>n("div",{className:"vc-typing-indicator",...c},(Ta.store.indicatorMode&2)===2&&n("div",{onClick:u=>{u.stopPropagation(),u.preventDefault()},onKeyPress:u=>u.stopPropagation()},n(hO,{users:s.map(u=>D.getUser(u)),guildId:t,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"})),(Ta.store.indicatorMode&1)===1&&n("div",{className:"vc-typing-indicator-dots"},n(gO,{dotRadius:3,themed:!0})))):null}var gO,hO,Uk,yO,Ta,yg,$k=f(()=>{"use strict";a();_k();_();ne();M();Pe();T();$();S();Yv();gO=se(".dots,","dotRadius:"),hO=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),Uk=be("TypingStore"),yO=be("UserGuildSettingsStore");Ta=P({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}]}}),yg=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.fawn,p.Sqaaakoi],settings:Ta,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/\.name,{.{0,140}\.children.+?:null(?<=,channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id,$1.getGuildId())"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id,$1.getGuildId())"}}],TypingIndicator:(e,t)=>n(k,{noop:!0},n(vO,{channelId:e,guildId:t}))})});var vg,Gk=f(()=>{"use strict";a();M();T();vg=y({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[p.Ven],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,r)=>Math.min(o,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let o=t.split(`
|
|
`);if(o.length<2)return t;let r="";return o[o.length-1]==="```"&&(r=o.pop()),`${o[0]}
|
|
${this.unindent(o.slice(1).join(`
|
|
`))}
|
|
${r}`})},onBeforeMessageSend(e,t){return this.unindentMsg(t)},onBeforeMessageEdit(e,t,o){return this.unindentMsg(o)}})});var bO,bg,zk=f(()=>{"use strict";a();_();vr();M();T();bO=P({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:Vt(2,16),default:4}}),bg=y({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[p.nakoyasha],settings:bO,patches:[{find:"#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]})});var Zv,SO,Sg,Hk=f(()=>{"use strict";a();No();At();M();T();S();Zv=4,SO=(e,{channel:t,message:{author:o,messageSnapshots:r,embeds:i,flags:s,id:l}})=>{let c=(s&Zv)!==0,u=r.some(v=>v?.message.embeds.length);if(!c&&!i.length&&!u)return;let d=t.isPrivate()||!!(Be.getChannelPermissions({id:t.id})&ke.EMBED_LINKS);if(o.id===D.getCurrentUser().id&&!d)return;let g=dt("delete",e),h=g?.findIndex(v=>v?.props?.id==="delete");!h||!g||g.splice(h-1,0,n(E.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:c?"Unsuppress Embeds":"Suppress Embeds",color:c?void 0:"danger",icon:c?sl:al,action:()=>bt.patch({url:Pt.Endpoints.MESSAGE(t.id,l),body:{flags:c?s&~Zv:s|Zv}})}))},Sg=y({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:SO}})});var wa,xg=f(()=>{"use strict";a();_();T();wa=P({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},showSelf:{type:3,description:"Enable or disable showing pronouns for yourself",default:!0}})});function xO(e,t=!1){let o=Se([Qt],()=>Qt.getUserProfile(e)?.pronouns),r=Se([Qt],()=>Qt.getGuildMemberProfile(e,Ko()?.getGuildId())?.pronouns);return t?o:r||o}function jk(e,t=!1){let o=xO(e,t)?.trim().replace(/\n+/g,"");return wa.store.pronounsFormat==="LOWERCASE"?o?.toLowerCase():o}var Wk=f(()=>{"use strict";a();Pe();S();xg()});function Kk(e){return!(e.author.bot||e.author.system||e.type===wO||!wa.store.showSelf&&e.author.id===D.getCurrentUser().id)}function Yk({message:e}){let t=jk(e.author.id);return t&&n(oe,{text:Me("USER_PROFILE_PRONOUNS")},o=>n("span",{...o,className:z(qk.timestampInline,qk.timestamp)},"\u2022 ",t))}var qk,TO,wO,Zk,Jk,Qk=f(()=>{"use strict";a();wr();ne();Pe();me();$();S();xg();Wk();qk=R("timestampInline"),TO=Ao("textAndImages","messageDisplayCompact"),wO=24;Zk=k.wrap(({message:e})=>Kk(e)?n(Yk,{message:e}):null,{noop:!0}),Jk=k.wrap(({message:e})=>!TO.useSetting()||!Kk(e)?null:n(Yk,{message:e}),{noop:!0})});var Tg,Xk=f(()=>{"use strict";a();_();M();T();Qk();xg();hr("UserMessagesPronouns","PronounDB");Tg=y({name:"UserMessagesPronouns",authors:[p.Tyman,p.TheKodeToad,p.Ven,p.Elvyra],description:"Adds pronouns to chat user messages",settings:wa,patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:'="SYSTEM_TAG"',replacement:[{match:/className:\i\(\)\(\i\.className(?:,\i\.clickable)?,\i\)}\),(?=\i)/g,replace:"$&$self.CompactPronounsChatComponentWrapper(arguments[0]),",noWarn:!0},{match:/className:\i\(\)\(\i\.className(?:,\i\.clickable)?,\i\)}\)\),(?=\i)/g,replace:"$&$self.CompactPronounsChatComponentWrapper(arguments[0]),"}]}],PronounsChatComponentWrapper:Zk,CompactPronounsChatComponentWrapper:Jk})});var Vk=f(()=>{});function tN(e){return e.size??=16,n("div",{...e,role:e.onClick!=null?"button":void 0,className:z(qn("speaker"),e.onClick!=null?qn("clickable"):void 0,e.className)},n("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 3a1 1 0 0 0-1-1h-.06a1 1 0 0 0-.74.32L5.92 7H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.92l4.28 4.68a1 1 0 0 0 .74.32H11a1 1 0 0 0 1-1V3ZM15.1 20.75c-.58.14-1.1-.33-1.1-.92v-.03c0-.5.37-.92.85-1.05a7 7 0 0 0 0-13.5A1.11 1.11 0 0 1 14 4.2v-.03c0-.6.52-1.06 1.1-.92a9 9 0 0 1 0 17.5Z"}),n("path",{d:"M15.16 16.51c-.57.28-1.16-.2-1.16-.83v-.14c0-.43.28-.8.63-1.02a3 3 0 0 0 0-5.04c-.35-.23-.63-.6-.63-1.02v-.14c0-.63.59-1.1 1.16-.83a5 5 0 0 1 0 9.02Z"})))}function oN(e){return e.size??=16,n("div",{...e,role:e.onClick!=null?"button":void 0,className:z(qn("speaker"),e.onClick!=null?qn("clickable"):void 0,e.className)},n("svg",{width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"currentColor"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4h.5v-.5a2.5 2.5 0 0 1 5 0V4h.5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm4-.5V4h-2v-.5a1 1 0 1 1 2 0Z"}),n("path",{d:"M11 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1h-.06a1 1 0 0 1-.74-.32L5.92 17H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.92l4.28-4.68a1 1 0 0 1 .74-.32H11ZM20.5 12c-.28 0-.5.22-.52.5a7 7 0 0 1-5.13 6.25c-.48.13-.85.55-.85 1.05v.03c0 .6.52 1.06 1.1.92a9 9 0 0 0 6.89-8.25.48.48 0 0 0-.49-.5h-1ZM16.5 12c-.28 0-.5.23-.54.5a3 3 0 0 1-1.33 2.02c-.35.23-.63.6-.63 1.02v.14c0 .63.59 1.1 1.16.83a5 5 0 0 0 2.82-4.01c.02-.28-.2-.5-.48-.5h-1Z"})))}function AO({channel:e,isLocked:t}){let o=Se([Mg],()=>Mg.getVoiceStatesForChannel(e.id)),r=$e(()=>Object.values(o).map(u=>D.getUser(u.userId)).filter(u=>u!=null),[o]),i=e.getGuildId()==null?void 0:ce.getGuild(e.getGuildId()),s=i?.icon==null?void 0:Ft.getGuildIconURL({id:i.id,icon:i.icon,size:30}),l=Ms(e.type).with(ah.union(1,3),()=>e.recipients.length>=2&&e.icon==null?n(NO,{recipients:e.recipients,size:"SIZE_32"}):n(kO,{src:IO(e),size:"SIZE_32"})).otherwise(()=>null),c=PO(e);return n(m,null,i!=null&&n("div",{className:qn("name")},s!=null&&n("img",{className:qn("guild-icon"),src:s,alt:""}),n(Q,{variant:"text-sm/bold"},i.name)),n("div",{className:qn("name")},l,n(Q,{variant:"text-sm/semibold"},c)),n("div",{className:qn("vc-members")},t?n(oN,{size:18}):n(tN,{size:18}),n(CO,{users:r,renderIcon:!1,max:13,size:18})))}var qn,MO,PO,IO,Mg,CO,kO,NO,eN,wg,Pg,nN=f(()=>{"use strict";a();He();ne();me();$();S();qn=ue("vc-uvs-"),{selectVoiceChannel:MO}=R("selectVoiceChannel","selectChannel"),{useChannelName:PO}=Ze("#{intl::GROUP_DM_ALONE}",{useChannelName:B.byCode("()=>null==")}),IO=Ce(".getChannelIconURL({"),Mg=be("VoiceStateStore"),CO=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),kO=se(".status)/2):0"),NO=se("frontSrc:","getAvatarURL"),eN=R("actionButton","highlight");wg={},Pg=k.wrap(({userId:e,isActionButton:t,shouldHighlight:o})=>{let r=Se([Mg],()=>Mg.getVoiceStateForUser(e)?.channelId),i=r==null?void 0:ie.getChannel(r);if(i==null)return null;let s=i.isDM()||i.isMultiUserDM();if(!s&&!Be.can(ke.VIEW_CHANNEL,i)&&!Vencord.Plugins.isPluginEnabled("ShowHiddenChannels"))return null;let l=!s&&(!Be.can(ke.VIEW_CHANNEL,i)||!Be.can(ke.CONNECT,i));function c(u){if(u.preventDefault(),u.stopPropagation(),!(i==null||r==null))if(clearTimeout(wg[r]),delete wg[r],u.detail>1){if(!s&&!Be.can(ke.CONNECT,i)){Je("You cannot join the user's Voice Channel",ee.Type.FAILURE);return}MO(r)}else wg[r]=setTimeout(()=>{Ps.transitionToChannel(r),delete wg[r]},250)}return n(oe,{text:n(AO,{channel:i,isLocked:l}),tooltipClassName:qn("tooltip-container"),tooltipContentClassName:qn("tooltip-content")},u=>{let d={...u,className:z(t&&eN.actionButton,o&&eN.highlight),size:t?20:void 0,onClick:c};return l?n(oN,{...d}):n(tN,{...d})})},{noop:!0})});var Bc,Ig,rN=f(()=>{"use strict";a();Vk();Ll();_l();_();M();T();nN();Bc=P({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}}),Ig=y({name:"UserVoiceShow",description:"Shows an indicator when a user is in a Voice Channel",authors:[p.Nuckyz,p.LordElias],dependencies:["MemberListDecoratorsAPI","MessageDecorationsAPI"],settings:Bc,patches:[{find:"#{intl::USER_PROFILE_LOAD_ERROR}",replacement:{match:/(\.fetchError.+?\?)null/,replace:(e,t)=>`${t}$self.VoiceChannelIndicator({userId:arguments[0]?.userId})`},predicate:()=>Bc.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:()=>Bc.store.showInMemberList}],start(){Bc.store.showInMemberList&&Yi("UserVoiceShow",({user:e})=>e==null?null:n(Pg,{userId:e.id})),Bc.store.showInMessages&&Ji("UserVoiceShow",({message:e})=>e?.author==null?null:n(Pg,{userId:e.author.id}))},stop(){Zi("UserVoiceShow"),Qi("UserVoiceShow")},VoiceChannelIndicator:Pg})});var RO,Jv,Cg,iN=f(()=>{"use strict";a();_();_o();M();T();RO="https://usrbg.is-hardly.online/users",Jv=P({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}}),Cg=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.katlyn,p.pylix,p.TheKodeToad],settings:Jv,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:()=>Jv.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.getVoiceBackgroundStyles($1);"}]}],data:null,settingsAboutComponent:()=>n(it,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),getVoiceBackgroundStyles({className:e,participantUserId:t}){if(e.includes("tile_")&&this.userHasBackground(t))return{backgroundImage:`url(${this.getImageUrl(t)})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},patchBannerUrl({displayProfile:e}){if(!(e?.banner&&Jv.store.nitroFirst)&&this.userHasBackground(e?.userId))return this.getImageUrl(e?.userId)},userHasBackground(e){return!!this.data?.users[e]},getImageUrl(e){if(!this.userHasBackground(e))return null;let{endpoint:t,bucket:o,prefix:r,users:{[e]:i}}=this.data;return`${t}/${o}/${r}${e}?${i}`},async start(){let e=await fetch(RO);e.ok&&(this.data=await e.json())}})});var Qv,Xv,DO,kg,sN=f(()=>{"use strict";a();M();T();$();S();Qv=new Map,DO=Ce(".createFromServer(",".isBlockedForMessage","messageReference:"),kg=y({name:"ValidReply",description:'Fixes "Message could not be loaded" upon hovering over the reply',authors:[p.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){Xv=e},async fetchReply(e){let{channel_id:t,message_id:o}=e.baseMessage.messageReference;Qv.has(o)||(Qv.set(o,t),bt.get({url:`/channels/${t}/messages`,query:{limit:1,around:o},retries:2}).then(r=>{let i=r?.body?.[0];i&&(i.id!==o?(Xv.set(t,o,{state:2}),G.dispatch({type:"MESSAGE_DELETE",channelId:t,message:o})):(Xv.set(i.channel_id,i.id,{state:0,message:DO(i)}),G.dispatch({type:"MESSAGE_UPDATE",message:i})))}).catch(()=>{}).finally(()=>{Qv.delete(o)}))}})});async function EO(e){let t=D.getUser(e);if(t)return t;let o=await bt.get({url:Pt.Endpoints.USER(e)}).then(s=>(G.dispatch({type:"USER_UPDATE",user:s.body}),s.body));await G.dispatch({type:"USER_PROFILE_FETCH_FAILURE",userId:e}),t=D.getUser(e);let r=Object.entries(LO).filter(([s,l])=>!isNaN(l)&&t.hasFlag(l)).map(([s])=>aN[s.toLowerCase()]).filter(Pr);(o.premium_type||!o.bot&&(o.banner||o.avatar?.startsWith?.("a_")))&&r.push(aN.premium);let i=Qt.getUserProfile(e);return i.accentColor=o.accent_color,i.badges=r,i.banner=o.banner,i.premiumType=o.premium_type,t}function OO({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,l]=K(e.userId);if(s)return n(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return n(o,{...e,inlinePreview:i.formatInline},n("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let d=u.match(/<@!?(\d+)>/)?.[1];if(!d||Ng.has(d))return;if(D.getUser(d))return l(d);let g=()=>{Ng.add(d),lN.unshift(()=>EO(d).then(()=>{l(d),Ng.delete(d)}).catch(h=>{h?.status===429&&(lN.unshift(()=>mn(h?.body?.retry_after??1e3).then(g)),Ng.delete(d))}).finally(()=>mn(300)))};g()}},c))}var LO,aN,Ng,lN,Ag,cN=f(()=>{"use strict";a();ne();M();Zs();me();qr();T();S();LO=Pt.UserFlags,aN={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,lN=new Mo(5);Ag=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",authors:[p.Ven,p.Dolfies],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,100}return null==.{0,70}\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}},{find:"unknownUserMentionPlaceholder:",replacement:{match:/unknownUserMentionPlaceholder:/,replace:"$&false&&"}}],renderMention(e,t,o,r,i){return n(k,{noop:!0},n(OO,{key:"mention"+o.userId,RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var Vv,Rg,uN=f(()=>{"use strict";a();M();T();S();Vv={},Rg=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.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=ie.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(Le.getVoiceChannelId()===o){e();return}let r=Vv[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete Vv[o]):r.timeout=setTimeout(()=>{delete Vv[o]},500)}})});function Lg(e,t=j.plugins.VcNarrator){if(!e)return;let o=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new V("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(o.voice=r,o.volume=t.volume,o.rate=t.rate,speechSynthesis.speak(o))}function Dg(e){let t=j.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function Eg(e,t,o,r,i){return e.replaceAll("{{USER}}",Dg(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Dg(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Dg(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Dg(i)||(i?"Someone":""))}function _O({channelId:e,oldChannelId:t},o){if(o&&e!==eb&&(t=eb,eb=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function BO(e,t){let o=Object.assign({},j.plugins.VcNarrator,e),r=D.getCurrentUser(),i=jo.getGuildId();Lg(Eg(o[t+"Message"],r.username,"general",r.globalName??r.username,Re.getNick(i,r.id)??r.username),o)}var pN,eb,Og,dN=f(()=>{"use strict";a();_();Ei();M();Ae();ze();Qo();T();$();S();pN=R("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");Og=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[p.Ven],reporterTestable:2,flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=jo.getGuildId(),o=Le.getVoiceChannelId(),r=D.getCurrentUser().id;if(ie.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===r;if(!u&&(!o||l!==o&&c!==o))continue;let[d,g]=_O(i,u);if(!d)continue;let h=j.plugins.VcNarrator[d+"Message"],v=u&&!j.plugins.VcNarrator.sayOwnName?"":D.getUser(s).username,C=v&&(D.getUser(s).globalName??v),w=v&&(Re.getNick(t,s)??v),x=ie.getChannel(g).name;Lg(Eg(h,v,x,C,w))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Le.getVoiceChannelId(),t=pN.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";Lg(Eg(j.plugins.VcNarrator[o+"Message"],"",ie.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Le.getVoiceChannelId(),t=pN.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";Lg(Eg(j.plugins.VcNarrator[o+"Message"],"",ie.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new V("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:window.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,o]=$e(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=$e(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(wo,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let s="No narrator voices found. ";s+=navigator.platform?.toLowerCase().includes("linux")?"Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag":"Try installing some in the Narrator settings of your Operating System",i=n(wo,null,s)}return n(b.FormSection,null,n(b.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(b.FormText,null,"The special placeholders ",n("code",null,"{{USER}}"),", ",n("code",null,"{{DISPLAY_NAME}}"),", ",n("code",null,"{{NICKNAME}}")," and ",n("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),o&&n(m,null,n(b.FormTitle,{className:F.top20,tag:"h3"},"Play Example Sounds"),n("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>n(I,{key:s,onClick:()=>BO(e,s)},ko([s]))))),i)}})});var mN=f(()=>{});function UO(e){let{useQuickCss:t}=Ot(["useQuickCss"]),o=[];for(let r of Object.values(Vencord.Plugins.plugins))r.toolboxActions&&Vencord.Plugins.isPluginEnabled(r.name)&&o.push(n(E.MenuGroup,{label:r.name,key:`vc-toolbox-${r.name}`},Object.entries(r.toolboxActions).map(([i,s])=>{let l=`vc-toolbox-${r.name}-${i}`;return n(E.MenuItem,{id:l,key:l,label:i,action:s})})));return n(E.Menu,{navId:"vc-toolbox",onClose:e},n(E.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:gl}),n(E.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:t,label:"Enable QuickCSS",action:()=>{j.useQuickCss=!t}}),n(E.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...o)}function $O(e){return n("svg",{viewBox:"0 0 27 27",width:24,height:24,className:"vc-toolbox-icon"},n("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function GO(){let[e,t]=K(!1);return n(xs,{position:"bottom",align:"right",animation:xs.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>UO(()=>t(!1))},(o,{isShown:r})=>n(FO,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>$O(r),selected:r}))}function zO({children:e}){return e.splice(e.length-1,0,n(k,{noop:!0},n(GO,null))),n(m,null,e)}var FO,_g,fN=f(()=>{"use strict";a();mN();Pu();_();ne();M();T();$();S();FO=se(".HEADER_BAR_BADGE_TOP:",'.iconBadge,"top"');_g=y({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[p.Ven,p.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:k.wrap(zO,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function hN(e,t,o){let r=e.startsWith("/")?"png":tb.store.format,i=new URL(e,window.location.href);i.searchParams.set("size",tb.store.imgSize),i.pathname=i.pathname.replace(/\.(png|jpe?g|webp)$/,`.${r}`),e=i.toString(),i.searchParams.set("size","4096");let s=i.toString();Yo({url:e,original:s,width:t,height:o})}var tb,Fc,gN,HO,jO,WO,Bg,yN=f(()=>{"use strict";a();_();At();M();Pe();T();S();tb=P({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"}))}}),Fc=e=>hN(e,512,512),gN=e=>hN(e,1024);HO=(e,{user:t,guildId:o})=>{if(!t)return;let r=Re.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(E.MenuGroup,null,n(E.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Fc(Ft.getUserAvatarURL(t,!0)),icon:yn}),r&&n(E.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Fc(Ft.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0})),icon:yn})))},jO=(e,{guild:t})=>{if(!t)return;let{id:o,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,n(E.MenuGroup,null,r?n(E.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Fc(Ft.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:yn}):null,i?n(E.MenuItem,{id:"view-banner",label:"View Banner",action:()=>gN(Ft.getGuildBannerURL(t,!0)),icon:yn}):null))},WO=(e,{channel:t})=>{t&&e.splice(-1,0,n(E.MenuGroup,null,n(E.MenuItem,{id:"view-group-channel-icon",label:"View Icon",action:()=>Fc(Ft.getChannelIconURL(t)),icon:yn})))},Bg=y({name:"ViewIcons",authors:[p.Ven,p.TheKodeToad,p.Nuckyz,p.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:tb,openAvatar:Fc,openBanner:gN,contextMenus:{"user-context":HO,"guild-context":jO,"gdm-context":WO},patches:[{find:".overlay:void 0,status:",replacement:[{match:/avatarSrc:(\i),eventHandlers:(\i).+?"div",{...\2,/,replace:'$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},',noWarn:!0},{match:/avatarSrc:(\i),eventHandlers:(\i).+?"div",.{0,100}className:\i,/,replace:'$&style:{cursor:"pointer"},onClick:()=>{$self.openAvatar($1)},'}],all:!0},{find:'backgroundColor:"COMPLETE"',replacement:{match:/(\.banner,.+?),style:{(?=.+?backgroundImage:null!=(\i)\?"url\("\.concat\(\2,)/,replace:(e,t,o)=>`${t},onClick:()=>${o}!=null&&$self.openBanner(${o}),style:{cursor:${o}!=null?"pointer":void 0,`}},{find:'["aria-hidden"],"aria-label":',replacement:{match:/null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,replace:(e,t)=>`${e},onClick:()=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${t})`}},{find:".cursorPointer:null,children",replacement:{match:/(?=,src:(\i.getAvatarURL\(.+?[)]))/,replace:(e,t)=>`,onClick:()=>$self.openAvatar(${t})`}},{find:'experimentLocation:"empty_messages"',replacement:{match:/(?<=SIZE_80,)(?=src:(.+?\))[,}])/,replace:(e,t)=>`onClick:()=>$self.openAvatar(${t}),`}}]})});function qO(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function KO(e){let t=qO(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let o=t;return delete o.editHistory,delete o.deleted,delete o.firstEditTimestamp,o.attachments?.forEach(r=>delete r.deleted),t}function nb(e,t,o){let r=he(i=>n(k,null,n(ve,{...i,size:"large"},n(Ne,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(pt,{onClick:()=>sr(r)})),n(we,null,n("div",{style:{padding:"16px 0"}},!!o&&n(m,null,n(b.FormTitle,{tag:"h5"},"Content"),n(rl,{content:o,lang:""}),n(b.FormDivider,{className:F.bottom20})),n(b.FormTitle,{tag:"h5"},t," Data"),n(rl,{content:e,lang:"json"}))),n(ut,null,n(ge,{cellSpacing:10},n(I,{onClick:()=>Xt(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(I,{onClick:()=>Xt(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function vN(e){e=KO(e);let t=JSON.stringify(e,null,4);return nb(t,"Message",e.content)}function Ma(e){return(t,o)=>{let r=o[e.toLowerCase()];if(!r||o.label===Me("CHANNEL_ACTIONS_MENU_LABEL"))return;let i=t.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),t=s.children}t.splice(-1,0,n(E.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>nb(JSON.stringify(r,null,4),e),icon:ob}))}}var ob,Fg,YO,Ug,bN=f(()=>{"use strict";a();_();bu();ne();jt();M();Pe();ze();me();Ke();T();S();ob=()=>n("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},n("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),n("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));Fg=P({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"}]}});YO=(e,{id:t})=>{let o=ar();if(!o)return;let r=ce.getRole(o.id,t);r&&e.push(n(E.MenuItem,{id:"vc-view-role-raw",label:"View Raw",action:()=>nb(JSON.stringify(r,null,4),"Role"),icon:ob}))},Ug=y({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[p.KingFish,p.Ven,p.rad,p.ImLvna],settings:Fg,contextMenus:{"guild-context":Ma("Guild"),"guild-settings-role-context":Ma("Role"),"channel-context":Ma("Channel"),"thread-context":Ma("Channel"),"gdm-context":Ma("Channel"),"user-context":Ma("User"),"dev-context":YO},renderMessagePopoverButton(e){let t=()=>{Fg.store.clickMethod==="Right"?Xt(e.content):vN(e)},o=i=>{Fg.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Xt(e.content)):(i.preventDefault(),i.stopPropagation(),vN(e))};return{label:Fg.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:ob,message:e,channel:ie.getChannel(e.channel_id),onClick:t,onContextMenu:o}}})});var SN=f(()=>{});var $g,xN=f(()=>{"use strict";a();SN();M();T();$g=y({name:"VoiceDownload",description:"Adds a download to voice messages. (Opens a new browser tab)",authors:[p.puv],patches:[{find:"rippleContainer,children",replacement:{match:/\(0,\i\.jsx\).{0,150},children:.{0,50}\("source",{src:(\i)}\)}\)/,replace:"[$&, $self.renderDownload($1)]"}}],renderDownload(e){return n("a",{className:"vc-voice-download",href:e,onClick:t=>t.stopPropagation(),"aria-label":"Download voice message",target:"_blank"},n(this.Icon,null))},Icon:()=>n("svg",{height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z"}))})});var TN=f(()=>{});var Pa,Gg=f(()=>{"use strict";a();_();T();Pa=P({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var rb,hi,Uc=f(()=>{"use strict";a();He();$();rb=be("MediaEngineStore"),hi=ue("vc-vmsg-")});var ZO,wN,MN=f(()=>{"use strict";a();S();Gg();Uc();ZO=VencordNative.pluginHelpers.VoiceMessages,wN=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=K(!1),i=l=>{r(l),t?.(l)};function s(){let l=DiscordNative.nativeModules.requireModule("discord_voice");!o?l.startLocalAudioRecording({echoCancellation:Pa.store.echoCancellation,noiseCancellation:Pa.store.noiseSuppression,deviceId:rb.getInputDeviceId()},u=>{u?i(!0):Je("Failed to start recording",ee.Type.FAILURE)}):l.stopLocalAudioRecording(async u=>{if(u){let d=await ZO.readRecording(u);d?e(new Blob([d],{type:"audio/ogg; codecs=opus"})):Je("Failed to finish recording",ee.Type.FAILURE)}i(!1)})}return n(I,{onClick:s},o?"Stop":"Start"," recording")}});var JO,PN,IN=f(()=>{"use strict";a();wt();$();Uc();JO=se("waveform:","onVolumeChange"),PN=({src:e,waveform:t,recording:o})=>{let r=Qa({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(JO,{key:e,src:e,waveform:t}):n("div",{className:hi("preview",o?"preview-recording":[])},n("div",{className:hi("preview-indicator")}),n("div",{className:hi("preview-time")},s),n("div",{className:hi("preview-label")},o?"RECORDING":"----"))}});var CN=f(()=>{"use strict";a();S();Gg();Uc()});function t_(e,t){let o=Le.getChannelId(),r=XO.getPendingReply(o);r&&G.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new QO({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{bt.post({url:Pt.Endpoints.MESSAGES(o),body:{flags:8192,channel_id:o,content:"",nonce:To.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?Wo.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>Je("Failed to upload voice message",ee.Type.FAILURE)),i.upload()}function o_(){let[e,t]=K();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function n_({modalProps:e}){let[t,o]=K(!1),[r,i]=K(),[s,l]=o_();le(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=St(async()=>{if(!r)return kN;let g=await new AudioContext().decodeAudioData(await r.arrayBuffer()),h=g.getChannelData(0),v=new Uint8Array(Ai.clamp(Math.floor(g.duration*10),Math.min(32,h.length),256)),C=Math.floor(h.length/v.length);for(let N=0;N<v.length;N++){let A=0;for(let L=0;L<C;L++){let U=N*C+L;A+=h[U]**2}v[N]=~~(Math.sqrt(A/C)*255)}let w=Math.max(...v),x=1+(255/w-1)*Math.min(1,100*(w/255)**3);for(let N=0;N<v.length;N++)v[N]=Math.min(255,~~(v[N]*x));return{waveform:window.btoa(String.fromCharCode(...v)),duration:g.duration}},{deps:[r],fallbackValue:kN}),u=r&&(!r.type.startsWith("audio/ogg")||r.type.includes("codecs")&&!r.type.includes("opus"));return n(ve,{...e},n(Ne,null,n(b.FormTitle,null,"Record Voice Message")),n(we,{className:hi("modal")},n("div",{className:hi("buttons")},n(VO,{setAudioBlob:d=>{i(d),l(d)},onRecordingChange:o}),n(I,{onClick:async()=>{let d=await kS("audio/*");d&&(i(d),l(d))}},"Upload File")),n(b.FormTitle,null,"Preview"),n(PN,{src:s,waveform:c.waveform,recording:t}),u&&n(Zt,{className:`vc-plugins-restart-card ${F.top16}`},n(b.FormText,null,"Voice Messages have to be OggOpus to be playable on iOS. This file is ",n("code",null,r.type)," so it will not be playable on iOS."),n(b.FormText,{className:F.top8},"To fix it, first convert it to OggOpus, for example using the ",n(it,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),n(ut,null,n(I,{disabled:!r,onClick:()=>{t_(r,c),e.onClose(),Je("Now sending voice message... Please be patient",ee.Type.MESSAGE)}},"Send")))}var QO,XO,ib,VO,e_,zg,kN,NN=f(()=>{"use strict";a();TN();At();_o();M();ze();Ke();wt();T();s1();$();S();MN();Gg();Uc();IN();CN();QO=kt(e=>e.prototype?.trackUploadFinished),XO=be("PendingReplyStore"),ib=R("optionName","optionIcon","optionLabel"),VO=wN,e_=(e,t)=>{t.channel.guild_id&&!(Be.can(ke.SEND_VOICE_MESSAGES,t.channel)&&Be.can(ke.SEND_MESSAGES,t.channel))||e.push(n(E.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:ib.optionLabel},n(Lh,{className:ib.optionIcon,height:24,width:24}),n("div",{className:ib.optionName},"Send voice message")),action:()=>he(o=>n(n_,{modalProps:o}))}))},zg=y({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:[p.Ven,p.Vap,p.Nickyux],settings:Pa,contextMenus:{"channel-attach":e_}}),kN={waveform:"AAAAAAAAAAAA",duration:1}});var r_,Hg,AN=f(()=>{"use strict";a();_();vr();M();T();r_=P({multiplier:{description:"Volume Multiplier",type:5,markers:Vt(1,5,1),default:2,stickToMarkers:!0}}),Hg=y({name:"VolumeBooster",authors:[p.Nuckyz,p.sadan],description:"Allows you to set the user and stream volume above the default maximum",settings:r_,patches:[...["#{intl::USER_VOLUME}","currentVolume:"].map(e=>({find:e,replacement:{match:/(?<=maxValue:)\i\.\i\?(\d+?):(\d+?)(?=,)/,replace:(t,o,r)=>`${o}*$self.settings.store.multiplier`}})),{find:"streamSourceNode",predicate:()=>!1,group:!0,replacement:[{match:/Math\.max.{0,30}\)\)/,replace:"arguments[0]"},{match:/\}return"video"/,replace:"this.updateAudioElement();$&"},{match:/\.volume=this\._volume\/100;/,replace:".volume=0.00;$self.patchVolume(this);"}]},{find:"AudioContextSettingsMigrated",replacement:[{match:/(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localMutes\).+?volume:).+?(?=,)/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localVolumes\).+?volume:).+?(?=})/,replace:"$&>200?200:$&"}]},{find:'="MediaEngineStore",',replacement:[{match:/(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,replace:(e,t,o,r,i)=>t+`(${o}>200?void 0:${o}=${r})`+i+`${o}??${r})`}]}],patchVolume(e){if(e.stream.getAudioTracks().length!==0){if(e.streamSourceNode??=e.audioContext.createMediaStreamSource(e.stream),!e.gainNode){let t=e.gainNode=e.audioContext.createGain();e.streamSourceNode.connect(t),t.connect(e.audioContext.destination)}e.sinkId!=null&&e.sinkId!==e.audioContext.sinkId&&"setSinkId"in AudioContext.prototype&&e.audioContext.setSinkId(e.sinkId==="default"?"":e.sinkId),e.gainNode.gain.value=e._mute?0:e._volume/100}}})});function l_(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return bt.get({url:Pt.Endpoints.REACTIONS(e.channel_id,e.id,r),query:{limit:100,type:o},oldFormErrors:!0}).then(i=>{for(let s of i.body)G.dispatch({type:"USER_UPDATE",user:s});G.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})}).catch(console.error).finally(()=>mn(250))}function c_(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=DN[r]??={fetched:!1,users:{}};return i.fetched||(a_.unshift(()=>l_(e,t,o)),i.fetched=!0),i.users}function u_(e){return function(o,r){return n(oe,{text:e.slice(4).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:s_.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-4))}}function RN(e){e.stopPropagation()}var i_,s_,sb,a_,DN,jg,LN=f(()=>{"use strict";a();ne();M();me();qr();wt();T();$();S();i_=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),s_=R("moreUsers","emptyUser","avatarContainer","clickableAvatar"),sb=null,a_=new Mo;jg=y({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[p.Ven,p.KannaDev,p.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){sb=e},renderUsers(e){return e.message.reactions.length>10?null:n(k,{noop:!0},n(this.UsersComponent,{...e}))},UsersComponent({message:e,emoji:t,type:o}){let r=rr();Ii(()=>{sb?.scrollCounter>0&&sb.setAutomaticAnchor(null)}),le(()=>{let l=c=>{c.messageId===e.id&&r()};return G.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>G.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id,r]);let i=c_(e,t,o),s=Object.values(i).filter(Boolean);return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:RN,onKeyPress:RN},n(i_,{users:s,guildId:ie.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:u_(s)})))},set reactions(e){DN=e}})});async function ab(){return Ur&&Ur.close(),Ur=new WebSocket(`ws://127.0.0.1:${Yt.store.webSocketPort??42070}/?client=Vencord`),new Promise((e,t)=>{Ur.onopen=e,Ur.onerror=t,setTimeout(t,3e3)})}function m_(e){return e.type===Wg.DM&&Yt.store.dmNotifications||e.type===Wg.GROUP_DM&&Yt.store.groupDmNotifications?!1:!Yt.store.serverNotifications}function f_(e,t,o){fetch(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(r=>r.blob()).then(r=>new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result.split(",")[1]),s.readAsDataURL(r)})).then(r=>{let i={type:1,timeout:Yt.store.lengthBasedTimeout?BN(t):Yt.store.timeout,height:_N(t),opacity:Yt.store.opacity,volume:Yt.store.volume,audioPath:Yt.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};ON(i)})}function EN(e,t){let o={type:1,timeout:Yt.store.lengthBasedTimeout?BN(e):Yt.store.timeout,height:_N(e),opacity:Yt.store.opacity,volume:Yt.store.volume,audioPath:Yt.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:"default",sourceApp:"Vencord"};ON(o)}async function ON(e){if(Yt.store.preferUDP){d_.sendToOverlay(e);return}let t={sender:"Vencord",target:"xsoverlay",command:"SendNotification",jsonData:JSON.stringify(e),rawData:null};Ur.readyState!==Ur.OPEN&&await ab(),Ur.send(JSON.stringify(t))}function g_(e,t){let o=D.getCurrentUser();return e.author.id===o.id||e.author.bot&&!Yt.store.botNotifications?!1:p_(e,t)}function _N(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function BN(e){return e.length<=100?3:e.length<=200?4:e.length<=300?5:6}var Wg,p_,W5e,Yt,Ur,d_,qg,FN=f(()=>{"use strict";a();_();vr();M();Ae();T();$();S();Wg=kt(e=>e.ANNOUNCEMENT_THREAD===10),p_=Ce(".SUPPRESS_NOTIFICATIONS))return!1"),W5e=new V("XSOverlay"),Yt=P({webSocketPort:{type:1,description:"Websocket port",default:42070,async onChange(){await ab()}},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:Vt(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:Vt(0,1,.1)}});d_=VencordNative.pluginHelpers.XSOverlay,qg=y({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[p.Nyako],tags:["vr","notify"],reporterTestable:2,settings:Yt,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(D.getCurrentUser().id)&&Yt.store.callNotifications){let t=ie.getChannel(e.channel_id);EN("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){if(t)return;let o=ie.getChannel(e.channel_id);if(!g_(e,e.channel_id))return;let r=Yt.store.pingColor.replaceAll("#","").trim(),i=Yt.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let g=ce.getGuild(o.guild_id);l=`${e.author.username} (${g.name}, #${o.name})`}switch(o.type){case Wg.DM:l=e.author.username.trim();break;case Wg.GROUP_DM:let g=o.name.trim()??o.rawRecipients.map(h=>h.username).join(", ");l=`${e.author.username} (${g})`;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(g=>typeof g?.content_type=="string"&&g?.content_type.startsWith("image")).forEach(g=>{s+=` [image: ${g.filename}] `}),e.attachments.filter(g=>g&&!g.content_type?.startsWith("image")).forEach(g=>{s+=` [attachment: ${g.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(g,h)=>`<color=#${r}><b>@${D.getUser(h)?.username||"unknown-user"}</color></b>`)),e.mention_roles.length>0)for(let g of e.mention_roles){let h=ce.getRole(o.guild_id,g);if(!h)continue;let v=h.colorString??`#${r}`;s=s.replace(`<@&${g}>`,`<b><color=${v}>@${h.name}</color></b>`)}let u=s.match(new RegExp("(<a?:\\w+:\\d+>)","g")),d=s.match(new RegExp("<(#\\d+)>","g"));if(u)for(let g of u)s=s.replace(new RegExp(`${g}`,"g"),`:${g.split(":")[1]}:`);if(d)for(let g of d){let h=g.split("<#")[1];h=h.substring(0,h.length-1),s=s.replace(new RegExp(`${g}`,"g"),`<b><color=#${i}>#${ie.getChannel(h).name}</color></b>`)}m_(o)||f_(l,s,e)}},start:ab,stop(){Ur.close()},settingsAboutComponent:()=>n(m,null,n(I,{onClick:()=>EN("This is a test notification! explode","Hello from Vendor!")},"Send test notification"))})});var Kg,UN=f(()=>{"use strict";a();M();T();Kg=y({name:"YoutubeAdblock",description:"Block ads in YouTube embeds and the WatchTogether activity via AdGuard",authors:[p.ImLvna,p.Ven]})});var je,zs,M2,$n=f(()=>{a();py();I2();C2();k2();N2();D2();E2();O2();F2();U2();$2();G2();z2();H2();j2();q2();gy();xx();Tx();wx();Mx();Px();Ix();Nx();Rx();by();Bx();Fx();Ux();zx();Hx();cT();pT();dT();yT();bT();ST();MT();AT();RT();DT();OT();BT();UT();$T();zT();HT();JT();QT();VT();Mw();Pw();Iw();Aw();Lw();Ew();nM();pM();dM();gM();hM();yM();vM();bM();SM();xM();MM();IM();CM();DM();LM();BM();GM();zM();qM();KM();c0();eP();Zd();cP();uP();mP();hP();v0();wP();CP();NP();EP();I0();qP();KP();YP();ZP();XP();oI();rI();iI();sI();aI();cI();uI();pI();dI();mI();fI();gI();hI();yI();vI();bI();SI();xI();TI();wI();MI();PI();NI();AI();RI();dc();GI();jI();rf();d4();b4();T4();w4();A4();R4();L4();q4();K4();J4();Q4();eC();IC();CC();NC();RC();OC();zC();jC();I5();C5();D5();Av();F5();$5();j5();W5();q5();J5();ik();sk();ak();uk();pk();mk();fk();Tk();wk();Ok();$k();Yv();Gk();zk();Hk();Xk();rN();iN();sN();cN();uN();dN();fN();yN();bN();xN();NN();AN();LN();FN();UN();je={[Ws.name]:Ws,[Zu.name]:Zu,[Ju.name]:Ju,[Qu.name]:Qu,[Xu.name]:Xu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[op.name]:op,[np.name]:np,[rp.name]:rp,[ip.name]:ip,[sp.name]:sp,[ap.name]:ap,[lp.name]:lp,[cp.name]:cp,[qs.name]:qs,[fp.name]:fp,[hp.name]:hp,[yp.name]:yp,[vp.name]:vp,[bp.name]:bp,[Sp.name]:Sp,[xp.name]:xp,[Tp.name]:Tp,[wp.name]:wp,[Mp.name]:Mp,[Pp.name]:Pp,[Ip.name]:Ip,[Cp.name]:Cp,[kp.name]:kp,[Np.name]:Np,[Rp.name]:Rp,[Dp.name]:Dp,[Lp.name]:Lp,[Ep.name]:Ep,[Op.name]:Op,[_p.name]:_p,[$p.name]:$p,[Gp.name]:Gp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[qp.name]:qp,[Kp.name]:Kp,[Yp.name]:Yp,[Zp.name]:Zp,[Xp.name]:Xp,[Vp.name]:Vp,[td.name]:td,[ud.name]:ud,[pd.name]:pd,[dd.name]:dd,[fd.name]:fd,[hd.name]:hd,[yd.name]:yd,[Id.name]:Id,[Cd.name]:Cd,[kd.name]:kd,[Nd.name]:Nd,[Ad.name]:Ad,[Rd.name]:Rd,[Dd.name]:Dd,[Ld.name]:Ld,[Ed.name]:Ed,[Od.name]:Od,[_d.name]:_d,[Bd.name]:Bd,[Fd.name]:Fd,[Ud.name]:Ud,[$d.name]:$d,[zd.name]:zd,[Hd.name]:Hd,[jd.name]:jd,[Wd.name]:Wd,[qd.name]:qd,[Kd.name]:Kd,[Yd.name]:Yd,[Jd.name]:Jd,[Qd.name]:Qd,[Vd.name]:Vd,[tm.name]:tm,[om.name]:om,[im.name]:im,[sm.name]:sm,[am.name]:am,[lm.name]:lm,[um.name]:um,[dm.name]:dm,[fm.name]:fm,[gm.name]:gm,[hm.name]:hm,[ym.name]:ym,[bm.name]:bm,[Sm.name]:Sm,[Tm.name]:Tm,[wm.name]:wm,[Mm.name]:Mm,[Pm.name]:Pm,[Im.name]:Im,[Cm.name]:Cm,[km.name]:km,[Nm.name]:Nm,[Am.name]:Am,[Dm.name]:Dm,[Lm.name]:Lm,[Em.name]:Em,[Om.name]:Om,[_m.name]:_m,[Bm.name]:Bm,[Fm.name]:Fm,[Um.name]:Um,[$m.name]:$m,[Gm.name]:Gm,[zm.name]:zm,[Hm.name]:Hm,[jm.name]:jm,[Wm.name]:Wm,[qm.name]:qm,[Xm.name]:Xm,[ef.name]:ef,[tf.name]:tf,[af.name]:af,[lf.name]:lf,[uf.name]:uf,[pf.name]:pf,[df.name]:df,[gf.name]:gf,[hf.name]:hf,[bf.name]:bf,[wf.name]:wf,[Mf.name]:Mf,[Pf.name]:Pf,[If.name]:If,[kf.name]:kf,[_f.name]:_f,[Bf.name]:Bf,[Ff.name]:Ff,[Uf.name]:Uf,[$f.name]:$f,[Gf.name]:Gf,[zf.name]:zf,[Yf.name]:Yf,[Zf.name]:Zf,[Qf.name]:Qf,[Xf.name]:Xf,[Vf.name]:Vf,[eg.name]:eg,[tg.name]:tg,[og.name]:og,[ng.name]:ng,[rg.name]:rg,[ig.name]:ig,[sg.name]:sg,[ag.name]:ag,[lg.name]:lg,[cg.name]:cg,[ug.name]:ug,[pg.name]:pg,[dg.name]:dg,[mg.name]:mg,[fg.name]:fg,[yg.name]:yg,[hg.name]:hg,[vg.name]:vg,[bg.name]:bg,[Sg.name]:Sg,[Tg.name]:Tg,[Ig.name]:Ig,[Cg.name]:Cg,[kg.name]:kg,[Ag.name]:Ag,[Rg.name]:Rg,[Og.name]:Og,[_g.name]:_g,[Bg.name]:Bg,[Ug.name]:Ug,[$g.name]:$g,[zg.name]:zg,[Hg.name]:Hg,[jg.name]:jg,[qg.name]:qg,[Kg.name]:Kg},zs={[Ws.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},[np.name]:{folderName:"_api/messageEvents.ts",userPlugin:!1},[rp.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},[qs.name]:{folderName:"_core/settings.tsx",userPlugin:!1},[fp.name]:{folderName:"_core/supportHelper.tsx",userPlugin:!1},[hp.name]:{folderName:"accountPanelServerProfile",userPlugin:!1},[yp.name]:{folderName:"alwaysAnimate",userPlugin:!1},[vp.name]:{folderName:"alwaysExpandRoles",userPlugin:!1},[bp.name]:{folderName:"alwaysTrust",userPlugin:!1},[Sp.name]:{folderName:"anonymiseFileNames",userPlugin:!1},[xp.name]:{folderName:"appleMusic.desktop",userPlugin:!1},[Tp.name]:{folderName:"banger",userPlugin:!1},[wp.name]:{folderName:"betterFolders",userPlugin:!1},[Mp.name]:{folderName:"betterGifAltText",userPlugin:!1},[Pp.name]:{folderName:"betterGifPicker",userPlugin:!1},[Ip.name]:{folderName:"betterNotes",userPlugin:!1},[Cp.name]:{folderName:"betterRoleContext",userPlugin:!1},[kp.name]:{folderName:"betterRoleDot",userPlugin:!1},[Np.name]:{folderName:"betterSessions",userPlugin:!1},[Rp.name]:{folderName:"betterSettings",userPlugin:!1},[Dp.name]:{folderName:"betterUploadButton",userPlugin:!1},[Lp.name]:{folderName:"biggerStreamPreview",userPlugin:!1},[Ep.name]:{folderName:"blurNsfw",userPlugin:!1},[Op.name]:{folderName:"callTimer",userPlugin:!1},[_p.name]:{folderName:"clearURLs",userPlugin:!1},[$p.name]:{folderName:"clientTheme",userPlugin:!1},[Gp.name]:{folderName:"colorSighted",userPlugin:!1},[zp.name]:{folderName:"consoleJanitor",userPlugin:!1},[jp.name]:{folderName:"consoleShortcuts",userPlugin:!1},[Wp.name]:{folderName:"copyEmojiMarkdown",userPlugin:!1},[qp.name]:{folderName:"copyFileContents",userPlugin:!1},[Kp.name]:{folderName:"copyUserURLs",userPlugin:!1},[Yp.name]:{folderName:"crashHandler",userPlugin:!1},[Zp.name]:{folderName:"ctrlEnterSend",userPlugin:!1},[Xp.name]:{folderName:"customRPC",userPlugin:!1},[Vp.name]:{folderName:"customidle",userPlugin:!1},[td.name]:{folderName:"dearrow",userPlugin:!1},[ud.name]:{folderName:"decor",userPlugin:!1},[pd.name]:{folderName:"disableCallIdle",userPlugin:!1},[dd.name]:{folderName:"dontRoundMyTimestamps",userPlugin:!1},[fd.name]:{folderName:"emoteCloner",userPlugin:!1},[hd.name]:{folderName:"experiments",userPlugin:!1},[yd.name]:{folderName:"f8break",userPlugin:!1},[Id.name]:{folderName:"fakeNitro",userPlugin:!1},[Cd.name]:{folderName:"fakeProfileThemes",userPlugin:!1},[kd.name]:{folderName:"favEmojiFirst",userPlugin:!1},[Nd.name]:{folderName:"favGifSearch",userPlugin:!1},[Ad.name]:{folderName:"fixCodeblockGap",userPlugin:!1},[Rd.name]:{folderName:"fixImagesQuality",userPlugin:!1},[Dd.name]:{folderName:"fixSpotifyEmbeds.desktop",userPlugin:!1},[Ld.name]:{folderName:"fixYoutubeEmbeds.desktop",userPlugin:!1},[Ed.name]:{folderName:"forceOwnerCrown",userPlugin:!1},[Od.name]:{folderName:"friendInvites",userPlugin:!1},[_d.name]:{folderName:"friendsSince",userPlugin:!1},[Bd.name]:{folderName:"fullSearchContext",userPlugin:!1},[Fd.name]:{folderName:"fullUserInChatbox",userPlugin:!1},[Ud.name]:{folderName:"gameActivityToggle",userPlugin:!1},[$d.name]:{folderName:"gifPaste",userPlugin:!1},[zd.name]:{folderName:"greetStickerPicker",userPlugin:!1},[Hd.name]:{folderName:"hideAttachments",userPlugin:!1},[jd.name]:{folderName:"iLoveSpam",userPlugin:!1},[Wd.name]:{folderName:"ignoreActivities",userPlugin:!1},[qd.name]:{folderName:"imageLink",userPlugin:!1},[Kd.name]:{folderName:"imageZoom",userPlugin:!1},[Yd.name]:{folderName:"implicitRelationships",userPlugin:!1},[Jd.name]:{folderName:"invisibleChat.desktop",userPlugin:!1},[Qd.name]:{folderName:"ircColors",userPlugin:!1},[Vd.name]:{folderName:"keepCurrentChannel",userPlugin:!1},[tm.name]:{folderName:"lastfm",userPlugin:!1},[om.name]:{folderName:"loadingQuotes",userPlugin:!1},[im.name]:{folderName:"memberCount",userPlugin:!1},[sm.name]:{folderName:"mentionAvatars",userPlugin:!1},[am.name]:{folderName:"messageClickActions",userPlugin:!1},[lm.name]:{folderName:"messageLatency",userPlugin:!1},[um.name]:{folderName:"messageLinkEmbeds",userPlugin:!1},[dm.name]:{folderName:"messageLogger",userPlugin:!1},[fm.name]:{folderName:"messageTags",userPlugin:!1},[gm.name]:{folderName:"moreCommands",userPlugin:!1},[hm.name]:{folderName:"moreKaomoji",userPlugin:!1},[ym.name]:{folderName:"moyai",userPlugin:!1},[bm.name]:{folderName:"mutualGroupDMs",userPlugin:!1},[Sm.name]:{folderName:"newGuildSettings",userPlugin:!1},[Tm.name]:{folderName:"noBlockedMessages",userPlugin:!1},[wm.name]:{folderName:"noDevtoolsWarning",userPlugin:!1},[Mm.name]:{folderName:"noF1",userPlugin:!1},[Pm.name]:{folderName:"noMaskedUrlPaste",userPlugin:!1},[Im.name]:{folderName:"noMosaic",userPlugin:!1},[Cm.name]:{folderName:"noOnboardingDelay",userPlugin:!1},[km.name]:{folderName:"noPendingCount",userPlugin:!1},[Nm.name]:{folderName:"noProfileThemes",userPlugin:!1},[Am.name]:{folderName:"noRPC.discordDesktop",userPlugin:!1},[Dm.name]:{folderName:"noReplyMention",userPlugin:!1},[Lm.name]:{folderName:"noServerEmojis",userPlugin:!1},[Em.name]:{folderName:"noSystemBadge.discordDesktop",userPlugin:!1},[Om.name]:{folderName:"noTypingAnimation",userPlugin:!1},[_m.name]:{folderName:"noUnblockToJump",userPlugin:!1},[Bm.name]:{folderName:"normalizeMessageLinks",userPlugin:!1},[Fm.name]:{folderName:"notificationVolume",userPlugin:!1},[Um.name]:{folderName:"nsfwGateBypass",userPlugin:!1},[$m.name]:{folderName:"onePingPerDM",userPlugin:!1},[Gm.name]:{folderName:"oneko",userPlugin:!1},[zm.name]:{folderName:"openInApp",userPlugin:!1},[Hm.name]:{folderName:"overrideForumDefaults",userPlugin:!1},[jm.name]:{folderName:"partyMode",userPlugin:!1},[Wm.name]:{folderName:"pauseInvitesForever",userPlugin:!1},[qm.name]:{folderName:"permissionFreeWill",userPlugin:!1},[Xm.name]:{folderName:"permissionsViewer",userPlugin:!1},[ef.name]:{folderName:"petpet",userPlugin:!1},[tf.name]:{folderName:"pictureInPicture",userPlugin:!1},[af.name]:{folderName:"pinDms",userPlugin:!1},[lf.name]:{folderName:"plainFolderIcon",userPlugin:!1},[uf.name]:{folderName:"platformIndicators",userPlugin:!1},[pf.name]:{folderName:"previewMessage",userPlugin:!1},[df.name]:{folderName:"quickMention",userPlugin:!1},[gf.name]:{folderName:"quickReply",userPlugin:!1},[hf.name]:{folderName:"reactErrorDecoder",userPlugin:!1},[bf.name]:{folderName:"readAllNotificationsButton",userPlugin:!1},[wf.name]:{folderName:"relationshipNotifier",userPlugin:!1},[Mf.name]:{folderName:"replaceGoogleSearch",userPlugin:!1},[Pf.name]:{folderName:"replyTimestamp",userPlugin:!1},[If.name]:{folderName:"revealAllSpoilers",userPlugin:!1},[kf.name]:{folderName:"reverseImageSearch",userPlugin:!1},[_f.name]:{folderName:"reviewDB",userPlugin:!1},[Bf.name]:{folderName:"roleColorEverywhere",userPlugin:!1},[Ff.name]:{folderName:"secretRingTone",userPlugin:!1},[Uf.name]:{folderName:"seeSummaries",userPlugin:!1},[$f.name]:{folderName:"sendTimestamps",userPlugin:!1},[Gf.name]:{folderName:"serverInfo",userPlugin:!1},[zf.name]:{folderName:"serverListIndicators",userPlugin:!1},[Yf.name]:{folderName:"shikiCodeblocks.desktop",userPlugin:!1},[Zf.name]:{folderName:"showAllMessageButtons",userPlugin:!1},[Qf.name]:{folderName:"showConnections",userPlugin:!1},[Xf.name]:{folderName:"showHiddenChannels",userPlugin:!1},[Vf.name]:{folderName:"showHiddenThings",userPlugin:!1},[eg.name]:{folderName:"showMeYourName",userPlugin:!1},[tg.name]:{folderName:"showTimeoutDuration",userPlugin:!1},[og.name]:{folderName:"silentMessageToggle",userPlugin:!1},[ng.name]:{folderName:"silentTyping",userPlugin:!1},[rg.name]:{folderName:"sortFriendRequests",userPlugin:!1},[ig.name]:{folderName:"spotifyControls",userPlugin:!1},[sg.name]:{folderName:"spotifyCrack",userPlugin:!1},[ag.name]:{folderName:"spotifyShareCommands",userPlugin:!1},[lg.name]:{folderName:"startupTimings",userPlugin:!1},[cg.name]:{folderName:"stickerPaste",userPlugin:!1},[ug.name]:{folderName:"streamerModeOnStream",userPlugin:!1},[pg.name]:{folderName:"superReactionTweaks",userPlugin:!1},[dg.name]:{folderName:"textReplace",userPlugin:!1},[mg.name]:{folderName:"themeAttributes",userPlugin:!1},[fg.name]:{folderName:"translate",userPlugin:!1},[yg.name]:{folderName:"typingIndicator",userPlugin:!1},[hg.name]:{folderName:"typingTweaks",userPlugin:!1},[vg.name]:{folderName:"unindent",userPlugin:!1},[bg.name]:{folderName:"unlockedAvatarZoom",userPlugin:!1},[Sg.name]:{folderName:"unsuppressEmbeds",userPlugin:!1},[Tg.name]:{folderName:"userMessagesPronouns",userPlugin:!1},[Ig.name]:{folderName:"userVoiceShow",userPlugin:!1},[Cg.name]:{folderName:"usrbg",userPlugin:!1},[kg.name]:{folderName:"validReply",userPlugin:!1},[Ag.name]:{folderName:"validUser",userPlugin:!1},[Rg.name]:{folderName:"vcDoubleClick",userPlugin:!1},[Og.name]:{folderName:"vcNarrator",userPlugin:!1},[_g.name]:{folderName:"vencordToolbox",userPlugin:!1},[Bg.name]:{folderName:"viewIcons",userPlugin:!1},[Ug.name]:{folderName:"viewRaw",userPlugin:!1},[$g.name]:{folderName:"voiceDownload",userPlugin:!1},[zg.name]:{folderName:"voiceMessages",userPlugin:!1},[Hg.name]:{folderName:"volumeBooster",userPlugin:!1},[jg.name]:{folderName:"whoReacted",userPlugin:!1},[qg.name]:{folderName:"xsOverlay",userPlugin:!1},[Kg.name]:{folderName:"youtubeAdblock.desktop",userPlugin:!1}},M2={"WebRichPresence (arRPC)":"web",DevCompanion:"dev",DisableDeepLinks:"vesktop",WebContextMenus:"web",WebKeybinds:"web",WebScreenShareFixes:"web"}});var cb={};lt(cb,{BadgePosition:()=>Yu,_getBadges:()=>dy,addProfileBadge:()=>Hl,removeProfileBadge:()=>jl});function Hl(e){e.component&&=k.wrap(e.component,{noop:!0}),lb.add(e)}function jl(e){return lb.delete(e)}function dy(e){let t=[];for(let r of lb)if(!r.shouldShow||r.shouldShow(e)){let i=r.getBadges?r.getBadges(e).map(s=>(s.component&&=k.wrap(s.component,{noop:!0}),s)):[{...r,...e}];r.position===0?t.unshift(...i):t.push(...i)}let o=je.BadgeAPI.getDonorBadges(e.userId);return o&&t.unshift(...o),t}var Yu,lb,Wl=f(()=>{"use strict";a();ne();$n();Yu=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(Yu||{}),lb=new Set});var ub={};lt(ub,{Badges:()=>S_,ChatButtons:()=>k_,Commands:()=>y_,ContextMenu:()=>C_,DataStore:()=>It,MemberListDecorators:()=>w_,MessageAccessories:()=>v_,MessageDecorations:()=>T_,MessageEvents:()=>h_,MessagePopover:()=>b_,MessageUpdater:()=>N_,Notices:()=>Ir,Notifications:()=>I_,ServerList:()=>x_,Settings:()=>M_,Styles:()=>P_,UserSettings:()=>A_});var h_,Ir,y_,It,v_,b_,S_,x_,T_,w_,M_,P_,I_,C_,k_,N_,A_,Mr=f(()=>{"use strict";a();Wl();xr();rn();No();_n();Ll();$u();_l();Ul();ey();na();f1();pr();vf();_();He();wr();h_=J1,Ir=m1,y_=x1,It=ir,v_=z1,b_=V1,S_=cb,x_=Y0,T_=H1,w_=G1,M_=c1,P_=Ch,I_=Kh,C_=$1,k_=_1,N_=r0,A_=yy});function R_(e,t,o){let r=t;if(t in e)return void o(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,o(i)},configurable:!0,enumerable:!1})}var $N=f(()=>{"use strict";a()});var pb={};lt(pb,{CONTRIB_ROLE_ID:()=>ph,ChangeList:()=>Rl,DONOR_ROLE_ID:()=>Za,Devs:()=>p,DevsById:()=>ks,KNOWN_ISSUES_CHANNEL_ID:()=>mh,LazyComponent:()=>gt,Logger:()=>V,Margins:()=>F,ModalAPI:()=>tl,ModalCloseButton:()=>pt,ModalContent:()=>we,ModalFooter:()=>ut,ModalHeader:()=>Ne,ModalRoot:()=>ve,ModalSize:()=>Oo,Modals:()=>Rs,NoopComponent:()=>yh,Queue:()=>Mo,REACT_GLOBAL:()=>bA,REGULAR_ROLE_ID:()=>dh,SUPPORT_CATEGORY_ID:()=>Cs,SUPPORT_CHANNEL_ID:()=>cu,SYM_LAZY_CACHED:()=>Zn,SYM_LAZY_GET:()=>sn,Theme:()=>Su,VENBOT_USER_ID:()=>lu,VENCORD_GUILD_ID:()=>Ya,ZWSP:()=>Tl,canonicalizeDescriptor:()=>Wc,canonicalizeFind:()=>Jg,canonicalizeMatch:()=>Lt,canonicalizeReplace:()=>Na,canonicalizeReplacement:()=>bi,checkIntersecting:()=>gh,classes:()=>z,closeAllModals:()=>Bn,closeModal:()=>sr,copyWithToast:()=>Xt,debounce:()=>Eo,fetchUserProfile:()=>Ah,formatDuration:()=>wl,getCurrentChannel:()=>Ko,getCurrentGuild:()=>ar,getEmojiURL:()=>xu,getIntlMessage:()=>Me,getIntlMessageFromHash:()=>rS,getTheme:()=>Ds,getUniqueUsername:()=>cr,humanFriendlyJoin:()=>S3,identity:()=>Ns,insertTextIntoChatInputBox:()=>lr,interpolateIfDefined:()=>Ja,isMobile:()=>xA,isNonNullish:()=>Pr,isObject:()=>SA,isObjectEmpty:()=>nr,isPluginDev:()=>fn,isTruthy:()=>Jp,localStorage:()=>_i,makeCodeblock:()=>zi,makeLazy:()=>en,mergeDefaults:()=>As,onceDefined:()=>R_,onlyOnce:()=>Ki,openImageModal:()=>Yo,openInviteModal:()=>Fi,openMediaModal:()=>kh,openModal:()=>he,openModalLazy:()=>ol,openPrivateChannel:()=>EA,openUserProfile:()=>Zo,parseUrl:()=>fh,pluralise:()=>hh,proxyLazy:()=>Dt,runtimeHashMessageKey:()=>Ln,sendMessage:()=>Ls,sleep:()=>mn,stripIndent:()=>x3,toInlineCode:()=>T3,tryOrElse:()=>uu,useAwaiter:()=>St,useForceUpdater:()=>rr,useIntersection:()=>vh,useTimer:()=>Qa,wordsFromCamel:()=>Sn,wordsFromKebab:()=>m3,wordsFromPascal:()=>g1,wordsFromSnake:()=>d3,wordsFromTitle:()=>f3,wordsToCamel:()=>g3,wordsToKebab:()=>y3,wordsToPascal:()=>v3,wordsToSnake:()=>h3,wordsToTitle:()=>ko});var GN=f(()=>{"use strict";a();Oi();$N();R1();M();Pe();Zs();vs();So();Ca();fu();Ae();ze();gu();me();Ke();Al();Ho();qr();wt();Qo();});var fb={};lt(fb,{toggle:()=>db});function mb(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function D_(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");mb("vencord-os-theme-values").textContent=`:root{${t}}`}async function db(e){Ia?Ia.disabled=!e:e&&(Ia=mb("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{Ia.textContent=t,Ia.disabled=!j.useQuickCss}),Ia.textContent=await VencordNative.quickCss.get())}async function $c(){zN??=mb("vencord-themes");let{themeLinks:e,enabledThemes:t}=j,o=pn.theme==="light"?"light":"dark",r=e.map(i=>{let s=/^@(light|dark) (.*)/.exec(i);if(!s)return i;let[,l,c]=s;return l===o?c:null}).filter(i=>i!==null);{let i=t.map(s=>`vencord:///themes/${s}?v=${Date.now()}`);r.push(...i)}zN.textContent=r.map(i=>`@import url("${i.trim()}");`).join(`
|
|
`)}var Ia,zN,gb=f(()=>{"use strict";a();_();S();document.addEventListener("DOMContentLoaded",()=>{D_(),$c(),db(j.useQuickCss),Wt.addChangeListener("useQuickCss",db),Wt.addChangeListener("themeLinks",$c),Wt.addChangeListener("enabledThemes",$c);let e=pn.theme;pn.addChangeListener(()=>{e!==pn.theme&&(e=pn.theme,$c())}),VencordNative.quickCss.addThemeChangeListener($c)})});var HN=f(()=>{"use strict";a()});var hb={};lt(hb,{ChunkIdsRegex:()=>Vc,Common:()=>Is,DefaultExtractAndLoadChunksRegex:()=>Xc,LazyComponentWebpack:()=>Zc,_blacklistBadModules:()=>Yc,_initWebpack:()=>La,_resolveReady:()=>Aa,cache:()=>tn,extract:()=>Ba,extractAndLoadChunks:()=>Vg,extractAndLoadChunksLazy:()=>Xn,factoryListeners:()=>Da,filters:()=>B,find:()=>on,findAll:()=>Gr,findBulk:()=>zr,findByCode:()=>_a,findByCodeLazy:()=>Ce,findByProps:()=>Oa,findByPropsLazy:()=>R,findComponentByCode:()=>Jc,findComponentByCodeLazy:()=>se,findComponentLazy:()=>Qc,findExportedComponentLazy:()=>Rb,findLazy:()=>kt,findModuleFactory:()=>Ea,findModuleId:()=>an,findStore:()=>Qg,findStoreLazy:()=>be,fluxStores:()=>xi,handleModuleNotFound:()=>En,lazyWebpackSearchHistory:()=>Ab,mapMangledModule:()=>Xg,mapMangledModuleLazy:()=>Ze,moduleListeners:()=>Kc,onceReady:()=>Ti,proxyLazyWebpack:()=>mo,search:()=>bs,stringMatches:()=>Ra,waitFor:()=>Xe,waitForSubscriptions:()=>wi,wreq:()=>ht});var yb=f(()=>{"use strict";a();S();$();HN()});var O_={};lt(O_,{Api:()=>ub,Components:()=>jh,PlainSettings:()=>Un,Plugins:()=>Wu,QuickCss:()=>fb,Settings:()=>j,Updater:()=>N1,Util:()=>pb,Webpack:()=>hb,WebpackPatcher:()=>ry});async function L_(){if(j.cloud.authenticated&&!await co("Vencord_cloudSecret")){Ye({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:()=>su.open("VencordCloud")});return}j.cloud.settingsSync&&j.cloud.authenticated&&(_i.Vencord_settingsDirty?(await Bs(),delete _i.Vencord_settingsDirty):await Ru(!1)&&Ye({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Co}))}async function E_(){await Ti,zl("WebpackReady"),L_();try{if(!await br())return;if(j.autoUpdate){await Vr(),j.autoUpdateNotification&&setTimeout(()=>Ye({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:Co}),1e4);return}setTimeout(()=>Ye({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick:pp}),1e4)}catch(e){Wi.error("Failed to check for updates",e)}}var tP=f(()=>{a();Mr();Es();qu();GN();gb();qi();yb();ju();gb();ju();dp();T();_n();pr();_();qu();fu();gr();Sl();qi();yb();S();zl("Init");E_();document.addEventListener("DOMContentLoaded",()=>{zl("DOMContentLoaded"),j.winNativeTitleBar&&navigator.platform.toLowerCase().startsWith("win")&&document.head.append(Object.assign(document.createElement("style"),{id:"vencord-native-titlebar-style",textContent:"[class*=titleBar]{display: none!important}"}))},{once:!0})});tP();return bb(O_);})();
|
|
//# sourceURL=VencordRenderer
|
|
//# sourceMappingURL=vencord://renderer.js.map
|
|
/*! For license information please see renderer.js.LEGAL.txt */
|