261 lines
646 KiB
JavaScript
261 lines
646 KiB
JavaScript
// Vencord 77bed92
|
|
// Standalone: true
|
|
// Platform: Universal
|
|
// Updater Disabled: false
|
|
"use strict";var Vencord=(()=>{var QN=Object.create;var Hc=Object.defineProperty;var XN=Object.getOwnPropertyDescriptor;var VN=Object.getOwnPropertyNames;var eA=Object.getPrototypeOf,tA=Object.prototype.hasOwnProperty;var ys=(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 bi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t)=>{for(var o in t)Hc(e,o,{get:t[o],enumerable:!0})},Tb=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VN(t))!tA.call(e,i)&&i!==o&&Hc(e,i,{get:()=>t[i],enumerable:!(r=XN(t,i))||r.enumerable});return e};var jc=(e,t,o)=>(o=e!=null?QN(eA(e)):{},Tb(t||!e||!e.__esModule?Hc(o,"default",{value:e,enumerable:!0}):o,e)),wb=e=>Tb(Hc({},"__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,Ne=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 Mb,F,ze=f(()=>{"use strict";a();Mb="",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,Mb+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Mb,id:"vencord-margins"})),{once:!0})});function tn(e,t=5){let o=0,r;return()=>(r===void 0&&t>o++&&(r=e(),r===void 0&&t===o&&console.error("Lazy factory failed:",e)),r)}function Dt(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[Zn]:void 0,[an](){return!s[Zn]&&t>i++&&(s[Zn]=e(),!s[Zn]&&t===i&&console.error("Lazy factory failed:",e)),s[Zn]}});return new Proxy(s,{...Wc,get(l,c,u){if(c===Zn||c===an)return Reflect.get(l,c,u);if(!o&&r)return Dt(()=>Reflect.get(l[an](),c,u),t,!0);let d=l[an]();if(typeof d=="object"||typeof d=="function")return Reflect.get(d,c,u);throw new Error("proxyLazy called on a primitive value")}})}var Pb,Wc,an,Zn,So=f(()=>{"use strict";a();Pb=["arguments","caller","prototype"],Wc={},an=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"])Wc[e]=(t,...o)=>Reflect[e](t[an](),...o);Wc.ownKeys=e=>{let t=e[an](),o=Reflect.ownKeys(t);for(let r of Pb)o.includes(r)||o.push(r);return o};Wc.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Pb.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[an](),t);return o&&Object.defineProperty(e,t,o),o}});function gt(e,t=5){let o=tn(e,t),r=i=>{let s=o()??oA;return n(s,{...i})};return r.$$vencordInternal=o,r}var oA,ka=f(()=>{"use strict";a();So();oA=()=>null});function kb(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&nA|e>>Nb-t}function Te(e){return BigInt.asUintN(64,e)}function qc(e,t=0){return new Qg(t).update(e).digest()}var Bt,ao,Ib,Na,Cb,Nb,nA,rA,Qg,Xg=f(()=>{a();Bt=11400714785074694791n,ao=14029467366897019727n,Ib=1609587929392839161n,Na=9650029242287828579n,Cb=2870177450012600261n,Nb=64n,nA=2n**Nb-1n,rA=new TextEncoder;Qg=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=rA.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+Na),i=Te(i^zt(Te(this.#n*ao),31n)*Bt),i=Te(i*Bt+Na),i=Te(i^zt(Te(this.#r*ao),31n)*Bt),i=Te(i*Bt+Na),i=Te(i^zt(Te(this.#i*ao),31n)*Bt),i=Te(i*Bt+Na)):i=Te(this.#t+Cb),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+Na),r+=8;for(r+4<=o&&(l=kb(t[r+1]<<8|t[r],t[r+3]<<8|t[r+2],0,0),i=Te(zt(i^Te(l*Bt),23n)*ao+Ib),r+=4);r<o;)l=kb(t[r++],0,0,0),i=Te(zt(i^Te(l*Cb),11n)*Bt);return s=Te(i>>33n),i=Te((i^s)*ao),s=Te(i>>29n),i=Te((i^s)*Ib),s=Te(i>>32n),i=Te(i^s),i}}});function sA(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 iA?r:r.reverse()}function Ln(e){let t=qc(e,0),o=sA(t);return[vs[o[0]>>2],vs[(o[0]&3)<<4|o[1]>>4],vs[(o[1]&15)<<2|o[2]>>6],vs[o[2]&63],vs[o[3]>>2],vs[(o[3]&3)<<4|o[3]>>4]].join("")}var vs,iA,bs=f(()=>{"use strict";a();Xg();vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),iA=(()=>{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 Aa(e,t){return typeof e!="function"?e.replaceAll("$self",t):(...o)=>e(...o).replaceAll("$self",t)}function Kc(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 Si(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Kc(o.match,Lt),o.replace=Kc(o.replace,r=>Aa(r,t)),Object.defineProperties(e,o)}function Vg(e){let t=Object.getOwnPropertyDescriptors(e);t.find=Kc(t.find,Lt),Object.defineProperties(e,t)}var jo=f(()=>{"use strict";a();bs()});function aA(e,t,o){return function(...r){return[t.apply(this,r),0]}}function lA(e,t,o){return t}var Ab,Qn,Yc=f(()=>{"use strict";a();Ne();Ab=aA,Qn=lA});var ou={};lt(ou,{ChunkIdsRegex:()=>tu,DefaultExtractAndLoadChunksRegex:()=>eu,LazyComponentWebpack:()=>Qc,_blacklistBadModules:()=>Jc,_initWebpack:()=>Ea,_resolveReady:()=>Ra,cache:()=>on,extract:()=>Fa,extractAndLoadChunks:()=>oh,extractAndLoadChunksLazy:()=>Xn,factoryListeners:()=>La,filters:()=>B,find:()=>nn,findAll:()=>Gr,findBulk:()=>zr,findByCode:()=>Ba,findByCodeLazy:()=>we,findByProps:()=>_a,findByPropsLazy:()=>R,findComponentByCode:()=>Xc,findComponentByCodeLazy:()=>se,findComponentLazy:()=>Vc,findExportedComponentLazy:()=>Ob,findLazy:()=>kt,findModuleFactory:()=>Oa,findModuleId:()=>Hr,findStore:()=>eh,findStoreLazy:()=>be,fluxStores:()=>Ti,handleModuleNotFound:()=>En,lazyWebpackSearchHistory:()=>Eb,mapMangledModule:()=>th,mapMangledModuleLazy:()=>Ze,moduleListeners:()=>Zc,onceReady:()=>wi,proxyLazyWebpack:()=>Eo,search:()=>Ss,stringMatches:()=>Da,waitFor:()=>Xe,waitForSubscriptions:()=>Mi,wreq:()=>Tt});function Ea(e){Tt=e,on=e.c,Reflect.defineProperty(e.c,Symbol.toStringTag,{value:"ModuleCache",configurable:!0,writable:!0,enumerable:!1})}function Db(e){return e==null||e===window||e===document||e===document.documentElement||e[Symbol.toStringTag]==="DOMTokenList"||e[Symbol.toStringTag]==="IntlMessagesProxy"?!0:e[Rb]!==void 0?(Reflect.deleteProperty(e,Rb),!0):e instanceof cA}function Lb(e,t){let o=Object.getOwnPropertyDescriptor(e,t);o!=null&&Reflect.defineProperty(e,t,{...o,enumerable:!1})}function Jc(e,t,o){if(Db(t))return Lb(e,o),!0;if(typeof t!="object")return!1;let r=!0;for(let i in t)Db(t[i])?Lb(t,i):r=!1;return r}function En(e,...t){let o=new Error(`webpack.${e} found no module`);xi.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 on){let r=on[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 Oa(...e){let t=Hr(...e);return t?Tt.m[t]:null}function Eo(e,t){return Dt(e,t)}function Qc(e,t){return gt(e,t)}function kt(e){return Dt(()=>nn(e))}function _a(...e){let t=nn(B.byProps(...e),{isIndirect:!0});return t||En("findByProps",...e),t}function R(...e){return Dt(()=>_a(...e))}function Ba(...e){let t=nn(B.byCode(...e),{isIndirect:!0});return t||En("findByCode",...e),t}function we(...e){return Dt(()=>Ba(...e))}function eh(e){let t=Ti[e];if(t==null){for(let o of Pi.Store.getAll?.()??[]){let r=o.getName();r===e&&(t=o),Ti[r]==null&&(Ti[r]=o)}t==null&&(t=nn(B.byStoreName(e),{isIndirect:!0}))}return t||En("findStore",e),t}function be(e){return Dt(()=>eh(e))}function Xc(...e){let t=nn(B.componentByCode(...e),{isIndirect:!0});return t||En("findComponentByCode",...e),t}function Vc(e){return gt(()=>{let t=nn(e,{isIndirect:!0});return t||En("findComponent",e),t})}function se(...e){return gt(()=>{let t=nn(B.componentByCode(...e),{isIndirect:!0});return t||En("findComponentByCode",...e),t})}function Ob(...e){return gt(()=>{let t=nn(B.byProps(...e),{isIndirect:!0});return t||En("findExportedComponent",...e),t[e[0]]})}function uA(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(()=>th(e,t,o))}async function oh(e,t=eu){let o=Oa(...e);if(!o){let u=new Error("extractAndLoadChunks: Couldn't find module factory");return xi.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 xi.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 xi.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(tu)).map(d=>{let g=Number(d[1]);return Number.isNaN(g)?d[1]:g});await Promise.all(u.map(d=>Tt.e(d)))}if(Tt.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 xi.warn(u,"Code:",e,"Matcher:",t),!1}return Tt(c),!0}function Xn(e,t=eu){return tn(()=>oh(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(on!=null){let[r,i]=nn(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}Mi.set(e,t)}function Ss(...e){e=e.map(Lt);let t={},o=Tt.m;for(let r in o){let i=o[r];Da(i.toString(),e)&&(t[r]=i)}return t}function Fa(e){let t=Tt.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 xi,Ra,wi,Tt,on,Ti,Da,B,Mi,Zc,La,cA,Rb,nn,zr,Hr,Eb,th,eu,tu,$=f(()=>{"use strict";a();So();ka();Ne();jo();Yc();S();xi=new V("Webpack"),wi=new Promise(e=>Ra=e),Ti={},Da=(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:Da(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}},Mi=new Map,Zc=new Set,La=new Set;cA=Object.getPrototypeOf(Int8Array),Rb="is this a proxy that returns values for any key?";nn=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 on){let s=on[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 nn(t[0]);let r=t,i=0,s=Array(o);e:for(let l in on){let c=on[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!`);xi.warn(l)}return s}),Hr=Qn("findModuleId",function(...t){t=t.map(Lt);for(let r in Tt.m)if(Da(Tt.m[r].toString(),t))return r;let o=new Error(`Didn't find module with code(s):
|
|
`+t.join(`
|
|
`));return xi.warn(o),null});Eb=[];th=Qn("mapMangledModule",function(t,o,r=!1){let i={},s=Hr(...Array.isArray(t)?t:[t]);if(s===null)return i;let l=Tt(s),c=uA(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});eu=/(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/,tu=/\("([^"]+?)"\)/g});var pA,nu,_b=f(()=>{"use strict";a();$();pA=kt(e=>e.image&&e.modal&&!e.applicationIcon),nu=R("buttonWrapper","buttonContent")});function yt(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 nh=f(()=>{"use strict";a();wt();$()});var dA,mA,fA,gA,b,Zt,I,fo,rh,Bb,oe,Vn,ct,ru,Q,hA,rn,xs,Ts,ws,ih,xo,sh,er,Ua,$a,ln,yA,jr,vA,bA,iu,Ga,za,lo,Ms,Ii,su,Fb=f(()=>{"use strict";a();ka();$();nh();dA=yt("FormTitle",B.componentByCode('["defaultMargin".concat','="h5"')),mA=yt("FormText",B.componentByCode(".SELECTABLE),",".DISABLED:")),fA=yt("FormSection",B.componentByCode(".titleId)")),gA=yt("FormDivider",B.componentByCode(".divider,",",style:",'"div"',/\.divider,\i\),style:/)),b={FormTitle:dA,FormText:mA,FormSection:fA,FormDivider:gA},Zt=yt("Card",B.componentByCode(".editable),",".outline:")),I=yt("Button",B.componentByCode("#{intl::A11Y_LOADING_STARTED}))),!1")),fo=yt("Switch",B.componentByCode(".labelRow,ref:",".disabledText")),rh=yt("Checkbox",B.componentByCode(".checkboxWrapperDisabled:")),Bb=Ze(".tooltipTop,bottom:",{Tooltip:B.componentByCode("this.renderTooltip()]"),TooltipContainer:B.componentByCode('="div"')}),oe=gt(()=>Bb.Tooltip),Vn=gt(()=>Bb.TooltipContainer),ct=yt("TextInput",B.componentByCode(".error]:this.hasError()")),ru=yt("TextArea",B.componentByCode("this.getPaddingRight()},id:")),Q=yt("Text",B.componentByCode('case"always-white"')),hA=yt("Heading",B.componentByCode(">6?{","variant:")),rn=yt("Select",B.componentByCode('.selectPositionTop]:"top"===','"Escape"===')),xs=yt("SearchableSelect",B.componentByCode('.selectPositionTop]:"top"===',".multi]:")),Ts=yt("Slider",B.componentByCode('"markDash".concat(')),ws=yt("Popout",B.componentByCode("ref:this.ref,","renderPopout:this.renderPopout,")),ih=yt("Dialog",B.componentByCode('role:"dialog",tabIndex:-1')),xo=yt("TabBar",B.componentByCode("ref:this.tabBarRef,className:")),sh=yt("Paginator",B.componentByCode('rel:"prev",children:')),er=yt("Clickable",B.componentByCode("this.context?this.renderNonInteractive():")),Ua=yt("Avatar",B.componentByCode(".size-1.375*"));Xe(B.byCode('="ltr",orientation:',"customTheme:","forwardRef"),e=>$a=e);Xe(["thin","auto","customTheme"],e=>ln=e);yA=gt(()=>$a(ln.none,ln.fade,ln.customTheme)),jr=gt(()=>$a(ln.thin,ln.fade,ln.customTheme)),vA=gt(()=>$a(ln.auto,ln.fade,ln.customTheme)),{FocusLock_:bA}=Ze('document.getElementById("app-mount"))',{FocusLock_:B.componentByCode(".containerRef")}),iu=gt(()=>bA);Xe(e=>{if(typeof e!="function")return!1;let t=String(e);return t.includes(".resolve({theme:null")&&!t.includes("useMemo")},e=>Ga=e);za=yt("MaskedLink",B.componentByCode("MASKED_LINK)")),lo=yt("Timestamp",B.componentByCode("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}")),Ms=yt("Flex",["Justify","Align","Wrap"]),Ii=yt("OAuth2AuthorizeModal",B.componentByCode(".authorize,children:",".contentBackground")),su=Ze(".assign({colorNames:",{Transition:B.componentByCode('["items","children"]',",null,"),animated:B.byProps("div","text")})});var E,Et,Ub=f(()=>{"use strict";a();$();E={};Xe(e=>e.name==="MenuCheckboxItem",(e,t)=>{let o=Tt(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 j,q,le,Ci,Re,Mt,Ps,au,ki,$b=f(()=>{"use strict";a();$();ki=R("createPortal","render");Xe("useState",e=>{j=e,{useEffect:le,useState:q,useLayoutEffect:Ci,useMemo:Re,useRef:Mt,useReducer:Ps,useCallback:au}=j})});var Pi,no,Jt,Ha,Fe,tr,Ni,cn,ce,D,Qt,Ee,Wo,ie,De,Ue,un,pn,ja,Wa,Se,Gb=f(()=>{"use strict";a();$();nh();Pi=R("connectStores"),no=R("ChannelMessage","SlashCommand"),Ha=R("openPrivateChannel"),Se=we("useStateFromStores");oo("DraftStore",e=>Wa=e);oo("UserStore",e=>D=e);oo("UserProfileStore",e=>Qt=e);oo("ChannelStore",e=>ie=e);oo("SelectedChannelStore",e=>Ee=e);oo("SelectedGuildStore",e=>Wo=e);oo("GuildStore",e=>ce=e);oo("GuildMemberStore",e=>De=e);oo("RelationshipStore",e=>Ue=e);oo("PermissionStore",e=>Fe=e);oo("PresenceStore",e=>cn=e);oo("ReadStateStore",e=>Ni=e);oo("GuildChannelStore",e=>tr=e);oo("MessageStore",e=>Jt=e);oo("WindowStore",e=>ja=e);oo("EmojiStore",e=>un=e);oo("ThemeStore",e=>pn=e)});var zb={};var Hb=f(()=>{"use strict";a()});var jb={};var Wb=f(()=>{"use strict";a()});var lh={};lt(lh,{DisplayProfile:()=>ah});var ah,qb=f(()=>{"use strict";a();ah=class{userId;banner;bio;pronouns;accentColor;themeColors;popoutAnimationParticleType;profileEffectId;_userProfile;_guildMemberProfile;canUsePremiumProfileCustomization;canEditThemes;premiumGuildSince;premiumSince;premiumType;primaryColor}});var qa,Kb=f(()=>{"use strict";a();$();qa={FrecencyUserSettingsActionCreators:kt(e=>e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")),PreloadedUserSettingsActionCreators:kt(e=>e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings"))}});function Je(e,t=Yb.MESSAGE,o){ee.show(ee.create(e,t,o))}var G,On,Pt,vt,Wr,Ai,Is,ch,Ri,dn,To,Oe,rt,Yb,SA,ee,go,Di,Ka,Li,Ht,or,Cs,lu,ke,Ei,uh,qo,cu,ph,dh,Ft,Ya,xA,TA,wA,qr,Zb=f(()=>{"use strict";a();$();Xe(["dispatch","subscribe"],e=>{G=e,Vencord.Plugins.subscribeAllPluginsFluxEvents(e);let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ra()};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}),vt=kt(e=>typeof e=="object"&&e.del&&e.put),Wr=R("parseTwoDigitYear"),Ai=R("highlight","registerLanguage"),{match:Is,P:ch}=Ze("@ts-pattern/matcher",{match:B.byCode("return new"),P:B.byProps("when")}),Ri=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=>Oe=e);Xe(["show","close"],e=>rt=e);Yb={MESSAGE:"message",SUCCESS:"success",FAILURE:"failure",CUSTOM:"custom",CLIP:"clip",LINK:"link",FORWARD:"forward",BOOKMARK:"bookmark",CLOCK:"clock"},SA={TOP:0,BOTTOM:1},ee={Type:Yb,Position:SA,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:we(".USER(")},Di=R("clearAll","addFile"),Ka={promptToUpload:we("#{intl::ATTACHMENT_TOO_MANY_ERROR_TITLE}")},Li=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()")}),Cs=Ze('"Thread must have a parent ID."',{transitionToChannel:B.byCode(".preload"),transitionToThread:B.byCode('"Thread must have a parent ID."')});Xe(["open","saveAccountChanges"],e=>lu=e);ke=kt(e=>typeof e.ADMINISTRATOR=="bigint"),{zustandCreate:Ei}=Ze(["useSyncExternalStoreWithSelector:","Object.assign"],{zustandCreate:B.byCode(/=>(\i)\?\i\(\1/)}),{zustandPersist:uh}=Ze(".onRehydrateStorage)?",{zustandPersist:B.byCode(/(\(\i,\i\))=>.+?\i\1/)}),qo=R("editMessage","sendMessage"),cu=R("clearCache","_channelMessages"),ph=R("openUserProfileModal","closeUserProfileModal"),dh=R("resolveInvite"),Ft=R("getGuildBannerURL","getUserAvatarURL"),Ya=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\)=>/)}),xA=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"')}),TA=R("useName","getGlobalName"),wA=Ze(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/,{getDisplayProfile:B.byCode(".getGuildMemberProfile("),useDisplayProfile:B.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)}),qr=Ze("millisecondsInUnit:",{calendarFormat:B.byCode("sameElse"),dateFormat:B.byCode('":'),isSameDay:B.byCode("Math.abs(+"),diffAsUnits:B.byCode("days:0","millisecondsInUnit")})});var ks={};lt(ks,{Alerts:()=>rt,Animations:()=>su,ApplicationAssetUtils:()=>Li,Avatar:()=>Ua,Button:()=>I,ButtonWrapperClasses:()=>nu,Card:()=>Zt,ChannelRouter:()=>Cs,ChannelStore:()=>ie,Checkbox:()=>rh,Clickable:()=>er,Clipboard:()=>Ht,ComponentDispatch:()=>On,ComponentTypes:()=>zb,Constants:()=>Pt,ContextMenuApi:()=>Et,DateUtils:()=>qr,Dialog:()=>ih,DisplayProfileUtils:()=>wA,DraftStore:()=>Wa,DraftType:()=>no,EmojiStore:()=>un,ExpressionPickerStore:()=>Ya,Flex:()=>Ms,Flux:()=>Pi,FluxDispatcher:()=>G,FocusLock:()=>iu,Forms:()=>b,GuildChannelStore:()=>tr,GuildMemberStore:()=>De,GuildStore:()=>ce,Heading:()=>hA,IconUtils:()=>Ft,InviteActions:()=>dh,MaskedLink:()=>za,Menu:()=>E,MenuTypes:()=>jb,MessageActions:()=>qo,MessageCache:()=>cu,MessageStore:()=>Jt,ModalImageClasses:()=>pA,NavigationRouter:()=>or,OAuth2AuthorizeModal:()=>Ii,P:()=>ch,Paginator:()=>sh,Parser:()=>Oe,PermissionStore:()=>Fe,PermissionsBits:()=>ke,Popout:()=>ws,PopoutActions:()=>xA,PresenceStore:()=>cn,PrivateChannelsStore:()=>Ha,React:()=>j,ReactDOM:()=>ki,ReadStateStore:()=>Ni,RelationshipStore:()=>Ue,RestAPI:()=>vt,ScrollerAuto:()=>vA,ScrollerNone:()=>yA,ScrollerThin:()=>jr,SearchableSelect:()=>xs,Select:()=>rn,SelectedChannelStore:()=>Ee,SelectedGuildStore:()=>Wo,SettingsRouter:()=>lu,Slider:()=>Ts,SnowflakeUtils:()=>To,Switch:()=>fo,TabBar:()=>xo,Text:()=>Q,TextArea:()=>ru,TextInput:()=>ct,ThemeStore:()=>pn,Timestamp:()=>lo,Toasts:()=>ee,Tooltip:()=>oe,TooltipContainer:()=>Vn,UploadHandler:()=>Ka,UploadManager:()=>Di,UserProfileActions:()=>ph,UserProfileStore:()=>Qt,UserSettingsActionCreators:()=>qa,UserStore:()=>D,UserUtils:()=>go,UsernameUtils:()=>TA,UtilTypes:()=>lh,WindowStore:()=>ja,createScroller:()=>$a,hljs:()=>Ai,i18n:()=>dn,lodash:()=>Ri,match:()=>Is,moment:()=>Wr,scrollerClasses:()=>ln,showToast:()=>Je,useCallback:()=>au,useEffect:()=>le,useLayoutEffect:()=>Ci,useMemo:()=>Re,useReducer:()=>Ps,useRef:()=>Mt,useState:()=>q,useStateFromStores:()=>Se,useToken:()=>Ga,zustandCreate:()=>Ei,zustandPersist:()=>uh});var S=f(()=>{"use strict";a();_b();Fb();Ub();$b();Gb();Hb();Wb();qb();Kb();Zb()});var MA,uu,Za,Ja,mh,fh,pu,Ns,gh,p,As,M=f(()=>{"use strict";a();MA="Vencord.Webpack.Common.React",uu="1017176847865352332",Za="1015060230222131221",Ja="1042507929485586532",mh="1026534353167208489",fh="1026504932959977532",pu="1026515880080842772",Ns="1108135649699180705",gh="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}}),As=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 PA(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 hh(e){try{return new URL(e)}catch{return null}}function Rs(e){return e}function vh(e,t,o=t+"s"){return e===1?`${e} ${t}`:`${e} ${o}`}function Qa(e,...t){return t.some(o=>o==null)?"":String.raw({raw:e},...t)}function du(e,t){try{let o=e();return o instanceof Promise?o.catch(()=>t):o}catch{return t}}var yh,IA,fn,me=f(()=>{"use strict";a();S();M();yh=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};IA=navigator.userAgent.includes("Mobi"),fn=e=>Object.hasOwn(As,e)});function bt(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=q({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=Ps(o=>o+1,0);return e?t:t[1]}function Xa({interval:e=1e3,deps:t=[]}){let[o,r]=q(0),i=Re(()=>Date.now(),t);return le(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var bh,Sh,wt=f(()=>{"use strict";a();S();me();ka();bh=()=>null,Sh=(e=!1)=>{let t=j.useRef(null),[o,r]=q(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(yh(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 Jb=f(()=>{});function wo(e){return n("div",{...e,className:z(e.className,"vc-error-card")},e.children)}var Oi=f(()=>{"use strict";a();Jb();me()});var CA,kA,Qb,xh,k,ne=f(()=>{"use strict";a();Ne();ze();wt();S();Oi();CA="#e78284",kA=new V("React ErrorBoundary",CA),Qb={},xh=gt(()=>class extends j.PureComponent{state={error:Qb,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}),kA.error(`${this.props.message||"A component threw an Error"}
|
|
`,t,o.componentStack)}render(){if(this.state.error===Qb)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)))}});xh.wrap=(e,t)=>o=>n(xh,{...t,wrappedProps:o},n(e,{...o}));k=xh});var Xb=f(()=>{});function Va(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 mu=f(()=>{"use strict";a();me()});function el({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(Va,null),"Donate")}var fu=f(()=>{"use strict";a();S();mu()});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 Vb=f(()=>{});function Oo(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var _i=f(()=>{"use strict";a()});var Th,eS,gu,tS=f(()=>{"use strict";a();Th=Symbol("SettingsStore.isProxy"),eS=Symbol("SettingsStore.getRawTarget"),gu=class{pathListeners=new Map;globalListeners=new Set;proxyContexts=new WeakMap;proxyHandler=(()=>{let t=this;return{get(o,r,i){if(r===Th)return!0;if(r===eS)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[Th]){let d=`${u}${u&&"."}${r}`;return t.makeProxy(s,c,d)}return s},set(o,r,i){if(i?.[Th]&&(i=i[eS]),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 Bi,hu=f(()=>{"use strict";a();({localStorage:Bi}=window)});function Ds(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},Ds(e[o],r)):e[o]??=r}return e}var yu=f(()=>{"use strict";a()});var Mo,Kr=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 oS=f(()=>{});var vu,wh=f(()=>{"use strict";a();oS();_();ne();me();S();vu=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([ja],()=>ja.isFocused()),[T,N]=q(!1),[A,L]=q(0),U=Re(()=>Date.now(),[v,T,w]);le(()=>{if(T||!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,T,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:()=>DA,createStore:()=>nS,del:()=>Yr,delMany:()=>RA,entries:()=>EA,get:()=>co,getMany:()=>AA,keys:()=>Ih,promisifyRequest:()=>Po,set:()=>hn,setMany:()=>NA,update:()=>Fi,values:()=>LA});function Po(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function nS(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 Mh||(Mh=nS("VencordData","VencordStore")),Mh}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 NA(e,t=gn()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),Po(o.transaction)))}function AA(e,t=gn()){return t("readonly",o=>Promise.all(e.map(r=>Po(o.get(r)))))}function Fi(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 Yr(e,t=gn()){return t("readwrite",o=>(o.delete(e),Po(o.transaction)))}function RA(e,t=gn()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),Po(o.transaction)))}function DA(e=gn()){return e("readwrite",t=>(t.clear(),Po(t.transaction)))}function Ph(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Po(e.transaction)}function Ih(e=gn()){return e("readonly",t=>{if(t.getAllKeys)return Po(t.getAllKeys());let o=[];return Ph(t,r=>o.push(r.key)).then(()=>o)})}function LA(e=gn()){return e("readonly",t=>{if(t.getAll)return Po(t.getAll());let o=[];return Ph(t,r=>o.push(r.value)).then(()=>o)})}function EA(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=>Ph(r,i=>o.push([i.key,i.value])).then(()=>o))})}var Mh,_n=f(()=>{"use strict";a();});var Nh={};lt(Nh,{classNameFactory:()=>ue,classNameToSelector:()=>iS,compileStyle:()=>kh,disableStyle:()=>Ko,enableStyle:()=>Io,isStyleEnabled:()=>Ch,requireStyle:()=>tl,setStyleClassNames:()=>_A,styleMap:()=>rS,toggleStyle:()=>OA});function tl(e){let t=rS.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Io(e){let t=tl(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),kh(t),document.head.appendChild(t.dom),!0)}function Ko(e){let t=tl(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var rS,OA,Ch,_A,kh,iS,ue,He=f(()=>{"use strict";a();rS=window.VencordStyles??=new Map;OA=e=>Ch(e)?Ko(e):Io(e),Ch=e=>tl(e).dom?.isConnected??!1,_A=(e,t,o=!0)=>{let r=tl(e);r.classNames=t,o&&Ch(r.name)&&kh(r)},kh=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?iS(r):t})},iS=(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 _o,Ls,ve,Ae,Me,ut,pt,Ah,ol,nl,he,sr,Bn,Ke=f(()=>{"use strict";a();$();wt();_o=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(_o||{}),Ls=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(()=>Ls.ModalRoot),Ae=gt(()=>Ls.ModalHeader),Me=gt(()=>Ls.ModalContent),ut=gt(()=>Ls.ModalFooter),pt=gt(()=>Ls.ModalCloseButton),Ah=we("hasMediaOptions","shouldHideMediaOptions"),ol=Ze(".modalKey?",{openModalLazy:B.byCode(".modalKey?"),openModal:B.byCode(",instant:"),closeModal:B.byCode(".onCloseCallback()"),closeAllModals:B.byCode(".getState();for")}),{openModalLazy:nl,openModal:he,closeModal:sr,closeAllModals:Bn}=ol});function Rh({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var bu=f(()=>{"use strict";a()});function rl({value:e,onChange:t,validate:o}){let[r,i]=j.useState(e),[s,l]=j.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 Su=f(()=>{"use strict";a();S()});function il(e){return n("div",{className:BA.markup},Oe.defaultRules.codeBlock.react(e,null,{}))}var BA,xu=f(()=>{"use strict";a();$();S();BA=R("markup","codeContainer")});var sS=f(()=>{});function Pe(e,t){return aS(Ln(e),t,e)}function aS(e,t,o){try{return t==null?dn.intl.string(dn.t[e]):dn.intl.format(dn.t[e],t)}catch(r){return FA.error(`Failed to get intl message for key: ${o??e}`,r),o??""}}async function Ui(e){let{invite:t}=await dh.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 Yo(){return ie.getChannel(Ee.getChannelId())}function ar(){return ce.getGuild(Yo()?.guild_id)}function UA(e){Ha.openPrivateChannel(e)}function Es(){return qa.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function lr(e){On.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function Os(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return qo.sendMessage(e,i,o,r)}function Zo(e,t){return Ah({items:[{type:"IMAGE",original:e.original??e.url,...e}],...t})}async function Jo(e){if(!await go.getUser(e))throw new Error("No such user: "+e);let o=Wo.getGuildId();ph.openUserProfileModal({userId:e,guildId:o,channelId:Ee.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Dh(e,t){let o=Qt.getUserProfile(e);if(o)return o;G.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await vt.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 wu(e,t,o){let r=Ft.getEmojiURL({id:e,animated:t,size:o});return t?r.replace(".webp",".gif"):r}var FA,Tu,Ie=f(()=>{"use strict";a();S();bs();Ne();Ke();FA=new V("IntlManager");Tu=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Tu||{})});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 $i({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 Gi(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 sl(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 Lh(e){return n(Nt,{"aria-label":Pe("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 Eh(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 al(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 ll(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 Oh(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 cl(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 $A(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 zi(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 _h(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 ul(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 Bh(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 Fh(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 pl(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 Uh(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 dl(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 ml(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 $h(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 fl(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 Gh(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();sS();Ie();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 Bo=f(()=>{"use strict";a()});var lS=f(()=>{});function jh({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:z(Mu.container,"default-colors",e?Mu.checked:void 0),style:{backgroundColor:e?zh:Hh,opacity:o?.3:1}},n("svg",{className:Mu.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:zh,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:zh,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(m,null,n("path",{fill:Hh,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:Hh,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:Mu.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var zh,Hh,Mu,Wh=f(()=>{"use strict";a();lS();me();$();zh="var(--brand-500)",Hh="var(--primary-400)",Mu=R("slider","input","container")});var qh={};lt(qh,{Badge:()=>Rh,CheckedTextInput:()=>rl,CodeBlock:()=>il,CogWheel:()=>cl,CopyIcon:()=>Gi,DeleteIcon:()=>zi,ErrorBoundary:()=>k,ErrorCard:()=>wo,Flex:()=>ge,FolderIcon:()=>pl,GithubIcon:()=>fl,Heart:()=>Va,ImageIcon:()=>yn,ImageInvisible:()=>ll,ImageVisible:()=>al,InfoIcon:()=>sl,Link:()=>it,LinkIcon:()=>$i,LogIcon:()=>Uh,Microphone:()=>Oh,NoEntrySignIcon:()=>ul,NotesIcon:()=>Fh,OpenExternalIcon:()=>ur,OwnerCrownIcon:()=>Lh,PaintbrushIcon:()=>ml,PencilIcon:()=>$h,PlusIcon:()=>_h,ReplyIcon:()=>$A,RestartIcon:()=>dl,SafetyIcon:()=>Bh,ScreenshareIcon:()=>Eh,Switch:()=>jh,WebsiteIcon:()=>Gh});var _s=f(()=>{"use strict";a();bu();Su();xu();fu();ne();Oi();jt();mu();At();Bo();Wh()});function GA(){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(rn,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:Rs}),n(b.FormTitle,{tag:"h5",className:F.top16+" "+F.bottom8},"Notification Position"),n(rn,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:Rs}),n(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(Ts,{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(Ts,{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 Pu(){he(e=>n(ve,{...e,size:"medium"},n(Ae,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Settings"),n(pt,{onClick:e.onClose})),n(Me,null,n(GA,null))))}var Kh=f(()=>{"use strict";a();_();ze();me();Ke();S();_s()});var cS,uS=f(()=>{a();cS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"});var pS,dS=f(()=>{a();uS();pS=(e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=cS[o[e]&63];return t}});async function fS(e){if(e.noPersist)return;let t=Z.notifications.logLimit;t!==0&&(await Fi(Iu,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:pS()}),r.length>t&&t!==200&&(r.length=t),r}),gl.forEach(o=>o()))}async function zA(e){let t=await mS(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await hn(Iu,t),gl.forEach(r=>r()))}function HA(){let[e,t]=Ps(s=>s+1,0);le(()=>(gl.add(t),()=>void gl.delete(t)),[]);let[o,r,i]=bt(mS,{fallbackValue:[],deps:[e]});return[o,i]}function jA({data:e}){let[t,o]=q(!1),r=j.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:Bs("wrapper",{removing:t}),ref:r},n(vu,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>zA(e.timestamp),200))},richBody:n("div",{className:Bs("body")},e.body,n(lo,{timestamp:new Date(e.timestamp),className:Bs("timestamp")}))}))}function WA({log:e,pending:t}){return!e.length&&!t?n("div",{className:Bs("container")},n("div",{className:Bs("empty")}),n(b.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:Bs("container")},e.map(o=>n(jA,{data:o,key:o.id})))}function qA({modalProps:e,close:t}){let[o,r]=HA();return n(ve,{...e,size:"large"},n(Ae,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(pt,{onClick:t})),n(Me,null,n(WA,{log:o,pending:r})),n(ut,null,n(ge,null,n(I,{onClick:Pu},"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(Iu,[]),gl.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log"))))}function hl(){let e=he(t=>n(qA,{modalProps:t,close:()=>sr(e)}))}var Iu,mS,Bs,gl,Cu=f(()=>{"use strict";a();_n();_();He();jt();Kh();Ke();wt();S();dS();wh();Iu="notification-log",mS=async()=>await co(Iu)??[],Bs=ue("vc-notification-log-"),gl=new Set});function ZA(){if(!Yh){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),Yh=ki.createRoot(e)}return Yh}function JA(e,t){let o=ZA();return new Promise(r=>{o.render(n(vu,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function QA(){if(typeof Notification>"u")return!1;let{useNative:e}=Z.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function gS(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ye(e){if(fS(e),QA()&&await gS()){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 KA.push(()=>JA(e,YA++))}var KA,Yh,YA,hS=f(()=>{"use strict";a();_();Kr();S();wh();Cu();KA=new Mo,YA=42});var Zh={};lt(Zh,{requestPermission:()=>gS,showNotification:()=>Ye});var pr=f(()=>{"use strict";a();hS()});function CS(e,t){return a3(e,t||{},0,0)}function kS(e,t){return r3(e,{i:2},t&&t.out,t&&t.dictionary)}var ho,Qo,n1,ku,Nu,Vh,SS,xS,TS,e1,wS,XA,yS,t1,dr,Ve,Fn,Zr,Ve,Ve,Ve,Ve,bl,Ve,VA,e3,t3,o3,Jh,vn,Qh,r1,MS,n3,fr,r3,mr,yl,Xh,o1,vS,vl,PS,bS,i3,IS,s3,a3,l3,c3,NS=f(()=>{a();ho=Uint8Array,Qo=Uint16Array,n1=Int32Array,ku=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]),Nu=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]),Vh=new ho([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),SS=function(e,t){for(var o=new Qo(31),r=0;r<31;++r)o[r]=t+=1<<e[r-1];for(var i=new n1(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}},xS=SS(ku,2),TS=xS.b,e1=xS.r;TS[28]=258,e1[258]=28;wS=SS(Nu,0),XA=wS.b,yS=wS.r,t1=new Qo(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,t1[Ve]=((dr&65280)>>8|(dr&255)<<8)>>1;Fn=function(e,t,o){for(var r=e.length,i=0,s=new Qo(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new Qo(t);for(i=1;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(o){c=new Qo(1<<t);var u=15-t;for(i=0;i<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[t1[h]>>u]=d}else for(c=new Qo(r),i=0;i<r;++i)e[i]&&(c[i]=t1[l[e[i]-1]++]>>15-e[i]);return c},Zr=new ho(288);for(Ve=0;Ve<144;++Ve)Zr[Ve]=8;for(Ve=144;Ve<256;++Ve)Zr[Ve]=9;for(Ve=256;Ve<280;++Ve)Zr[Ve]=7;for(Ve=280;Ve<288;++Ve)Zr[Ve]=8;bl=new ho(32);for(Ve=0;Ve<32;++Ve)bl[Ve]=5;VA=Fn(Zr,9,0),e3=Fn(Zr,9,1),t3=Fn(bl,5,0),o3=Fn(bl,5,1),Jh=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},Qh=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},r1=function(e){return(e+7)/8|0},MS=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))},n3=["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||n3[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,fr),!o)throw r;return r},r3=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,T=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=e3,w=o3,T=9,N=5;else if(L==2){var re=vn(e,h,31)+257,te=vn(e,h+10,15)+4,K=re+vn(e,h+5,31)+1;h+=14;for(var Y=new ho(K),ae=new ho(19),fe=0;fe<te;++fe)ae[Vh[fe]]=vn(e,h+fe*3,7);h+=te*3;for(var xe=Jh(ae),St=(1<<xe)-1,qe=Fn(ae,xe,1),fe=0;fe<K;){var $e=qe[vn(e,h,St)];h+=$e&15;var U=$e>>4;if(U<16)Y[fe++]=U;else{var ot=0,Ge=0;for(U==16?(Ge=3+vn(e,h,3),h+=2,ot=Y[fe-1]):U==17?(Ge=3+vn(e,h,7),h+=3):U==18&&(Ge=11+vn(e,h,127),h+=7);Ge--;)Y[fe++]=ot}}var Be=Y.subarray(0,re),Ce=Y.subarray(re);T=Jh(Be),N=Jh(Ce),C=Fn(Be,T,1),w=Fn(Ce,N,1)}else fr(1);else{var U=r1(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<<T)-1,Ct=(1<<N)-1,at=h;;at=h){var ot=C[Qh(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,xt=ku[fe];so=vn(e,h,(1<<xt)-1)+TS[fe],h+=xt}var Ho=w[Qh(e,h)&Ct],Kn=Ho>>4;Ho||fr(3),h+=Ho&15;var Ce=XA[Kn];if(Kn>3){var xt=Nu[Kn];Ce+=Qh(e,h)&(1<<xt)-1,h+=xt}if(h>A){u&&fr(0);break}c&&d(v+131072);var $r=v+so;if(v<Ce){var Rn=s-Ce,eo=Math.min(Ce,$r);for(Rn+v<0&&fr(3);v<eo;++v)o[v]=r[Rn+v]}for(;v<$r;++v)o[v]=o[v-Ce]}}t.l=C,t.p=at,t.b=v,t.f=g,C&&(g=1,t.m=T,t.d=w,t.n=N)}while(!g);return v!=o.length&&l?MS(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},yl=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},Xh=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:IS,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 Qo(v+1),w=o1(o[g-1],C,0);if(w>t){var r=0,T=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)T+=A-(1<<w-C[L]),C[L]=t;else break}for(T>>=N;T>0;){var U=s[r].s;C[U]<t?T-=1<<t-C[U]++-1:++r}for(;r>=0&&T;--r){var H=s[r].s;C[H]==t&&(--C[H],++T)}w=t}return{t:new ho(C),l:w}},o1=function(e,t,o){return e.s==-1?Math.max(o1(e.l,t,o+1),o1(e.r,t,o+1)):t[e.s]=o},vS=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new Qo(++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}},vl=function(e,t){for(var o=0,r=0;r<t.length;++r)o+=e[r]*t[r];return o},PS=function(e,t,o){var r=o.length,i=r1(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},bS=function(e,t,o,r,i,s,l,c,u,d,g){mr(t,g++,o),++i[256];for(var h=Xh(i,15),v=h.t,C=h.l,w=Xh(s,15),T=w.t,N=w.l,A=vS(v),L=A.c,U=A.n,H=vS(T),X=H.c,re=H.n,te=new Qo(19),K=0;K<L.length;++K)++te[L[K]&31];for(var K=0;K<X.length;++K)++te[X[K]&31];for(var Y=Xh(te,7),ae=Y.t,fe=Y.l,xe=19;xe>4&&!ae[Vh[xe-1]];--xe);var St=d+5<<3,qe=vl(i,Zr)+vl(s,bl)+l,$e=vl(i,v)+vl(s,T)+l+14+3*xe+vl(te,ae)+2*te[16]+3*te[17]+7*te[18];if(u>=0&&St<=qe&&St<=$e)return PS(t,g,e.subarray(u,u+d));var ot,Ge,Be,Ce;if(mr(t,g,1+($e<qe)),g+=2,$e<qe){ot=Fn(v,C,0),Ge=v,Be=Fn(T,N,0),Ce=T;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 K=0;K<xe;++K)mr(t,g+3*K,ae[Vh[K]]);g+=3*xe;for(var Ct=[L,X],at=0;at<2;++at)for(var io=Ct[at],K=0;K<io.length;++K){var so=io[K]&31;mr(t,g,Lo[so]),g+=ae[so],so>15&&(mr(t,g,io[K]>>5&127),g+=io[K]>>12)}}else ot=VA,Ge=Zr,Be=t3,Ce=bl;for(var K=0;K<c;++K){var xt=r[K];if(xt>255){var so=xt>>18&31;yl(t,g,ot[so+257]),g+=Ge[so+257],so>7&&(mr(t,g,xt>>23&31),g+=ku[so]);var Ho=xt&31;yl(t,g,Be[Ho]),g+=Ce[Ho],Ho>3&&(yl(t,g,xt>>5&8191),g+=Nu[Ho])}else yl(t,g,ot[xt]),g+=Ge[xt]}return yl(t,g,ot[256]),g+Ge[256]},i3=new n1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),IS=new ho(0),s3=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=i3[t-1],v=h>>13,C=h&8191,w=(1<<o)-1,T=s.p||new Qo(32768),N=s.h||new Qo(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 n1(25e3),X=new Qo(288),re=new Qo(32),te=0,K=0,Y=s.i||0,ae=0,fe=s.w||0,xe=0;Y+2<l;++Y){var St=U(Y),qe=Y&32767,$e=N[St];if(T[qe]=$e,N[St]=qe,fe<=Y){var ot=l-Y;if((te>7e3||ae>24576)&&(ot>423||!d)){g=bS(e,u,0,H,X,re,K,ae,xe,Y-xe,g),ae=te=K=0,xe=Y;for(var Ge=0;Ge<286;++Ge)X[Ge]=0;for(var Ge=0;Ge<30;++Ge)re[Ge]=0}var Be=2,Ce=0,Lo=C,Ct=qe-$e&32767;if(ot>2&&St==U(Y-Ct))for(var at=Math.min(v,ot)-1,io=Math.min(32767,Y),so=Math.min(258,ot);Ct<=io&&--Lo&&qe!=$e;){if(e[Y+Be]==e[Y+Be-Ct]){for(var xt=0;xt<so&&e[Y+xt]==e[Y+xt-Ct];++xt);if(xt>Be){if(Be=xt,Ce=Ct,xt>at)break;for(var Ho=Math.min(Ct,xt-2),Kn=0,Ge=0;Ge<Ho;++Ge){var $r=Y-Ct+Ge&32767,Rn=T[$r],eo=$r-Rn&32767;eo>Kn&&(Kn=eo,$e=$r)}}}qe=$e,$e=T[qe],Ct+=qe-$e&32767}if(Ce){H[ae++]=268435456|e1[Be]<<18|yS[Ce];var Dn=e1[Be]&31,O=yS[Ce]&31;K+=ku[Dn]+Nu[O],++X[257+Dn],++re[O],fe=Y+Be,++te}else H[ae++]=e[Y],++X[e[Y]]}}for(Y=Math.max(Y,fe);Y<l;++Y)H[ae++]=e[Y],++X[e[Y]];g=bS(e,u,d,H,X,re,K,ae,xe,Y-xe,g),d||(s.r=g&7|u[g/8|0]<<3,g-=7,s.h=N,s.p=T,s.i=Y,s.w=fe)}else{for(var Y=s.w||0;Y<l+d;Y+=65535){var J=Y+65535;J>=l&&(u[g/8|0]=d,J=l),g=PS(u,g+1,e.subarray(Y,J))}s.i=l}return MS(c,0,r+r1(g)+i)},a3=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 s3(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)};l3=typeof TextDecoder<"u"&&new TextDecoder,c3=0;try{l3.decode(IS,{stream:!0}),c3=1}catch{}});async function AS(){let e=await co("Vencord_cloudSecret")??{},t=i1();return e[t]?(await Fi("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Sl()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Sl()}`]}async function u3(e){await Fi("Vencord_cloudSecret",t=>(t??={},t[`${i1()}:${Sl()}`]=e,t))}async function Ru(){await Fi("Vencord_cloudSecret",e=>(e??={},delete e[`${i1()}:${Sl()}`],e))}async function s1(){if(await AS()!==void 0){Z.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",Jr()));var{clientId:e,redirectUri:t}=await o.json()}catch{Ye({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),Z.cloud.authenticated=!1;return}he(o=>n(Ii,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){Z.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(Au.info("Authorized with secret"),await u3(s),Ye({title:"Cloud Integration",body:"Cloud integrations enabled!"}),Z.cloud.authenticated=!0):(Ye({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),Z.cloud.authenticated=!1)}catch(i){Au.error("Failed to authorize",i),Ye({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),Z.cloud.authenticated=!1}}}))}async function Fs(){let e=await AS();return window.btoa(`${e}:${Sl()}`)}var Au,Jr,i1,Sl,a1=f(()=>{"use strict";a();_n();pr();_();S();Ne();Ke();Au=new V("Cloud","#39b7e0"),Jr=()=>new URL(Z.cloud.url),i1=()=>Jr().origin,Sl=()=>{let e=D.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function Co(){window.DiscordNative.app.relaunch()}function Du(e){window.DiscordNative.fileManager.showItemInFolder(e)}var gr=f(()=>{"use strict";a()});function RS(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 l1=f(()=>{"use strict";a()});async function DS(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 LS({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 ES(){let e=`vencord-settings-backup-${Wr().format("YYYY-MM-DD")}.json`,t=await LS(),o=new TextEncoder().encode(t);DiscordNative.fileManager.saveWithDialog(o,e)}async function _S(e=!0){{let[t]=await DiscordNative.fileManager.openFiles({filters:[{name:"Vencord Settings Backup",extensions:["json"]},{name:"all",extensions:["*"]}]});if(t)try{await DS(new TextDecoder().decode(t.data)),e&&p3()}catch(o){new V("SettingsSync").error(o),e&&d3(o)}}}async function Us(e){let t=await LS({minify:!0});try{let o=await fetch(new URL("/v1/settings",Jr()),{method:"PUT",headers:{Authorization:await Fs(),"Content-Type":"application/octet-stream"},body:CS(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 Lu(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",Jr()),{method:"GET",headers:{Authorization:await Fs(),Accept:"application/octet-stream","If-None-Match":Z.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=Z.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(kS(new Uint8Array(s)));return await DS(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 BS(){try{let e=await fetch(new URL("/v1/settings",Jr()),{method:"DELETE",headers:{Authorization:await Fs()}});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 OS,p3,d3,bn,xl=f(()=>{"use strict";a();pr();_();S();NS();a1();Ne();gr();l1();OS=(e,t)=>ee.show({type:e,message:t,id:ee.genId()}),p3=()=>OS(ee.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),d3=e=>OS(ee.Type.FAILURE,`Failed to import settings: ${String(e)}`);bn=new V("Cloud:Settings","#39b7e0")});function y(e){return e}var x=f(()=>{"use strict";a()});var p1={};lt(p1,{PlainSettings:()=>Un,Settings:()=>Z,SettingsStore:()=>Wt,definePluginSettings:()=>P,migratePluginSetting:()=>u1,migratePluginSettings:()=>hr,useSettings:()=>Ot});function Ot(e){let[,t]=j.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){m3.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],Wt.markAsChanged();break}}}function u1(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 Z.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 m3,f3,c1,g3,Wt,Un,Z,_=f(()=>{"use strict";a();_i();tS();hu();Ne();yu();xl();x();S();$n();m3=new V("Settings"),f3={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}},c1=VencordNative.settings.get();Ds(c1,f3);g3=Oo(async()=>{Z.cloud.settingsSync&&Z.cloud.authenticated&&(await Us(),delete Bi.Vencord_settingsDirty)},6e4),Wt=new gu(c1,{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(),Bi.Vencord_settingsDirty=!0,g3(),VencordNative.settings.set(Wt.plain,t)});Un=c1,Z=Wt.store});var FS=f(()=>{});var g1={};lt(g1,{currentNotice:()=>Tl,nextNotice:()=>US,noticesQueue:()=>m1,popNotice:()=>h3,showNotice:()=>f1});function h3(){d1.dismiss()}function US(){Tl=m1.shift(),Tl&&d1.show(...Tl,"VencordNotice")}function f1(e,t,o){m1.push(["GENERIC",e,t,o]),Tl||US()}var d1,m1,Tl,h1=f(()=>{"use strict";a();$();Xe(e=>e.show&&e.dismiss&&!e.suppressAll,e=>d1=e);m1=[],Tl=null});var $S=f(()=>{});function GS(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ml(e,t,o=!1){let r=Wr.duration(e,t),i=M3.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} ${GS(d,u===1,o)}`)}return c.length?c:`0 ${GS(t,!1,o)}`}function P3(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 Hi(e,t){let o="```";return`${o}${t||""}
|
|
${e.replaceAll("```","\\`\\`\\`")}
|
|
${o}`}function I3(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 C3(e){return"``"+wl+e.replaceAll("`",wl+"`"+wl)+wl+"``"}var Sn,y3,v3,y1,b3,S3,x3,T3,w3,ko,M3,wl,Xo=f(()=>{"use strict";a();S();Sn=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),y3=e=>e.toLowerCase().split("_"),v3=e=>e.toLowerCase().split("-"),y1=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),b3=e=>e.toLowerCase().split(" "),S3=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),x3=e=>e.join("_").toUpperCase(),T3=e=>e.join("-").toLowerCase(),w3=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),ko=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),M3=["years","months","weeks","days","hours","minutes","seconds"];wl="\u200B"});function Pl(){return`-${To.fromTimestamp(Date.now())}`}function mt(e,t){let o=k3({channelId:e,content:"",embeds:[]});return qo.receiveMessage(e,Ds(t,o)),t}function qt(e,t,o){return e.find(r=>r.name===t)?.value??o}var k3,v1=f(()=>{"use strict";a();yu();$();S();k3=we('username:"Clyde"')});var $s,yr,b1,S1=f(()=>{"use strict";a();$s=(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))($s||{}),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||{}),b1=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(b1||{})});var w1={};lt(w1,{ApplicationCommandInputType:()=>yr,ApplicationCommandOptionType:()=>$s,ApplicationCommandType:()=>b1,BUILT_IN:()=>Gn,OptionalMessageOption:()=>zn,RequiredMessageOption:()=>Il,_handleCommand:()=>A3,_init:()=>N3,commands:()=>x1,findOption:()=>qt,generateId:()=>Pl,prepareOption:()=>T1,registerCommand:()=>Gs,sendBotMessage:()=>mt,unregisterCommand:()=>Cl});function T1(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===zS?r[o]=zn:t===HS&&(r[o]=Il),t.choices?.forEach(i=>i.displayName||=i.name),T1(r[o])}),e}function R3(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,options:o.options!==void 0?o.options:void 0,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};Gs(r,t)})}function Gs(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+jS+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,T1(e),e.options?.[0]?.type===1){R3(e,t);return}x1[e.name]=e,Gn.push(e)}function Cl(e){let t=Gn.findIndex(o=>o.name===e);return t===-1?!1:(Gn.splice(t,1),delete x1[e],!0)}var Gn,x1,zS,HS,zn,Il,jS,N3,A3,sn=f(()=>{"use strict";a();Ne();Xo();v1();S1();v1();S1();x1={},zS=Symbol("OptionalMessageOption"),HS=Symbol("RequiredMessageOption"),zn=zS,Il=HS,N3=function(e){try{Gn=e,zn=e.find(t=>(t.untranslatedName||t.displayName)==="shrug").options[0],Il=e.find(t=>(t.untranslatedName||t.displayName)==="me").options[0],jS=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},A3=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}:
|
|
${Hi(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,zs=f(()=>{a();xn="77bed92"});var ji,WS=f(()=>{a();ji="Vendicated/Vencord"});var cG,M1=f(()=>{"use strict";a();zs();WS();cG=`Vencord/${xn}${ji?` (https://github.com/${ji})`:""}`});function qS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=j.useState(l??!1),[d,g]=j.useState(null);j.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 KS=f(()=>{"use strict";a();Xo();S()});function YS({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var ZS=f(()=>{"use strict";a()});function P1({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]=j.useState(`${t[r]??e.default??0}`),[d,g]=j.useState(null);j.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)>=D3?(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 D3,JS=f(()=>{"use strict";a();ze();Xo();x();S();D3=BigInt(Number.MAX_SAFE_INTEGER)});function QS({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]=j.useState(l??null),[d,g]=j.useState(null);j.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(rn,{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 XS=f(()=>{"use strict";a();ze();Xo();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 VS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=j.useState(null);j.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(Ts,{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 I1=f(()=>{"use strict";a();ze();Xo();S()});function e2({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,c]=j.useState(t[r]??e.default??null),[u,d]=j.useState(null);j.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 t2=f(()=>{"use strict";a();ze();Xo();S()});var vr=f(()=>{"use strict";a();bu();KS();ZS();JS();XS();I1();t2()});var o2=f(()=>{});function L3(){let e=Es()===2?"#000000":"#FFFFFF";return n(fl,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function E3(){let e=Es()===2?"#000000":"#FFFFFF";return n(Gh,{"aria-hidden":!0,fill:e,className:"vc-settings-modal-link-icon"})}function n2({text:e,href:t,Icon:o}){return n(oe,{text:e},r=>n(za,{...r,href:t},n(o,null)))}var Eu,Ou,C1=f(()=>{"use strict";a();o2();Ie();S();_s();Eu=e=>n(n2,{...e,Icon:E3}),Ou=e=>n(n2,{...e,Icon:L3})});function i2(e){let t=new _3({username:e.username,id:e.id??Pl(),avatar:e.avatar,bot:!0});return G.dispatch({type:"USER_UPDATE",user:t}),t}function s2({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=j.useState([]),l=Ot().plugins[e.name],[c,u]=j.useState({}),[d,g]=j.useState({}),[h,v]=j.useState(null),C=()=>Object.values(d).every(U=>!U),w=!!(l&&e.options&&!nr(e.options));j.useEffect(()=>{(async()=>{for(let U of e.authors.slice(0,6)){let H=U.id?await go.getUser(`${U.id}`).catch(()=>i2({username:U.name})):i2({username:U.name});s(X=>[...X,H])}})()},[e.authors]);async function T(){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(Y){u(ae=>({...ae,[H]:Y}))}function te(Y){g(ae=>({...ae,[H]:Y}))}let K=B3[X.type];return n(K,{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(K=>K.name).join(", ")},({onMouseEnter:K,onMouseLeave:Y})=>n("div",{className:k1.moreUsers,onMouseEnter:K,onMouseLeave:Y},"+",X))}let L=js[e.name];return n(ve,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Ae,{separator:!1},n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(pt,{onClick:o})),n(Me,null,n(b.FormSection,null,n(ge,{className:r2("info")},n(b.FormText,{className:r2("description")},e.description),!L.userPlugin&&n("div",{className:"vc-settings-modal-links"},n(Eu,{text:"View more info",href:`https://vencord.dev/plugins/${e.name}`}),n(Ou,{text:"View source code",href:`https://github.com/${ji}/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(O3,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:A,renderUser:U=>n(er,{className:k1.clickableAvatar,onClick:()=>Hs(U)},n("img",{className:k1.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:T,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 Qr(e,t){he(o=>n(s2,{...o,plugin:e,onRestartNeeded:()=>t?.(e.name)}))}var r2,O3,k1,_3,B3,kl=f(()=>{"use strict";a();$S();sn();_();He();ne();jt();M1();So();ze();me();Ke();x();$();S();$n();vr();_u();C1();r2=ue("vc-plugin-modal-"),O3=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),k1=R("moreUsers","emptyUser","avatarContainer","clickableAvatar"),_3=Dt(()=>D.getCurrentUser().constructor);B3={0:e2,1:P1,2:P1,3:qS,4:QS,5:VS,6:YS,7:()=>null}});var a2=f(()=>{});function Bu({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:Xr("card",{"card-disabled":e}),onMouseEnter:d,onMouseLeave:g},n("div",{className:Xr("header")},n("div",{className:Xr("name-author")},n(Q,{variant:"text-md/bold",className:Xr("name")},n("div",{ref:v,className:Xr("title-container")},n("div",{ref:h,className:Xr("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(Rh,{text:"NEW",color:"#ED4245"})),!!s&&n(Q,{variant:"text-md/normal",className:Xr("author")},s)),r,n(jh,{checked:l,onChange:c,disabled:e})),n(Q,{className:Xr("note"),variant:"text-sm/normal"},u),i)}var Xr,N1=f(()=>{"use strict";a();a2();He();bu();Wh();S();Xr=ue("vc-addon-")});var l2=f(()=>{});var c2=f(()=>{});var R1={};lt(R1,{UpdateLogger:()=>qi,changes:()=>Vr,checkForUpdates:()=>br,getRepo:()=>A1,isNewer:()=>Nl,isOutdated:()=>Wi,maybePromptToUpdate:()=>Al,update:()=>ei,updateError:()=>Ws});async function Fu(e){let t=await e;if(t.ok)return t.value;throw Ws=t.error,t.error}async function br(){return Vr=await Fu(VencordNative.updater.getUpdates()),Vr.some(e=>e.hash===xn)?(Nl=!0,Wi=!1):Wi=Vr.length>0}async function ei(){if(!Wi)return!0;let e=await Fu(VencordNative.updater.update());if(e&&(Wi=!1,!await Fu(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Al(e,t=!1){try{if(await br()){let r=confirm(e);if(r&&Nl)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await ei(),Co())}}catch(o){qi.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var qi,Wi,Nl,Ws,Vr,A1,Ki=f(()=>{"use strict";a();zs();Ne();gr();qi=new V("Updater","white"),Wi=!1,Nl=!1;A1=()=>Fu(VencordNative.updater.getRepo())});function u2(){Al("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var p2=f(()=>{"use strict";a();Ki()});function Yi(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Rl=f(()=>{"use strict";a()});function Vo({title:e,children:t}){return n(b.FormSection,null,n(Q,{variant:"heading-lg/semibold",tag:"h2",className:F.bottom16},e),t)}function Fo(e,t){return k.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:D1})}var D1,Sr=f(()=>{"use strict";a();l2();c2();ne();p2();ze();Rl();S();D1=Yi(u2)});var Dl,L1=f(()=>{"use strict";a();Dl=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 d2=f(()=>{});var F1={};lt(F1,{ChatBarButton:()=>en,_injectButtons:()=>U3,addChatBarButton:()=>_1,removeChatBarButton:()=>B1});function U3(e,t){if(!t.disabled)for(let[o,r]of O1)e.push(n(k,{noop:!0,key:o,onError:i=>F3.error(`Failed to render ${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var E1,O1,F3,_1,B1,en,xr=f(()=>{"use strict";a();d2();ne();Ne();$();S();Xe(["buttonContainer","channelTextArea"],e=>E1=e);O1=new Map,F3=new V("ChatButtons");_1=(e,t)=>O1.set(e,t),B1=e=>O1.delete(e),en=k.wrap(e=>n(oe,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("div",{className:`expression-picker-chat-input-button ${E1?.buttonContainer??""} vc-chatbar-button`},n(I,{"aria-label":e.tooltip,size:"",look:I.Looks.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${nu.button} ${E1?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,onAuxClick:e.onAuxClick,...e.buttonProps},n("div",{className:nu.buttonWrapper},e.children)))),{noop:!0})});var z1={};lt(z1,{_usePatchContextMenu:()=>z3,addContextMenuPatch:()=>$1,addGlobalContextMenuPatch:()=>$3,findGroupChildrenByChildId:()=>dt,globalPatches:()=>Uu,navPatches:()=>Ll,removeContextMenuPatch:()=>G1,removeGlobalContextMenuPatch:()=>G3});function $1(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=Ll.get(o);r||(r=new Set,Ll.set(o,r)),r.add(t)}}function $3(e){Uu.add(e)}function G1(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Ll.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function G3(e){return Uu.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 z3(e){e={...e,children:U1(e.children)},e.contextMenuAPIArguments??=[];let t=Ll.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){m2.error(`Patch for ${e.navId} errored,`,r)}for(let o of Uu)try{o(e.navId,e.children,...e.contextMenuAPIArguments)}catch(r){m2.error("Global patch errored,",r)}return e}function U1(e){return Array.isArray(e)?e.map(U1):(j.isValidElement(e)&&(e=j.cloneElement(e),e?.props?.children&&(e.type!==E.MenuControlItem||e.type===E.MenuControlItem&&e.props.control!=null)&&(e.props.children=U1(e.props.children))),e)}var m2,Ll,Uu,No=f(()=>{"use strict";a();Ne();S();m2=new V("ContextMenu"),Ll=new Map,Uu=new Set});var H1={};lt(H1,{__getDecorators:()=>H3,addMemberListDecorator:()=>Zi,decoratorsFactories:()=>$u,removeMemberListDecorator:()=>Ji});function Zi(e,t,o){$u.set(e,{render:t,onlyIn:o})}function Ji(e){$u.delete(e)}function H3(e){let t=!!e.guildId,o=Array.from($u.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 $u,El=f(()=>{"use strict";a();ne();$u=new Map});var j1={};lt(j1,{_modifyAccessories:()=>j3,accessories:()=>Gu,addMessageAccessory:()=>Ol,removeMessageAccessory:()=>_l});function Ol(e,t,o){Gu.set(e,{render:t,position:o})}function _l(e){Gu.delete(e)}function j3(e,t){for(let[o,r]of Gu.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 Gu,zu=f(()=>{"use strict";a();ne();Gu=new Map});var W1={};lt(W1,{__addDecorationsToMessage:()=>W3,addMessageDecoration:()=>Qi,decorationsFactories:()=>Hu,removeMessageDecoration:()=>Xi});function Qi(e,t){Hu.set(e,t)}function Xi(e){Hu.delete(e)}function W3(e){let t=Array.from(Hu.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 Hu,Bl=f(()=>{"use strict";a();ne();Hu=new Map});var X1={};lt(X1,{_handleClick:()=>Y3,_handlePreEdit:()=>K3,_handlePreSend:()=>q3,addMessageClickListener:()=>J1,addMessagePreEditListener:()=>Fl,addMessagePreSendListener:()=>Vi,removeMessageClickListener:()=>Q1,removeMessagePreEditListener:()=>Ul,removeMessagePreSendListener:()=>es});async function q3(e,t,o,r){o.replyOptions=r;for(let i of K1)try{if((await i(e,t,o))?.cancel)return!0}catch(s){q1.error(`MessageSendHandler: Listener encountered an unknown error
|
|
`,s)}return!1}async function K3(e,t,o){for(let r of Y1)try{if((await r(e,t,o))?.cancel)return!0}catch(i){q1.error(`MessageEditHandler: Listener encountered an unknown error
|
|
`,i)}return!1}function Vi(e){return K1.add(e),e}function Fl(e){return Y1.add(e),e}function es(e){return K1.delete(e)}function Ul(e){return Y1.delete(e)}function Y3(e,t,o){e=Jt.getMessage(t.id,e.id)??e;for(let r of Z1)try{r(e,t,o)}catch(i){q1.error(`MessageClickHandler: Listener encountered an unknown error
|
|
`,i)}}function J1(e){return Z1.add(e),e}function Q1(e){return Z1.delete(e)}var q1,K1,Y1,Z1,$l=f(()=>{"use strict";a();Ne();S();q1=new V("MessageEvents","#e5c890"),K1=new Set,Y1=new Set;Z1=new Set});var ty={};lt(ty,{_buildPopoverElements:()=>J3,addMessagePopoverButton:()=>V1,buttons:()=>ju,removeMessagePopoverButton:()=>ey});function V1(e,t){ju.set(e,t)}function ey(e){ju.delete(e)}function J3(e,t){let o=[];for(let[r,i]of ju.entries())try{let s=i(t);s&&(s.key??=r,o.push(n(k,{noop:!0},n(e,{...s}))))}catch(s){Z3.error(`[${r}]`,s)}return n(m,null,o)}var Z3,ju,oy=f(()=>{"use strict";a();ne();Ne();Z3=new V("MessagePopover"),ju=new Map});var sy={};lt(sy,{SYM_IS_PROXIED_FACTORY:()=>ny,SYM_ORIGINAL_FACTORY:()=>oi,SYM_PATCHED_BY:()=>iy,SYM_PATCHED_SOURCE:()=>ry,allWebpackInstances:()=>Wu,getBuildNumber:()=>h2,getFactoryPatchedBy:()=>V3,getFactoryPatchedSource:()=>X3,patchTimings:()=>Q3,patches:()=>ti});function X3(e,t=Tt){return t.m[e]?.[ry]}function V3(e,t=Tt){return t.m[e]?.[iy]}function y2(e,t,o,r,i=!1){if(oR(e,t,o,r,i))return!0;nR(t,o);let s=new Proxy(Z.eagerPatches?b2(t,o):o,tR);return Reflect.set(e,t,s,r)}function oR(e,t,o,r,i){let s,l;for(let c of Wu)if(!(i&&c.m===e)&&Object.hasOwn(c.m,t)){s=c.m[t],l=c.m;break}return s!=null?(l!==e&&s[ny]?Reflect.set(e,t,s,r):v2(t,o),s[oi]!=null&&(s[oi]=o),!0):!1}function v2(e,t){for(let o of Wu)Tn(o.m,e,{value:t})}function nR(e,t){for(let o of La)try{o(t,e)}catch(r){wn.error(`Error in Webpack factory listener:
|
|
`,r,o)}}function g2(e,t,o){let r=e[oi];e===r&&delete e[oi];let[i,s,l]=o;if(v2(i.id,r),Tt==null&&!f2&&(f2=!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)}`+Qa`, WebpackInstance origin: ${d}`+")"),Ea(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&&Jc(l.c,s,i.id)||s==null)return c;for(let u of Zc)try{u(s,i.id)}catch(d){wn.error(`Error in Webpack module listener:
|
|
`,d,u)}for(let[u,d]of Mi)try{if(u(s)){Mi.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)){Mi.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 b2(e,t){let o="0,"+String(t),r=o,i=t,s=new Set;for(let l=0;l<ti.length;l++){let c=ti[l],u=h2(),d=u!==-1;if(d&&c.fromBuild!=null&&u<c.fromBuild||c.toBuild!=null&&u>c.toBuild){ti.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=Ab(`patch by ${c.plugin}`,(T,N)=>(typeof T!="string"&&T.global&&(T.lastIndex=0),o.replace(T,N))),v=o,C=t,w=!1;for(let T of c.replacement){if(d&&T.fromBuild!=null&&u<T.fromBuild||T.toBuild!=null&&u>T.toBuild)continue;c.plugin==="Vesktop"&&Si(T,"VCDP");let N=o,A=t;try{let[L,U]=h(T.match,T.replace);if(L===o){if(c.noWarn||T.noWarn||wn.warn(`Patch by ${c.plugin} had no effect (Module id is ${String(e)}): ${T.match}`),c.group){wn.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${T.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)}): ${T.match}
|
|
`,L),w&&s.delete(c.plugin),c.group){wn.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${T.match} errored`),o=v,i=C;break}o=N,i=A}}c.all||ti.splice(l--,1)}return i[oi]=t,i}var ti,ny,oi,ry,iy,Wu,Q3,h2,wn,f2,Tn,eR,tR,qu=f(()=>{"use strict";a();_();So();Ne();me();jo();Yc();$();ti=[],ny=Symbol("WebpackPatcher.isProxiedFactory"),oi=Symbol("WebpackPatcher.originalFactory"),ry=Symbol("WebpackPatcher.patchedSource"),iy=Symbol("WebpackPatcher.patchedBy"),Wu=new Set,Q3=[],h2=tn(()=>{try{let t=function(i){let s=i.match(/.concat\("(\d+?)"\)/);return s==null?-1:Number(s[1])};var e=t;let o=String(Tt.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=Oa("Trying to open a changelog for an invalid build number");return t(String(r))}catch{return-1}});wn=new V("WebpackInterceptor","#8caaee"),f2=!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/"&&(Tt==null&&this.c!=null&&(wn.info("Main WebpackInstance found"+Qa` in ${o}`+", initializing internal references to WebpackRequire"),Ea(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"+Qa` in ${o}`),Wu.add(this);for(let c in e)y2(e,c,e[c],e,!0);Tn(e,Symbol.toStringTag,{value:"ModuleFactories",enumerable:!1});let l=new Proxy(e,eR);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]})}}}});eR={set:y2},tR={apply(e,t,o){if(e[oi]!=null)return g2(e,t,o);let r=e.name,i=b2(r,e);return g2(i,t,o)},get(e,t,o){if(t===ny)return!0;let r=e[oi]??e;if(t==="toString"||t===ry||t===iy){let i=Reflect.get(r,t,r);return t==="toString"?i.bind(r):i}return Reflect.get(e,t,o)}}});var Ku={};lt(Ku,{PMLogger:()=>rR,addPatch:()=>T2,isPluginEnabled:()=>zl,patches:()=>ti,plugins:()=>iR,startAllPlugins:()=>Hl,startDependenciesRecursive:()=>w2,startPlugin:()=>cy,stopPlugin:()=>lR,subscribeAllPluginsFluxEvents:()=>aR,subscribePluginFluxEvents:()=>ly,unsubscribePluginFluxEvents:()=>M2});function zl(e){return(je[e]?.required||je[e]?.isDependency||Gl[e]?.enabled)??!1}function T2(e,t,o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`){let r=e;if(r.plugin=t,!(r.predicate&&!r.predicate())){Vg(r),Array.isArray(r.replacement)||(r.replacement=[r.replacement]);for(let i of r.replacement)Si(i,o);r.replacement=r.replacement.filter(({predicate:i})=>!i||i()),ti.push(r)}}function w2(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!Gl[r].enabled){let i=je[r];if(w2(i),Gl[r].enabled=!0,i.isDependency=!0,i.patches){Kt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}cy(i)||o.push(r)}}),{restartNeeded:t,failures:o}}function ly(e,t){if(e.flux&&!ay.has(e.name)){ay.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 M2(e,t){if(e.flux){ay.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 aR(e){S2=!0;for(let t in je)zl(t)&&ly(je[t],e)}var Kt,rR,iR,S2,ay,x2,Gl,sR,Tr,Hl,cy,lR,Yu=f(()=>{"use strict";a();ql();xr();sn();No();El();zu();Bl();$l();oy();_();He();Ne();jo();x();S();qu();$n();Yc();Kt=new V("PluginManager","#a6d189"),rR=Kt,iR=je,S2=!1,ay=new Set,x2=Object.values(je),Gl=Z.plugins;sR=["onBeforeMessageEdit","onBeforeMessageSend","onMessageClick","renderChatBarButton","renderMemberListDecorator","renderMessageAccessory","renderMessageDecoration","renderMessagePopoverButton"],Tr=new Set;for(let e of x2)if(zl(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}Gl[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 sR)e[t]&&=e[t].bind(e)}for(let e of Tr)je[e].isDependency=!0,Gl[e].enabled=!0;for(let e of x2){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&&zl(e.name))for(let t of e.patches)T2(t,e.name)}Hl=Qn("startAllPlugins",function(t){Kt.info(`Starting plugins (stage ${t})`);for(let o in je)if(zl(o)){if((je[o].startAt??"WebpackReady")!==t)continue;cy(je[o])}});cy=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(T){return Kt.error(`Failed to start ${o}
|
|
`,T),!1}}if(t.started=!0,r?.length){Kt.debug("Registering commands of plugin",o);for(let T of r)try{Gs(T,o)}catch(N){return Kt.error(`Failed to register command ${T.name}
|
|
`,N),!1}}if(S2&&ly(t,G),i){Kt.debug("Adding context menus patches of plugin",o);for(let T in i)$1(T,i[T])}return s&&Io(s),l&&jl(l),c&&Fl(c),u&&Vi(u),d&&J1(d),g&&_1(o,g),h&&Zi(o,h),C&&Qi(o,C),v&&Ol(o,v),w&&V1(o,w),!0},e=>`startPlugin ${e.name}`),lR=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(T){return Kt.error(`Failed to stop ${o}
|
|
`,T),!1}}if(t.started=!1,r?.length){Kt.debug("Unregistering commands of plugin",o);for(let T of r)try{Cl(T.name)}catch(N){return Kt.error(`Failed to unregister command ${T.name}
|
|
`,N),!1}}if(M2(t,G),i){Kt.debug("Removing context menus patches of plugin",o);for(let T in i)G1(T,i[T])}return s&&Ko(s),l&&Wl(l),c&&Ul(c),u&&es(u),d&&Q1(d),g&&B1(o),h&&Ji(o),C&&Xi(o),v&&_l(o),w&&ey(o),!0},e=>`stopPlugin ${e.name}`)});function mR(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function fR({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 Zu({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=Z.plugins[e.name],c=()=>Vencord.Plugins.isPluginEnabled(e.name);function u(){let d=c();if(!d){let{restartNeeded:h,failures:v}=cR(e);if(v.length){P2.error(`Failed to start dependencies for ${e.name}: ${v.join(", ")}`),f1("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?pR(e):uR(e))){l.enabled=!1;let h=`Error while ${d?"stopping":"starting"} plugin ${e.name}`;P2.error(h),mR(h);return}l.enabled=!d}return n(Bu,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:u,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>Qr(e,o),className:z(dR.button,Hn("info-button"))},e.options&&!nr(e.options)?n(cl,{className:Hn("info-icon")}):n(sl,{className:Hn("info-icon")}))})}function gR({search:e}){let t=Object.entries(C2).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 uy(){let e=Ot(),t=j.useMemo(()=>new Dl,[]);j.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,T)=>n(m,null,T>0&&", ",Oe.parse("`"+w+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=j.useMemo(()=>{let w={};for(let T in je){let N=je[T].dependencies;if(N)for(let A of N)w[A]??=[],w[A].push(T)}return w},[]),r=Re(()=>Object.values(je).sort((w,T)=>w.name.localeCompare(T.name)),[]),[i,s]=j.useState({value:"",status:0}),l=i.value.toLowerCase(),c=w=>s(T=>({...T,value:w})),u=w=>s(T=>({...T,status:w})),d=w=>{let{status:T}=i,N=Vencord.Plugins.isPluginEnabled(w.name);return N&&T===2||!N&&T===1||T===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]=bt(()=>co("Vencord_existingPlugins").then(w=>{let T=Date.now()/1e3,N={},A=Object.values(r).map(U=>U.name),L=[];for(let{name:U}of r)(N[U]=w?.[U]??T)+60*60*24*2>T&&L.push(U);return hn("Vencord_existingPlugins",N),Ri.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.":hR(o[w.name]?.filter(A=>e.plugins[A].enabled));v.push(n(oe,{text:N,key:w.name},({onMouseLeave:A,onMouseEnter:L})=>n(Zu,{onMouseLeave:A,onMouseEnter:L,onRestartNeeded:U=>t.handleChange(U),disabled:!0,plugin:w,key:w.name})))}else h.push(n(Zu,{onRestartNeeded:N=>t.handleChange(N),disabled:!1,plugin:w,isNew:g?.includes(w.name),key:w.name}))}return n(Vo,{title:"Plugins"},n(fR,{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:I2.inputWrapper},n(rn,{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:I2.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(gR,{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 hR(e){return n(j.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 cR,uR,pR,Hn,P2,I2,dR,py=f(()=>{"use strict";a();FS();_n();h1();_();He();At();kl();N1();Sr();L1();So();Ne();ze();me();wt();$();S();$n();({startDependenciesRecursive:cR,startPlugin:uR,stopPlugin:pR}=Dt(()=>(Yu(),wb(Ku)))),Hn=ue("vc-plugins-"),P2=new V("PluginSettings","#a6d189"),I2=R("inputWrapper","inputDefault","error"),dR=R("button","disabled","enabled")});function Hs(e){he(t=>n(ve,{...t},n(k,null,n(Me,{className:qs("root")},n(yR,{user:e})))))}function yR({user:e}){Ot();let t=Se([Qt],()=>Qt.getUserProfile(e.id));le(()=>{!t&&!e.bot&&e.id&&Dh(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=Re(()=>{let l=Object.values(je);return(As[e.id]?l.filter(u=>u.authors.includes(As[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:qs("header")},n("img",{className:qs("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(b.FormTitle,{tag:"h2",className:qs("name")},e.username),n("div",{className:z("vc-settings-modal-links",qs("links"))},r&&n(Eu,{text:r,href:`https://${r}`}),o&&n(Ou,{text:o,href:`https://github.com/${o}`}))),i.length?n(b.FormText,null,"This person has ",s," to ",vh(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:qs("plugins")},i.map(l=>n(Zu,{key:l.name,plugin:l,disabled:l.required??!1,onRestartNeeded:()=>Je("Restart to apply changes!")}))))}var qs,_u=f(()=>{"use strict";a();Vb();_();He();ne();Bo();M();Ie();me();Ke();S();$n();py();C1();qs=ue("vc-author-modal-")});async function k2(e=!1){dy={};let t={};e&&(t.cache="no-cache"),dy=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var vR,bR,dy,Ks,my=f(()=>{"use strict";a();Xb();ql();fu();ne();jt();mu();_u();M();Ne();ze();me();Ke();x();S();vR="https://vencord.dev/assets/favicon.png",bR={description:"Vencord Contributor",image:vR,position:0,shouldShow:({userId:e})=>fn(e),onClick:(e,{userId:t})=>Hs(D.getUser(t))},dy={};Ks=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 k2(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},userProfileBadge:bR,async start(){await k2()},getBadges(e){if(!e)return[];try{return e.userId??=e.user?.id,fy(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 dy[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(Ae,null,n(ge,{style:{width:"100%",justifyContent:"center"}},n(b.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(Va,null),"Vencord Donor"))),n(Me,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(el,null))))))}}))}})});var Qu,N2=f(()=>{"use strict";a();M();x();Qu=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 Xu,A2=f(()=>{"use strict";a();M();x();Xu=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 Vu,R2=f(()=>{"use strict";a();M();x();Vu=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 ep,D2=f(()=>{"use strict";a();M();x();ep=y({name:"DynamicImageModalAPI",authors:[p.sadan,p.Nuckyz],description:"Allows you to omit either width or height when opening an image modal",patches:[{find:".dimensionlessImage,",replacement:{match:/(?<="IMAGE"===\i&&\(\i=)\i(?=\?)/,replace:"true"}}]})});var L2,E2=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});L2="src/plugins/_api/memberListDecorators/style.css"});var tp,O2=f(()=>{"use strict";a();M();x();E2();tp=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.Ven],managedStyle:L2,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 _2,op,B2=f(()=>{"use strict";a();M();jo();x();_2={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"},op=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 _2){let u=_2[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 np,F2=f(()=>{"use strict";a();M();x();np=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 U2,$2=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});U2="src/plugins/_api/messageDecorations/style.css"});var rp,G2=f(()=>{"use strict";a();M();x();$2();rp=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],managedStyle:U2,patches:[{find:'"Message Username"',replacement:{match:/#{intl::GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE}.+?renderPopout:.+?(?=\])/,replace:"$&,Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var ip,z2=f(()=>{"use strict";a();M();x();ip=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 sp,H2=f(()=>{"use strict";a();M();x();sp=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 ap,j2=f(()=>{"use strict";a();M();x();ap=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 lp,W2=f(()=>{"use strict";a();M();x();lp=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 cp,q2=f(()=>{"use strict";a();M();x();cp=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 up,K2=f(()=>{"use strict";a();M();x();up=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 Y2,pp,Z2=f(()=>{"use strict";a();_();M();Ne();x();Y2=P({disableAnalytics:{type:3,description:"Disable Discord's tracking (analytics/'science')",default:!0,restartNeeded:!0}}),pp=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:Y2,patches:[{find:"AnalyticsActionHandlers.handle",predicate:()=>Y2.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 SR(){return n(Vo,{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:()=>_S(),size:I.Sizes.SMALL},"Import Settings"),n(I,{onClick:ES,size:I.Sizes.SMALL},"Export Settings")))}var J2,Q2=f(()=>{"use strict";a();jt();ze();me();xl();S();Sr();J2=Fo(SR,"Backup & Restore")});function X2(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 V2=f(()=>{"use strict";a()});function xR(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function TR(){let e=await fetch(new URL("/v1/",Jr()),{method:"DELETE",headers:{Authorization:await Fs()}});if(!e.ok){Au.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}Z.cloud.authenticated=!1,await Ru(),Ye({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function wR(){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:()=>Us(!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:()=>Lu(!0,!0)},"Sync from Cloud")),n(I,{size:I.Sizes.SMALL,color:I.Colors.RED,disabled:!t,onClick:()=>BS()},"Delete Cloud Settings")))}function MR(){let e=Ot(["cloud.authenticated","cloud.url"]);return n(Vo,{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?s1():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(rl,{key:"backendUrl",value:e.cloud.url,onChange:async t=>{e.cloud.url=t,e.cloud.authenticated=!1,Ru()},validate:xR}),n(X2,{columns:2,gap:"1em",className:F.top8},n(I,{size:I.Sizes.MEDIUM,disabled:!e.cloud.authenticated,onClick:async()=>{await Ru(),e.cloud.authenticated=!1,await s1()}},"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:TR,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data")),n(b.FormDivider,{className:F.top16})),n(wR,null))}var ex,tx=f(()=>{"use strict";a();pr();_();Su();V2();Bo();a1();ze();xl();S();Sr();ex=Fo(MR,"Cloud")});var Jq,ox=f(()=>{"use strict";a();xu();_i();ze();jo();Xo();$();S();Sr();Jq=Oo(function({find:e,setModule:t,setError:o}){let r=Ss(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 nx,rx=f(()=>{"use strict";a();py();Sr();nx=Fo(uy,"Plugins")});var ix=f(()=>{});function Mn(e){let{Icon:t,action:o,text:r,disabled:i}=e;return n("button",{className:gy("pill"),onClick:o,disabled:i},n(t,{className:gy("img")}),r)}function dp(e){return n(Zt,{className:gy("card")},e.children)}var gy,hy=f(()=>{"use strict";a();ix();He();S();gy=ue("vc-settings-quickActions-")});function IR({link:e}){let[t,o,r]=bt(()=>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 CR({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(IR,{link:r}))}))):null}function kR({theme:e,enabled:t,onChange:o,onDelete:r}){return n(Bu,{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&&Ui(e.invite).catch(()=>Je("Invalid or expired invite"))}},"Discord Server"))})}function NR(){let e=Ot(["themeLinks","enabledThemes"]),t=Mt(null),[o,r]=q(0),[i,s]=q(e.themeLinks.join(`
|
|
`)),[l,c]=q(null),[u,,d]=bt(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(dp,null,n(m,null,n(Mn,{text:"Open Themes Folder",action:()=>Du(u),disabled:d,Icon:pl}),n(Mn,{text:"Load missing Themes",action:g,Icon:dl}),n(Mn,{text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor(),Icon:ml}),Z.plugins.ClientTheme.enabled&&n(Mn,{text:"Edit ClientTheme",action:()=>Qr(je.ClientTheme),Icon:$h}))),n("div",{className:PR("grid")},l?.map(N=>n(kR,{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 T(){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(ru,{value:i,onChange:s,className:"vc-settings-theme-links",placeholder:"Theme Links",spellCheck:!1,onBlur:w,rows:10}),n(CR,{themeLinks:e.themeLinks})))}return n(Vo,{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&&T())}var NK,PR,sx,ax=f(()=>{"use strict";a();_();He();jt();At();Bo();kl();Ie();ze();gr();wt();$();S();$n();N1();hy();Sr();NK=kt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),PR=ue("vc-settings-theme-");sx=Fo(NR,"Themes")});function lx(e,t){return async()=>{e(!0);try{await t()}catch(o){qi.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},Oe.parse(i))))})}finally{e(!1)}}}function cx({repo:e,hash:t,disabled:o=!1}){return n(it,{href:`${e}/commit/${t}`,disabled:o},t)}function ux({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(cx,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function AR(e){let[t,o]=j.useState(Vr),[r,i]=j.useState(!1),[s,l]=j.useState(!1),c=(t?.length??0)>0;return n(m,null,!t&&Ws?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,Ws.stderr||Ws.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(ux,{updates:t,...e}),n(ge,{className:z(F.bottom8,F.top8)},c&&n(I,{size:I.Sizes.SMALL,disabled:s||r,onClick:lx(l,async()=>{await ei()&&(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:lx(i,async()=>{await br()?o(Vr):(o([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function RR(e){return n(m,null,n(b.FormText,{className:F.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(ux,{...e,updates:Vr}))}function px(){let e=Ot(["autoUpdate","autoUpdateNotification"]),[t,o,r]=bt(A1,{fallbackValue:"Loading..."});j.useEffect(()=>{o&&qi.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(Vo,{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(cx,{hash:xn,repo:t,disabled:r}),")"),n(b.FormDivider,{className:F.top8+" "+F.bottom8}),n(b.FormTitle,{tag:"h5"},"Updates"),Nl?n(RR,{...i}):n(AR,{...i}))}var dx,mp,fp=f(()=>{"use strict";a();_();Oi();jt();Bo();ze();me();Ke();gr();wt();Ki();S();zs();Sr();dx=Fo(px,"Updater"),mp=function(){let e=Fo(px,"Updater");try{he(Fo(t=>n(ve,{...t,size:"medium"},n(Me,{className:"vc-updater-modal"},n(pt,{onClick:t.onClose,className:"vc-updater-modal-close-button"}),n(e,null))),"UpdaterModal"))}catch{D1()}}});var mx=f(()=>{});function gp({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,fx=f(()=>{"use strict";a();mx();He();S();Pn=ue("vc-special-")});function BR(){let[e,,t]=bt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=Ot(),r=j.useMemo(()=>Math.random()>.5?DR:LR,[]),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(Vo,{title:"Vencord Settings"},FR(c?.id)?n(gp,{title:"Donations",subtitle:"Thank you for donating!",description:"You can manage your perks at any time by messaging @vending.machine.",cardImage:ER,backgroundImage:gx,backgroundColor:"#ED87A9"},n(hx,null)):n(gp,{title:"Support the Project",description:"Please consider supporting the development of Vencord by donating!",cardImage:r,backgroundImage:gx,backgroundColor:"#c3a3ce"},n(hx,null)),fn(c?.id)&&n(gp,{title:"Contributions",subtitle:"Thank you for contributing!",description:"Since you've contributed to Vencord you now have a cool new badge!",cardImage:OR,backgroundImage:_R,backgroundColor:"#EDCC87",buttonTitle:"See what you've contributed to",buttonOnClick:()=>Hs(c)}),n(b.FormSection,{title:"Quick Actions"},n(dp,null,n(Mn,{Icon:Uh,text:"Notification Log",action:hl}),n(Mn,{Icon:ml,text:"Edit QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),n(Mn,{Icon:dl,text:"Relaunch Discord",action:Co}),n(Mn,{Icon:pl,text:"Open Settings Folder",action:()=>Du(e)}),n(Mn,{Icon:fl,text:"View Source Code",action:()=>VencordNative.native.openExternal("https://github.com/"+ji)}))),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:()=>Qr(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(rn,{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:Rs})),n(b.FormSection,{className:F.top16,title:"Vencord Notifications",tag:"h5"},n(ge,null,n(I,{onClick:Pu},"Notification Settings"),n(I,{onClick:hl},"View Notification Log"))))}function hx(){return n(el,{look:I.Looks.FILLED,color:I.Colors.WHITE,style:{marginTop:"1em"}})}function FR(e){let t=Ks.getDonorBadges(e);return De.getMember(Za,e)?.roles.includes(Ja)||!!t}var xY,DR,LR,ER,OR,gx,_R,yx,vx=f(()=>{"use strict";a();Cu();_();He();fu();_u();kl();M1();M();ze();me();gr();wt();S();my();_s();Kh();hy();Sr();fx();xY=ue("vc-settings-"),DR="https://cdn.discordapp.com/emojis/1026533090627174460.png",LR="https://media.discordapp.net/stickers/1039992459209490513.png",ER="https://cdn.discordapp.com/emojis/1238120638020063377.png",OR="https://cdn.discordapp.com/emojis/1026533070955872337.png",gx="https://media.discordapp.net/stickers/1311070116305436712.png?size=2048",_R="https://media.discordapp.net/stickers/1311070166481895484.png?size=2048";yx=Fo(BR,"Vencord Settings")});var Ys,yy=f(()=>{"use strict";a();_();Q2();tx();ox();rx();ax();fp();vx();M();Ie();x();zs();Ys=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:yx,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:nx,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:sx,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:dx,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:ex,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:J2,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}=Z.plugins.Settings;if(r==="bottom")return o==="LOGOUT";if(r==="belowActivity")return o==="CHANGELOG";if(e)try{let i={top:Pe("USER_SETTINGS"),aboveNitro:Pe("BILLING_SETTINGS"),belowNitro:Pe("APP_SETTINGS"),aboveActivity:Pe("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 by={};lt(by,{UserSettings:()=>vy,getUserSetting:()=>bx,getUserSettingLazy:()=>Ao});function bx(e,t){if(!Vencord.Plugins.isPluginEnabled("UserSettingsAPI"))throw new Error("Cannot use UserSettingsAPI without setting as dependency.");for(let o in vy){let r=vy[o];if(r.userSettingsAPIGroup===e&&r.userSettingsAPIName===t)return r}}function Ao(e,t){return Dt(()=>bx(e,t))}var vy,wr=f(()=>{"use strict";a();So();Ne();$();vy=Eo(()=>{let e=Hr('"textAndImages","renderSpoilers"');return e==null?new V("UserSettingsAPI ").error("Didn't find settings module."):Tt(e)})});async function xx(){let e=await br();return e&&(await ei(),Co()),e}async function Tx(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=`Discord Desktop v${DiscordNative.app.getVersion()}`,o={Vencord:`v1.11.9 \u2022 [${xn}](<https://github.com/Vendicated/Vencord/commit/${xn}>)${Ys.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1744298103263)}`,Client:`${e} ~ ${t}`,Platform:window.navigator.platform};o["Last Crash Reason"]=(await du(()=>DiscordNative.processUtils.getLastCrash(),void 0))?.rendererCrashReason??"N/A";let r={"NoRPC enabled":Vencord.Plugins.isPluginEnabled("NoRPC"),"Activity Sharing disabled":du(()=>!HR.getSetting(),!1),"Vencord DevBuild":!1,"Has UserPlugins":Object.values(js).some(s=>s.userPlugin),"More than two weeks out of date":1744298103263<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 wx(){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=>!js[s].userPlugin),r=t.filter(s=>js[s].userPlugin),i=`**Enabled Plugins (${o.length}):**
|
|
${Hi(o.join(", "))}`;return r.length&&(i+=`**Enabled UserPlugins (${r.length}):**
|
|
${Hi(r.join(", "))}`),i}var UR,$R,GR,zR,HR,Sx,jR,WR,hp,Mx=f(()=>{"use strict";a();_();wr();ne();jt();Bo();fp();M();Ie();Ne();ze();me();gr();Rl();Xo();x();Ki();S();zs();$n();yy();UR=/```js\n(.+?)```/s,$R=["1024286218801926184"],GR=[mh,fh,Ja],zR=async function(){}.constructor,HR=Ao("status","showCurrentGame"),Sx=e=>e.parent_id===Ns||$R.includes(e.id);jR=Yi(br),WR=P({}).withPrivateSettings(),hp=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["UserSettingsAPI"],settings:WR,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)||Sx(e.channel),execute:async()=>({content:await Tx()})},{name:"vencord-plugins",description:"Send Vencord plugin list",predicate:e=>fn(D.getCurrentUser()?.id)||Sx(e.channel),execute:()=>({content:wx()})}],flux:{async CHANNEL_SELECT({channelId:e}){if(!(e===pu||ie.getChannel(e)?.parent_id===Ns))return;let o=D.getCurrentUser()?.id;if(!o||fn(o))return;if(await jR().catch(()=>{}),Wi)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:()=>mp(),cancelText:"View Updates",confirmText:"Update & Restart Now",onConfirm:xx,secondaryConfirmText:"I know what I'm doing or I can't update"});let r=De.getSelfMember(Za)?.roles;!r||GR.some(i=>r.includes(i))}},renderMessageAccessory(e){let t=[];if((e.channel.id===gh||e.channel.parent_id===Ns&&e.message.author.id===uu)&&e.message.content?.includes("update")&&t.push(n(I,{key:"vc-update",color:I.Colors.GREEN,onClick:async()=>{try{await xx()?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===Ns&&Fe.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()=>Os(e.channel.id,{content:await Tx()})},"Run /vencord-debug"),n(I,{key:"vc-plg-list",onClick:async()=>Os(e.channel.id,{content:wx()})},"Run /vencord-plugins")),e.message.author.id===uu)){let r=UR.exec(e.message.content||e.message.embeds[0]?.rawDescription||"");r&&t.push(n(I,{key:"vc-run-snippet",onClick:async()=>{try{await zR(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)||Ue.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: ",Oe.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),!ie.getChannel(pu)&&" (Click the link to join)")},{noop:!0})})});var qR,KR,yp,Kl,YR,Yl,vp,Px=f(()=>{"use strict";a();_();ne();M();Ie();x();$();S();qR=se("UserProfilePopoutWrapper: user cannot be undefined"),KR=R("accountProfilePopoutWrapper"),yp=!1,Kl={current:null},YR=k.wrap(()=>{let{prioritizeServerProfile:e}=Yl.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:Yo()?.getGuildId()==null,action:t=>{yp=!0,Kl.current?.props.onMouseDown(),Kl.current?.props.onClick(t)}}),n(E.MenuCheckboxItem,{id:"vc-ap-prioritize-server-profile",label:"Prioritize Server Profile",checked:e,action:()=>Yl.store.prioritizeServerProfile=!e}))},{noop:!0}),Yl=P({prioritizeServerProfile:{type:3,description:"Prioritize Server Profile when left clicking your account panel",default:!1}}),vp=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:Yl,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 Kl},useAccountPanelRef(){return le(()=>()=>{Kl.current=null},[]),Kl=Mt(null)},openAccountPanelContextMenu(e){Et.openContextMenu(e,YR)},onPopoutClose(){yp=!1},UserProfile:k.wrap(({popoutProps:e,currentUser:t,originalRenderPopout:o})=>{if(Yl.store.prioritizeServerProfile&&yp||!Yl.store.prioritizeServerProfile&&!yp)return o();let r=Yo();return r?.getGuildId()==null?o():n("div",{className:KR.accountProfilePopoutWrapper},n(qR,{...e,userId:t.id,guildId:r.getGuildId(),channelId:r.id}))},{noop:!0})})});var bp,Ix=f(()=>{"use strict";a();M();x();bp=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 Sp,Cx=f(()=>{"use strict";a();_();M();x();hr("AlwaysExpandRoles","ShowAllRoles");Sp=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 Sy,xp,kx=f(()=>{"use strict";a();_();M();x();Sy=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}}),xp=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:()=>Sy.store.domain},{find:"bitbucket.org",replacement:{match:/function \i\(\i\){(?=.{0,30}pathname:\i)/,replace:"$&return null;"},predicate:()=>Sy.store.file}],settings:Sy})});var ZR,JR,QR,ni,Tp,Nx=f(()=>{"use strict";a();_();ne();M();x();$();ZR=we(".actionBarIcon)"),JR=R("popFirstFile","update"),QR=/\.tar\.\w+$/,ni=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:()=>ni.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>ni.store.method!==1}}),Tp=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:ni,renderIcon:k.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??ni.store.anonymiseByDefault;return n(ZR,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,JR.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??ni.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=QR.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(ni.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:ni.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return ni.store.consistent+i;case 2:return Date.now()+i}}})});function VR(e){G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"AppleMusic"})}function Zl(e,t){return e.replaceAll("{name}",t.name).replaceAll("{album}",t.album??"").replaceAll("{artist}",t.artist??"")}function Ax(e,t){let o=e==="Album"?t.albumArtwork:t.artistArtwork;if(o)return Li.fetchAssetIds(Rx,[o]).then(r=>r[0])}var XR,Rx,Uo,wp,Dx=f(()=>{"use strict";a();_();M();x();S();XR=VencordNative.pluginHelpers.AppleMusicRichPresence,Rx="1239490006054207550";Uo=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}"}});wp=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:Uo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},Uo.store.refreshInterval*1e3)},stop(){clearInterval(this.updateInterval),G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null})},updatePresence(){this.getActivity().then(e=>{VR(e)})},async getActivity(){let e=await XR.fetchTrackData();if(!e)return null;let[t,o]=await Promise.all([Ax(Uo.store.largeImageType,e),Ax(Uo.store.smallImageType,e)]),r={},i=Number.isNaN(e.duration)&&e.playerPosition===0;Uo.store.largeImageType!=="Disabled"&&(r.large_image=t,i||(r.large_text=Zl(Uo.store.largeTextString,e))),Uo.store.smallImageType!=="Disabled"&&(r.small_image=o,i||(r.small_text=Zl(Uo.store.smallTextString,e)));let s=[];return Uo.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:Rx,name:Zl(Uo.store.nameString,e),details:Zl(Uo.store.detailsString,e),state:i?void 0:Zl(Uo.store.stateString,e),timestamps:e.playerPosition&&e.duration&&Uo.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:Uo.store.activityType,flags:1}}})});var Lx,Mp,Ex=f(()=>{"use strict";a();_();M();x();Lx=P({source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}),Mp=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[p.Xinto,p.Glitch],settings:Lx,patches:[{find:"#{intl::BAN_CONFIRM_TITLE}",replacement:{match:/src:\i\("?\d+"?\)/g,replace:"src:$self.source"}}],get source(){return Lx.store.source}})});var Ox=f(()=>{});var _x,eD,Bx,Fx=f(()=>{"use strict";a();ne();$();S();xy();_x=be("ChannelRTCStore"),eD=se('("guildsnav")'),Bx=k.wrap(e=>{let t=Se([Zs],()=>Zs.getExpandedFolders()),o=Se([_x],()=>_x.isFullscreenInContext()),r=n(eD,{...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(su.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&n(su.animated.div,{style:{...c,...l}},r))},{noop:!0})});function nD(e){return tD.getGuildFolders().find(t=>t.guildIds.includes(e))}function wy(){for(let e of Zs.getExpandedFolders())My.toggleGuildFolderExpand(e)}var Zs,tD,oD,My,Ux,Ty,$t,Pp,xy=f(()=>{"use strict";a();Ox();_();M();Ie();x();$();S();Fx();Zs=be("ExpandedGuildFolderStore"),tD=be("SortedGuildStore"),oD=kt(e=>e.prototype?.moveNextTo),My=R("move","toggleGuildFolderExpand"),Ux=null,Ty=!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}}),Pp=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)&&Ux!==e.guildId){Ux=e.guildId;let t=nD(e.guildId);t?.folderId?$t.store.forceOpen&&!Zs.isFolderExpanded(t.folderId)&&My.toggleGuildFolderExpand(t.folderId):$t.store.closeAllFolders&&wy()}},TOGGLE_GUILD_FOLDER_EXPAND(e){$t.store.closeOthers&&!Ty&&(Ty=!0,G.wait(()=>{let t=Zs.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&My.toggleGuildFolderExpand(o);Ty=!1}))},LOGOUT(){wy()}},gridStyle:"vc-betterFolders-sidebar-grid",getGuildTree(e,t,o){return Re(()=>{if(!e||o==null)return t;let r=new oD;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"]===Pe("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:Bx,closeFolders:wy})});var Ip,$x=f(()=>{"use strict";a();M();x();Ip=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 Cp,Gx=f(()=>{"use strict";a();M();x();Cp=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 Py,kp,zx=f(()=>{"use strict";a();_();M();jo();x();Py=P({hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>Z.plugins.BetterNotesBox.hide,default:!1}}),kp=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],settings:Py,patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Py.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 Py.store.noSpellCheck}})});function iD(){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 sD(){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 Hx,rD,jx,Np,Wx=f(()=>{"use strict";a();_();wr();At();M();Ie();x();$();S();Hx=R("open","selectRole","updateGuild"),rD=Ao("appearance","developerMode");jx=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"}]}}),Np=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:jx,start(){rD.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:sD})),Fe.getGuildPermissionProps(o).canManageRoles&&e.unshift(n(E.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await Hx.open(o.id,"ROLES"),Hx.selectRole(t)},icon:iD})),r.icon&&e.push(n(E.MenuItem,{id:"vc-view-role-icon",label:"View Role Icon",action:()=>{Zo({url:`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${r.id}/${r.icon}.${jx.store.roleIconFileFormat}`,height:128,width:128})},icon:yn})))}}})});var Ap,qx=f(()=>{"use strict";a();_();M();x();S();Ap=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:()=>Z.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:"#{intl::ADD_ROLE_A11Y_LABEL}",all:!0,predicate:()=>Z.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!Z.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",all:!0,predicate:()=>Z.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!Z.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 Kx,Yx,Zx,Jx,Qx,Xx,Vx,eT,tT,oT=f(()=>{"use strict";a();wt();$();Kx=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"})),Yx=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"})),Zx=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"})),Jx=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"})),Qx=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"})),Xx=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"})),Vx=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"})),eT=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"})),tT=gt(()=>Ba("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"))});function Ql(e){return`${e.os} \xB7 ${e.platform}`}function Xl(){return It.set(nT(),$o)}async function rT(){(await It.get(nT())||new Map).forEach((t,o)=>{$o.set(o,t)})}function iT(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 sT(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return Kx;case"Android Chrome":case"Chrome iOS":case"Chrome":return Yx;case"Edge":return Zx;case"Firefox":return Jx;case"Internet Explorer":return Qx;case"Opera Mini":case"Opera":return Xx;case"Mobile Safari":case"Safari":return Vx;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return tT;default:return eT}}var nT,$o,Iy=f(()=>{"use strict";a();Mr();S();oT();nT=()=>`BetterSessions_savedSessions_${D.getCurrentUser().id}`,$o=new Map});function aT({props:e,session:t,state:o}){let[r,i]=o,[s,l]=j.useState($o.get(t.id_hash)?.name??"");function c(){$o.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:Ql(t.client_info)),Xl(),e.onClose()}return n(ve,{...e},n(Ae,null,n(b.FormTitle,{tag:"h4"},"Rename")),n(Me,null,n(b.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),n(ct,{style:{marginBottom:"10px"},placeholder:Ql(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 lT=f(()=>{"use strict";a();Ke();S();Iy()});function cT({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(aT,{props:o,session:e,state:t}))},"Rename")}var uT=f(()=>{"use strict";a();Ke();S();lT()});var aD,lD,pT,cD,uD,Cy,Rp,dT=f(()=>{"use strict";a();pr();_();ne();M();x();$();S();uT();Iy();aD=be("AuthSessionsStore"),lD=R("saveAccountChanges","open"),pT=R("timestampTooltip","blockquoteContainer"),cD=R("sessionIcon"),uD=se("!1,lowerBadgeSize:"),Cy=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}}),Rp=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:Cy,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=$o.get(e.id_hash),o=j.useState(t?.name?`${t.name}*`:Ql(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(cT,{session:e,state:o}))},{noop:!0}),renderTimestamp:k.wrap(({session:e,timeLabel:t})=>n(oe,{text:e.approx_last_used_time.toLocaleString(),tooltipClassName:pT.timestampTooltip},o=>n("span",{...o,className:pT.timestamp},t)),{noop:!0}),renderIcon:k.wrap(({session:e,DeviceIcon:t})=>{let o=sT(e.client_info.platform);return n(uD,{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:cD.sessionIcon,style:{backgroundColor:iT(e.client_info.os)}},n(t,{width:28,height:28,color:"currentColor"})))},{noop:!0}),async checkNewSessions(){let e=await vt.get({url:Pt.Endpoints.AUTH_SESSIONS});for(let t of e.body.user_sessions)$o.has(t.id_hash)||($o.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:()=>lD.open("Sessions")}));Xl()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=aD.getSessions().map(t=>t.id_hash);e.forEach(t=>{$o.has(t)||$o.set(t,{name:"",isNew:!1})}),e.length>0&&$o.forEach((t,o)=>{e.includes(o)||$o.delete(o)}),$o.forEach(t=>{t.isNew=!1}),Xl()}},async start(){await rT(),this.checkNewSessions(),Cy.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,Cy.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}})});function pD(){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 ky(){let e=Re(()=>Object.values(je).sort((l,c)=>l.name.localeCompare(c.name)),[]),[t,o]=q(""),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:Pe("SEARCH")})}),!!s.length&&n(E.MenuSeparator,null),s.map(l=>n(E.MenuItem,{key:l.name,id:l.name,label:l.name,action:()=>Qr(l,pD)})))}var mT=f(()=>{"use strict";a();kl();Ie();me();S();$n()});function mD({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:dD({[Dp.layer]:!0,[Dp.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(iu,{containerRef:i},s)}var dD,Dp,Js,Lp,fT=f(()=>{"use strict";a();_();He();M();Ie();Ne();x();$();S();mT();dD=ue("");Xe(["animating","baseLayer","bg","layer","layers"],e=>Dp=e);Js=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}});Lp=y({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[p.Kyuuhachi],settings:Js,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=\((\i),"contextType",\i\.\i\);)/,replace:"$1=$self.Layer;",predicate:()=>Js.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>Js.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:()=>Js.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:()=>Js.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:ky,Layer(e){try{[iu.$$vencordInternal(),On,Dp].forEach(t=>t.test)}catch{return new V("BetterSettings").error("Failed to find some components"),e.children}return n(mD,{...e})},wrapMenu(e){if(!Js.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:Pe("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 Ep,gT=f(()=>{"use strict";a();M();x();Ep=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 hT,yT,vT=f(()=>{"use strict";a();$();hT=be("ApplicationStreamPreviewStore"),yT=be("ApplicationStreamingStore")});var fD,bT,gD,hD,Op,ST=f(()=>{"use strict";a();At();M();Ie();x();S();vT();fD=async({guildId:e,channelId:t,ownerId:o})=>{let r=await hT.getPreviewURL(e,t,o);r&&Zo({url:r,height:720,width:1280})},bT=(e,{userId:t})=>{let o=yT.getAnyStreamForUser(t);if(!o)return;let r=n(E.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Eh,action:()=>o&&fD(o),disabled:!o});e.push(n(E.MenuSeparator,null),r)},gD=(e,{stream:t})=>bT(e,{userId:t.ownerId}),hD=(e,{user:t})=>{if(t)return bT(e,{userId:t.id})},Op=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],contextMenus:{"user-context":hD,"stream-context":gD}})});function xT(){Vl.textContent=`
|
|
.vc-nsfw-img [class^=imageContainer],
|
|
.vc-nsfw-img [class^=wrapperPaused] {
|
|
filter: blur(${Z.plugins.BlurNSFW.blurAmount}px);
|
|
transition: filter 0.2s;
|
|
|
|
&:hover {
|
|
filter: blur(0);
|
|
}
|
|
}
|
|
`}var Vl,_p,TT=f(()=>{"use strict";a();_();M();x();_p=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:xT}},start(){Vl=document.createElement("style"),Vl.id="VcBlurNsfw",document.head.appendChild(Vl),xT()},stop(){Vl?.remove()}})});function yD(e){let t=Z.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 Bp,wT=f(()=>{"use strict";a();_();ne();M();wt();x();Bp=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=Xa({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},yD(t)))}})});var MT,PT=f(()=>{"use strict";a();MT=["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 IT,vD,Fp,CT=f(()=>{"use strict";a();M();x();PT();IT=/[\\^$.*+?()[\]{}|]/g,vD=RegExp(IT.source),Fp=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&&vD.test(e)?e.replace(IT,"\\$&"):e||""},createRules(){let e=MT;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 kT=f(()=>{});function RT(e){let t=e.toString(16).padStart(6,"0");ec.store.color=t,DT(t)}function NT(e){xD({theme:e})}function TD(){let e=Se([pn],()=>pn.theme),t=e==="light",o=t?"dark":"light",i=Se([AT],()=>AT.gradientPreset)!==void 0,s=RD(ec.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:os("settings")},n("div",{className:os("container")},n("div",{className:os("settings-labels")},n(b.FormTitle,{tag:"h3"},"Theme Color"),n(b.FormText,null,"Add a color to your Discord client theme")),n(bD,{color:parseInt(ec.store.color,16),onChange:RT,showEyeDropper:!1,suggestedColors:SD})),(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:os("warning")},n(b.FormText,{className:os("warning-text")},"Warning, your theme won't look good:"),l&&n(b.FormText,{className:os("warning-text")},"Selected color won't contrast well with text"),i&&n(b.FormText,{className:os("warning-text")},"Nitro themes aren't supported")),l&&c&&n(I,{onClick:()=>NT(o),color:I.Colors.RED},"Switch to ",o," mode"),i&&n(I,{onClick:()=>NT(e),color:I.Colors.RED},"Disable Nitro Theme"))))}function Up(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 CD(e){let t={},o={};for(let[,r,i]of e.matchAll(MD))t[r]=parseFloat(i);for(let[,r,i]of e.matchAll(wD))o[r]=parseFloat(i);Ny("clientThemeOffsets",[`.theme-light {
|
|
${Up(t,PD,"--primary-345-hsl")}
|
|
}`,`.theme-dark {
|
|
${Up(t,ID,"--primary-600-hsl")}
|
|
}`,`.visual-refresh.theme-light {
|
|
${Up(o,null,"--neutral-2-hsl")}
|
|
}`,`.visual-refresh.theme-dark {
|
|
${Up(o,null,"--neutral-69-hsl")}
|
|
}`].join(`
|
|
|
|
`))}function kD(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=Gp(o,w=>$p(w,r)).join(`,
|
|
`),l=Gp(o,w=>$p(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=Gp(o,w=>$p(w,d)).map(w=>w.split(";")).flat(),C=`.theme-light {
|
|
${Gp(h,w=>$p(w,g)).map(w=>`${w}: var(--primary-100);`).join(`
|
|
`)}
|
|
}`;Ny("clientThemeLightModeFixes",[c,u,C].join(`
|
|
|
|
`))}function $p(e,t){let o=e.match(t);return o===null?null:o[1]}function Gp(e,t){return e.map(t).filter(Boolean)}function DT(e){let{hue:t,saturation:o,lightness:r}=AD(e),i=document.getElementById("clientThemeVars");i||(i=Ny("clientThemeVars")),i.textContent=`:root {
|
|
--theme-h: ${t};
|
|
--theme-s: ${o}%;
|
|
--theme-l: ${r}%;
|
|
}`}function Ny(e,t=""){let o=document.createElement("style");return o.setAttribute("id",e),o.textContent=t.split(`
|
|
`).map(r=>r.trim()).join(`
|
|
`),document.body.appendChild(o),o}async function ND(){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 AD(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 RD(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 os,bD,SD,xD,AT,ec,zp,wD,MD,PD,ID,LT=f(()=>{"use strict";a();kT();_();He();M();ze();me();x();$();S();os=ue("vc-clientTheme-"),bD=se("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),SD=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];xD=we('type:"UNSYNCED_USER_SETTINGS_UPDATE','"system"===');AT=be("ClientThemesBackgroundStore");ec=P({color:{type:6,default:"313338",component:TD},resetColor:{type:6,component:()=>n(I,{onClick:()=>RT(3224376)},"Reset Theme Color")}}),zp=y({name:"ClientTheme",authors:[p.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:ec,startAt:"DOMContentLoaded",async start(){DT(ec.store.color);let e=await ND();CD(e),kD(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove(),document.getElementById("clientThemeLightModeFixes")?.remove()}}),wD=/(--neutral-\d{1,3}-hsl):.*?(\S*)%;/g,MD=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,PD=/^--primary-[1-5]\d{2}-hsl/g,ID=/^--primary-[5-9]\d{2}-hsl/g});var Hp,ET=f(()=>{"use strict";a();M();x();Hp=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 LD({settingKey:e}){let{allowLevel:t}=rs.use(["allowLevel"]),o=t[e];return n(rh,{value:o,onChange:(r,i)=>rs.store.allowLevel[e]=i,size:20},n(Q,{variant:"text-sm/normal"},e[0].toUpperCase()+e.slice(1)))}var In,DD,ns,ED,rs,jp,OT=f(()=>{"use strict";a();_();_s();M();ze();x();S();In=()=>{},DD={logDangerously:In,log:In,verboseDangerously:In,verbose:In,info:In,warn:In,error:In,trace:In,time:In,fileOnly:In},ns=new Set;ED=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(rs.store.allowLevel).map(e=>n(LD,{key:e,settingKey:e}))))),rs=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){ns.clear(),e.split(";").map(t=>t.trim()).forEach(ns.add.bind(ns))}},allowLevel:{type:6,component:ED,default:{error:!0,warn:!1,trace:!1,log:!1,info:!1,debug:!1}}}),jp=y({name:"ConsoleJanitor",description:"Disables annoying console messages/errors",authors:[p.Nuckyz,p.sadan],settings:rs,startAt:"Init",start(){ns.clear(),this.settings.store.whitelistedLoggers?.split(";").map(e=>e.trim()).forEach(ns.add.bind(ns))},Noop:In,NoopLogger:()=>DD,shouldLog(e,t){return ns.has(e)||rs.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:()=>rs.store.disableLoggers,replacement:{match:/(?<=&&)(?=console)/,replace:"$self.shouldLog(arguments[0],arguments[1])&&"}},{find:'("Spotify")',predicate:()=>rs.store.disableSpotifyLogger,replacement:{match:/new \i\.\i\("Spotify"\)/,replace:"$self.NoopLogger()"}}]})});var _T=f(()=>{"use strict";a();Ne();jo();$();$()});function Ay(){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(ks).map(i=>[i,{getter:()=>ks[i]}])),wp:ou,wpc:{getter:()=>on},wreq:{getter:()=>Tt},wpPatcher:{getter:()=>Vencord.WebpackPatcher},wpInstances:{getter:()=>Vencord.WebpackPatcher.allWebpackInstances},wpsearch:Ss,wpex:Fa,wpexs:i=>Fa(Hr(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:Aa,canonicalizeReplacement:Si,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=ki.createRoot(u.body.appendChild(document.createElement("div")));d.render(j.createElement(i,s)),u.addEventListener("close",()=>d.unmount(),{once:!0})},preEnable:i=>(Vencord.Settings.plugins[i]??={enabled:!0}).enabled=!0,channel:{getter:()=>Yo(),preload:!1},channelId:{getter:()=>Ee.getChannelId(),preload:!1},guild:{getter:()=>ar(),preload:!1},guildId:{getter:()=>Wo.getGuildId(),preload:!1},me:{getter:()=>D.getCurrentUser(),preload:!1},meId:{getter:()=>D.getCurrentUser().id,preload:!1},messages:{getter:()=>Jt.getMessages(Ee.getChannelId()),preload:!1},openModal:{getter:()=>ol.openModal},openModalLazy:{getter:()=>ol.openModalLazy},Stores:Ti,setExperiment:(i,s)=>{G.dispatch({type:"EXPERIMENT_OVERRIDE_BUCKET",experimentId:i,experimentBucket:s})}}}function BT(e,t,o){let r=t.getter();if(!r||t.preload===!1)return r;function i(l){if(l[an])o?r[an]():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&&(Wp(window.shortcutList,e,{value:s}),Wp(window,e,{value:s})),s}var Wp,qp,FT=f(()=>{"use strict";a();M();Ie();bs();So();Ke();gr();jo();x();$();$();S();_T();Wp=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));qp=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=Ay();window.shortcutList={};for(let[t,o]of Object.entries(e))"getter"in o?(Wp(window.shortcutList,t,{get:()=>BT(t,o,!0)}),Wp(window,t,{get:()=>window.shortcutList[t]})):(window.shortcutList[t]=o,window[t]=o);wi.then(()=>{setTimeout(()=>this.eagerLoad(!1),1e3),VencordNative.pluginHelpers.ConsoleShortcuts.initDevtoolsOpenEagerLoad()})},async eagerLoad(e){await wi;let t=Ay();for(let[o,r]of Object.entries(t))if(!(!Object.hasOwn(r,"getter")||r.preload===!1))try{BT(o,r,e)}catch{}},stop(){delete window.shortcutList;for(let e in Ay())delete window[e]}})});function _D(e,t){let{id:o,name:r}=e.dataset;if(!o)return t?OD(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 OD,UT,Kp,$T=f(()=>{"use strict";a();_();M();me();x();$();S();({convertNameToSurrogate:OD}=R("convertNameToSurrogate"));UT=P({copyUnicode:{type:3,description:"Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",default:!0}}),Kp=y({name:"CopyEmojiMarkdown",description:"Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",authors:[p.HappyEnderman,p.Vishnya],settings:UT,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(_D(t,UT.store.copyUnicode),"Success! Copied emoji markdown.")}}))}}})});var GT=f(()=>{});var BD,Yp,zT=f(()=>{"use strict";a();GT();ne();At();M();me();x();S();BD=()=>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"})),Yp=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]=q(!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(BD,null):t>0?n(ul,{color:"var(--channel-icon)"}):n(Gi,null)))},{noop:!0})})});var FD,Zp,HT=f(()=>{"use strict";a();At();M();x();S();FD=(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:$i}))},Zp=y({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":FD}})});var Cn,UD,$D,Ry,jT,Dy,Ly,Jp,WT=f(()=>{"use strict";a();pr();_();M();Ne();Ke();x();Ki();$();S();Cn=new V("CrashHandler"),{ModalStack:UD,DraftManager:$D}=Eo(()=>{let[e,t]=zr(B.byProps("pushLazy","popAll"),B.byProps("clearDraft","saveDraft"));return{ModalStack:e,DraftManager:t}}),Ry=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}}),jT=!1,Dy=!1,Ly=!0,Jp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:Ry,patches:[{find:"#{intl::ERRORS_UNEXPECTED_CRASH}",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!Dy&&(Dy=!0,setTimeout(()=>{try{if(!Ly){try{Ye({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}Ly=!1,setTimeout(()=>Ly=!0,1e3)}catch{}try{jT||(jT=!0,Al("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0))}catch{}try{Ry.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=Ee.getChannelId();for(let o in no)Number.isNaN(Number(o))&&$D.clearDraft(t,no[o])}catch(t){Cn.debug("Failed to clear drafts.",t)}try{Ya.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{UD.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(Ry.store.attemptToNavigateToHome)try{or.transitionToGuild("@me")}catch(t){Cn.debug("Failed to navigate to home",t)}setImmediate(()=>Dy=!1);try{e.setState({error:null,info:null})}catch(t){Cn.debug("Failed to update crash handler component.",t)}}})});var Qp,qT=f(()=>{"use strict";a();_();M();x();Qp=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 Xp(e){return!!e}function Pr(e){return e!=null}var Qs=f(()=>{"use strict";a()});async function YT(e){return(await Li.fetchAssetIds(Xs.store.appID,[e]))[0]}function uo(){Vp(!0),Z.plugins.CustomRPC.enabled&&Vp()}function QT(){return Xs.store.type!==1}function HD(e){return!QT()&&!/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 ZT(){return Xs.store.timestampMode!==3}function JT(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 XT(){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:T}=Xs.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),Xs.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(Xp),N.metadata={button_urls:[C,T].filter(Xp)}),u&&(N.assets={large_image:await YT(u),large_text:d||void 0}),g&&(N.assets={...N.assets,small_image:await YT(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 Vp(e){let t=await XT();G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var GD,zD,KT,Xs,ed,VT=f(()=>{"use strict";a();_();wr();Oi();jt();Bo();M();Qs();ze();me();wt();x();$();S();GD=we("profileThemeStyle:","--profile-gradient-primary-color"),zD=se(".party?(0",".card"),KT=Ao("status","showCurrentGame");Xs=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:QT,isValid:HD},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:ZT,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:ZT,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:uo,isValid:JT},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:JT},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}});ed=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:Vp,stop:()=>Vp(!0),settings:Xs,patches:[{find:".party?(0",all:!0,replacement:{match:/\i\.id===\i\.id\?null:/,replace:""}}],settingsAboutComponent:()=>{let e=bt(XT),t=KT.useSetting(),{profileThemeStyle:o}=GD({});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:()=>KT.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(zD,{activity:e[0],user:D.getCurrentUser(),currentUser:D.getCurrentUser()})))}})});var Ey,td,ew=f(()=>{"use strict";a();Mr();_();vr();M();x();S();Ey=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}}),td=y({name:"CustomIdle",description:"Allows you to set the time before Discord goes idle (or disable auto-idle)",authors:[p.newwares],settings:Ey,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(!Ey.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}=Ey.store;return e===0?1/0:e*6e4}})});var tw=f(()=>{});async function WD(){try{let{embed:e}=this.props,{replaceElements:t,dearrowByDefault:o}=od.store;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let r=jD.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 qD({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;od.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 jD,od,nd,ow=f(()=>{"use strict";a();tw();_();ne();M();Ne();x();S();jD=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;od=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}}),nd=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[p.Ven],settings:od,embedDidMount:WD,renderButton(e){return n(k,{noop:!0},n(qD,{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:()=>!od.store.hideButton}]}]})});var nw=f(()=>{});var KD,ri,rw,iw,sw,is,rd,Vs,tc,Oy,ii=f(()=>{"use strict";a();KD="https://decor.fieryflames.dev",ri=KD+"/api",rw=ri+"/authorize",iw="https://ugc.decor.fieryflames.dev",sw="1096966363416899624",is="100101099111114",rd="11497119",Vs="1096357702931841148",tc="dXp2SdxDcP",Oy=1e3*60*60*4});var YD,si,oc=f(()=>{"use strict";a();Mr();So();Ne();Ke();S();ii();YD={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)}},si=Dt(()=>Ei(uh((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(Ii,{...i,scopes:["identify"],responseType:"code",redirectUri:rw,permissions:0n,clientId:sw,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:YD,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function id(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${si.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var aw,lw,cw,_y,uw,pw,sd=f(()=>{"use strict";a();ii();oc();aw=async e=>{if(e?.length===0)return{};let t=new URL(ri+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},lw=async(e="@me")=>id(ri+`/users/${e}/decorations`).then(t=>t.json()),cw=async(e="@me")=>id(ri+`/users/${e}/decoration`).then(t=>t.json()),_y=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"),id(ri+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},uw=async e=>{await id(ri+`/decorations/${e}`,{method:"DELETE"})},pw=async()=>fetch(ri+"/decorations/presets").then(e=>e.json())});function By(e){return`${e.animated?"a_":""}${e.hash}`}function ad(e){return{asset:By(e),skuId:is}}var ld=f(()=>{"use strict";a();ii()});function dw(e){try{let[t,o]=q(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:is}:null}catch(t){console.error(t)}return null}var Cr,Fy=f(()=>{"use strict";a();_i();So();S();sd();ii();Cr=Dt(()=>Ei((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:Oo(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=[...o],s=await aw(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()<Oy||(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()<Oy||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,ea=f(()=>{"use strict";a();So();S();sd();ld();Fy();jn=Dt(()=>Ei((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await lw(),r=await cw();e({decorations:o,selectedDecoration:r})},async create(o){let r=await _y(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await uw(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}),_y(o),Cr.getState().set(D.getCurrentUser().id,o?By(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Qe,ta,oa,mw,ai=f(()=>{"use strict";a();He();$();Qe=ue("vc-decor-"),ta=R("modalFooterShopButton"),oa=Xn([".COLLECTIBLES_SHOP_FULLSCREEN&&"]),mw=Xn(["stickerInspected]:"])});var nc,fw,cd,Uy,gw,ss=f(()=>{"use strict";a();$();S();fw=e=>nc=e,cd=Qc(()=>{let e=Xc(".shopPreviewBanner");return j.memo(e)}),gw=e=>Uy=e});function $y(e){return n(nc,{...e,isSelected:!1},n(_h,null),n(Q,{variant:"text-xs/normal",color:"header-primary"},Pe("CREATE")))}var hw=f(()=>{"use strict";a();At();Ie();S();ss()});function Gy(e){return n(nc,{...e},n(ul,null),n(Q,{variant:"text-xs/normal",color:"header-primary"},Pe("NONE")))}var yw=f(()=>{"use strict";a();At();Ie();S();ss()});function zy({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:Gi,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:zi,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 vw=f(()=>{"use strict";a();At();S();ea();ai()});function Hy(e){let{decoration:t}=e;return n(Uy,{...e,onContextMenu:o=>{Et.openContextMenu(o,()=>n(zy,{decoration:t}))},avatarDecoration:ad(t)})}var bw=f(()=>{"use strict";a();S();ld();ss();vw()});function jy({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Qe("sectioned-grid-list-grid")},r.map(i=>n(j.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var Sw=f(()=>{"use strict";a();S();ai()});function Wy(e){return n("div",{className:z(Qe("sectioned-grid-list-container"),ZD.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Qe("sectioned-grid-list-section")},e.renderSectionHeader(t),n(jy,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var ZD,xw=f(()=>{"use strict";a();me();$();ai();Sw();ZD=R("managedReactiveScroller")});function QD(e){let[t,o]=q(null);return le(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function XD(e){let[t,o]=q(""),[r,i]=q(null),[s,l]=q(!1),[c,u]=q(null);le(()=>{c&&u(null)},[r]);let{create:d}=jn(),g=QD(r),h=Re(()=>g?{asset:g,skuId:rd}:null,[g]);return n(ve,{...e,size:"medium",className:ta.modal},n(Ae,{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(Me,{className:Qe("create-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(Tw,{messageType:ww.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(JD,{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(cd,{avatarDecorationOverride:h,user:D.getCurrentUser()}))),n(Tw,{messageType:ww.INFO,className:F.bottom8},"To receive updates on your decoration's review, join ",n(it,{href:`https://discord.gg/${tc}`,onClick:async v=>{v.preventDefault(),ce.getGuild(Vs)?(Bn(),G.dispatch({type:"LAYER_POP_ALL"}),or.transitionToGuild(Vs)):await Ui(tc)&&(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 JD,Tw,ww,ud,qy=f(()=>{"use strict";a();ne();Bo();Ie();ze();Ke();$();S();ii();ea();ai();ss();JD=se("fileUploadInput,"),{HelpMessage:Tw,HelpMessageTypes:ww}=Ze('POSITIVE="positive',{HelpMessageTypes:B.byProps("POSITIVE","WARNING","INFO"),HelpMessage:B.byCode(".iconDiv")});ud=()=>Promise.all([oa(),mw()]).then(()=>he(e=>n(XD,{...e})))});function VD(e){return n(ve,{...e,size:"small",className:ta.modal},n(Ae,{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(Me,{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:()=>{na.store.agreedToGuidelines=!0,e.onClose(),ud()}},"Continue"),n(I,{onClick:e.onClose,color:I.Colors.PRIMARY,look:I.Looks.LINK},"Go Back")))}var Mw,Pw=f(()=>{"use strict";a();Bo();Ke();S();pd();ai();qy();Mw=()=>oa().then(()=>he(e=>n(VD,{...e})))});function tL(){let[e,t]=q([]);return le(()=>{pw().then(t)},[]),e}function nL({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=q([]);return le(()=>{oL.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(eL,{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 rL(e){let[t,o]=q(void 0),r=typeof t<"u",i=t!=null?ad(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=tL(),C=v.flatMap(L=>L.decorations),w=v.find(L=>L.id===d?.presetId),T=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:ta.modal},n(Ae,{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(Me,{className:Qe("change-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(Wy,{renderItem:L=>{if(typeof L=="string")switch(L){case"none":return n(Gy,{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($y,{className:Qe("change-decoration-modal-decoration"),...U,onSelect:h?()=>{}:na.store.agreedToGuidelines?ud:Mw}))}else return n(oe,{text:"Pending review",shouldShow:L.reviewed===!1},U=>n(Hy,{...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(nL,{section:L}),sections:A}),n("div",{className:Qe("change-decoration-modal-preview")},n(cd,{avatarDecorationOverride:i,user:D.getCurrentUser()}),T&&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 ",Oe.parse(`<@${d.authorId}>`)),T&&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(){si.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(Vs)?(e.onClose(),G.dispatch({type:"LAYER_POP_ALL"}),or.transitionToGuild(Vs)):await Ui(tc)&&(Bn(),G.dispatch({type:"LAYER_POP_ALL"}))},color:I.Colors.PRIMARY,look:I.Looks.LINK},"Discord Server")))))}var eL,oL,Ky,Iw=f(()=>{"use strict";a();ne();jt();Ie();ze();me();Ke();Kr();$();S();sd();ii();oc();ea();ld();pd();ai();ss();hw();yw();bw();xw();qy();Pw();eL=se("defaultRenderUser","showDefaultAvatarsForNullUsers");oL=new Mo;Ky=()=>oa().then(()=>he(e=>n(rL,{...e})))});function rc({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=si(),{selectedDecoration:i,select:s,fetch:l}=jn();return le(()=>{r.isAuthorized()&&l()},[r.token]),n(iL,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Qe("section-remove-margin")},n(ge,null,n(I,{onClick:()=>{r.isAuthorized()?Ky():r.authorize().then(Ky).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 iL,Yy=f(()=>{"use strict";a();jt();$();S();oc();ea();ai();Iw();iL=se(".customizationSectionBackground")});var na,pd=f(()=>{"use strict";a();_();Bo();ze();me();Ke();x();S();Yy();na=P({changeDecoration:{type:6,component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(rc,{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 dd,Cw=f(()=>{"use strict";a();nw();ne();M();x();S();ii();oc();ea();Fy();pd();ss();Yy();dd=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:na,flux:{CONNECTION_OPEN:()=>{si.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){fw(e)},set DecorationGridDecoration(e){gw(e)},SKU_ID:is,useUserDecorAvatarDecoration:dw,async start(){Cr.getState().fetch(D.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===is){let o=e.asset.split("_");return e.asset.startsWith("a_")&&!t&&o.shift(),`${iw}/${o.join("_")}.png`}else if(e?.skuId===rd)return e.asset},DecorSection:k.wrap(rc)})});var md,kw=f(()=>{"use strict";a();M();x();md=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 fd,Nw=f(()=>{"use strict";a();M();x();S();fd=y({name:"DontRoundMyTimestamps",authors:[p.Lexi],description:"Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",start(){Wr.relativeTimeRounding(Math.floor)},stop(){Wr.relativeTimeRounding(Math.round)}})});function Zy(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}.${cL[e.format_type]}?size=4096&lossless=true`}async function Aw(e){let t=sL.getStickerById(e);if(t)return t;let{body:o}=await vt.get({url:Pt.Endpoints.STICKER(e)});return G.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function uL(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 Rw(Zy(t)));let{body:r}=await vt.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 pL(e,t){let o=await Rw(Zy(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return aL({guildId:e,name:t.name.split("~")[0],image:r})}function dL(e){let t=D.getCurrentUser().id;return Object.values(ce.getGuilds()).filter(o=>{if(!(o.ownerId===t||(Fe.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=lL(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 Rw(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function mL(e,t){try{t.t==="Sticker"?await uL(e,t):await pL(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 hL({data:e}){let[t,o]=j.useState(!1),[r,i]=j.useState(e.name),[s,l]=j.useReducer(u=>u+1,0),c=j.useMemo(()=>dL(e),[e.id,s]);return n(m,null,n(b.FormTitle,{className:F.top20},"Custom Name"),n(rl,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&gL.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),mL(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:fL(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function gd(e,t){return n(E.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>nl(async()=>{let o=await t(),r={t:e,...o},i=Zy(r);return s=>n(ve,{...s},n(Ae,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(Me,null,n(hL,{data:r})))})})}function Dw(e){let t=new URL(e);return t.pathname.endsWith(".gif")||t.searchParams.get("animated")==="true"}var sL,aL,lL,cL,fL,gL,yL,vL,hd,Lw=f(()=>{"use strict";a();No();Su();M();Ne();ze();Ke();x();$();S();sL=be("StickersStore"),aL=we(".GUILD_EMOJIS(","EMOJI_UPLOAD_START"),lL=we(".additionalEmojiSlots"),cL=[,"png","png","json","gif"];fL=e=>[20,20,18,18,16,14,12][e.length]??4,gL=/^\w+$/i;yL=(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 gd("Emoji",()=>({id:o,name:d,isAnimated:Dw(r??i)}));case"sticker":return t.message.stickerItems.find(h=>h.id===o)?.format_type===3?void 0:gd("Sticker",()=>Aw(o))}})();l&&dt("copy-link",e)?.push(l)},vL=(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(gd("Emoji",()=>({id:o,name:r,isAnimated:s&&Dw(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(gd("Sticker",()=>Aw(o)))},hd=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:yL,"expression-picker":vL}})});var Jy,Ew=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});Jy="src/plugins/experiments/hideBugReport.css"});var yd,bL,Ow,vd,_w=f(()=>{"use strict";a();_();He();ne();Oi();M();ze();x();$();S();Ew();yd=R("key","combo"),bL=kt(e=>e?.definition?.id==="2024-09_bug_reporter"),Ow=P({toolbarDevMenu:{type:3,description:"Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",default:!1,restartNeeded:!0}}),vd=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:Ow,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:()=>Ow.store.toolbarDevMenu},{find:"useCanFavoriteChannel",replacement:{match:/\i\.isDM\(\)\|\|\i\.isThread\(\)/,replace:"false"}},{find:"isDecoupledGameClippingEnabled(){",replacement:{match:/\i\.isStaff\(\)/,replace:"true"}}],start:()=>!bL.getCurrentConfig().hasBugReporterAccess&&Io(Jy),stop:()=>Ko(Jy),settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(j.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:yd.combo,style:{display:"inline-flex"}},n("kbd",{className:yd.key},t)," +"," ",n("kbd",{className:yd.key},o)," +"," ",n("kbd",{className:yd.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 bd,Bw=f(()=>{"use strict";a();M();x();bd=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 Uw=bi((Mre,Fw)=>{"use strict";a();var kr=Fw.exports;(function e(t,o,r){function i(c,u){if(!o[c]){if(!t[c]){var d=typeof ys=="function"&&ys;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 ys=="function"&&ys,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):Y())},C=typeof window<"u"?window:void 0,w=C||{},T=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,K,Y=void 0;function ae(O,J){var ye=this,de=new this.constructor(St);de[xe]===void 0&&Kn(de);var Le=ye._state;if(Le){var nt=arguments[Le-1];v(function(){return xt(Le,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(St);return Ce(J,O),J}Y=N?function(){return r.nextTick(H)}:T?(re=0,te=new T(H),K=document.createTextNode(""),te.observe(K,{characterData:!0}),function(){K.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 St(){}var qe=void 0,$e=1,ot=2;function Ge(O,J,ye){v(function(de){var Le=!1,nt=function(to,Yn,vi,ZN){try{to.call(Yn,vi,ZN)}catch(JN){return JN}}(ye,J,function(to){Le||(Le=!0,J!==to?Ce(de,to):Ct(de,to))},function(to){Le||(Le=!0,at(de,to))},de._label);!Le&&nt&&(Le=!0,at(de,nt))},O)}function Be(O,J,ye){J.constructor===O.constructor&&ye===ae&&J.constructor.resolve===fe?function(de,Le){Le._state===$e?Ct(de,Le._result):Le._state===ot?at(de,Le._result):io(Le,void 0,function(nt){return Ce(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 Ce(O,J){if(O===J)at(O,new TypeError("You cannot resolve a promise with itself"));else if(function(de){var Le=typeof de;return de!==null&&(Le=="object"||Le=="function")}(J)){var ye=void 0;try{ye=J.then}catch(de){return void at(O,de)}Be(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=$e,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 Le=O._subscribers,nt=Le.length;O._onerror=null,Le[nt]=J,Le[nt+$e]=ye,Le[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,Le=void 0,nt=O._result,to=0;to<J.length;to+=3)de=J[to],Le=J[to+ye],de?xt(ye,de,Le,nt):Le(nt);O._subscribers.length=0}}function xt(O,J,ye,de){var Le=c(ye),nt=void 0,to=void 0,Yn=!0;if(Le){try{nt=ye(de)}catch(vi){Yn=!1,to=vi}if(J===nt)return void at(J,new TypeError("A promises callback cannot return that same promise."))}else nt=de;J._state!==qe||(Le&&Yn?Ce(J,nt):Yn===!1?at(J,to):O===$e?Ct(J,nt):O===ot&&at(J,nt))}var Ho=0;function Kn(O){O[xe]=Ho++,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 Le=void 0,nt=void 0,to=!1;try{Le=O.then}catch(vi){to=!0,nt=vi}if(Le===ae&&O._state!==qe)this._settledAt(O._state,J,O._result);else if(typeof Le!="function")this._remaining--,this._result[J]=O;else if(ye===eo){var Yn=new ye(St);to?at(Yn,nt):Be(Yn,O,Le),this._willSettleAt(Yn,J)}else this._willSettleAt(new ye(function(vi){return vi(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($e,J,de)},function(de){return ye._settledAt(ot,J,de)})},Rn);function Rn(O,J){this._instanceConstructor=O,this.promise=new O(St),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]=Ho++,this._result=this._state=void 0,this._subscribers=[],St!==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){Ce(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 Le=O.length,nt=0;nt<Le;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(St);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(T){T.clearRect(0,0,r.width,r.height)}),l=null,w.disposeOp==2&&(w.disposeOp=1)),l&&l.disposeOp==1?d.forEach(function(T){T.clearRect(l.left,l.top,l.width,l.height)}):l&&l.disposeOp==2&&d.forEach(function(T){T.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(T){T.clearRect(w.left,w.top,w.width,w.height)}),d.forEach(function(T){T.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,T="";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),T=v.match(/\D+$/)[0],C=Math.round(h.height*w/h.width)+T),C!=""&&v==""&&(w=parseFloat(C),T=C.match(/\D+$/)[0],v=Math.round(h.width*w/h.height)+T),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(T){var N=new Uint8Array(T);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,K=null,Y=new i;if(c(N,function(Ge,Be,Ce,Lo){switch(Ge){case"IHDR":te=Be.subarray(Ce+8,Ce+8+Lo),Y.width=u(Be,Ce+8),Y.height=u(Be,Ce+12);break;case"acTL":Y.numPlays=u(Be,Ce+8+4);break;case"fcTL":K&&Y.frames.push(K),(K={}).width=u(Be,Ce+8+4),K.height=u(Be,Ce+8+8),K.left=u(Be,Ce+8+12),K.top=u(Be,Ce+8+16);var Ct=d(Be,Ce+8+20),at=d(Be,Ce+8+22);at==0&&(at=100),K.delay=1e3*Ct/at,K.delay<=10&&(K.delay=100),Y.playTime+=K.delay,K.disposeOp=g(Be,Ce+8+24),K.blendOp=g(Be,Ce+8+25),K.dataParts=[];break;case"fdAT":K&&K.dataParts.push(Be.subarray(Ce+8+4,Ce+8+Lo));break;case"IDAT":K&&K.dataParts.push(Be.subarray(Ce+8,Ce+8+Lo));break;case"IEND":re.push(h(Be,Ce,12+Lo));break;default:X.push(h(Be,Ce,12+Lo))}}),K&&Y.frames.push(K),Y.frames.length!=0)for(var ae=0,fe=new Blob(X),xe=new Blob(re),St=0;St<Y.frames.length;St++){K=Y.frames[St];var qe=[];qe.push(l),te.set(C(K.width),0),te.set(C(K.height),4),qe.push(w("IHDR",te)),qe.push(fe);for(var $e=0;$e<K.dataParts.length;$e++)qe.push(w("IDAT",K.dataParts[$e]));qe.push(xe);var ot=URL.createObjectURL(new Blob(qe,{type:"image/png"}));delete K.dataParts,qe=null,K.img=document.createElement("img"),K.img.onload=function(){URL.revokeObjectURL(this.src),++ae==Y.frames.length&&A(Y)},K.img.onerror=function(){L("Image creation error")},K.img.src=ot}else L("Not an animated PNG")}else L("Not an animated PNG")})};var c=function(T,N){var A=8;do{var L=u(T,A),U=v(T,A+4,4),H=N(U,T,A,L);A+=12+L}while(H!==!1&&U!="IEND"&&A<T.length)},u=function(T,N){var A=0;A+=T[0+N]<<24>>>0;for(var L=1;L<4;L++)A+=T[L+N]<<8*(3-L);return A},d=function(T,N){for(var A=0,L=0;L<2;L++)A+=T[L+N]<<8*(1-L);return A},g=function(T,N){return T[N]},h=function(T,N,A){var L=new Uint8Array(A);return L.set(T.subarray(N,N+A)),L},v=function(T,N,A){var L=Array.prototype.slice.call(T.subarray(N,N+A));return String.fromCharCode.apply(String,L)},C=function(T){return[T>>>24&255,T>>>16&255,T>>>8&255,255&T]},w=function(T,N){var A=T.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}(T),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 $w,Gw,zw,Hw,Sd=f(()=>{"use strict";a();So();$w=tn(()=>Uw().APNG),Gw="https://cdn.jsdelivr.net/npm/@vap/shiki-worker@0.0.8/dist/index.min.js",zw="https://cdn.jsdelivr.net/npm/@vap/shiki@0.10.3/dist/onig.wasm",Hw=tn(()=>import("https://cdn.jsdelivr.net/npm/stegcloak-dist@1.0.0/index.js"))});var t0=bi(e0=>{a();var Kw=Object.defineProperty,SL=e=>Kw(e,"__esModule",{value:!0}),xL=(e,t)=>{for(var o in t)Kw(e,o,{get:t[o],enumerable:!0})};SL(e0);xL(e0,{GIFEncoder:()=>eM,applyPalette:()=>AL,default:()=>$L,nearestColor:()=>EL,nearestColorIndex:()=>Xw,nearestColorIndexWithDistance:()=>Vw,prequantize:()=>NL,quantize:()=>CL,snapColorsToPalette:()=>LL});var TL={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 Yw(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 Qy=12,jw=5003,wL=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function ML(e,t,o,r,i=Yw(512),s=new Uint8Array(256),l=new Int32Array(jw),c=new Int32Array(jw)){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,T=C,N=(1<<T)-1,A=1<<v-1,L=A+1,U=A+2,H=0,X=o[0],re=0;for(let Y=u;Y<65536;Y*=2)++re;re=8-re,i.writeByte(d),K(A);let te=o.length;for(let Y=1;Y<te;Y++)e:{let ae=o[Y],fe=(ae<<Qy)+X,xe=ae<<re^X;if(l[xe]===fe){X=c[xe];break e}let St=xe===0?1:u-xe;for(;l[xe]>=0;)if(xe-=St,xe<0&&(xe+=u),l[xe]===fe){X=c[xe];break e}K(X),X=ae,U<1<<Qy?(c[xe]=U++,l[xe]=fe):(l.fill(-1),U=A+2,w=!0,K(A))}return K(X),K(L),i.writeByte(0),i.bytesView();function K(Y){for(g&=wL[h],h>0?g|=Y<<h:g=Y,h+=T;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?(T=C,N=(1<<T)-1,w=!1):(++T,N=T===Qy?1<<T:(1<<T)-1)),Y==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 PL=ML;function Zw(e,t,o){return e<<8&63488|t<<2&992|o>>3}function Jw(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function Qw(e,t,o){return e>>4<<8|t&240|o>>4}function xd(e,t,o){return e<t?t:e>o?o:e}function ic(e){return e*e}function Ww(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,T=l*w/(l+w);if(!(T>=i)){var v=0;o&&(v+=T*ic(C.ac-c),v>=i)||(v+=T*ic(C.rc-u),!(v>=i)&&(v+=T*ic(C.gc-d),!(v>=i)&&(v+=T*ic(C.bc-g),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Xy(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function IL(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=Jw(g,d,u,c),v=h in r?r[h]:r[h]=Xy();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=Qw(d,u,c),h=g in r?r[g]:r[g]=Xy();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=Zw(d,u,c),h=g in r?r[g]:r[g]=Xy();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}return r}function CL(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=IL(u,r),v=h.length,C=v-1,w=new Uint32Array(v+1);for(var T=0,A=0;A<v;++A){let $e=h[A];if($e!=null){var N=1/$e.cnt;g&&($e.ac*=N),$e.rc*=N,$e.gc*=N,$e.bc*=N,h[T++]=$e}}ic(t)/T<.022&&(d=!1);for(var A=0;A<T-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<T;++A){Ww(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=T-t;for(A=0;A<re;){for(var te;;){var K=w[1];if(te=h[K],te.tm>=te.mtm&&h[te.nn].mtm<=te.tm)break;te.mtm==C?K=w[1]=w[w[0]--]:(Ww(h,K,!1),te.tm=A);var X=h[K].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]=K}var Y=h[te.nn],ae=te.cnt,fe=Y.cnt,N=1/(ae+fe);g&&(te.ac=N*(ae*te.ac+fe*Y.ac)),te.rc=N*(ae*te.rc+fe*Y.rc),te.gc=N*(ae*te.gc+fe*Y.gc),te.bc=N*(ae*te.bc+fe*Y.bc),te.cnt+=Y.cnt,te.mtm=++A,h[Y.bk].fw=Y.fw,h[Y.fw].bk=Y.bk,Y.mtm=C}let xe=[];var St=0;for(A=0;;++St){let qe=xd(Math.round(h[A].rc),0,255),$e=xd(Math.round(h[A].gc),0,255),ot=xd(Math.round(h[A].bc),0,255),Ge=255;g&&(Ge=xd(Math.round(h[A].ac),0,255),c&&(Ge=Ge<=(typeof c=="number"?c:127)?0:255),i&&Ge<=l&&(qe=$e=ot=s,Ge=0));let Be=g?[qe,$e,ot,Ge]:[qe,$e,ot];if(kL(xe,Be)||xe.push(Be),(A=h[A].fw)==0)break}return xe}function kL(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 wd(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 Td(e,t){return t>1?Math.round(e/t)*t:e}function NL(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=Td(c,o),r&&(c=c<=(typeof r=="number"?r:127)?0:255),g=Td(g,t),d=Td(d,t),u=Td(u,t),i[s]=c<<24|u<<16|d<<8|g<<0}}function AL(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,T=Jw(w,C,v,h),N=T in c?c[T]:c[T]=RL(w,C,v,h,t);l[d]=N}else{let d=o==="rgb444"?Qw:Zw;for(let g=0;g<i;g++){let h=r[g],v=h>>16&255,C=h>>8&255,w=h&255,T=d(w,C,v),N=T in c?c[T]:c[T]=DL(w,C,v,t);l[g]=N}}return l}function RL(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=as(d-r);if(g>l)continue;let h=u[0];if(g+=as(h-e),g>l)continue;let v=u[1];if(g+=as(v-t),g>l)continue;let C=u[2];g+=as(C-o),!(g>l)&&(l=g,s=c)}return s}function DL(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=as(u-e);if(d>s)continue;let g=c[1];if(d+=as(g-t),d>s)continue;let h=c[2];d+=as(h-o),!(d>s)&&(s=d,i=l)}return i}function LL(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=Vw(r,c.slice(0,3),wd),d=u[0],g=u[1];g>0&&g<=i&&(e[d]=c)}}function as(e){return e*e}function Xw(e,t,o=wd){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 Vw(e,t,o=wd){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 EL(e,t,o=wd){return e[Xw(e,t,o)]}function eM(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,r=Yw(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(TL.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:T=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");_L(r,h,v,A,U),qw(r,A),L>=0&&BL(r,L)}let re=Math.round(N/10);OL(r,H,re,w,T);let te=!!A&&!X;FL(r,h,v,te?A:null),te&&qw(r,A),UL(r,g,h,v,U,s,l,c)}};function d(){tM(r,"GIF89a")}}function OL(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),li(e,o),e.writeByte(i||0),e.writeByte(0)}function _L(e,t,o,r,i=8){let c=Vy(r.length)-1,u=128|i-1<<4|0|c,d=0,g=0;li(e,t),li(e,o),e.writeBytes([u,d,g])}function BL(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),tM(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),li(e,t),e.writeByte(0)}function qw(e,t){let o=1<<Vy(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 FL(e,t,o,r){if(e.writeByte(44),li(e,0),li(e,0),li(e,t),li(e,o),r){let l=Vy(r.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function UL(e,t,o,r,i=8,s,l,c){PL(o,r,t,i,e,s,l,c)}function li(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function tM(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function Vy(e){return Math.max(Math.ceil(Math.log2(e)),1)}var $L=eM});function iM(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function Cd(e,t){let o=ie.getChannel(e);return!o||o.isPrivate()?!0:Fe.can(t,o)}function WL(){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 ra,ls,Md,oM,Id,cs,o0,GL,sc,n0,r0,Pd,nM,et,zL,HL,rM,jL,kd,sM=f(()=>{"use strict";a();$l();_();M();Sd();Ie();Ne();x();$();S();ra=jc(t0()),ls=be("StickersStore"),Md=be("UserSettingsProtoStore"),oM=R("readerFactory");Id=Eo(()=>qa.PreloadedUserSettingsActionCreators),cs=Eo(()=>iM("appearance",Id.ProtoClass)),o0=Eo(()=>iM("clientThemeSettings",cs)),GL=we(".getUserIsAdmin("),sc="[3,4].includes(fakeNitroIntention)",n0=/\/emojis\/(\d+?)\.(png|webp|gif)/,r0=/\/stickers\/(\d+?)\./,Pd=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,nM=/\[.+?\]\((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}});zL=e=>Cd(e,ke.USE_EXTERNAL_EMOJIS),HL=e=>Cd(e,ke.USE_EXTERNAL_STICKERS),rM=e=>Cd(e,ke.EMBED_LINKS),jL=e=>Cd(e,ke.ATTACH_FILES);kd=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:[WL(),{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}&&!${sc}`},{match:/!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,replace:e=>`${e}&&!${sc}`},{match:/(!)?(\i\.\i\.canUseEmojisEverywhere\(\i\))/,replace:(e,t)=>t?`(${e}&&!${sc})`:`(${e}||${sc})`},{match:/(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/,replace:e=>`(${e}||${sc})`}]},{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??=cs.create(),Md.settings.appearance?.theme!=null){let r=cs.create({theme:Md.settings.appearance.theme});e.appearance.theme=r.theme}if(Md.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=o0.create({backgroundGradientPresetId:{value:Md.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(!Id||!cs||!o0||!oM)return;let i=Id.getCurrentValue().appearance,s=i!=null?cs.fromBinary(cs.toBinary(i),oM):cs.create();s.theme=t;let l=o0.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=Id.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(n0);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 Oe.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(r0.test(c.props.href))return null;let u=c.props.href.match(Pd);if(u&&ls.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(Ri.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")&&!nM.test(i))continue;let s=i.match(r0);if(s){let c=null;try{c=new URL(i)}catch{}let u=ls.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(Pd);if(l){if(!ls.getStickerById(l[1]))continue;let c=ls.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(nM)?.[1]===e.url))return!1;if(et.store.transformEmojis&&n0.test(e.url))return!0;if(et.store.transformStickers){if(r0.test(e.url))return!0;let r=e.url.match(Pd);if(r&&ls.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(Pd);return!(o&&ls.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&n0.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}=$w(),{frames:i,width:s,height:l}=await r(e),c=(0,ra.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:T,top:N,width:A,height:L,img:U,delay:H,blendOp:X,disposeOp:re}=w;v=g.getImageData(T,N,A,L),X===0&&g.clearRect(T,N,A,L),g.drawImage(U,T,N,A,L);let{data:te}=g.getImageData(0,0,u,u),K=(0,ra.quantize)(te,256),Y=(0,ra.applyPalette)(te,K);c.writeFrame(Y,u,u,{transparent:!0,palette:K,delay:H}),re===1?g.clearRect(T,N,A,L):re===2&&g.putImageData(v,T,N)}c.finish();let C=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});Ka.promptToUpload([C],ie.getChannel(o),no.ChannelMessage)},canUseEmote(e,t){if(e.type===0)return!0;if(e.available===!1||GL(e,this.guildId,!0))return!1;let o=!1;if(e.managed&&e.guildId){let r=De.getSelfMember(e.guildId)?.roles??[];o=e.roles.some(i=>r.includes(i))}return this.canUseEmotes||o?e.guildId===this.guildId||zL(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=Vi(async(r,i,s)=>{let{guildId:l}=this,c=!1;e:{if(!e.enableStickerBypass)break e;let u=ls.getStickerById(s.stickers?.[0]);if(!u||"pack_id"in u)break e;let d=this.canUseStickers&&HL(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 jL(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(wu(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&&!rM(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=Fl(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(wu(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&&!rM(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){es(this.preSend),Ul(this.preEdit)}})});var aM=f(()=>{});function qL(...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 lM,cM=f(()=>{a();lM=qL});function uM(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 pM(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 dM,mM,KL,YL,Nd,fM=f(()=>{"use strict";a();aM();_();ne();M();ze();me();wt();x();$();S();cM();dM=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}]}}),mM=se("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),KL=se("isTryItOutFlow:","pendingThemeColors:","pendingAvatarDecoration:","EDIT_PROFILE_BANNER"),YL=Xn(["#{intl::USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON}"],/createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/),Nd=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=pM(Qt.getUserProfile(D.getCurrentUser().id).bio)??[0,0],[t,o]=q(e[0]),[r,i]=q(e[1]),[,,s]=bt(YL);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(Ms,{direction:Ms.Direction.HORIZONTAL,style:{gap:"1rem"}},n(mM,{color:t,label:n(Q,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Primary"),onChange:l=>{o(l)}}),n(mM,{color:r,label:n(Q,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Accent"),onChange:l=>{i(l)}}),n(I,{onClick:()=>{let l=uM(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(KL,{user:D.getCurrentUser(),pendingThemeColors:[t,r],onAvatarChange:()=>{},onBannerChange:()=>{},canUsePremiumCustomization:!0,hideExampleButton:!0,hideFakeActivity:!0,isTryItOutFlow:!0}))))},settings:dM,colorDecodeHook(e){if(e){if(dM.store.nitroFirst&&e.themeColors)return e;let t=pM(e.bio);if(t)return lM(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:k.wrap(function({primary:e,accent:t}){return n(I,{onClick:()=>{let o=uM(e,t);Xt(o)},color:I.Colors.PRIMARY,size:I.Sizes.XLARGE,className:F.left16},"Copy 3y3")},{noop:!0})})});var Ad,gM=f(()=>{"use strict";a();M();x();S();Ad=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 JL({instance:e,SearchBarComponent:t}){let[o,r]=q(""),i=Mt(null),s=au(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(),yM(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:ZL.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 yM(e){let t;try{t=new URL(e)}catch{return e}switch(hM.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 ZL,hM,Rd,vM=f(()=>{"use strict";a();_();ne();M();x();$();S();ZL=R("searchBar","searchBarFullRow"),hM=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}]}}),Rd=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:hM,getTargetString:yM,instance:null,renderSearchBar(e,t){return this.instance=e,n(k,{noop:!0},n(JL,{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 Dd,bM=f(()=>{"use strict";a();M();x();Dd=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 Ld,SM=f(()=>{"use strict";a();M();x();Ld=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 Ed,xM=f(()=>{"use strict";a();_();vr();M();x();Ed=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 Od,TM=f(()=>{"use strict";a();M();x();Od=y({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[p.coolelectronics]})});var _d,wM=f(()=>{"use strict";a();M();x();S();_d=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 i0,Bd,MM=f(()=>{"use strict";a();sn();M();x();$();i0=R("createFriendInvite"),Bd=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 i0.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 i0.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 i0.revokeFriendInvites(),mt(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var XL,VL,PM,IM,e8,Fd,CM=f(()=>{"use strict";a();ne();M();Ie();x();$();S();XL=R("memberSinceWrapper"),VL=R("memberSince"),PM=we('month:"short",day:"numeric"'),IM=R("getLocale"),e8=se('"auto":"smooth"',".section"),Fd=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(!Ue.isFriend(e))return null;let o=Ue.getSince(e);return o?n(e8,{heading:"Friends Since"},t?n(Q,{variant:"text-sm/normal"},PM(o,IM.getLocale())):n("div",{className:XL.memberSinceWrapper},n("div",{className:VL.memberSince},!!Yo()?.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"},PM(o,IM.getLocale()))))):null},{noop:!0})})});function o8({message:e,channel:t,onHeightUpdate:o}){let r=e.author&&!(e.author.id===D.getCurrentUser().id||e.author.system);return t8({navId:"message-actions",ariaLabel:Pe("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 t8,kM,n8,Ud,NM=f(()=>{"use strict";a();No();_();M();Ie();wt();x();$();S();t8=we(".MESSAGE,commandTargetId:"),kM=bh;Xe(B.componentByCode('"devmode-copy-id-".concat'),e=>kM=e);n8=(e,t)=>{if(t?.isFullSearchContextMenu==null)return;dt("devmode-copy-id",e,!0)?.push(kM({id:t.message.author.id,label:Pe("COPY_ID_AUTHOR")}))};hr("FullSearchContext","SearchReply");Ud=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(o8,{message:t,channel:o,onHeightUpdate:r.onHeightUpdate})))},contextMenus:{"message-actions":n8}})});var r8,$d,AM=f(()=>{"use strict";a();ne();M();x();$();S();r8=se(".USER_MENTION)"),$d=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(r8,{className:"mention",userId:e.id,channelId:e.channelId}),{fallback:({wrappedProps:{originalComponent:e}})=>e()})})});var RM,DM=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});RM="src/plugins/gameActivityToggle/style.css"});function s8(e){let{oldIcon:t}=EM.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 a8(){let e=LM.useSetting();return n(i8,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:s8(e),role:"switch","aria-checked":!e,redGlow:!e,onClick:()=>LM.updateSetting(t=>!t)})}var i8,LM,EM,Gd,OM=f(()=>{"use strict";a();_();wr();ne();M();x();$();DM();i8=se(".NONE,disabled:",".PANEL_BUTTON"),LM=Ao("status","showCurrentGame");EM=P({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),Gd=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:EM,managedStyle:RM,patches:[{find:"#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",replacement:{match:/className:\i\.buttons,.{0,50}children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:k.wrap(a8,{noop:!0})})});var zd,_M=f(()=>{"use strict";a();M();Ie();x();S();zd=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+" "),Ya.closeExpressionPicker())}})});function FM(e,t,o){let r=qo.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Hd.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};qo._sendMessage(e.id,i,r)}else qo.sendGreetMessage(e.id,o[0],r)}function l8({channel:e,message:t}){let o=Hd.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(UM).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"},BM.map(s=>n(E.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>FM(e,t,[s.id])}))),Hd.store.unholyMultiGreetEnabled?n(m,null,n(E.MenuSeparator,null),n(E.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},BM.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:()=>FM(e,t,i),disabled:i.length===0}))):null)}var UM,Hd,BM,jd,$M=f(()=>{"use strict";a();_();M();x();$();S();UM=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(UM||{}),Hd=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(),BM=kt(e=>Array.isArray(e)&&e[0]?.name==="Wave");jd=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:Hd,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(l8,{...t}))}})});var GM=f(()=>{});var s0={};lt(s0,{updateMessage:()=>Nr});function Nr(e,t,o){let r=cu.getOrCreate(e);if(!r.has(t))return;let i=r.update(t,s=>o?s.merge(o):new s.constructor(s));cu.commit(i),Jt.emitChange()}var ia=f(()=>{"use strict";a();S()});async function zM(){return ac=await co(HM)??new Set,ac}var HM,ac,c8,Wd,jM=f(()=>{"use strict";a();GM();_n();ia();_();At();M();me();x();S();HM="HideAttachments_HiddenIds",ac=new Set;c8=e=>hn(HM,e);hr("HideMedia","HideAttachments");Wd=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=ac.has(e.id);return{label:o?"Show Media":"Hide Media",icon:o?al:ll,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 zM()},stop(){ac.clear()},shouldHide(e){return ac.has(e)},async toggleHide(e,t){let o=await zM();o.delete(t)||o.add(t),await c8(o),Nr(e,t)}})});var qd,WM=f(()=>{"use strict";a();M();x();qd=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 YM(e,t,o,r){return n(oe,{text:t},i=>n("button",{...i,onClick:s=>m8(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 KM(e,t=!1){let o=Gt.use(["ignoredActivities"]),{ignoredActivities:r}=o;return r.some(i=>i.id===e.id)?d8(e,"var(--status-danger)"):p8(e,t?"var(--green-300)":"var(--primary-400)")}function m8(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 ci(){u8.updateSetting(e=>e)}function f8(){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=Z.plugins.CustomRPC?.appID;if(!e)return Je("CustomRPC application ID is not set.",ee.Type.FAILURE);a0?.(e)&&Je("CustomRPC application ID is already added.",ee.Type.FAILURE)}},"Import CustomRPC ID")))}function g8(e){let[t,o]=q(Gt.store.idsList??"");a0=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(()=>()=>{a0=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 h8(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 qM,u8,p8,d8,a0,Gt,Kd,ZM=f(()=>{"use strict";a();_();wr();ne();jt();M();ze();x();$();S();qM=be("RunningGameStore"),u8=Ao("status","showCurrentGame");p8=(e,t)=>YM(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),d8=(e,t)=>YM(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);a0=null;Gt=P({importCustomRPC:{type:6,component:f8},listMode:{type:4,description:"Change the mode of the filter list",options:[{label:"Whitelist",value:0,default:!0},{label:"Blacklist",value:1}],onChange:ci},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(", "),ci()},component:e=>n(g8,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1,onChange:ci},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1,onChange:ci},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1,onChange:ci},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1,onChange:ci},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1,onChange:ci},ignoredActivities:{type:7,default:[],onChange:ci}});Kd=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=qM.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(h8(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=qM.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}},KM({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(k,{noop:!0},KM({id:e.id,name:e.name,type:1}))}})});var Yd,JM=f(()=>{"use strict";a();M();x();Yd=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 lc,l0=f(()=>{"use strict";a();lc="vc-imgzoom-magnify-modal"});function c0(e,t){e()?t():requestAnimationFrame(()=>c0(e,t))}var QM=f(()=>{"use strict";a()});var XM,u0,VM=f(()=>{"use strict";a();He();ne();S();l0();p0();QM();XM=ue("vc-imgzoom-"),u0=k.wrap(({instance:e,size:t,zoom:o})=>{let[r,i]=q(!1),[s,l]=q({x:0,y:0}),[c,u]=q({x:0,y:0}),[d,g]=q(0),h=Mt(!1),v=Mt(o),C=Mt(t),w=Mt(null),T=Mt(null),N=Mt(null),A=Mt(null);if(Ci(()=>{let U=ae=>{ae.key==="Shift"&&(h.current=!0)},H=ae=>{ae.key==="Shift"&&(h.current=!1)},X=()=>{T.current&&N.current&&(T.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},St=-((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:St,y:qe}),g(1)}else g(0)},te=ae=>{e.state.mouseOver&&ae.button===0&&(v.current=ht.store.zoom,C.current=ht.store.size,document.getElementById("image-context")&&G.dispatch({type:"CONTEXT_MENU_CLOSE"}),re(ae),g(1))},K=()=>{g(0),ht.store.saveZoomValues&&(ht.store.zoom=v.current,ht.store.size=C.current)},Y=async ae=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let fe=v.current+ae.deltaY/100*(ht.store.invertScroll?-1:1)*ht.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*(ht.store.invertScroll?-1:1)*ht.store.zoomSpeed;C.current=fe<=50?50:fe,re(ae)}};return c0(()=>e.state.readyState==="READY",()=>{let ae=document.getElementById(lc);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",K),document.addEventListener("wheel",Y),()=>{document.removeEventListener("keydown",U),document.removeEventListener("keyup",H),document.removeEventListener("mousemove",re),document.removeEventListener("mousedown",te),document.removeEventListener("mouseup",K),document.removeEventListener("wheel",Y)}},[]),Ci(()=>()=>{ht.store.saveZoomValues&&(ht.store.zoom=v.current,ht.store.size=C.current)}),!r)return null;let L=w.current?.getBoundingClientRect();return L?n("div",{className:XM("lens",{"nearest-neighbor":ht.store.nearestNeighbour,square:ht.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:T,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:XM("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 eP,tP=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});eP="src/plugins/imageZoom/styles.css"});var ht,y8,Zd,p0=f(()=>{"use strict";a();_();vr();_i();M();x();S();VM();l0();tP();ht=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}}),y8=(e,t)=>{if("href"in t||t.target?.classList?.contains("emoji"))return;let{square:o,nearestNeighbour:r}=ht.use(["square","nearestNeighbour"]);e.push(n(E.MenuGroup,{id:"image-zoom"},n(E.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:o,action:()=>{ht.store.square=!o}}),n(E.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:r,action:()=>{ht.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:ht.store.zoom,onChange:Oo(l=>ht.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:ht.store.size,onChange:Oo(l=>ht.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:ht.store.zoomSpeed,onChange:Oo(l=>ht.store.zoomSpeed=l,100),renderValue:l=>`${l.toFixed(3)}x`})})))},Zd=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:eP,patches:[{find:".dimensionlessImage,",replacement:[{match:/className:\i\.media,/,replace:`id:"${lc}",$&`},{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:ht,contextMenus:{"image-context":y8},currentMagnifierElement:null,element:null,Magnifier:u0,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===lc&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(u0,{size:ht.store.size,zoom:ht.store.zoom,instance:e}),this.root=ki.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 oP,Jd,nP=f(()=>{"use strict";a();_();M();x();$();S();rP();oP=be("UserAffinitiesStore"),Jd=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:()=>Z.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?-(oP.getUserAffinity(t.user.id)?.affinity??0):e(t)},async refreshUserAffinities(){try{await vt.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=oP.getUserAffinitiesUserIds(),t=Ue.getRelationships(),o=Array.from(e).filter(u=>!Ue.getRelationshipType(u));o.forEach(u=>{t[u]=5}),Ue.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,Ue.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 v8(e){let t=e?.message?.content,[o,r]=j.useState("password");return n(ve,{...e},n(Ae,null,n(b.FormTitle,{tag:"h4"},"Decrypt Message")),n(Me,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=d0(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 iP(e){he(t=>n(v8,{...t,...e}))}var sP=f(()=>{"use strict";a();Ke();S();Qd()});function b8(e){let[t,o]=j.useState(""),[r,i]=j.useState(""),[s,l]=j.useState("password"),[c,u]=j.useState(!1),d=t&&(c||r&&r.trim().split(" ").length>1);return n(ve,{...e},n(Ae,null,n(b.FormTitle,{tag:"h4"},"Encrypt Message")),n(Me,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=cP(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 aP(){he(e=>n(b8,{...e}))}var lP=f(()=>{"use strict";a();Ie();Ke();S();Qd()});function S8(){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 x8(){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 cP(e,t,o){return m0.hide(e+"\u200B",t,o)}function d0(e,t,o){let r=m0.reveal(e,t);return o?r.replace("\u200B",""):r}function w8(e){return e.endsWith("\u200B")}async function M8(e){let t=uP.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=d0(o,t[r],!1);if(w8(i))return i}return!1}var m0,T8,uP,Xd,Qd=f(()=>{"use strict";a();xr();ia();_();ne();M();Sd();x();S();sP();lP();T8=({isMainChat:e})=>e?n(en,{tooltip:"Encrypt Message",onClick:()=>aP(),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,uP=P({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),Xd=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessageUpdaterAPI"],reporterTestable:8,settings:uP,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 Hw();m0=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 M8(e);t?this.buildEmbed(e,t):iP({message:e})}}:null},renderChatBarButton:T8,colorCodeFromNumber(e){return`#${[e>>16,e>>8,e].map(t=>(t&255).toString(16)).join("")}`},async getEmbed(e){let{body:t}=await vt.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(S8,null),indicator:k.wrap(x8,{noop:!0})})});function pP(e){let{lightness:t}=us.use(["lightness"]),o=Re(()=>e?qc(e):null,[e]);return o&&`hsl(${o%360n}, 100%, ${t}%)`}var us,Vd,dP=f(()=>{"use strict";a();_();Xg();M();x();S();us=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}}),Vd=y({name:"IrcColors",description:"Makes username colors in chat unique, like in IRC clients",authors:[p.Grzesiek11,p.jamesbt365],settings:us,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:()=>us.store.memberListColors}],calculateNameColorForMessageContext(e){let t=e?.message?.author?.id,o=e?.author?.colorString,r=pP(t);return e?.message?.channel_id==="1337"&&t==="313337"||us.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!us.store.applyColorOnlyToUsersWithoutColor||!o?r:o},calculateNameColorForListContext(e){let t=e?.user?.id,o=e?.colorString,r=pP(t);return us.store.applyColorOnlyInDms&&!e?.channel?.isPrivate()?o:!us.store.applyColorOnlyToUsersWithoutColor||!o?r:o}})});var em,kn,tm,mP=f(()=>{"use strict";a();_n();M();x();S();em=!1,tm=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:em}=e)},CONNECTION_OPEN(){em&&(em=!1,kn?.channelId&&(ie.hasChannel(kn.channelId)?Cs.transitionToChannel(kn.channelId):or.transitionToGuild("@me")))},async CHANNEL_SELECT({guildId:e,channelId:t}){em||(kn={guildId:e,channelId:t},await hn("KeepCurrentChannel_previousData",kn))}},async start(){kn=await co("KeepCurrentChannel_previousData"),kn?kn.channelId&&Cs.transitionToChannel(kn.channelId):(kn={guildId:Wo.getGuildId(),channelId:Ee.getChannelId()??null},await hn("KeepCurrentChannel_previousData",kn))}})});async function f0(e){return(await Li.fetchAssetIds(om,[e]))[0]}function I8(e){G.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var om,P8,fP,gP,yo,nm,hP=f(()=>{"use strict";a();_();Bo();M();Ne();x();$();S();om="1108588077900898414",P8="2a96cbd8b46e442fc41c2b86b821562f",fP=new V("LastFMRichPresence"),gP=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}}),nm=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 fP.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 fP.error("Failed to query Last.fm API",e),null}},async updatePresence(){I8(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(P8))return e.imageUrl;if(yo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(yo.store.hideWithActivity&&gP.getActivities().some(s=>s.application_id!==om)||yo.store.hideWithSpotify&&gP.getActivities().some(s=>s.type===2&&s.application_id!==om))return null;let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await f0(t),large_text:e.album||void 0,...yo.store.showLastFmLogo&&{small_image:await f0("lastfm-small"),small_text:"Last.fm"}}:{large_image:await f0("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:om,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 yP,vP=f(()=>{a();yP=`# 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 C8,k8,g0,rm,bP=f(()=>{"use strict";a();_();M();Ne();x();vP();C8=yP.split(`
|
|
`).map(e=>/^\s*[^#\s]/.test(e)&&e.trim()).filter(Boolean),k8="Did you really disable all loading quotes? What a buffoon you are...",g0=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:"|"}}),rm=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72,p.UlyssesZhan],settings:g0,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:()=>g0.store.replaceEvents}]}],mutateQuotes(e){try{let{enableDiscordPresetQuotes:t,additionalQuotes:o,additionalQuotesDelimiter:r,enablePluginPresetQuotes:i}=g0.store;t||(e.length=0),i&&e.push(...C8),e.push(...o.split(r).filter(Boolean)),e.length||e.push(k8)}catch(t){new V("LoadingQuotes").error("Failed to mutate quotes",t)}}})});var SP=f(()=>{});var im,xP=f(()=>{"use strict";a();So();me();Kr();S();im=Dt(()=>{let e=new Mo,t=new Map;class o extends Pi.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await Ha.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 b0({isTooltip:e,tooltipGuildId:t}){let o=Se([Ee],()=>Yo()),r=e?t:o?.guild_id,i=Se([h0],()=>h0.getMemberCount(r)),s=Se([im],()=>im.getCount(r)),{groups:l}=Se([y0],()=>y0.getProps(r,o?.id)),c=Se([v0],()=>v0.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(()=>{im.ensureCount(r)},[r]),i==null)return null;let u=s!=null?sm(s):"?";return n("div",{className:sa("widget",{tooltip:e,"member-list":!e})},n(oe,{text:`${u} online in this channel`,position:"bottom"},d=>n("div",{...d},n("span",{className:sa("online-dot")}),n("span",{className:sa("online")},u))),n(oe,{text:`${sm(i)} total server members`,position:"bottom"},d=>n("div",{...d},n("span",{className:sa("total-dot")}),n("span",{className:sa("total")},sm(i)))))}var TP=f(()=>{"use strict";a();Ie();me();S();S0();xP()});var h0,y0,v0,x0,N8,sm,sa,am,S0=f(()=>{"use strict";a();SP();_();He();ne();M();x();$();TP();h0=be("GuildMemberCountStore"),y0=be("ChannelMemberStore"),v0=be("ThreadMemberListStore"),x0=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}}),N8=new Intl.NumberFormat,sm=e=>N8.format(e),sa=ue("vc-membercount-"),am=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[p.Ven,p.Commandtechno],settings:x0,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:()=>x0.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/#{intl::VIEW_AS_ROLES_MENTIONS_WARNING}.{0,100}(?=])/,replace:"$&,$self.renderTooltip(arguments[0].guild)"},predicate:()=>x0.store.toolTip}],render:k.wrap(b0,{noop:!0}),renderTooltip:k.wrap(e=>n(b0,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var wP=f(()=>{});function A8(){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 MP(e){return PP.store.showAtSymbol?`@${e}`:e}var PP,lm,IP=f(()=>{"use strict";a();wP();_();ne();M();x();S();PP=P({showAtSymbol:{type:3,description:"Whether the the @ symbol should be displayed on user mentions",default:!0}});lm=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:PP,renderUsername:k.wrap(e=>{let{user:t,username:o}=e,[r,i]=q(!1);return t?n("span",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)},n("img",{src:t.getAvatarURL(Wo.getGuildId(),16,r),className:"vc-mentionAvatars-icon",style:{borderRadius:"50%"}}),MP(o)):n(m,null,MP(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(A8,null)})})});var CP,R8,T0,kP,NP,aa,cm,AP=f(()=>{"use strict";a();_();M();x();$();S();CP=R("deleteMessage","startEditMessage"),R8=R("isEditing","isEditingAny"),T0=!1,kP=e=>e.key==="Backspace"&&(T0=!0),NP=e=>e.key==="Backspace"&&(T0=!1),aa=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}}),cm=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],settings:aa,start(){document.addEventListener("keydown",kP),document.addEventListener("keyup",NP)},stop(){document.removeEventListener("keydown",kP),document.removeEventListener("keyup",NP)},onMessageClick(e,t,o){let r=e.author.id===D.getCurrentUser().id;if(T0)aa.store.enableDeleteOnClick&&(r||Fe.can(ke.MANAGE_MESSAGES,t))&&(e.deleted?G.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:e.id,mlDeleted:!0}):CP.deleteMessage(t.id,e.id),o.preventDefault());else{if(o.detail<2||aa.store.requireModifier&&!o.ctrlKey&&!o.shiftKey||t.guild_id&&!Fe.can(ke.SEND_MESSAGES,t)||e.deleted===!0)return;if(r){if(!aa.store.enableDoubleClickToEdit||R8.isEditing(t.id,e.id)||e.state!=="SENT")return;CP.startEditMessage(t.id,e.id,e.content),o.preventDefault()}else{if(!aa.store.enableDoubleClickToReply||e.hasFlag(64))return;let s=o.shiftKey&&!aa.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 RP,D8,um,DP=f(()=>{"use strict";a();_();ne();M();Qs();x();$();S();RP=1471228928,D8=se(".hiddenVisually]:"),um=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>=RP-864e5&&(l=o,c+=RP);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(D8,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 B8(e,t){let o=la.get(t);if(o)return o.message;la.set(t,{fetched:!1});let i=(await vt.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 la.set(s.id,{message:s,fetched:!0}),s}function F8(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"&&!OP.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function U8(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 $8(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||OP.test(t.url))))}function G8(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 z8(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function H8({message:e}){let t=e.vencordEmbeddedBy??[],o=[];for(let[r,i,s]of e.content.matchAll(M0)){if(t.includes(s)||t.length>2)continue;let l=ie.getChannel(i);if(!l||!l.isPrivate()&&!Fe.can(ke.VIEW_CHANNEL,l))continue;let{listMode:c,idList:u}=pm.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=la.get(s)?.message;if(!g)if(g??=Jt.getMessage(i,s),g)la.set(s,{message:g,fetched:!0});else{_8.unshift(()=>B8(i,s).then(C=>C&&Nr(e.channel_id,e.id)));continue}let h={message:z8(g,[...t,e.id]),channel:l},v=pm.store.automodEmbeds;o.push(v==="always"||v==="prefer"&&!$8(g)?n(W8,{...h}):n(j8,{...h}))}return o.length?n(m,null,o):null}function _P(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 j8({message:e,channel:t}){let o=EP.useSetting(),r=D.getUser(ie.getChannel(t.id).recipients?.[0]),[i,s]=_P(t);return n(L8,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(Q,{variant:"text-xs/medium",tag:"span"},n("span",null,i," - "),Oe.parse(t.isDM()?`<@${r.id}>`:`<#${t.id}>`)),iconProxyURL:s}},renderDescription:()=>n("div",{key:e.id,className:z(LP.message,pm.store.messageBackgroundColor&&LP.searchResult)},n(O8,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1,compact:o}))})}function W8(e){let{message:t,channel:o}=e,r=EP.useSetting(),i=F8(t),{parse:s}=Oe,[l,c]=_P(o);return n(E8,{channel:o,childrenAccessories:n(Q,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${w0.embedAuthor} ${w0.embedMargin}`},c&&n("img",{src:c,className:w0.embedAuthorIcon,alt:""}),n("span",null,n("span",null,l," - "),o.isDM()?Oe.parse(`<@${ie.getChannel(o.id).recipients[0]}>`):Oe.parse(`<#${o.id}>`))),compact:r,content:n(m,null,t.content||t.attachments.length<=i.length?s(t.content):[U8(t.attachments.length,t.embeds.length)],i.map((u,d)=>{let{width:g,height:h}=G8(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 la,L8,E8,O8,LP,w0,EP,M0,OP,_8,pm,dm,BP=f(()=>{"use strict";a();zu();ia();_();wr();ne();M();me();Kr();x();$();S();la=new Map,L8=se(".inlineMediaEmbed"),E8=se(".withFooter]:","childrenMessageContent:"),O8=se("childrenExecutedCommand:",".hideAccessories"),LP=R("message","searchResult"),w0=R("embedAuthorIcon","embedAuthor","embedAuthor"),EP=Ao("textAndImages","messageDisplayCompact"),M0=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(?:\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,OP=/^https:\/\/(?:www\.)?tenor\.com\//,_8=new Mo,pm=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:()=>la.clear()},"Clear the linked message cache")}});dm=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:pm,start(){Ol("messageLinkEmbed",e=>M0.test(e.message.content)?(M0.lastIndex=0,n(k,null,n(H8,{message:e.message}))):null,4)},stop(){_l("messageLinkEmbed")}})});var FP=f(()=>{});var P0,UP=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});P0="src/plugins/messageLogger/deleteStyleOverlay.css"});var I0,$P=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});I0="src/plugins/messageLogger/deleteStyleText.css"});function GP(e){he(t=>n(k,null,n(Y8,{modalProps:t,message:e})))}function Y8({modalProps:e,message:t}){let[o,r]=q(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(Ae,{className:cc("head")},n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Message Edit History"),n(pt,{onClick:e.onClose})),n(Me,{className:cc("contents")},n(xo,{type:"top",look:"brand",className:z("vc-settings-tab-bar",cc("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:cc("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:cc("timestamp"),timestamp:l,isEdited:!0,isInline:!1})))),n("div",{className:z(q8.markup,K8.messageContent,F.top20)},C0(s[o],t))))}var q8,K8,cc,zP=f(()=>{"use strict";a();He();ne();ze();me();Ke();$();S();k0();q8=R("markup","codeContainer"),K8=R("messageContent","markupRtl"),cc=ue("vc-ml-modal-")});function HP(){Z.plugins.MessageLogger.deleteStyle==="text"?(Io(I0),Ko(P0)):(Ko(I0),Io(P0))}function C0(e,t){return Oe.parse(e,!0,{channelId:t.channel_id,messageId:t.id,allowLinks:!0,allowHeading:!0,allowList:!0,allowEmojiLinks:!0,viewingChannelId:Ee.getChannelId()})}var Z8,jP,WP,J8,mm,fm,k0=f(()=>{"use strict";a();FP();No();ia();_();He();ne();M();Ie();Ne();me();x();$();S();UP();$P();zP();Z8=R("edited","communicationDisabled","isSystemMessage");jP="ml-remove-history",WP="ml-toggle-style",J8=(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:WP,key:WP,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(n(E.MenuItem,{id:jP,key:jP,label:"Remove Message History",color:"danger",action:()=>{r?G.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))}},mm=(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:[]})})}}))};fm=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:J8,"channel-context":mm,"thread-context":mm,"user-context":mm,"gdm-context":mm},start(){HP()},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 Z.plugins.MessageLogger.inlineEdits&&n(m,null,o.editHistory?.map((r,i)=>n("div",{key:i,className:"messagelogger-edited"},C0(r.content,o),n(lo,{timestamp:r.timestamp,isEdited:!0,isInline:!1},n("span",{className:Z8.edited}," ","(",Pe("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:()=>HP()},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}=Z.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:()=>GP(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:()=>Z.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:()=>Z.plugins.MessageLogger.collapseDeleted}]})});function KP(){return ps.store.tagsList}function gm(e){return ps.store.tagsList[e]??null}function X8(e){ps.store.tagsList[e.name]=e}function V8(e){delete ps.store.tagsList[e]}function YP(e){Gs({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>gm(e.name)?(ps.store.clyde&&mt(o.channel.id,{content:`${ui} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
|
|
`)}):(mt(o.channel.id,{content:`${ui} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[Q8]:!0},"CustomTags")}var ui,qP,Q8,ps,hm,ZP=f(()=>{"use strict";a();sn();_n();_();M();x();ui="<:luna:1035316192220553236>",qP="MessageTags_TAGS",Q8=Symbol("MessageTags");ps=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:{}}}),hm=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],settings:ps,async start(){let e=await co(qP);e!=null&&(ps.store.tagsList=Object.fromEntries(e.map(o=>(delete o.enabled,[o.name,o]))),await Yr(qP));let t=KP();for(let o in t)YP(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(gm(o))return mt(t.channel.id,{content:`${ui} A Tag with the name **${o}** already exists!`});let i={name:o,message:r};YP(i),X8(i),mt(t.channel.id,{content:`${ui} Successfully created the tag **${o}**!`});break}case"delete":{let o=qt(e[0].options,"tag-name","");if(!gm(o))return mt(t.channel.id,{content:`${ui} A Tag with the name **${o}** does not exist!`});Cl(o),V8(o),mt(t.channel.id,{content:`${ui} Successfully deleted the tag **${o}**!`});break}case"list":{mt(t.channel.id,{embeds:[{title:"All Tags:",description:Object.values(KP()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
|
|
`)||`${ui} 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=gm(o);if(!r)return mt(t.channel.id,{content:`${ui} 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 e6(e){let t="";for(let o=0;o<e.length;o++)t+=o%2?e[o].toUpperCase():e[o].toLowerCase();return t}var ym,JP=f(()=>{"use strict";a();sn();M();x();ym=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:[Il],execute:e=>({content:e6(qt(e,"message",""))})}]})});var vm,QP=f(()=>{"use strict";a();sn();M();x();vm=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 n6(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function r6(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function s6(e){let t=n6(e,A0)+r6(e,i6);return Math.min(t,10)}function N0(){if(!pi.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=pi.store.quality==="HD"?o6:t6,e.volume=pi.store.volume,e.play()}var A0,t6,o6,pi,bm,i6,XP=f(()=>{"use strict";a();_();I1();M();me();x();S();A0="\u{1F5FF}",t6="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",o6="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",pi=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}}),bm=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:pi,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||pi.store.ignoreBots&&o.author?.bot||pi.store.ignoreBlocked&&Ue.isBlocked(o.author?.id)||!o.content||r!==Ee.getChannelId())return;let i=s6(o.content);for(let s=0;s<i;s++)N0(),await mn(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:o,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||pi.store.ignoreBots&&D.getUser(r)?.bot||pi.store.ignoreBlocked&&Ue.isBlocked(i)||o!==Ee.getChannelId())return;let l=s.name.toLowerCase();l!==A0&&!l.includes("moyai")&&!l.includes("moai")||N0()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==A0&&!t.includes("moyai")&&!t.includes("moai")||N0()}}});i6=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});function p6(e){return e.name||e.recipients.map(D.getUser).filter(Pr).map(t=>Ue.getNickname(t.id)||l6.getName(t)).join(", ")}function m6(e){let t=Sm(e.id).length;return`${t===0?"No":t} Mutual Group${t!==1?"s":""}`}function VP(e,t){return e.map(o=>n(er,{key:o.id,className:di.listRow,onClick:()=>{t(),a6.selectPrivateChannel(o.id)}},n(Ua,{src:Ft.getChannelIconURL({id:o.id,icon:o.icon,size:32}),size:"SIZE_40",className:di.listAvatar}),n("div",{className:di.listRowContent},n("div",{className:di.listName},p6(o)),n("div",{className:u6.guildNick},o.recipients.length+1," Members"))))}var a6,l6,di,c6,u6,Sm,d6,eI,xm,tI=f(()=>{"use strict";a();ne();M();Qs();Ne();x();$();S();a6=R("selectPrivateChannel"),l6=R("getGlobalName"),di=R("emptyIconFriends","emptyIconGuilds"),c6=se('"PRESS_SECTION"'),u6=R("guildNick","guildAvatarWithoutIcon");Sm=e=>ie.getSortedPrivateChannels().filter(t=>t.isGroupDM()&&t.recipients.includes(e)),d6=e=>e.bot||e.id===D.getCurrentUser().id;eI=Symbol("MutualGroupDMs.Patched"),xm=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 Sm(e)}catch(t){new V("MutualGroupDMs").error("Failed to get mutual group dms:",t)}return[]},pushSection(e,t){try{if(d6(t)||e[eI])return;e[eI]=!0,e.push({section:"MUTUAL_GDMS",text:m6(t)})}catch(o){new V("MutualGroupDMs").error("Failed to push mutual group dms section:",o)}},renderMutualGDMs:k.wrap(({user:e,onClose:t})=>{let o=Re(()=>Sm(e.id),[e.id]),r=VP(o,t);return n(jr,{className:di.listScroller,fade:!0,onClose:t},r.length>0?r:n("div",{className:di.empty},n("div",{className:di.emptyIconFriends}),n("div",{className:di.emptyText},"No group dms in common")))}),renderDMPageList:k.wrap(({user:e,hasDivider:t,Divider:o,listStyle:r})=>{let i=Sm(e.id);return i.length===0?null:n(m,null,t&&o,n(c6,{listClassName:r,header:"Mutual Groups",isLoading:!1,items:VP(i,()=>{})}))})})});function rI(e){e==="@me"||e==="null"||e==null||(oI(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&&oI(e,{message_notifications:Ar.store.messages}),Ar.store.showAllChannels&&g6(e)&&f6(e))}var oI,f6,g6,Ar,nI,Tm,iI=f(()=>{"use strict";a();No();_();At();M();x();$();S();({updateGuildNotificationSettings:oI}=R("updateGuildNotificationSettings")),{toggleShowAllChannels:f6}=Ze(".onboardExistingMember(",{toggleShowAllChannels:e=>{let t=String(e);return t.length<100&&!t.includes("onboardExistingMember")&&!t.includes("getOptedInChannels")}}),g6=we(".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}}),nI=e=>(t,{guild:o})=>{if(!o)return;dt("privacy",t)?.push(n(E.MenuItem,{label:"Apply NewGuildSettings",id:"vc-newguildsettings-apply",icon:e?cl:void 0,action:()=>rI(o.id)}))};Tm=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":nI(!1),"guild-header-popout":nI(!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:rI})});var sI,wm,Mm,aI=f(()=>{"use strict";a();_();M();bs();Ne();x();$();S();sI=R("getRelationships","isBlocked");u1("NoBlockedMessages","ignoreBlockedMessages","ignoreMessages");wm=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}}),Mm=y({name:"NoBlockedMessages",description:"Hides all blocked/ignored messages from chat completely",authors:[p.rushii,p.Samu,p.jamesbt365],settings:wm,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:()=>wm.store.ignoreMessages,replacement:[{match:/(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,replace:(t,o,r)=>`if($self.shouldIgnoreMessage(${r}.message))return;`}]}))],shouldIgnoreMessage(e){try{return sI.isBlocked(e.author.id)?!0:wm.store.applyToIgnoredUsers&&sI.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=wm.store.applyToIgnoredUsers?dn.t[Ln("IGNORED_MESSAGE_COUNT")]():null;return t===o||t===r}catch(t){return console.error(t),!1}}})});var Pm,lI=f(()=>{"use strict";a();M();x();Pm=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 Im,cI=f(()=>{"use strict";a();M();x();Im=y({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Cm,uI=f(()=>{"use strict";a();M();x();Cm=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 pI,km,dI=f(()=>{"use strict";a();_();M();x();pI=P({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),km=y({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord image mosaic",tags:["image","mosaic","media"],settings:pI,patches:[{find:'=>"IMAGE"===',replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i))?;/,replace:(e,t)=>t!=null?`=>${t};`:"=>false;"}},{find:"renderAttachments(",predicate:()=>pI.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]})});var Nm,mI=f(()=>{"use strict";a();M();x();Nm=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 h6,uc,Am,fI=f(()=>{"use strict";a();_();M();x();$();h6=R("getMessageRequestsCount"),uc=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}}),Am=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:uc,patches:[{find:"getPendingCount(){",predicate:()=>uc.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>uc.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount();return",predicate:()=>uc.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>uc.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,300}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return h6.getMessageRequestChannelIds().size}})});var Rm,gI=f(()=>{"use strict";a();M();x();S();Rm=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 Dm,hI=f(()=>{"use strict";a();M();x();Dm=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 Lm,Em,yI=f(()=>{"use strict";a();_();M();x();Lm=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}}),Em=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:Lm,shouldMention(e,t){let o=Lm.store.userList.includes(e.author.id),r=Lm.store.shouldPingListed?o:!o;return Lm.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var R0,Om,vI=f(()=>{"use strict";a();_();M();x();R0=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"}]}}),Om=y({name:"NoServerEmojis",authors:[p.UlyssesZhan],description:"Do not show server emojis in the autocomplete menu.",settings:R0,patches:[{find:"}searchWithoutFetchingLatest(",replacement:{match:/searchWithoutFetchingLatest.{20,300}get\((\i).{10,40}?reduce\(\((\i),(\i)\)=>\{/,replace:"$& if ($self.shouldSkip($1, $3)) return $2;"}}],shouldSkip(e,t){return t.type!==1?!1:R0.store.shownEmojis==="onlyUnicode"?!0:R0.store.shownEmojis==="currentServer"?t.guildId!==e:!1}})});var _m,bI=f(()=>{"use strict";a();M();x();_m=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 Bm,SI=f(()=>{"use strict";a();M();x();Bm=y({name:"NoTypingAnimation",authors:[p.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Fm,xI=f(()=>{"use strict";a();M();x();Fm=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 Um,TI=f(()=>{"use strict";a();M();x();Um=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 y6,$m,wI=f(()=>{"use strict";a();_();M();x();y6=P({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),$m=y({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[p.philipbry],settings:y6,patches:[{find:"ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/g,replace:"$self.settings.store.notificationVolume/100*"}}]})});var Gm,MI=f(()=>{"use strict";a();M();x();Gm=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 pc,zm,PI=f(()=>{"use strict";a();_();M();x();S();pc=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}}),zm=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:pc,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&&pc.store.channelToAffect==="group_dm"||t===3&&pc.store.channelToAffect==="user_dm"||pc.store.allowMentions&&e.mentions.some(o=>o.id===D.getCurrentUser().id)||pc.store.allowEveryone&&e.mention_everyone?!0:Ni.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Hm,II=f(()=>{"use strict";a();M();x();Hm=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 L0,D0,v6,jm,CI=f(()=>{"use strict";a();_();M();x();S();L0={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"}},D0=P(Object.entries(L0).reduce((e,[t,o])=>(e[t]={type:3,description:o.description,default:!0},e),{})),v6=VencordNative.pluginHelpers.OpenInApp,jm=y({name:"OpenInApp",description:"Open links in their respective apps instead of your browser",authors:[p.Ven,p.surgedevs],settings:D0,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(L0))if(D0.store[r]&&(i.shortlinkMatch?.test(o)&&(t?.preventDefault(),o=await v6.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=L0[t];if(r?.accountViewReplace&&D0.store[t])return VencordNative.native.openExternal(r.accountViewReplace(o)),e.preventDefault(),!0}})});var E0,Wm,kI=f(()=>{"use strict";a();_();M();x();E0=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"}}),Wm=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:()=>E0.store.defaultLayout,getSortOrder:()=>E0.store.defaultSortOrder,settings:E0})});function AI(e){G.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function RI(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 NI,qm,DI=f(()=>{"use strict";a();_();M();x();S();NI=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:RI}}),qm=y({name:"PartyMode",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],reporterTestable:2,settings:NI,start(){AI(!0),RI(NI.store.superIntensePartyMode)},stop(){AI(!1)}})});function b6(e){let t=ce.getGuild(e);return t?!t.hasFeature("INVITES_DISABLED")&&Fe.getGuildPermissionProps(t).canManageRoles:!1}function S6(e){let o=[...ce.getGuild(e).features,"INVITES_DISABLED"];vt.patch({url:Pt.Endpoints.GUILD(e),body:{features:o}})}var Km,LI=f(()=>{"use strict";a();ne();M();Ie();x();S();Km=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,Pe("GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION"),b6(e)&&n("a",{role:"button",onClick:()=>{t(!0),S6(e)}}," Pause Indefinitely.")))})});var O0,Ym,EI=f(()=>{"use strict";a();_();M();jo();x();O0=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}}),Ym=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:()=>O0.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:()=>O0.store.onboarding}],settings:O0})});var OI=f(()=>{});function Jm({id:e},t){let o=ce.getRoles(e);return[...t.roles,e].map(r=>o[r]).sort((r,i)=>i.position-r.position)}function _I(e){switch(mi.store.permissionsSortOrder){case 0:return e.sort((t,o)=>o.position-t.position);case 1:return e.sort((t,o)=>t.position-o.position);default:return e}}function Qm(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 Zm,ft,dc=f(()=>{"use strict";a();He();$();S();fc();mc();({getGuildPermissionSpecMap:Zm}=R("getGuildPermissionSpecMap")),ft=ue("vc-permviewer-")});function _0(){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 B0(){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 FI(){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 UI=f(()=>{"use strict";a()});function w6(e){let t=T6(e,20);if(!t)return;let{customIconSrc:o,unicodeEmoji:r}=t;return o??r?.url}function M6({permissions:e,guild:t,modalProps:o,header:r}){let i=Re(()=>Zm(t),[t.id]);Se([De],()=>De.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&&!De.isMember(t.id,g.id)).map(({id:g})=>g);G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:d})},[]);let[s,l]=q(0),c=e[s],u=ce.getRoles(t.id);return n(ve,{...o,size:"large"},n(Ae,null,n(Q,{className:ft("modal-title"),variant:"heading-lg/semibold"},r," permissions:"),n(pt,{onClick:o.onClose})),n(Me,{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(jr,{className:ft("modal-list"),orientation:"auto"},e.map((d,g)=>{let h=D.getUser(d.id??""),v=u[d.id??""],C=v!=null?w6(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(P6,{guild:t,roleId:d.id,onClose:o.onClose})):d.type===1&&Et.openContextMenu(w,()=>n(I6,{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(Lh,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:ft("modal-divider")}),n(jr,{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?B0():_0():h&&(h&d)===d?B0():v&&(v&d)===d?_0():FI()})()),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(sl,{...g}))))))))}function P6({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:Pe("COPY_ID_ROLE"),action:()=>{Ht.copy(t)}}),mi.store.unsafeViewAsRole&&n(E.MenuItem,{id:ft("view-as-role"),label:Pe("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 I6({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:Pe("COPY_ID_USER"),action:()=>{Ht.copy(e)}}))}function ds(e,t,o){return he(r=>n(C6,{modalProps:r,permissions:e,guild:t,header:o}))}var T6,C6,mc=f(()=>{"use strict";a();ne();jt();At();Ie();Ke();$();S();fc();dc();UI();T6=we("convertSurrogateToName","customIconSrc","unicodeEmoji");C6=k.wrap(M6)});function $I({text:e,color:t,...o}){return n("div",{...o,className:z(gc.role)},n("div",{className:gc.roleRemoveButton},n("span",{className:z(N6.roleCircle,gc.roleCircle),style:{backgroundColor:t}})),n("div",{className:gc.roleName},n(Q,{className:gc.roleNameOverflow,variant:"text-xs/medium"},e)))}function A6({roleName:e,roleColor:t}){return n(m,null,n(Q,{variant:"text-sm/medium"},"Granted By"),n($I,{text:e,color:t}))}function R6({guild:e,guildMember:t,closePopout:o}){let{permissionsSortOrder:r}=mi.use(["permissionsSortOrder"]),i=Re(()=>Zm(e),[e.id]),[s,l]=Re(()=>{let c=[],u=Jm(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=Pe("GUILD_OWNER")??"Server Owner";c.push({permission:g,roleName:"Owner",roleColor:"var(--primary-300)",rolePosition:1/0})}_I(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:()=>{mi.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(),ds(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(k6.root)},l.map(({permission:c,roleColor:u,roleName:d})=>n(oe,{key:c,text:n(A6,{roleName:d,roleColor:u}),tooltipClassName:ft("granted-by-container"),tooltipContentClassName:ft("granted-by-content")},g=>n($I,{...g,text:c,color:u})))))}var k6,gc,N6,GI,zI=f(()=>{"use strict";a();ne();Ie();me();$();S();fc();dc();mc();({RoleRootClasses:k6,RoleClasses:gc,RoleBorderClasses:N6}=Eo(()=>{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}}));GI=k.wrap(R6,{noop:!0})});function F0(e,t,o){return o===0&&!De.isMember(e,t)?null:n(E.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=ce.getGuild(e),{permissions:i,header:s}=Is(o).returnType().with(0,()=>{let l=De.getMember(e,t),c=Jm(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:Qm(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}));ds(i,r,s)}})}function Vm(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=Is(t).with(0,()=>F0(r.guildId,r.user.id,t)).with(1,()=>F0(r.guild.id,r.channel.id,t)).with(2,()=>F0(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 D6,Xm,mi,ef,fc=f(()=>{"use strict";a();OI();No();_();ne();At();M();me();x();$();S();mc();zI();dc();D6=R("container","scroller","list"),Xm=R("button","buttonInner","icon","banner"),mi=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}]}});ef=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:mi,patches:[{find:"#{intl::VIEW_ALL_ROLES}",replacement:{match:/\.expandButton,.+?null,/,replace:"$&$self.ViewPermissionsButton(arguments[0]),"}}],ViewPermissionsButton:k.wrap(({guild:e,guildMember:t})=>n(ws,{position:"bottom",align:"center",renderPopout:({closePopout:o})=>n(ih,{className:D6.container,style:{width:"500px"}},n(GI,{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(Xm.buttonInner,Xm.icon),className:z(Xm.button,Xm.icon,"vc-permviewer-role-button")},n(Bh,{height:"16",width:"16"})))),{noop:!0}),contextMenus:{"user-context":Vm("roles",0),"channel-context":Vm(["mute-channel","unmute-channel"],1),"guild-context":Vm("privacy",2),"guild-header-popout":Vm("privacy",2)}})});function HI(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 B6(e,t,o){for(let r of e)switch(r.name){case"image":let i=_6.getUpload(t.channel.id,r.name,no.SlashCommand);if(i){if(!i.isImage)throw Di.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),Di.clearAll(t.channel.id,no.SlashCommand),"Failed to fetch user. Check the console for more info."}}return Di.clearAll(t.channel.id,no.SlashCommand),null}var ca,L6,E6,tf,O6,_6,of,jI=f(()=>{"use strict";a();sn();M();So();x();$();S();ca=jc(t0()),L6=20,E6=128,tf=10,O6=tn(()=>Promise.all(Array.from({length:tf},(e,t)=>HI(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),_6=R("getUploads");of=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 O6(),r=qt(e,"no-server-pfp",!1);try{var i=await B6(e,t,r);if(!i)throw"No Image specified!"}catch(v){Di.clearAll(t.channel.id,no.SlashCommand),mt(t.channel.id,{content:String(v)});return}let s=await HI(i),l=qt(e,"delay",L6),c=qt(e,"resolution",E6),u=(0,ca.GIFEncoder)(),d=document.createElement("canvas");d.width=d.height=c;let g=d.getContext("2d");Di.clearAll(t.channel.id,no.SlashCommand);for(let v=0;v<tf;v++){g.clearRect(0,0,d.width,d.height);let C=v<tf/2?v:tf-v,w=.8+C*.02,T=.8-C*.05,N=(1-w)*.5+.1,A=1-T-.08;g.drawImage(s,N*c,A*c,w*c,T*c),g.drawImage(o[v],0,0,c,c);let{data:L}=g.getImageData(0,0,c,c),U=(0,ca.quantize)(L,256),H=(0,ca.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(()=>Ka.promptToUpload([h],t.channel,no.ChannelMessage),10)}}]})});var WI=f(()=>{});var qI,nf,KI=f(()=>{"use strict";a();WI();_();ne();M();x();S();qI=P({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),nf=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Lumap],settings:qI,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=qI.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 YI=f(()=>{});async function U0(){await G6();let e=D.getCurrentUser()?.id;e!=null&&(Ut=ro.store.userBasedCategoryList[e]??=[],JI?.())}function QI(){JI=rr(),ro.use(["pinOrder","canCollapseDmSection","dmSectionCollapsed","userBasedCategoryList"])}function XI(e){return Ut.find(t=>t.id===e)}function yc(e){return Ut[e]}function VI(e){Ut.push(e)}function e4(e,t){let o=Ut.find(r=>r.id===t);o!=null&&(o.channels.includes(e)||o.channels.push(e))}function t4(e){let t=Ut.find(o=>o.channels.includes(e));t!=null&&(t.channels=t.channels.filter(o=>o!==e))}function o4(e){let t=Ut.findIndex(o=>o.id===e);t!==-1&&Ut.splice(t,1)}function n4(e,t=!0){let o=Ut.find(r=>r.id===e);o!=null&&(o.collapsed=t)}function vc(e){return Ut.some(t=>t.channels.includes(e))}function rf(){return Ut.length}function r4(){if(ro.store.pinOrder===0){let e=H0.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 i4(){return Ut.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}function l4(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}function G0(e,t){let o=Ut.findIndex(i=>i.id===e),r=o+t;l4(Ut,o,r)}function z0(e,t){let o=Ut.find(s=>s.channels.includes(e));if(o==null)return;let r=o.channels.indexOf(e),i=r+t;l4(o.channels,r,i)}async function G6(){Z.plugins.PinDMs.dmSectioncollapsed!=null&&(ro.store.dmSectionCollapsed=Z.plugins.PinDMs.dmSectioncollapsed,delete Z.plugins.PinDMs.dmSectioncollapsed);let t=(await Ih()).map(o=>String(o)).filter(o=>o.startsWith(ZI));if(t.length!==0){for(let o of t){let r=await co(o);if(r==null)continue;let i=o.replace(ZI,"");ro.store.userBasedCategoryList[i]=r,await Yr(o)}await Promise.all([Yr(F6),Yr(U6),Yr($6)])}}var ZI,F6,U6,$6,JI,Ut,s4,hc,a4,$0,sf=f(()=>{"use strict";a();_n();_();wt();S();af();ZI="PinDMsCategories-",F6="PinDMsMigratedPinDMs",U6="PinDMsMigratedOldCategories",$6="BetterPinDMsCategories-",Ut=[];s4=(e,t,o)=>{let r=e[t],i=e[t+o];return r&&i},hc=(e,t)=>{let o=Ut.findIndex(r=>r.id===e);return s4(Ut,o,t)},a4=e=>hc(e,-1)||hc(e,1),$0=(e,t)=>{let o=Ut.find(i=>i.channels.includes(e));if(o==null)return!1;let r=o.channels.indexOf(e);return s4(o.channels,r,t)}});var c4,j0=f(()=>{"use strict";a();c4=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306]});function q6(e,t){return Re(()=>{if(e)return XI(e);if(t)return{id:ee.genId(),name:`Pin Category ${rf()+1}`,color:10070709,collapsed:!1,channels:[t]}},[e,t])}function K6({categoryId:e,modalProps:t,initialChannelId:o}){let r=q6(e,o);if(!r)return null;let[i,s]=q(r.name),[l,c]=q(r.color),u=d=>{d.preventDefault(),r.name=i,r.color=l,e||VI(r),t.onClose()};return n(ve,{...t},n(Ae,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),n("form",{onSubmit:u},n(Me,{className:W6("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(j6,{key:r.id,defaultColor:10070709,colors:c4,onChange:d=>c(d),value:l,renderDefaultButton:()=>null,renderCustomButton:()=>n(H6,{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 H6,j6,W0,W6,lf,q0=f(()=>{"use strict";a();He();Ke();$();S();j0();sf();H6=se("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}",".BACKGROUND_PRIMARY)"),j6=se('id:"color-picker"'),W0=Xn(['name:"UserSettings"'],/createPromise:.{0,20}(\i\.\i\("?.+?"?\).*?).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/),W6=ue("vc-pindms-modal-");lf=(e,t)=>nl(async()=>(await W0(),o=>n(K6,{categoryId:e,modalProps:o,initialChannelId:t})))});function p4(e){let t=vc(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:()=>lf(null,e)}),n(E.MenuSeparator,null),Ut.map(o=>n(E.MenuItem,{key:o.id,id:`pin-category-${o.id}`,label:o.name,action:()=>e4(e,o.id)}))),t&&n(m,null,n(E.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>t4(e)}),ro.store.pinOrder===1&&$0(e,-1)&&n(E.MenuItem,{id:"move-up",label:"Move Up",action:()=>z0(e,-1)}),ro.store.pinOrder===1&&$0(e,1)&&n(E.MenuItem,{id:"move-down",label:"Move Down",action:()=>z0(e,1)})))}var Y6,Z6,d4,m4=f(()=>{"use strict";a();No();S();sf();af();q0();Y6=(e,t)=>{dt("leave-channel",e)?.unshift(p4(t.channel.id))},Z6=(e,t)=>{let o=dt("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,p4(t.channel.id))}},d4={"gdm-context":Y6,"user-context":Z6}});var f4,H0,Q6,ro,cf,af=f(()=>{"use strict";a();YI();_();ne();M();me();x();$();S();m4();q0();j0();sf();f4=R("privateChannelsHeaderContainer"),H0=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:{}}}),cf=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:d4,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:U0,flux:{CONNECTION_OPEN:U0},usePinnedDms:QI,isPinned:vc,categoryLen:rf,getSections:i4,getAllUncollapsedChannels:r4,requireSettingsMenu:W0,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=yc(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=yc(e-1);return o?o.collapsed&&this.instance.props.selectedChannelId!==this.getCategoryChannels(o)[t]:!1},getScrollOffset(e,t,o,r,i){return vc(e)?t*(this.getAllUncollapsedChannels().indexOf(e)+r)+o:(t+o)*2+t*this.getAllUncollapsedChannels().length+i},renderCategory:k.wrap(({section:e})=>{let t=yc(e-1);return t?n(er,{onClick:()=>n4(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:()=>lf(t.id,null)}),a4(t.id)&&n(m,null,hc(t.id,-1)&&n(E.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>G0(t.id,-1)}),hc(t.id,1)&&n(E.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>G0(t.id,1)})),n(E.MenuSeparator,null),n(E.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>o4(t.id)})))}},n("h2",{className:z(f4.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`}},n("span",{className:f4.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=yc(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?H0.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}})});var uf,g4=f(()=>{"use strict";a();M();x();uf=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 h4=f(()=>{});function pf(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 x4(e){if(e.id===D.getCurrentUser().id){let t=X6.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 e7({userId:e}){let t=D.getUser(e);if(!t||t.bot)return[];x4(t);let o=cn.getState()?.clientStatuses?.[t.id];return o?Object.entries(o).map(([r,i])=>({component:()=>n("span",{className:"vc-platform-indicator"},n(S4,{key:r,platform:r,status:i,small:!1})),key:`vc-platform-indicator-${r}`})):[]}var X6,y4,V6,S4,v4,b4,K0,df,T4=f(()=>{"use strict";a();h4();ql();El();Bl();_();ne();M();x();$();S();X6=be("SessionsStore");y4={desktop:pf("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:pf("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:pf("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:pf("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:V6}=Ze(".concat(.5625*",{useStatusFillColor:B.byCode(".hex")}),S4=({platform:e,status:t,small:o})=>{let r=e==="embedded"?"Console":e[0].toUpperCase()+e.slice(1),i=y4[e]??y4.desktop;return n(i,{color:V6(t),tooltip:r,small:o})};v4=({user:e,small:t=!1})=>{if(!e||e.bot)return null;x4(e);let o=cn.getState()?.clientStatuses?.[e.id];if(!o)return null;let r=Object.entries(o).map(([i,s])=>n(S4,{key:i,platform:i,status:s,small:t}));return r.length?n("span",{className:"vc-platform-indicator",style:{gap:"2px"}},r):null},b4={getBadges:e7,position:0},K0={list:{description:"In the member list",onEnable:()=>Zi("platform-indicator",e=>n(k,{noop:!0},n(v4,{user:e.user,small:!0}))),onDisable:()=>Ji("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>jl(b4),onDisable:()=>Wl(b4)},messages:{description:"Inside messages",onEnable:()=>Qi("platform-indicator",e=>n(k,{noop:!0},n(v4,{user:e.message?.author}))),onDisable:()=>Xi("platform-indicator")}},df=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=Z.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(K0).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(K0).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>Z.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:()=>Z.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:()=>Z.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(K0).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 M4,w4,t7,o7,n7,mf,P4=f(()=>{"use strict";a();xr();sn();M();x();$();S();M4=R("getUploads"),w4=e=>Wa.getDraft(e,no.ChannelMessage),t7=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),o7=async e=>await Promise.all(M4.getUploads(e,no.ChannelMessage).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:Pl(),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 t7(l);if(!u)return c;c.width=u.width,c.height=u.height}return c})),n7=({isMainChat:e,isEmpty:t,type:{attachments:o}})=>{let r=Ee.getChannelId(),i=Se([Wa],()=>w4(r));if(!e)return null;let s=o&&M4.getUploads(r,no.ChannelMessage).length>0;return!(!t&&i?.length>0)&&!s?null:n(en,{tooltip:"Preview Message",onClick:async()=>mt(r,{content:w4(r),author:D.getCurrentUser(),attachments:s?await o7(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"})))},mf=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[p.Aria],startAt:"Init",renderChatBarButton:n7})});var ff,I4=f(()=>{"use strict";a();M();Ie();x();S();ff=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&&!Fe.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 A4(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function s7({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);hf=A4(i,t)}function a7({message:e,_isQuickReply:t}){t||(gf=A4(Jt.getMessages(e.channel_id)._array,e.id))}function C4(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!l7(e)||c7(e)||(e.preventDefault(),e.shiftKey?d7(t):p7(t))}function R4(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)&&r7.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function D4(e,t){let o=Jt.getMessages(Ee.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=>!i7.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?gf=s=i(gf):hf=s=i(hf),s===-1?void 0:o[o.length-s-1]}function u7(e){let{enabled:t,userList:o,shouldPingListed:r}=Z.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(N4.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function p7(e){let t=ie.getChannel(Ee.getChannelId());if(t.guild_id&&!Fe.can(ke.SEND_MESSAGES,t))return;let o=D4(e,!0);if(!o)return void G.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ee.getChannelId()});let r=ie.getChannel(o.channel_id),i=D.getCurrentUser().id;G.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:u7(o),showMentionToggle:!r.isPrivate()&&o.author.id!==i,_isQuickReply:!0}),On.dispatchToLastSubscribed("TEXTAREA_FOCUS"),R4(r.id,o.id)}function d7(e){let t=ie.getChannel(Ee.getChannelId());if(t.guild_id&&!Fe.can(ke.SEND_MESSAGES,t))return;let o=D4(e,!1);if(!o)return G.dispatch({type:"MESSAGE_END_EDIT",channelId:Ee.getChannelId()});G.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),R4(o.channel_id,o.id)}var r7,i7,k4,gf,hf,N4,yf,l7,c7,L4=f(()=>{"use strict";a();_();M();x();$();S();r7=R("jumpToMessage"),i7=R("getRelationships","isBlocked"),k4=navigator.platform.includes("Mac"),gf=-1,hf=-1,N4=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}]}}),yf=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:N4,start(){document.addEventListener("keydown",C4)},stop(){document.removeEventListener("keydown",C4)},flux:{DELETE_PENDING_REPLY(){gf=-1},MESSAGE_END_EDIT(){hf=-1},MESSAGE_START_EDIT:s7,CREATE_PENDING_REPLY:a7}});l7=e=>k4?e.metaKey:e.ctrlKey,c7=e=>e.altKey||!k4&&e.metaKey});var Y0,vf,E4=f(()=>{"use strict";a();M();x();S();vf=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${j.version}/scripts/error-codes/codes.json`;Y0=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
|
|
`,t))},stop(){Y0=void 0},decodeError(e,...t){let o=0;return Y0?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var O4=f(()=>{});var J0={};lt(J0,{ServerListRenderPosition:()=>bf,addServerListElement:()=>bc,removeServerListElement:()=>Sc,renderAll:()=>g7});function Z0(e){return e===0?m7:f7}function bc(e,t){Z0(e).add(t)}function Sc(e,t){Z0(e).delete(t)}var bf,m7,f7,g7,Sf=f(()=>{"use strict";a();ne();bf=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(bf||{}),m7=new Set,f7=new Set;g7=e=>Array.from(Z0(e),(t,o)=>n(k,{noop:!0,key:o},n(t,null)))});function y7(){let e=[];Object.values(ce.getGuilds()).forEach(t=>{tr.getChannels(t.id).SELECTABLE.concat(tr.getChannels(t.id).VOCAL).concat(Object.values(h7.getActiveJoinedThreadsForGuild(t.id)).flatMap(o=>Object.values(o))).forEach(o=>{Ni.hasUnread(o.channel.id)&&e.push({channelId:o.channel.id,messageId:Ni.lastMessageId(o.channel.id),readStateType:0})})}),G.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var h7,v7,xf,_4=f(()=>{"use strict";a();O4();Sf();ne();M();x();$();S();h7=be("ActiveJoinedThreadsStore");v7=()=>n(I,{onClick:y7,size:I.Sizes.MIN,look:I.Looks.BLANK,color:I.Colors.CUSTOM,className:"vc-ranb-button"},"Read All"),xf=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:k.wrap(v7,{noop:!0}),start(){bc(0,this.renderReadAllButton)},stop(){Sc(0,this.renderReadAllButton)}})});var Go,Tf=f(()=>{"use strict";a();_();x();Go=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 Q0=f(()=>{"use strict";a()});async function x7(){It.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function V0(){if(await x7(),D.getCurrentUser()==null)return;let[e,t,o]=await It.getMany([B4(),F4(),U4()]);if(await Promise.all([wf(),Mf(),xc()]),Go.store.offlineRemovals){if(Go.store.groups&&t?.size)for(let[r,i]of t)pa.has(r)||Rr(`You are no longer in the group ${i.name}.`,i.iconURL);if(Go.store.servers&&e?.size)for(let[r,i]of e)!ua.has(r)&&!X0.isUnavailable(r)&&Rr(`You are no longer in the server ${i.name}.`,i.iconURL);if(Go.store.friends&&o?.friends.length)for(let r of o.friends){if(ms.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),()=>Jo(i.id))}if(Go.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(ms.requests.includes(r)||[1,2,4].includes(Ue.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),()=>Jo(i.id))}}}function Rr(e,t,o){Go.store.notices&&Ir.showNotice(e,"OK",()=>Ir.popNotice()),Ye({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function $4(e){return ua.get(e)}function ev(e){ua.delete(e),wf()}async function wf(){ua.clear();let e=D.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(ce.getGuilds()))De.isMember(t,e)&&ua.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await It.set(B4(),ua)}function G4(e){return pa.get(e)}function tv(e){pa.delete(e),Mf()}async function Mf(){pa.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of ie.getSortedPrivateChannels())e===3&&pa.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(F4(),pa)}async function xc(){ms.friends=[],ms.requests=[];let e=Ue.getRelationships();for(let t in e)switch(e[t]){case 1:ms.friends.push(t);break;case 3:ms.requests.push(t);break}await It.set(U4(),ms)}var X0,ua,pa,ms,B4,F4,U4,ov=f(()=>{"use strict";a();Mr();pr();Ie();$();S();Tf();Q0();X0=be("GuildAvailabilityStore"),ua=new Map,pa=new Map,ms={friends:[],requests:[]},B4=()=>`relationship-notifier-guilds-${D.getCurrentUser().id}`,F4=()=>`relationship-notifier-groups-${D.getCurrentUser().id}`,U4=()=>`relationship-notifier-friends-${D.getCurrentUser().id}`});async function W4({relationship:{type:e,id:t}}){if(nv===t){nv=void 0;return}let o=await go.getUser(t).catch(()=>null);if(o)switch(e){case 1:Go.store.friends&&Rr(`${cr(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Jo(o.id));break;case 3:Go.store.friendRequestCancels&&Rr(`A friend request from ${cr(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Jo(o.id));break}}function q4({guild:{id:e,unavailable:t}}){if(!Go.store.servers||t||X0.isUnavailable(e))return;if(rv===e){ev(e),rv=void 0;return}let o=$4(e);o&&(ev(e),Rr(`You were removed from the server ${o.name}.`,o.iconURL))}function K4({channel:{id:e,type:t}}){if(!Go.store.groups||t!==3)return;if(iv===e){tv(e),iv=void 0;return}let o=G4(e);o&&(tv(e),Rr(`You were removed from the group ${o.name}.`,o.iconURL))}var nv,rv,iv,z4,H4,j4,Y4=f(()=>{"use strict";a();Ie();S();Tf();Q0();ov();z4=e=>nv=e,H4=e=>rv=e,j4=e=>iv=e});var Pf,Z4=f(()=>{"use strict";a();M();x();Y4();Tf();ov();Pf=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:Go,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:wf,GUILD_DELETE:q4,CHANNEL_CREATE:Mf,CHANNEL_DELETE:K4,RELATIONSHIP_ADD:xc,RELATIONSHIP_UPDATE:xc,RELATIONSHIP_REMOVE(e){W4(e),xc()},CONNECTION_OPEN:V0},async start(){setTimeout(()=>{V0()},5e3)},removeFriend:z4,removeGroup:j4,removeGuild:H4})});function w7(e,t){open(t+encodeURIComponent(e.trim()),"_blank")}function M7(e){let t={};return Tc.store.customEngineName&&Tc.store.customEngineURL&&(t[Tc.store.customEngineName]=Tc.store.customEngineURL),t={...t,...T7},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(Ms,{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:()=>w7(e,t[o])})}))}var T7,Tc,P7,If,J4=f(()=>{"use strict";a();No();_();M();x();S();T7={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="},Tc=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="}});P7=(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]=M7(o))}},If=y({name:"ReplaceGoogleSearch",description:"Replaces the Google search with different Engines",authors:[p.Moxxie,p.Ethan],settings:Tc,contextMenus:{message:P7}})});var Q4=f(()=>{});function X4(e){return n("i",{className:I7.separator,"aria-hidden":!0,...e})}function C7({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:qr.isSameDay(o,r),timestamp:o,isInline:!1},n(X4,null,"["),qr.isSameDay(o,r)?qr.dateFormat(o,"LT"):qr.calendarFormat(o),n(X4,null,"]"))}var I7,Cf,V4=f(()=>{"use strict";a();Q4();ne();M();x();$();S();I7=R("separator","latin24CompactTimeStamp");Cf=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(C7,{noop:!0})})});var k7,N7,kf,eC=f(()=>{"use strict";a();M();x();$();k7=R("spoilerContent"),N7=R("messagesWrapper","navigationDescription"),kf=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}=k7,{messagesWrapper:l}=N7,c=o?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function tC(e,t){open(t+encodeURIComponent(e),"_blank")}function oC(e){return n(E.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Nf).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",Nf[t]).toString().replace("lens.","")}),t),action:()=>tC(e,Nf[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(Nf).forEach(t=>tC(e,t))}))}var Nf,A7,R7,Af,nC=f(()=>{"use strict";a();No();jt();At();M();x();S();Nf={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="};A7=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;dt("copy-link",e)?.push(oC(o))},R7=(e,t)=>{if(!t?.src)return;(dt("copy-native-link",e)??e).push(oC(t.src))},Af=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:A7,"image-context":R7}})});var rC=f(()=>{});async function sv(){_t=await sC()??{}}async function sC(){return(await It.get(iC))?.[D.getCurrentUser()?.id]}async function Dr(){return(await sC())?.token}async function wc(e){return It.update(iC,t=>(t??={},_t=t[D.getCurrentUser().id]??={},e.token&&(_t.token=e.token),e.user&&(_t.user=e.user),t))}function da(e){he(t=>n(Ii,{...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();wc({token:s}),Je("Successfully logged in!",ee.Type.SUCCESS),e?.()}catch(r){new V("ReviewDB").error("Failed to authorize",r)}}}))}var iC,_t,Lr=f(()=>{"use strict";a();Mr();Ne();Ke();S();iC="rdb-auth",_t={}});var ma=f(()=>{"use strict";a()});function aC(e,t){let o=D.getCurrentUser().id;return o===e||t.sender.discordID===o||_t.user?.type===1}function lC(e,t){let o=D.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function cC(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();ma();Rt=ue("vc-rdb-")});function D7(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 L7({user:e,isBusy:t,setIsBusy:o}){let[r,i]=q(!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(D7,{onClick:t?void 0:async()=>{o(!0);try{await Df(e.discordID),i(!0)}finally{o(!1)}}}))}function E7(){let[e,t]=q(!1),[o,r,i]=bt(uC,{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(L7,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):n(b.FormText,null,"No blocked users.")}function Rf(){he(e=>n(ve,{...e},n(Ae,{className:Rt("block-modal-header")},n(b.FormTitle,{style:{margin:0}},"Blocked Users"),n(pt,{onClick:e.onClose})),n(Me,{className:Rt("block-modal")},_t.token?n(E7,null):n(b.FormText,null,"You are not logged into ReviewDB!"))))}var av=f(()=>{"use strict";a();Ne();Ke();wt();S();Lr();fa();Er()});var Or,Mc=f(()=>{"use strict";a();_();x();S();Lr();av();Er();Or=P({authorize:{type:6,component:()=>n(I,{onClick:()=>da()},"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:Rf},"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 fs(e,t={}){return fetch(pC+e,{...t,headers:{...t.headers,Authorization:await Dr()||""}})}async function dC(e,t=0){let o=0;Or.store.showWarning||(o|=O7);let r=new URLSearchParams({flags:String(o),offset:String(t)}),i=await fetch(`${pC}/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 mC(e){return await Dr()?await fs(`/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."),da(),null)}async function fC(e){return await fs(`/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 gC(e){let t=await fs("/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 hC(e,t){if(!(await fs("/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);wc({user:{..._t.user,blockedUsers:r}})}}async function uC(){let e=await fs("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function vC(e){return fs("/users",{method:"POST"}).then(t=>t.json())}async function bC(e){return fs(`/notifications?id=${e}`,{method:"PATCH"})}var pC,Lf,O7,yC,Df,fa=f(()=>{"use strict";a();S();Lr();ma();Mc();Er();pC="https://manti.vendicated.dev/api/reviewdb",Lf=50,O7=2;yC=e=>hC("block",e),Df=e=>hC("unblock",e)});function SC({onClick:e}){return n(oe,{text:"Delete Review"},t=>n("div",{...t,className:z(Ef.button,Ef.dangerous),onClick:e,role:"button"},n(zi,{width:"20",height:"20"})))}function xC({onClick:e}){return n(oe,{text:"Report Review"},t=>n("div",{...t,className:Ef.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 TC({onClick:e,isBlocked:t}){return n(oe,{text:`${t?"Unblock":"Block"} user`},o=>n("div",{...o,className:Ef.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 Ef,wC=f(()=>{"use strict";a();At();me();$();S();Ef=R("button","wrapper","disabled","separator")});function Of(e){let t=e.redirectURL?za: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 MC=f(()=>{"use strict";a();S();Er()});var _f,cv=f(()=>{"use strict";a();Ie();me();wt();$();S();Lr();ma();fa();Mc();Er();av();wC();MC();_f=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")),T=new Intl.DateTimeFormat;return function({review:A,refetch:L,profileId:U}){let[H,X]=q(!1);function re(){Jo(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())fC(A.id).then(fe=>{fe&&L()});else return vo("You must be logged in to delete reviews.")}})}function K(){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())gC(A.id);else return vo("You must be logged in to report reviews.")}})}let Y=_t?.user?.blockedUsers?.includes(A.sender.discordID)??!1;function ae(){if(Y)return Df(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())yC(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"))),Y&&n(Of,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>Rf()}),A.sender.badges.map((fe,xe)=>n(Of,{key:xe,...fe})),!Or.store.hideTimestamps&&A.type!==3&&n(lo,{timestamp:new Date(A.timestamp*1e3)},T.format(A.timestamp*1e3)),n("div",{className:Rt("review-comment")},A.comment.length>200&&!H?n(m,null,Oe.parseGuildEventDescription(A.comment.substring(0,200)),"...",n("br",null),n("a",{onClick:()=>X(!0)},"Read more"),"]"):Oe.parseGuildEventDescription(A.comment)),A.id!==0&&n("div",{className:z(l,c,o),style:{padding:"0px"}},n("div",{className:z(C.wrapper,i)},cC(A)&&n(xC,{onClick:K}),lC(U,A)&&n(TC,{isBlocked:Y,onClick:ae}),aC(U,A)&&n(SC,{onClick:te}))))}})});function uv({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]=bt(()=>dC(e,(s-1)*Lf),{fallbackValue:null,deps:[r,d,s],onSuccess:v=>{Or.store.hideBlockedUsers&&(v.reviews=v.reviews?.filter(C=>!Ue.isBlocked(C.sender.discordID))),i?.(),o(v)}});return h?n(m,null,n($7,{refetch:g,reviews:h.reviews,hideOwnReview:c,profileId:e,type:u}),l&&n(pv,{name:t,discordId:e,refetch:g,isAuthor:h.reviews?.some(v=>v.sender.discordID===D.getCurrentUser().id)})):null}function $7({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(_f,{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 pv({discordId:e,isAuthor:t,refetch:o,name:r,modalKey:i}){let{token:s}=_t,l=Mt(null),c=B7.FORM;c.disableAutoFocus=!0;let u=U7({id:"0",type:1});return n(m,null,n("div",{onClick:()=>{s||(vo("Opening authorization window..."),da())}},n(F7,{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 mC({userid:e,comment:d.value})){o();let h=l.current.ref.current.getSlateEditor();_7.delete(h,{at:{anchor:PC.start(h,[]),focus:PC.end(h,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}var _7,PC,B7,F7,U7,IC=f(()=>{"use strict";a();wt();$();S();Lr();ma();fa();Mc();Er();cv();_7=R("insertNodes","textToText"),PC=R("start","end","toSlateRange"),B7=R("FORM"),F7=se("disableThemedBackground","CHANNEL_TEXT_AREA"),U7=we(".GUILD_TEXT])","fromServer)")});function G7({modalProps:e,modalKey:t,discordId:o,name:r,type:i}){let[s,l]=q(),[c,u]=rr(!0),[d,g]=q(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(Ae,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(Me,{scrollerRef:h},n("div",{className:Rt("modal-reviews")},n(uv,{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(_f,{refetch:u,review:C,profileId:o}),n(pv,{isAuthor:C!=null,discordId:o,name:r,refetch:u,modalKey:t}),!!v&&n(sh,{currentPage:d,maxVisiblePages:5,pageSize:Lf,totalCount:v,onPageChange:g})))))}function Bf(e,t,o){let r="vc-rdb-modal-"+Date.now();he(i=>n(G7,{modalKey:r,modalProps:i,discordId:e,name:t,type:o}),{modalKey:r})}var CC=f(()=>{"use strict";a();ne();Ke();wt();S();Lr();fa();Er();cv();IC()});var gs,kC,dv,Ff,NC=f(()=>{"use strict";a();rC();ne();At();M();me();x();$();S();Lr();CC();ma();fa();Mc();Er();gs=R("button","buttonInner","icon","banner"),kC=(e,{guild:t})=>{t&&e.push(n(E.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:ur,action:()=>Bf(t.id,t.name,1)}))},dv=(e,{user:t})=>{t&&e.push(n(E.MenuItem,{label:"View Reviews",id:"vc-rdb-user-reviews",icon:ur,action:()=>Bf(t.id,t.username,0)}))},Ff=y({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[p.mantikafasi,p.Ven],settings:Or,contextMenus:{"guild-header-popout":kC,"guild-context":kC,"user-context":dv,"user-profile-actions":dv,"user-profile-overflow-menu":dv},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:sv},async start(){let e=Or.store,{lastReviewId:t,notifyReviews:o}=e;await sv(),setTimeout(async()=>{if(!_t.token)return;let r=await vC(_t.token);if(wc({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:Oe.parse(r.notification.content,!1),...i}),bC(r.notification.id)}},4e3)},BiteSizeReviewsButton:k.wrap(({user:e})=>n(Vn,{text:"View Reviews"},n(I,{onClick:()=>Bf(e.id,e.username,0),look:I.Looks.FILLED,size:I.Sizes.NONE,color:gs.bannerColor,className:z(gs.button,gs.icon,gs.banner),innerClassName:z(gs.buttonInner,gs.icon,gs.banner)},n(Fh,{height:16,width:16}))),{noop:!0})})});var z7,Wn,Uf,AC=f(()=>{"use strict";a();_();ne();vr();M();Ne();x();$();S();z7=we('"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}}),Uf=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(?=,onClick)(?<=user:(\i),channel:(\i).+?)/,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:De.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=z7(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 RC,$f,DC=f(()=>{"use strict";a();_();M();x();RC=P({onlySnow:{type:3,description:"Only play the Snow Halation Theme",default:!1,restartNeeded:!0}}),$f=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:RC,patches:[{find:'"call_ringing_beat"',replacement:[{match:/500!==\i\(\)\.random\(1,1e3\)/,replace:"false"},{predicate:()=>RC.store.onlySnow,match:/"call_ringing_beat",/,replace:""}]}]})});var H7,j7,LC,Gf,EC=f(()=>{"use strict";a();Mr();_();M();x();$();S();H7=R("allSummaries","findSummary"),j7=we(".people)),startId:",".type}"),LC=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}}),Gf=y({name:"Summaries",description:"Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",authors:[p.mantikafasi],settings:LC,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=>({...j7(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*LC.store.summaryExpiryThresholdDays&&e[t].splice(o,1);e[t].length===0&&delete e[t]}return Object.assign(H7.allSummaries(),e),e})},shouldFetch(e){let t=ie.getChannel(e);return ce.getGuild(t.guild_id).hasFeature("SUMMARIES_ENABLED_GA")}})});var OC=f(()=>{});function BC(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 q7({rootProps:e,close:t}){let[o,r]=q(),[i,s]=q(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),c=(g,h)=>`<t:${g}${h&&`:${h}`}>`,[u,d]=Re(()=>{let g=c(l,i);return[g,Oe.parse(g)]},[l,i]);return n(ve,{...e},n(Ae,{className:fi("modal-header")},n(b.FormTitle,{tag:"h2",className:fi("modal-title")},"Timestamp Picker"),n(pt,{onClick:t,className:fi("modal-close-button")})),n(Me,{className:fi("modal-content")},n("input",{className:fi("date-picker"),type:"datetime-local",value:o,onChange:g=>r(g.currentTarget.value),style:{colorScheme:Es()===2?"light":"dark"}}),n(b.FormTitle,null,"Timestamp Format"),n("div",{className:fi("format-select")},n(rn,{options:W7.map(g=>({label:g,value:g})),isSelected:g=>g===i,select:g=>s(g),serialize:g=>g,renderOptionLabel:g=>n("div",{className:fi("format-label")},Oe.parse(c(l,g.value))),renderOptionValue:()=>d})),n(b.FormTitle,{className:F.bottom8},"Preview"),n(b.FormText,{className:fi("preview-text")},d," (",u,")")),n(ut,null,n(I,{onClick:()=>{lr(u+" "),t()}},"Insert")))}var _C,W7,fi,K7,zf,FC=f(()=>{"use strict";a();OC();xr();_();He();M();Ie();ze();Ke();x();S();_C=P({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});W7=["","t","T","d","D","f","F","R"],fi=ue("vc-st-");K7=({isMainChat:e})=>e?n(en,{tooltip:"Insert Timestamp",onClick:()=>{let t=he(o=>n(q7,{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,zf=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:_C,renderChatBarButton:K7,onBeforeMessageSend(e,t){_C.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,BC))},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)," ","->"," ",Oe.parse(BC(t)))))))}})});var UC=f(()=>{});function zC(e){he(t=>n(ve,{...t,size:"medium"},n(Z7,{guild:e})))}function GC(e){return n(lo,{timestamp:new Date(e)})}function Z7({guild:e}){let[t,o]=q(),[r,i]=q(),[s,l]=q();le(()=>{Pc.friends=!1,Pc.blocked=!1,Pc.ignored=!1},[]);let[c,u]=q(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:()=>Zo({url:d,width:1024})}),n("div",{className:po("header")},g?n("img",{className:po("icon"),src:g,alt:"",onClick:()=>Zo({url:g,height:512,width:512})}):n("div",{"aria-hidden":!0,className:z($C.childWrapper,$C.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(X7,{guild:e,setCount:o}),c===2&&n(V7,{guild:e,setCount:i}),c===3&&n(eE,{guild:e,setCount:l})))}function J7(e,t){let o=De.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:()=>Zo({url:r,height:512,width:512})}),Oe.parse(`<@${t.id}>`))}function Q7({guild:e}){let[t]=bt(()=>go.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?J7(e.id,t):"Loading...","Created At":GC(To.extractTimestamp(e.id)),"Joined At":e.joinedAt?GC(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 X7({guild:e,setCount:t}){return mv("friends",e,Ue.getFriendIDs(),t)}function V7({guild:e,setCount:t}){let o=Object.keys(Ue.getRelationships()).filter(r=>Ue.isBlocked(r));return mv("blocked",e,o,t)}function eE({guild:e,setCount:t}){let o=Object.keys(Ue.getRelationships()).filter(r=>Ue.isIgnored(r));return mv("ignored",e,o,t)}function mv(e,t,o,r){let i=[],s=[];for(let l of o)De.isMember(t.id,l)?s.push(l):i.push(l);return Se([De],()=>De.getMemberIds(t.id),null,(l,c)=>l.length===c.length),le(()=>{!Pc[e]&&i.length&&(Pc[e]=!0,G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),le(()=>r(s.length),[s.length]),n(jr,{fade:!0,className:po("scroller")},s.map(l=>n(Y7,{key:l,user:D.getUser(l),status:cn.getStatus(l)||"offline",onSelect:()=>Jo(l),onContextMenu:()=>{}})))}var $C,Y7,po,Pc,HC=f(()=>{"use strict";a();UC();He();Ie();me();Ke();wt();$();S();$C=R("icon","acronym","childWrapper"),Y7=se(".listName,discriminatorClass"),po=ue("vc-gp-");Pc={friends:!1,blocked:!1,ignored:!1}});var jC,Hf,WC=f(()=>{"use strict";a();No();M();x();S();HC();jC=(e,{guild:t})=>{dt("privacy",e)?.push(n(E.MenuItem,{id:"vc-server-info",label:"Server Info",action:()=>zC(t)}))},Hf=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":jC,"guild-header-popout":jC}})});function tE(){let e=Se([Ue,cn],()=>{let t=0,o=Ue.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 oE(){let e=Se([ce,qC],()=>{let t=qC.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 qC,jf,KC=f(()=>{"use strict";a();Sf();_();ne();M();x();$();S();qC=be("UserGuildJoinRequestStore");jf=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}=Z.plugins.ServerListIndicators;return n(k,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(tE,null),!!(e&1)&&n(oE,null)))},start(){bc(0,this.renderIndicator)},stop(){Sc(0,this.renderIndicator)}})});var YC=f(()=>{});var ZC,JC=f(()=>{a();ZC=`/* 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 XC=bi((eSe,fv)=>{"use strict";a();var nE=Object.prototype.hasOwnProperty,Ro="~";function Ic(){}Object.create&&(Ic.prototype=Object.create(null),new Ic().__proto__||(Ro=!1));function rE(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function QC(e,t,o,r,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new rE(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 Wf(e,t){--e._eventsCount===0?e._events=new Ic:delete e._events[t]}function bo(){this._events=new Ic,this._eventsCount=0}bo.prototype.eventNames=function(){var t=[],o,r;if(this._eventsCount===0)return t;for(r in o=this._events)nE.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 QC(this,t,o,r,!1)};bo.prototype.once=function(t,o,r){return QC(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 Wf(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!r||l.context===r)&&Wf(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:Wf(this,s)}return this};bo.prototype.removeAllListeners=function(t){var o;return t?(o=Ro?Ro+t:t,this._events[o]&&Wf(this,o)):(this._events=new Ic,this._eventsCount=0),this};bo.prototype.off=bo.prototype.removeListener;bo.prototype.addListener=bo.prototype.on;bo.prefixed=Ro;bo.EventEmitter=bo;typeof fv<"u"&&(fv.exports=bo)});var vv=bi(ga=>{"use strict";a();Object.defineProperty(ga,"__esModule",{value:!0});ga.Channel=ga.ChannelPort=void 0;var iE=XC(),qf="vapIpc",gv=Symbol.for("vapIpc.edgeCreate"),hv=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}};ga.ChannelPort=hv;var yv=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new iE.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${qf}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${qf}: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(gv,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(`${qf}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${qf}: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(gv,i),r(s.id))};this._emitter.on(gv,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}};ga.Channel=yv});var xv=bi(ha=>{"use strict";a();Object.defineProperty(ha,"__esModule",{value:!0});ha.RemoteClient=ha.RemoteHost=void 0;var bv=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()}};ha.RemoteHost=bv;var Sv=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})}};ha.RemoteClient=Sv});var tk=bi(ya=>{"use strict";a();Object.defineProperty(ya,"__esModule",{value:!0});ya.WorkerClient=ya.createWorkerHost=void 0;var VC=vv(),ek=xv(),sE=(e,t)=>{let o=new VC.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 ek.RemoteHost(o,t)};ya.createWorkerHost=sE;var Tv=class extends ek.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,r,i={}){let s=new VC.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)}};ya.WorkerClient=Tv});var ok=bi(_r=>{"use strict";a();var aE=_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]}),wv=_r&&_r.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&aE(t,e,o)};Object.defineProperty(_r,"__esModule",{value:!0});wv(vv(),_r);wv(xv(),_r);wv(tk(),_r)});function Pv(e){Kf.id!==e.id&&(Object.assign(Kf,e),Mv.forEach(t=>t(e)))}var Kf,Mv,nk,Iv=f(()=>{"use strict";a();S();Kf={id:null,theme:null},Mv=new Set,nk=()=>{let[,e]=j.useState(Kf);return j.useEffect(()=>(Mv.add(e),()=>void Mv.delete(e)),[]),Kf}});function hs(e){if(Object.prototype.hasOwnProperty.call(va,e))return va[e];let t=Object.values(va).find(o=>o.aliases?.includes(e));return t?(dE.set(e,t),t):null}var lE,cE,rk,uE,pE,va,ik,sk,dE,Yf=f(()=>{"use strict";a();lE="Vap0r1ze/vapcord",cE="88a7032a59cca40da170926651b08201ea3b965a",rk=`https://raw.githubusercontent.com/${lE}/${cE}/assets/shiki-codeblocks`,uE=e=>`${rk}/${e}`,pE=`${rk}/languages.json`,va={},ik=async()=>{let e=await fetch(pE).then(o=>o.json()),t=Object.fromEntries(e.map(o=>[o.id,{...o,grammarUrl:uE(o.fileName)}]));Object.assign(va,t)},sk=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),dE=new Map});var mE,fE,pe,Br,Cv=f(()=>{"use strict";a();mE="shikijs/textmate-grammars-themes",fE="2d87559c7601a928b9f7e0f0dda243d2fb6d4499",pe=e=>`https://raw.githubusercontent.com/${mE}/${fE}/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 lk,kv,ak,_e,Cc=f(()=>{"use strict";a();Sd();lk=jc(ok());Iv();Yf();Cv();kv=Object.values(Br),_e={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:va,themes:Br,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>ak=e),init:async e=>{let t=await fetch(Gw).then(i=>i.blob()),o=_e.client=new lk.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let r=e||kv[0];await ik(),await o.run("setOnigasm",{wasm:zw}),await o.run("setHighlighter",{theme:r,langs:[]}),_e.loadedThemes.add(r),await _e._setTheme(r),ak(o)},_setTheme:async e=>{_e.currentThemeUrl=e;let{themeData:t}=await _e.client.run("getTheme",{theme:e});_e.currentTheme=JSON.parse(t),Pv({id:e,theme:_e.currentTheme})},loadTheme:async e=>{let t=await _e.clientPromise;_e.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),_e.loadedThemes.add(e))},setTheme:async e=>{await _e.clientPromise,e||=kv[0],_e.loadedThemes.has(e)||await _e.loadTheme(e),await _e._setTheme(e)},loadLang:async e=>{let t=await _e.clientPromise,o=hs(e);!o||_e.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await sk(o)}}),_e.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await _e.clientPromise,r=hs(t);return r?(_e.loadedLangs.has(r.id)||await _e.loadLang(r.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:_e.currentThemeUrl??kv[0]})):[]},destroy(){_e.currentTheme=null,_e.currentThemeUrl=null,Pv({id:null,theme:null}),_e.client?.destroy()}}});var kc,Nv=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});kc="src/plugins/shikiCodeblocks.desktop/devicon.css"});var Nc=f(()=>{"use strict";a()});var hE,gi,Av=f(()=>{"use strict";a();_();He();me();Xo();x();Cc();Cv();Nv();Nc();hE=Object.keys(Br),gi=P({theme:{type:4,description:"Default themes",options:hE.map(e=>({label:ko(y1(e)),value:Br[e],default:Br[e]===Br.DarkPlus})),onChange:_e.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:Br.MaterialCandy,onChange:e=>{_e.setTheme(e||gi.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?Ko(kc):Io(kc)}},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=hh(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function uk(e,t){let o=gi.use(e),[r,i]=j.useState(!1),s={...o,...t},l=s.customTheme||s.theme;if(t){let c=_e.currentThemeUrl&&l&&l!==_e.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),_e.setTheme(l))}return{...s,isThemeLoading:l!==_e.currentThemeUrl}}var pk=f(()=>{"use strict";a();S();Cc();Av()});function dk(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 mk=f(()=>{"use strict";a()});var Do,fk,Ac=f(()=>{"use strict";a();He();S();Yf();Nc();Do=ue("vc-shiki-"),fk=({lang:e,tryHljs:t})=>{let o=e?Ai?.getLanguage?.(e):null,i=(e?hs(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!o||e==="";case"SECONDARY":return!i&&!!o;case"NEVER":return!1;default:return!1}}});function gk(e){let[t,o]=j.useState(!1);function r(i){Ht.copy(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,r]}var hk=f(()=>{"use strict";a();S()});function yk({content:e,...t}){let[o,r]=gk(1e3);return n("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>r(e)},o?"Copied!":"Copy")}var vk=f(()=>{"use strict";a();hk()});function bk({content:e,theme:t}){let o=[];return Ht.SUPPORTS_COPY&&o.push(n(yk,{content:e,className:Do("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),n("div",{className:Do("btns")},o)}var Sk=f(()=>{"use strict";a();S();Ac();vk()});var xk,Tk=f(()=>{"use strict";a();S();Ac();xk=({theme:e,useHljs:t,lang:o,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=Ai.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 wk({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 Mk=f(()=>{"use strict";a();Nc();Ac()});var Zf,yE,Pk=f(()=>{"use strict";a();ne();wt();S();Yf();Cc();pk();Iv();mk();Ac();Sk();Tk();Mk();Zf=e=>n("pre",{className:Do("container")},n(k,null,n(yE,{...e}))),yE=({lang:e,content:t,isPreview:o,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=uk(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=nk(),d=e?hs(e):null,g=fk({lang:e,tryHljs:i}),[h,v]=Sh(!0),[C]=bt(async()=>!d||g||!v?null:await _e.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)"},T;return e&&(T=g?Ai?.getLanguage?.(e)?.name:d?.name),n("div",{ref:h,className:Do("root",{plain:!T,preview:o}),style:{backgroundColor:g?w.backgroundColor:`rgba(${dk(w.backgroundColor).concat(l/100).join(", ")})`,color:w.plainColor}},n("code",{className:Do("code")},n(wk,{langName:T,useDevIcon:s,shikiLang:d}),n(xk,{theme:w,useHljs:g,lang:e,content:t,tokens:C}),!o&&n(bk,{content:t,theme:w})))}});var Ik,Ck,kk=f(()=>{"use strict";a();Ik=new Map,Ck=()=>{Ik.forEach(e=>e.remove()),Ik.clear()}});var Jf,Nk=f(()=>{"use strict";a();YC();He();M();x();JC();Cc();Pk();Nv();Av();Nc();kk();Jf=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],reporterTestable:8,settings:gi,patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}},{find:"#{intl::PREVIEW_NUM_LINES}",replacement:{match:/(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,replace:"return $self.renderHighlighter({lang:$1.language,content:$1.text});"}}],start:async()=>{gi.store.useDevIcon!=="DISABLED"&&Io(kc),await _e.init(gi.store.customTheme||gi.store.theme)},stop:()=>{_e.destroy(),Ck()},settingsAboutComponent:({tempSettings:e})=>Zf({lang:"tsx",content:ZC,isPreview:!0,tempSettings:e}),shiki:_e,createHighlighter:Zf,renderHighlighter:({lang:e,content:t})=>Zf({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var Qf,Ak=f(()=>{"use strict";a();M();x();Qf=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 Rk=f(()=>{});function Lk(){let e=Ga(Dk.colors.INTERACTIVE_MUTED).hex(),t=Ga(Dk.colors.INTERACTIVE_ACTIVE).hex();return n(vE,{color:e,forcedIconColor:t,size:16,tooltipText:Pe("CONNECTION_VERIFIED"),className:"vc-sc-tooltip-icon"})}var Dk,vE,Ek=f(()=>{"use strict";a();Ie();$();S();Dk=kt(e=>e.colors?.INTERACTIVE_MUTED?.css),vE=se("#{intl::CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP}")});function ME({id:e,theme:t}){let o=Qt.getUserProfile(e);if(!o)return null;let r=o.connectedAccounts;return r?.length?n(ge,{style:{gap:TE(Xf.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>n(PE,{connection:i,theme:t,key:i.id}))):null}function PE({connection:e,theme:t}){let o=SE.get(bE(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:Xf.store.iconSize,height:Xf.store.iconSize}}),s=r?$i:Gi;return n(oe,{text:n("span",{className:"vc-sc-tooltip"},n("span",{className:"vc-sc-connection-name"},e.name),e.verified&&n(Lk,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 bE,SE,xE,TE,Xf,wE,Vf,Ok=f(()=>{"use strict";a();Rk();_();ne();jt();At();M();me();x();$();S();Ek();bE=we(".TWITTER_LEGACY:"),SE=R("isSupported","getByUrl"),xE=we(".getPreviewThemeColors","primaryColor:"),TE=e=>(e??0)*2+4,Xf=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}]}}),wE=k.wrap(e=>n(ME,{...e,id:e.user.id,theme:xE(e).theme}),{noop:!0});Vf=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[p.TheKodeToad],settings:Xf,patches:[{find:".hasAvatarForGuild(null==",replacement:{match:/currentUser:\i,guild:\i}\)(?<=user:(\i),bio:null==(\i)\?.+?)/,replace:"$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2 })"}}],profilePopoutComponent:wE})});var _k=f(()=>{});function OE({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=Fr.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,r]=q([]),{type:i,topic:s,lastMessageId:l,defaultForumLayout:c,lastPinTimestamp:u,defaultAutoArchiveDuration:d,availableTags:g,id:h,rateLimitPerUser:v,defaultThreadRateLimitPerUser:C,defaultSortOrder:w,defaultReactionEmoji:T,bitrate:N,rtcRegion:A,videoQualityMode:L,permissionOverwrites:U,guild_id:H}=e;return le(()=>{let X=[],re=ce.getGuild(H).ownerId;De.getMember(H,re)||X.push(re),Object.values(U).forEach(({type:te,id:K})=>{te===1&&!De.getMember(H,K)&&X.push(K)}),X.length>0&&G.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[H],userIds:X}),Z.plugins.PermissionsViewer.enabled&&r(Qm(Object.values(U).map(te=>({type:te.type,id:te.id,overwriteAllow:te.allow,overwriteDeny:te.deny})),H))},[h]),n("div",{className:z(Rv.auto,Rv.customTheme,Rv.managedReactiveScroller)},n("div",{className:zo("container")},n("img",{className:zo("logo"),src:EE}),n("div",{className:zo("heading-container")},n(Q,{variant:"heading-xxl/bold"},"This is a ",Fe.can(ke.VIEW_CHANNEL,e)?"locked":"hidden"," ",AE[i]," channel"),e.isNSFW()&&n(oe,{text:"NSFW"},({onMouseLeave:X,onMouseEnter:re})=>n("svg",{onMouseLeave:X,onMouseEnter:re,className:zo("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:zo("topic-container")},Oe.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: ",Ml(v,"seconds")),(C??0)>0&&n(Q,{variant:"text-md/normal"},"Default thread slowmode: ",Ml(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: ",LE[L??1]),(d??0)>0&&n(Q,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ml(d,"minutes")),c!=null&&n(Q,{variant:"text-md/normal"},"Default layout: ",DE[c]),w!=null&&n(Q,{variant:"text-md/normal"},"Default sort order: ",RE[w]),T!=null&&n("div",{className:zo("default-emoji-container")},n(Q,{variant:"text-md/normal"},"Default reaction emoji:"),Oe.defaultRules[T.emojiName?"emoji":"customEmoji"].react({name:T.emojiName?kE.convertSurrogateToName(T.emojiName):un.getCustomEmojiById(T.emojiId)?.name??"",emojiId:T.emojiId??void 0,surrogate:T.emojiName??void 0,src:T.emojiName?NE.getURL(T.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:zo("tags-container")},n(Q,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:zo("tags")},g.map(X=>n(CE,{tag:X,key:X.id})))),n("div",{className:zo("allowed-users-and-roles-container")},n("div",{className:zo("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:zo("allowed-users-and-roles-container-permdetails-btn"),onClick:()=>ds(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:zo("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(IE,{channel:e}))))}var Rv,Axe,IE,CE,kE,NE,AE,RE,DE,LE,EE,Bk,Fk=f(()=>{"use strict";a();_();ne();me();Xo();$();S();mc();dc();Dv();Rv=R("auto","managedReactiveScroller"),Axe=R("chat","content","noChat","chatContent"),IE=se("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}"),CE=se("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}"),kE=R("convertSurrogateToName"),NE=R("getURL","getEmojiColors"),AE={0:"text",5:"announcement",15:"forum",2:"voice",13:"stage"},RE={0:"Latest activity",1:"Creation date"},DE={0:"Not set",1:"List view",2:"Gallery view"},LE={1:"Automatic",2:"720p"},EE="/assets/433e3ec4319a9d11b0cbe39342614982.svg";Bk=k.wrap(OE)});function _E(e){return e.channel.id==="null"&&e.channel.name==="Uncategorized"&&e.comparator===-1}var Uk,zo,$k,Fr,eg,Dv=f(()=>{"use strict";a();_k();_();He();ne();M();me();jo();x();$();S();Fk();Uk=R("modeMuted","modeSelected","unread","icon"),zo=ue("vc-shc-"),$k=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}});eg=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(${$k}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${$k}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:!Fe.can(ke.VIEW_CHANNEL,e)||t&&!Fe.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)(_E(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(Bk,{channel:e}),LockIcon:k.wrap(()=>n("svg",{className:Uk.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(Uk.icon,zo("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 Lv,ba,tg,Gk=f(()=>{"use strict";a();_();M();x();Lv=e=>({type:3,description:e,default:!0,restartNeeded:!0}),ba=P({showTimeouts:Lv("Show member timeout icons in chat."),showInvitesPaused:Lv("Show the invites paused tooltip in the server list."),showModView:Lv("Show the member mod view context menu item in all servers.")}),tg=y({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused","ShowModView","DisableDiscoveryFilters"],description:"Displays various hidden & moderator-only things regardless of permissions.",authors:[p.Dolfies],settings:ba,patches:[{find:"showCommunicationDisabledStyles",predicate:()=>ba.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"INVITES_DISABLED))||",predicate:()=>ba.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,replace:"true"}},{find:/,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/,predicate:()=>ba.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:()=>ba.store.showModView,replacement:{match:/(role:)\i(?=,guildId.{0,100}role:(\i\[))/,replace:"$1$2arguments[0].member.highestRoleId]"}},{find:'action:"PRESS_MOD_VIEW",icon:',predicate:()=>ba.store.showModView,replacement:{match:/\i(?=\?null)/,replace:"false"}}]})});var zk=f(()=>{});var Rc,og,Hk=f(()=>{"use strict";a();zk();_();ne();M();x();Rc=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"}}),og=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:Rc,renderUsername:k.wrap(({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;Rc.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return o&&!Rc.store.inReplies||l.toLowerCase()===c.toLowerCase()?n(m,null,u,c):Rc.store.mode==="user-nick"?n(m,null,u,l," ",n("span",{className:"vc-smyn-suffix"},c)):Rc.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 jk=f(()=>{});function qk(e,t){let o=ie.getChannel(e.channel_id)?.guild_id;if(!o)return null;let r=De.getMember(o,e.author.id);if(!r?.communicationDisabledUntil)return null;let i=()=>n(FE,{deadline:new Date(r.communicationDisabledUntil),showUnits:!0,stopAtOneSec:!0});return Pe("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i}),t?i():Pe("GUILD_ENABLE_COMMUNICATION_TIME_REMAINING",{username:e.author.username,countdown:i})}var BE,FE,Wk,ng,Kk=f(()=>{"use strict";a();jk();_();ne();M();Ie();jo();x();$();S();BE=Lt("#{intl::MAX_AGE_NEVER}"),FE=Vc(e=>e.prototype?.render?.toString().includes(BE)),Wk=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}]}});ng=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:Wk,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})=>Wk.store.displayStyle==="tooltip"?n(oe,{text:qk(e,!1)},t):n("div",{className:"vc-std-wrapper"},n(oe,{text:o},t),n(Q,{variant:"text-md/normal",color:"status-danger"},qk(e,!0)," timeout remaining")),{noop:!0})})});var Ev,Ov,UE,rg,Yk=f(()=>{"use strict";a();xr();$l();_();M();x();S();Ev=!1,Ov=P({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Ev=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}}),UE=({isMainChat:e})=>{let[t,o]=q(Ev);function r(i){Ov.store.persistState&&(Ev=i),o(i)}return le(()=>{let i=(s,l)=>{t&&(Ov.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Vi(i),()=>void es(i)},[t]),e?n(en,{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},rg=y({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",settings:Ov,renderChatBarButton:UE})});var Nn,$E,GE,ig,Zk=f(()=>{"use strict";a();xr();sn();No();_();M();x();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}}),$E=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=Nn.use(["isEnabled","showIcon"]),r=()=>Nn.store.isEnabled=!Nn.store.isEnabled;return!e||!o?null:n(en,{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"}))))},GE=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}))},ig=y({name:"SilentTyping",authors:[p.Ven,p.Rini,p.ImBanana],description:"Hide that you are typing",settings:Nn,contextMenus:{"textarea-context":GE},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:$E})});var Jk=f(()=>{});function Qk(e){return new Date(Ue.getSince(e.id))}var zE,_v,Xk,sg,Vk=f(()=>{"use strict";a();Jk();_();He();ne();M();x();S();zE=new Intl.DateTimeFormat(void 0,{month:"numeric",day:"numeric",year:"numeric"}),_v=ue("vc-sortFriendRequests-");Xk=P({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),sg=y({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",settings:Xk,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:"#{intl::FRIEND_REQUEST_CANCEL}",replacement:{predicate:()=>Xk.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?-Qk(t.user):e(t)},WrapperDateComponent:k.wrap(({user:e,children:t})=>{let o=Qk(e);return n("div",{className:_v("wrapper")},t,!isNaN(o.getTime())&&n(Vn,{text:qr.dateFormat(o,"LLLL"),tooltipClassName:_v("tooltip")},n(Q,{variant:"text-xs/normal",className:_v("date")},zE.format(o))))})})});var e5,t5=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});e5="src/plugins/spotifyControls/hoverOnly.css"});var o5=f(()=>{});var n5=f(()=>{});var tt,r5=f(()=>{"use strict";a();_();$();S();tt=Eo(()=>{let{Store:e}=Pi,t=_a("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=Z.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 Bv(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 Sa(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 Dc(e){return n("button",{className:st("button"),...e},e.children)}function ZE({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:$i}),n(E.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>tt.openExternal(t),icon:ur}))}function JE(e,t){return o=>Et.openContextMenu(o,()=>n(ZE,{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(Dc,{className:z(st("button"),st("shuffle"),st(t?"shuffle-on":"shuffle-off")),onClick:()=>tt.setShuffle(!t)},n(YE,null)),n(Dc,{onClick:()=>{Z.plugins.SpotifyControls.previousButtonRestartsTrack&&tt.position>3e3?tt.seek(0):tt.prev()}},n(WE,null)),n(Dc,{onClick:()=>tt.setPlaying(!e)},e?n(jE,null):n(HE,null)),n(Dc,{onClick:()=>tt.next()},n(qE,null)),n(Dc,{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(KE,null)))}function VE(){let{duration:e}=tt.track,[t,o,r]=Se([tt],()=>[tt.mPosition,tt.isSettingPosition,tt.isPlaying]),[i,s]=q(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"},Bv(i)),n(E.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{o||(s(l),XE(l))},renderValue:Bv}),n(b.FormText,{variant:"text-xs/medium",className:st("progress-time")+" "+st("time-right"),"aria-label":"Total Duration"},Bv(e)))}function eO({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:()=>Zo(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:Oo(i=>tt.setVolume(i))})}))}function Fv(e,t,o){return t?{role:"link",onClick:()=>tt.openExternal(o),onContextMenu:JE(e,o)}:{}}function tO({track:e}){let t=e?.album?.image,[o,r]=q(!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(eO,{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,...Fv("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(j.Fragment,{key:s.name},n("span",{className:st("artist"),style:{fontSize:"inherit"},title:s.name,...Fv("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,...Fv("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function i5(){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]=q(!1);if(j.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(tO,{track:e}),n(VE,null),n(QE,null))}var st,HE,jE,WE,qE,KE,YE,XE,s5=f(()=>{"use strict";a();o5();n5();_();He();jt();At();_i();Ie();me();S();r5();st=ue("vc-spotify-");HE=Sa("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"),jE=Sa("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"),WE=Sa("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"),qE=Sa("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"),KE=Sa("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"),YE=Sa("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");XE=Oo(e=>{tt.seek(e)})});function a5(e){(e?Io:Ko)(e5)}var ag,l5=f(()=>{"use strict";a();_();He();ne();M();x();t5();s5();ag=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=>a5(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:()=>a5(Z.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(i5,null)),n(e,{...t}))}})});var Uv,lg,c5=f(()=>{"use strict";a();_();M();x();Uv=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}}),lg=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:Uv,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:()=>Uv.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>Uv.store.keepSpotifyActivityOnIdle,match:/(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:"$1"}]}]})});function $v(e,t){return{name:e,description:`Share your current Spotify ${e} in chat`,inputType:0,options:[zn],execute(o,{channel:r}){let i=oO.getTrack();if(!i)return mt(r.id,{content:"You're not listening to any music."});let s=t(i),l=qt(o,"message");Os(r.id,{content:l?`${l} ${s}`:s},!1,qo.getSendMessageOptionsForReply(nO.getPendingReply(r.id))).then(()=>{G.dispatch({type:"DELETE_PENDING_REPLY",channelId:r.id})})}}}var oO,nO,cg,u5=f(()=>{"use strict";a();sn();M();Ie();x();$();S();oO=R("getPlayerState"),nO=R("getPendingReply");cg=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[p.katlyn],commands:[$v("track",e=>`https://open.spotify.com/track/${e.id}`),$v("album",e=>`https://open.spotify.com/album/${e.album.id}`),$v("artist",e=>e.artists[0].external_urls.spotify)]})});function rO({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(j.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 iO({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"),Lc.logs.map((l,c)=>n(rO,{key:c,...l,instance:s[c]})))))}function sO({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 aO(){if(!Lc?.logs)return n("div",null,"Loading...");let e=Lc.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(j.Fragment,null,n(iO,{title:"Startup Timings",logs:Lc.logs,traceEnd:Lc.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(sO,{trace:e}))}var Lc,p5,d5=f(()=>{"use strict";a();ne();jt();$();S();Lc=R("markWithDelta","markAndLog","markAt");p5=k.wrap(aO)});var ug,m5=f(()=>{"use strict";a();M();x();d5();ug=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:p5})});var pg,f5=f(()=>{"use strict";a();M();x();pg=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 g5({streamKey:e},t){e.endsWith(D.getCurrentUser().id)&&G.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var dg,h5=f(()=>{"use strict";a();M();x();S();dg=y({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[p.Kodarru],flux:{STREAM_CREATE:e=>g5(e,!0),STREAM_DELETE:e=>g5(e,!1)}})});var Ec,mg,y5=f(()=>{"use strict";a();_();M();x();S();Ec=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}}}),mg=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:Ec,shouldPlayBurstReaction(e){return Ec.store.unlimitedSuperReactionPlaying?!0:Ec.store.superReactionPlayingLimit===0?!1:e<=Ec.store.superReactionPlayingLimit},get shouldSuperReactByDefault(){return Ec.store.superReactByDefault&&D.getCurrentUser().premiumType!=null}})});function w5(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 lO(e){try{return w5(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function Gv({initialValue:e,onChange:t,placeholder:o}){let[r,i]=q(e);return n(ct,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function x5({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(T5()),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(j.Fragment,{key:`${s.find}-${l}`},n(ge,{flexDirection:"row",style:{gap:0}},n(ge,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(Gv,{placeholder:"Find",initialValue:s.find,onChange:c=>i(c,l,"find")}),n(Gv,{placeholder:"Replace",initialValue:s.replace,onChange:c=>i(c,l,"replace")}),n(Gv,{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(zi,null))),o&&lO(s.find)))))}function cO(){let[e,t]=q("");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:M5(e)}))}function M5(e){if(e.length===0)return e;for(let t of xa.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 xa.store.regexRules)if(t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=w5(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 v5,b5,T5,S5,xa,uO,fg,P5=f(()=>{"use strict";a();Mr();_();jt();At();M();Ne();x();S();v5="TextReplace_rulesString",b5="TextReplace_rulesRegex",T5=()=>({find:"",replace:"",onlyIfIncludes:""}),S5=()=>[T5()],xa=P({replace:{type:6,component:()=>{let{stringRules:e,regexRules:t}=xa.use(["stringRules","regexRules"]);return n(m,null,n(x5,{title:"Using String",rulesArray:e}),n(x5,{title:"Using Regex",rulesArray:t}),n(cO,null))}},stringRules:{type:7,default:S5()},regexRules:{type:7,default:S5()}});uO="1102784112584040479",fg=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:xa,onBeforeMessageSend(e,t){e!==uO&&(t.content=M5(t.content))},async start(){let e=await It.get(v5);e!=null&&(xa.store.stringRules=e,await It.del(v5));let t=await It.get(b5);t!=null&&(xa.store.regexRules=t,await It.del(b5))}})});var gg,I5=f(()=>{"use strict";a();M();x();S();gg=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 C5=f(()=>{});function zv(){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,Oc=f(()=>{"use strict";a();_();x();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:zv},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 Wv(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 Hv,jv,k5=f(()=>{"use strict";a();Hv={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"},jv={"":"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 _c(e,t){let o=We.store.service==="google"?R5:mO;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 R5(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:Hv[s]??s,text:l.map(c=>c?.trans).filter(Boolean).join("")}}function N5(e,t,o){return R5(e,Wv(t),Wv(o))}async function mO(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",zv(),N5(e,t,o);let{status:r,data:i}=await pO.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 dO(),N5(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:jv[l]??l,text:s[0].text}}var An,pO,A5,dO,Bc=f(()=>{"use strict";a();He();Rl();S();k5();Oc();An=ue("vc-trans-"),pO=VencordNative.pluginHelpers.Translate,A5=()=>We.store.service==="google"?Hv:jv;dO=Yi(()=>Je("Deepl API quota exceeded. Falling back to Google Translate",ee.Type.FAILURE))});function gO({settingsKey:e,includeAuto:t}){let o=We.use([e])[e],r=Re(()=>{let i=Object.entries(A5()).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(xs,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>We.store[e]=i}))}function hO(){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 D5({rootProps:e}){return n(ve,{...e},n(Ae,{className:An("modal-header")},n(b.FormTitle,{tag:"h2",className:An("modal-title")},"Translate"),n(pt,{onClick:e.onClose})),n(Me,{className:An("modal-content")},fO.map(t=>n(gO,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(b.FormDivider,{className:F.bottom16}),n(hO,null)))}var fO,L5=f(()=>{"use strict";a();ze();Ke();S();Oc();Bc();fO=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Ta({height:e=20,width:t=20,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className: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 Fc,E5,qv=f(()=>{"use strict";a();xr();me();Ke();S();Oc();L5();Bc();E5=({isMainChat:e})=>{let{autoTranslate:t,showChatBarButton:o}=We.use(["autoTranslate","showChatBarButton"]),[r,i]=q(!1);if(le(()=>(Fc=i,()=>Fc=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(en,{tooltip:"Open Translate Modal",onClick:c=>{if(c.shiftKey)return s();he(u=>n(D5,{rootProps:u}))},onContextMenu:s,buttonProps:{"aria-haspopup":"dialog"}},n(Ta,{className:An({"auto-translate":t,"chat-button":!0})}));return r&&We.store.showAutoTranslateTooltip?n(oe,{text:"Auto Translate Enabled",forceOpen:!0},()=>l):l}});function Yv(e,t){Kv.get(e)(t)}function yO({onDismiss:e}){return n("button",{onClick:e,className:An("dismiss")},"Dismiss")}function O5({message:e}){let[t,o]=q();return le(()=>{if(!e.vencordEmbeddedBy)return Kv.set(e.id,o),()=>void Kv.delete(e.id)},[]),t?n("span",{className:An("accessory")},n(Ta,{width:16,height:16,className:An("accessory-icon")}),Oe.parse(t.text)," ","(translated from ",t.sourceLanguage," - ",n(yO,{onDismiss:()=>o(void 0)}),")"):null}var Kv,_5=f(()=>{"use strict";a();S();qv();Bc();Kv=new Map});var vO,B5,hg,F5=f(()=>{"use strict";a();C5();No();M();x();S();Oc();qv();_5();Bc();vO=(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:Ta,action:async()=>{let r=await _c("received",t.content);Yv(t.id,r)}}))},hg=y({name:"Translate",description:"Translate messages with Google Translate or DeepL",authors:[p.Ven,p.AshtonMemer],settings:We,contextMenus:{message:vO},translate:_c,renderMessageAccessory:e=>n(O5,{message:e.message}),renderChatBarButton:E5,renderMessagePopoverButton(e){return e.content?{label:"Translate",icon:Ta,message:e,channel:ie.getChannel(e.channel_id),onClick:async()=>{let t=await _c("received",e.content);Yv(e.id,t)}}:null},async onBeforeMessageSend(e,t){if(!We.store.autoTranslate||!t.content)return;Fc?.(!0),clearTimeout(B5),B5=setTimeout(()=>Fc?.(!1),2e3);let o=await _c("sent",t.content);t.content=o.text}})});var U5=f(()=>{});var $5,G5=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});$5="src/plugins/typingTweaks/style.css"});function Zv({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var yg,bO,vg,Jv=f(()=>{"use strict";a();_();ne();M();Ie();x();S();G5();yg=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"}});bO=k.wrap(function({user:e,guildId:t}){return n("strong",{className:"vc-typing-user",role:"button",onClick:()=>{Jo(e.id)},style:{color:yg.store.showRoleColors?De.getMember(t,e.id)?.colorString:void 0}},yg.store.showAvatars&&n(Ua,{size:"SIZE_16",src:e.getAvatarURL(t,128)}),De.getNick(t,e.id)||!t&&Ue.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),vg=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[p.zt],settings:yg,managedStyle:$5,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:()=>yg.store.alternativeFormatting}]}],buildSeveralUsers:Zv,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"&&!j.isValidElement(i)))return i;let s=t[r++];return n(bO,{key:s.id,guildId:e,user:s})})}catch(r){console.error(r)}return o},{noop:!0})})});function hi(e,t){let o=D.getUser(t);return De.getNick(e,t)??o.globalName??o.username}function wO({channelId:e,guildId:t}){let o=Se([z5],()=>({...z5.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([Ee],()=>Ee.getChannelId());if(!wa.store.includeMutedChannels&&TO.isChannelMuted(t,e)||!wa.store.includeCurrentChannel&&r===e)return null;let i=D.getCurrentUser()?.id,s=Object.keys(o).filter(c=>c!==i&&!(Ue.isBlocked(c)&&!wa.store.includeBlockedUsers)),l;switch(s.length){case 0:break;case 1:{l=Pe("ONE_USER_TYPING",{a:hi(t,s[0])});break}case 2:{l=Pe("TWO_USERS_TYPING",{a:hi(t,s[0]),b:hi(t,s[1])});break}case 3:{l=Pe("THREE_USERS_TYPING",{a:hi(t,s[0]),b:hi(t,s[1]),c:hi(t,s[2])});break}default:{l=Z.plugins.TypingTweaks.enabled?Zv({a:hi(t,s[0]),b:hi(t,s[1]),count:s.length-2}):Pe("SEVERAL_USERS_TYPING");break}}return s.length>0?n(oe,{text:l},c=>n("div",{className:"vc-typing-indicator",...c},(wa.store.indicatorMode&2)===2&&n("div",{onClick:u=>{u.stopPropagation(),u.preventDefault()},onKeyPress:u=>u.stopPropagation()},n(xO,{users:s.map(u=>D.getUser(u)),guildId:t,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"})),(wa.store.indicatorMode&1)===1&&n("div",{className:"vc-typing-indicator-dots"},n(SO,{dotRadius:3,themed:!0})))):null}var SO,xO,z5,TO,wa,bg,H5=f(()=>{"use strict";a();U5();_();ne();M();Ie();x();$();S();Jv();SO=se(".dots,","dotRadius:"),xO=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),z5=be("TypingStore"),TO=be("UserGuildSettingsStore");wa=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}]}}),bg=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.fawn,p.Sqaaakoi],settings:wa,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(wO,{channelId:e,guildId:t}))})});var Sg,j5=f(()=>{"use strict";a();M();x();Sg=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 MO,xg,W5=f(()=>{"use strict";a();_();vr();M();x();MO=P({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:Vt(2,16),default:4}}),xg=y({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[p.nakoyasha],settings:MO,patches:[{find:"#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]})});var Qv,PO,Tg,q5=f(()=>{"use strict";a();No();At();M();x();S();Qv=4,PO=(e,{channel:t,message:{author:o,messageSnapshots:r,embeds:i,flags:s,id:l}})=>{let c=(s&Qv)!==0,u=r.some(v=>v?.message.embeds.length);if(!c&&!i.length&&!u)return;let d=t.isPrivate()||!!(Fe.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?al:ll,action:()=>vt.patch({url:Pt.Endpoints.MESSAGE(t.id,l),body:{flags:c?s&~Qv:s|Qv}})}))},Tg=y({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:PO}})});var Ma,wg=f(()=>{"use strict";a();_();x();Ma=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 IO(e,t=!1){let o=Se([Qt],()=>Qt.getUserProfile(e)?.pronouns),r=Se([Qt],()=>Qt.getGuildMemberProfile(e,Yo()?.getGuildId())?.pronouns);return t?o:r||o}function K5(e,t=!1){let o=IO(e,t)?.trim().replace(/\n+/g,"");return Ma.store.pronounsFormat==="LOWERCASE"?o?.toLowerCase():o}var Y5=f(()=>{"use strict";a();Ie();S();wg()});function J5(e){return!(e.author.bot||e.author.system||e.type===kO||!Ma.store.showSelf&&e.author.id===D.getCurrentUser().id)}function Q5({message:e}){let t=K5(e.author.id);return t&&n(oe,{text:Pe("USER_PROFILE_PRONOUNS")},o=>n("span",{...o,className:z(Z5.timestampInline,Z5.timestamp)},"\u2022 ",t))}var Z5,CO,kO,X5,V5,eN=f(()=>{"use strict";a();wr();ne();Ie();me();$();S();wg();Y5();Z5=R("timestampInline"),CO=Ao("textAndImages","messageDisplayCompact"),kO=24;X5=k.wrap(({message:e})=>J5(e)?n(Q5,{message:e}):null,{noop:!0}),V5=k.wrap(({message:e})=>!CO.useSetting()||!J5(e)?null:n(Q5,{message:e}),{noop:!0})});var Mg,tN=f(()=>{"use strict";a();_();M();x();eN();wg();hr("UserMessagesPronouns","PronounDB");Mg=y({name:"UserMessagesPronouns",authors:[p.Tyman,p.TheKodeToad,p.Ven,p.Elvyra],description:"Adds pronouns to chat user messages",settings:Ma,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:X5,CompactPronounsChatComponentWrapper:V5})});var oN=f(()=>{});function rN(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 iN(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 OO({channel:e,isLocked:t}){let o=Se([Ig],()=>Ig.getVoiceStatesForChannel(e.id)),r=Re(()=>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=Is(e.type).with(ch.union(1,3),()=>e.recipients.length>=2&&e.icon==null?n(EO,{recipients:e.recipients,size:"SIZE_32"}):n(LO,{src:RO(e),size:"SIZE_32"})).otherwise(()=>null),c=AO(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(iN,{size:18}):n(rN,{size:18}),n(DO,{users:r,renderIcon:!1,max:13,size:18})))}var qn,NO,AO,RO,Ig,DO,LO,EO,nN,Pg,Cg,sN=f(()=>{"use strict";a();He();ne();me();$();S();qn=ue("vc-uvs-"),{selectVoiceChannel:NO}=R("selectVoiceChannel","selectChannel"),{useChannelName:AO}=Ze("#{intl::GROUP_DM_ALONE}",{useChannelName:B.byCode("()=>null==")}),RO=we(".getChannelIconURL({"),Ig=be("VoiceStateStore"),DO=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),LO=se(".status)/2):0"),EO=se("frontSrc:","getAvatarURL"),nN=R("actionButton","highlight");Pg={},Cg=k.wrap(({userId:e,isActionButton:t,shouldHighlight:o})=>{let r=Se([Ig],()=>Ig.getVoiceStateForUser(e)?.channelId),i=r==null?void 0:ie.getChannel(r);if(i==null)return null;let s=i.isDM()||i.isMultiUserDM();if(!s&&!Fe.can(ke.VIEW_CHANNEL,i)&&!Vencord.Plugins.isPluginEnabled("ShowHiddenChannels"))return null;let l=!s&&(!Fe.can(ke.VIEW_CHANNEL,i)||!Fe.can(ke.CONNECT,i));function c(u){if(u.preventDefault(),u.stopPropagation(),!(i==null||r==null))if(clearTimeout(Pg[r]),delete Pg[r],u.detail>1){if(!s&&!Fe.can(ke.CONNECT,i)){Je("You cannot join the user's Voice Channel",ee.Type.FAILURE);return}NO(r)}else Pg[r]=setTimeout(()=>{Cs.transitionToChannel(r),delete Pg[r]},250)}return n(oe,{text:n(OO,{channel:i,isLocked:l}),tooltipClassName:qn("tooltip-container"),tooltipContentClassName:qn("tooltip-content")},u=>{let d={...u,className:z(t&&nN.actionButton,o&&nN.highlight),size:t?20:void 0,onClick:c};return l?n(iN,{...d}):n(rN,{...d})})},{noop:!0})});var Uc,kg,aN=f(()=>{"use strict";a();oN();El();Bl();_();M();x();sN();Uc=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}}),kg=y({name:"UserVoiceShow",description:"Shows an indicator when a user is in a Voice Channel",authors:[p.Nuckyz,p.LordElias],dependencies:["MemberListDecoratorsAPI","MessageDecorationsAPI"],settings:Uc,patches:[{find:"#{intl::USER_PROFILE_LOAD_ERROR}",replacement:{match:/(\.fetchError.+?\?)null/,replace:(e,t)=>`${t}$self.VoiceChannelIndicator({userId:arguments[0]?.userId})`},predicate:()=>Uc.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:()=>Uc.store.showInMemberList}],start(){Uc.store.showInMemberList&&Zi("UserVoiceShow",({user:e})=>e==null?null:n(Cg,{userId:e.id})),Uc.store.showInMessages&&Qi("UserVoiceShow",({message:e})=>e?.author==null?null:n(Cg,{userId:e.author.id}))},stop(){Ji("UserVoiceShow"),Xi("UserVoiceShow")},VoiceChannelIndicator:Cg})});var _O,Xv,Ng,lN=f(()=>{"use strict";a();_();Bo();M();x();_O="https://usrbg.is-hardly.online/users",Xv=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}}),Ng=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:Xv,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:()=>Xv.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&&Xv.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(_O);e.ok&&(this.data=await e.json())}})});var Vv,eb,BO,Ag,cN=f(()=>{"use strict";a();M();x();$();S();Vv=new Map,BO=we(".createFromServer(",".isBlockedForMessage","messageReference:"),Ag=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){eb=e},async fetchReply(e){let{channel_id:t,message_id:o}=e.baseMessage.messageReference;Vv.has(o)||(Vv.set(o,t),vt.get({url:`/channels/${t}/messages`,query:{limit:1,around:o},retries:2}).then(r=>{let i=r?.body?.[0];i&&(i.id!==o?(eb.set(t,o,{state:2}),G.dispatch({type:"MESSAGE_DELETE",channelId:t,message:o})):(eb.set(i.channel_id,i.id,{state:0,message:BO(i)}),G.dispatch({type:"MESSAGE_UPDATE",message:i})))}).catch(()=>{}).finally(()=>{Vv.delete(o)}))}})});async function UO(e){let t=D.getUser(e);if(t)return t;let o=await vt.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(FO).filter(([s,l])=>!isNaN(l)&&t.hasFlag(l)).map(([s])=>uN[s.toLowerCase()]).filter(Pr);(o.premium_type||!o.bot&&(o.banner||o.avatar?.startsWith?.("a_")))&&r.push(uN.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 $O({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,l]=q(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||Rg.has(d))return;if(D.getUser(d))return l(d);let g=()=>{Rg.add(d),pN.unshift(()=>UO(d).then(()=>{l(d),Rg.delete(d)}).catch(h=>{h?.status===429&&(pN.unshift(()=>mn(h?.body?.retry_after??1e3).then(g)),Rg.delete(d))}).finally(()=>mn(300)))};g()}},c))}var FO,uN,Rg,pN,Dg,dN=f(()=>{"use strict";a();ne();M();Qs();me();Kr();x();S();FO=Pt.UserFlags,uN={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"}},Rg=new Set,pN=new Mo(5);Dg=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($O,{key:"mention"+o.userId,RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var tb,Lg,mN=f(()=>{"use strict";a();M();x();S();tb={},Lg=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(Ee.getVoiceChannelId()===o){e();return}let r=tb[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete tb[o]):r.timeout=setTimeout(()=>{delete tb[o]},500)}})});function GO(e,t){return e.reduce((o,r)=>{let i=t(r);return o[i]??=[],o[i].push(r),o},{})}function ob({voice:e,voices:t}){let o=t.map(r=>({label:r.name,value:r.voiceURI,default:r.default}));return n(xs,{placeholder:"Select a voice",maxVisibleItems:5,options:o,value:o.find(r=>r.value===e),onChange:r=>mo.store.voice=r,closeOnSelect:!0})}function HO({voice:e,voices:t}){let o=Re(()=>GO(t,u=>u.lang),[t]),r=Re(()=>{let u=[];for(let d in o)try{let g=zO.of(d);g&&u.push({name:d,friendlyName:g})}catch{}return u},[o]),[i,s]=q(()=>Eg()?.lang??r[0].name);if(r.length===1)return n(ob,{voice:e,voices:o[r[0].name]});let l=o[i],c=r.map(u=>({label:u.friendlyName,value:u.name}));return n(m,null,n(b.FormTitle,null,"Language"),n(xs,{placeholder:"Select a language",options:c,value:c.find(u=>u.value===i),onChange:u=>s(u),maxVisibleItems:5,closeOnSelect:!0}),n(b.FormTitle,null,"Voice"),n(ob,{voice:e,voices:l}))}function jO(){let e=Re(()=>window.speechSynthesis?.getVoices()??[],[]),{voice:t}=mo.use(["voice"]);if(!e.length)return n(b.FormText,null,"No voices found.");let o=e.length>20?HO:ob;return n(o,{voice:t,voices:e})}function fN(){return n(b.FormSection,null,n(b.FormTitle,null,"Voice"),n(jO,null))}var zO,gN=f(()=>{"use strict";a();S();nb();zO=new Intl.DisplayNames(["en"],{type:"language"})});function Eg(e=window.speechSynthesis?.getVoices()){if(!e)return;if(mo.store.voice){let o=e.find(r=>r.voiceURI===mo.store.voice);if(o)return o;new V("VcNarrator").error(`Voice "${mo.store.voice}" not found. Resetting to default.`)}let t=e.find(o=>o.default);return mo.store.voice=t?.voiceURI,t}var WO,mo,nb=f(()=>{"use strict";a();_();Ne();x();gN();WO=()=>window.speechSynthesis?.getVoices().find(e=>e.default);mo=P({voice:{type:6,component:fN,get default(){return WO()?.voiceURI}},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}})});function _g(e,{volume:t,rate:o}=mo.store){if(!e)return;let r=new SpeechSynthesisUtterance(e),i=Eg();r.voice=i,r.volume=t,r.rate=o,speechSynthesis.speak(r)}function Og(e){let t=mo.store.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function Bg(e,t,o,r,i){return e.replaceAll("{{USER}}",Og(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Og(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Og(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Og(i)||(i?"Someone":""))}function qO({channelId:e,oldChannelId:t},o){if(o&&e!==rb&&(t=rb,rb=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function KO(e,t){let o=Object.assign({},mo.plain,e),r=D.getCurrentUser(),i=Wo.getGuildId();_g(Bg(o[t+"Message"],r.username,"general",r.globalName??r.username,De.getNick(i,r.id)??r.username),o)}var hN,rb,Fg,yN=f(()=>{"use strict";a();Oi();M();Ne();ze();Xo();x();$();S();nb();hN=R("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");Fg=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[p.Ven],reporterTestable:2,settings:mo,flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=Wo.getGuildId(),o=Ee.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]=qO(i,u);if(!d)continue;let h=mo.store[d+"Message"],v=u&&!mo.store.sayOwnName?"":D.getUser(s).username,C=v&&(D.getUser(s).globalName??v),w=v&&(De.getNick(t,s)??v),T=ie.getChannel(g).name;_g(Bg(h,v,T,C,w))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ee.getVoiceChannelId(),t=hN.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";_g(Bg(mo.store[o+"Message"],"",ie.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ee.getVoiceChannelId(),t=hN.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";_g(Bg(mo.store[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}},settingsAboutComponent({tempSettings:e}){let[t,o]=Re(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=Re(()=>Object.keys(mo.def).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(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:()=>KO(e,s)},ko([s]))))),i)}})});var vN=f(()=>{});function ZO(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:hl}),n(E.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:t,label:"Enable QuickCSS",action:()=>{Z.useQuickCss=!t}}),n(E.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...o)}function JO(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 QO(){let[e,t]=q(!1);return n(ws,{position:"bottom",align:"right",animation:ws.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>ZO(()=>t(!1))},(o,{isShown:r})=>n(YO,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>JO(r),selected:r}))}function XO({children:e}){return e.splice(e.length-1,0,n(k,{noop:!0},n(QO,null))),n(m,null,e)}var YO,Ug,bN=f(()=>{"use strict";a();vN();Cu();_();ne();M();x();$();S();YO=se(".HEADER_BAR_BADGE_TOP:",'.iconBadge,"top"');Ug=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(XO,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function xN(e,t,o){let r=e.startsWith("/")?"png":ib.store.format,i=new URL(e,window.location.href);i.searchParams.set("size",ib.store.imgSize),i.pathname=i.pathname.replace(/\.(png|jpe?g|webp)$/,`.${r}`),e=i.toString(),i.searchParams.set("size","4096");let s=i.toString();Zo({url:e,original:s,width:t,height:o})}var ib,$c,SN,VO,e_,t_,$g,TN=f(()=>{"use strict";a();_();At();M();Ie();x();S();ib=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"}))}}),$c=e=>xN(e,512,512),SN=e=>xN(e,1024);VO=(e,{user:t,guildId:o})=>{if(!t)return;let r=De.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(E.MenuGroup,null,n(E.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>$c(Ft.getUserAvatarURL(t,!0)),icon:yn}),r&&n(E.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>$c(Ft.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0})),icon:yn})))},e_=(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:()=>$c(Ft.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:yn}):null,i?n(E.MenuItem,{id:"view-banner",label:"View Banner",action:()=>SN(Ft.getGuildBannerURL(t,!0)),icon:yn}):null))},t_=(e,{channel:t})=>{t&&e.splice(-1,0,n(E.MenuGroup,null,n(E.MenuItem,{id:"view-group-channel-icon",label:"View Icon",action:()=>$c(Ft.getChannelIconURL(t)),icon:yn})))},$g=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:ib,openAvatar:$c,openBanner:SN,contextMenus:{"user-context":VO,"guild-context":e_,"gdm-context":t_},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 o_(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function n_(e){let t=o_(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 ab(e,t,o){let r=he(i=>n(k,null,n(ve,{...i,size:"large"},n(Ae,null,n(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(pt,{onClick:()=>sr(r)})),n(Me,null,n("div",{style:{padding:"16px 0"}},!!o&&n(m,null,n(b.FormTitle,{tag:"h5"},"Content"),n(il,{content:o,lang:""}),n(b.FormDivider,{className:F.bottom20})),n(b.FormTitle,{tag:"h5"},t," Data"),n(il,{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 wN(e){e=n_(e);let t=JSON.stringify(e,null,4);return ab(t,"Message",e.content)}function Pa(e){return(t,o)=>{let r=o[e.toLowerCase()];if(!r||o.label===Pe("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:()=>ab(JSON.stringify(r,null,4),e),icon:sb}))}}var sb,Gg,r_,zg,MN=f(()=>{"use strict";a();_();xu();ne();jt();M();Ie();ze();me();Ke();x();S();sb=()=>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"}));Gg=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"}]}});r_=(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:()=>ab(JSON.stringify(r,null,4),"Role"),icon:sb}))},zg=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:Gg,contextMenus:{"guild-context":Pa("Guild"),"guild-settings-role-context":Pa("Role"),"channel-context":Pa("Channel"),"thread-context":Pa("Channel"),"gdm-context":Pa("Channel"),"user-context":Pa("User"),"dev-context":r_},renderMessagePopoverButton(e){let t=()=>{Gg.store.clickMethod==="Right"?Xt(e.content):wN(e)},o=i=>{Gg.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Xt(e.content)):(i.preventDefault(),i.stopPropagation(),wN(e))};return{label:Gg.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:sb,message:e,channel:ie.getChannel(e.channel_id),onClick:t,onContextMenu:o}}})});var PN=f(()=>{});var Hg,IN=f(()=>{"use strict";a();PN();M();x();Hg=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 CN=f(()=>{});var Ia,jg=f(()=>{"use strict";a();_();x();Ia=P({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var lb,yi,Gc=f(()=>{"use strict";a();He();$();lb=be("MediaEngineStore"),yi=ue("vc-vmsg-")});var i_,kN,NN=f(()=>{"use strict";a();S();jg();Gc();i_=VencordNative.pluginHelpers.VoiceMessages,kN=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=q(!1),i=l=>{r(l),t?.(l)};function s(){let l=DiscordNative.nativeModules.requireModule("discord_voice");!o?l.startLocalAudioRecording({echoCancellation:Ia.store.echoCancellation,noiseCancellation:Ia.store.noiseSuppression,deviceId:lb.getInputDeviceId()},u=>{u?i(!0):Je("Failed to start recording",ee.Type.FAILURE)}):l.stopLocalAudioRecording(async u=>{if(u){let d=await i_.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 s_,AN,RN=f(()=>{"use strict";a();wt();$();Gc();s_=se("waveform:","onVolumeChange"),AN=({src:e,waveform:t,recording:o})=>{let r=Xa({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(s_,{key:e,src:e,waveform:t}):n("div",{className:yi("preview",o?"preview-recording":[])},n("div",{className:yi("preview-indicator")}),n("div",{className:yi("preview-time")},s),n("div",{className:yi("preview-label")},o?"RECORDING":"----"))}});var DN=f(()=>{"use strict";a();S();jg();Gc()});function p_(e,t){let o=Ee.getChannelId(),r=l_.getPendingReply(o);r&&G.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new a_({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{vt.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?qo.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>Je("Failed to upload voice message",ee.Type.FAILURE)),i.upload()}function d_(){let[e,t]=q();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function m_({modalProps:e}){let[t,o]=q(!1),[r,i]=q(),[s,l]=d_();le(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=bt(async()=>{if(!r)return LN;let g=await new AudioContext().decodeAudioData(await r.arrayBuffer()),h=g.getChannelData(0),v=new Uint8Array(Ri.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),T=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]*T));return{waveform:window.btoa(String.fromCharCode(...v)),duration:g.duration}},{deps:[r],fallbackValue:LN}),u=r&&(!r.type.startsWith("audio/ogg")||r.type.includes("codecs")&&!r.type.includes("opus"));return n(ve,{...e},n(Ae,null,n(b.FormTitle,null,"Record Voice Message")),n(Me,{className:yi("modal")},n("div",{className:yi("buttons")},n(c_,{setAudioBlob:d=>{i(d),l(d)},onRecordingChange:o}),n(I,{onClick:async()=>{let d=await RS("audio/*");d&&(i(d),l(d))}},"Upload File")),n(b.FormTitle,null,"Preview"),n(AN,{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:()=>{p_(r,c),e.onClose(),Je("Now sending voice message... Please be patient",ee.Type.MESSAGE)}},"Send")))}var a_,l_,cb,c_,u_,Wg,LN,EN=f(()=>{"use strict";a();CN();At();Bo();M();ze();Ke();wt();x();l1();$();S();NN();jg();Gc();RN();DN();a_=kt(e=>e.prototype?.trackUploadFinished),l_=be("PendingReplyStore"),cb=R("optionName","optionIcon","optionLabel"),c_=kN,u_=(e,t)=>{t.channel.guild_id&&!(Fe.can(ke.SEND_VOICE_MESSAGES,t.channel)&&Fe.can(ke.SEND_MESSAGES,t.channel))||e.push(n(E.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:cb.optionLabel},n(Oh,{className:cb.optionIcon,height:24,width:24}),n("div",{className:cb.optionName},"Send voice message")),action:()=>he(o=>n(m_,{modalProps:o}))}))},Wg=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:Ia,contextMenus:{"channel-attach":u_}}),LN={waveform:"AAAAAAAAAAAA",duration:1}});var f_,qg,ON=f(()=>{"use strict";a();_();vr();M();x();f_=P({multiplier:{description:"Volume Multiplier",type:5,markers:Vt(1,5,1),default:2,stickToMarkers:!0}}),qg=y({name:"VolumeBooster",authors:[p.Nuckyz,p.sadan],description:"Allows you to set the user and stream volume above the default maximum",settings:f_,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 v_(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return vt.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 b_(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=BN[r]??={fetched:!1,users:{}};return i.fetched||(y_.unshift(()=>v_(e,t,o)),i.fetched=!0),i.users}function S_(e){return function(o,r){return n(oe,{text:e.slice(4).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:h_.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-4))}}function _N(e){e.stopPropagation()}var g_,h_,ub,y_,BN,Kg,FN=f(()=>{"use strict";a();ne();M();me();Kr();wt();x();$();S();g_=se("defaultRenderUser","showDefaultAvatarsForNullUsers"),h_=R("moreUsers","emptyUser","avatarContainer","clickableAvatar"),ub=null,y_=new Mo;Kg=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){ub=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();Ci(()=>{ub?.scrollCounter>0&&ub.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=b_(e,t,o),s=Object.values(i).filter(Boolean);return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:_N,onKeyPress:_N},n(g_,{users:s,guildId:ie.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:S_(s)})))},set reactions(e){BN=e}})});async function pb(){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 w_(e){return e.type===Yg.DM&&Yt.store.dmNotifications||e.type===Yg.GROUP_DM&&Yt.store.groupDmNotifications?!1:!Yt.store.serverNotifications}function M_(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?zN(t):Yt.store.timeout,height:GN(t),opacity:Yt.store.opacity,volume:Yt.store.volume,audioPath:Yt.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};$N(i)})}function UN(e,t){let o={type:1,timeout:Yt.store.lengthBasedTimeout?zN(e):Yt.store.timeout,height:GN(e),opacity:Yt.store.opacity,volume:Yt.store.volume,audioPath:Yt.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:"default",sourceApp:"Vencord"};$N(o)}async function $N(e){if(Yt.store.preferUDP){T_.sendToOverlay(e);return}let t={sender:"Vencord",target:"xsoverlay",command:"SendNotification",jsonData:JSON.stringify(e),rawData:null};Ur.readyState!==Ur.OPEN&&await pb(),Ur.send(JSON.stringify(t))}function P_(e,t){let o=D.getCurrentUser();return e.author.id===o.id||e.author.bot&&!Yt.store.botNotifications?!1:x_(e,t)}function GN(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function zN(e){return e.length<=100?3:e.length<=200?4:e.length<=300?5:6}var Yg,x_,a5e,Yt,Ur,T_,Zg,HN=f(()=>{"use strict";a();_();vr();M();Ne();x();$();S();Yg=kt(e=>e.ANNOUNCEMENT_THREAD===10),x_=we(".SUPPRESS_NOTIFICATIONS))return!1"),a5e=new V("XSOverlay"),Yt=P({webSocketPort:{type:1,description:"Websocket port",default:42070,async onChange(){await pb()}},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)}});T_=VencordNative.pluginHelpers.XSOverlay,Zg=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);UN("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){if(t)return;let o=ie.getChannel(e.channel_id);if(!P_(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 Yg.DM:l=e.author.username.trim();break;case Yg.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>`)}w_(o)||M_(l,s,e)}},start:pb,stop(){Ur.close()},settingsAboutComponent:()=>n(m,null,n(I,{onClick:()=>UN("This is a test notification! explode","Hello from Vendor!")},"Send test notification"))})});var Jg,jN=f(()=>{"use strict";a();M();x();Jg=y({name:"YoutubeAdblock",description:"Block ads in YouTube embeds and the WatchTogether activity via AdGuard",authors:[p.ImLvna,p.Ven]})});var je,js,C2,$n=f(()=>{a();my();N2();A2();R2();D2();O2();B2();F2();G2();z2();H2();j2();W2();q2();K2();Z2();yy();Mx();Px();Ix();Cx();kx();Nx();Dx();Ex();xy();$x();Gx();zx();Wx();qx();dT();fT();gT();ST();TT();wT();CT();LT();ET();OT();FT();$T();zT();HT();WT();qT();VT();ew();ow();Cw();kw();Nw();Lw();_w();Bw();sM();fM();gM();vM();bM();SM();xM();TM();wM();MM();CM();NM();AM();OM();_M();$M();jM();WM();ZM();JM();p0();nP();Qd();dP();mP();hP();bP();S0();IP();AP();DP();BP();k0();ZP();JP();QP();XP();tI();iI();aI();lI();cI();uI();dI();mI();fI();gI();hI();yI();vI();bI();SI();xI();TI();wI();MI();PI();II();CI();kI();DI();LI();EI();fc();jI();KI();af();g4();T4();P4();I4();L4();E4();_4();Z4();J4();V4();eC();nC();NC();AC();DC();EC();FC();WC();KC();Nk();Ak();Ok();Dv();Gk();Hk();Kk();Yk();Zk();Vk();l5();c5();u5();m5();f5();h5();y5();P5();I5();F5();H5();Jv();j5();W5();q5();tN();aN();lN();cN();dN();mN();yN();bN();TN();MN();IN();EN();ON();FN();HN();jN();je={[Ks.name]:Ks,[Qu.name]:Qu,[Xu.name]:Xu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[op.name]:op,[np.name]:np,[rp.name]:rp,[ip.name]:ip,[sp.name]:sp,[ap.name]:ap,[lp.name]:lp,[cp.name]:cp,[up.name]:up,[pp.name]:pp,[Ys.name]:Ys,[hp.name]:hp,[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,[Ap.name]:Ap,[Rp.name]:Rp,[Lp.name]:Lp,[Ep.name]:Ep,[Op.name]:Op,[_p.name]:_p,[Bp.name]:Bp,[Fp.name]:Fp,[zp.name]:zp,[Hp.name]:Hp,[jp.name]:jp,[qp.name]:qp,[Kp.name]:Kp,[Yp.name]:Yp,[Zp.name]:Zp,[Jp.name]:Jp,[Qp.name]:Qp,[ed.name]:ed,[td.name]:td,[nd.name]:nd,[dd.name]:dd,[md.name]:md,[fd.name]:fd,[hd.name]:hd,[vd.name]:vd,[bd.name]:bd,[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,[Gd.name]:Gd,[zd.name]:zd,[jd.name]:jd,[Wd.name]:Wd,[qd.name]:qd,[Kd.name]:Kd,[Yd.name]:Yd,[Zd.name]:Zd,[Jd.name]:Jd,[Xd.name]:Xd,[Vd.name]:Vd,[tm.name]:tm,[nm.name]:nm,[rm.name]:rm,[am.name]:am,[lm.name]:lm,[cm.name]:cm,[um.name]:um,[dm.name]:dm,[fm.name]:fm,[hm.name]:hm,[ym.name]:ym,[vm.name]:vm,[bm.name]:bm,[xm.name]:xm,[Tm.name]:Tm,[Mm.name]:Mm,[Pm.name]:Pm,[Im.name]:Im,[Cm.name]:Cm,[km.name]:km,[Nm.name]:Nm,[Am.name]:Am,[Rm.name]:Rm,[Dm.name]:Dm,[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,[Km.name]:Km,[Ym.name]:Ym,[ef.name]:ef,[of.name]:of,[nf.name]:nf,[cf.name]:cf,[uf.name]:uf,[df.name]:df,[mf.name]:mf,[ff.name]:ff,[yf.name]:yf,[vf.name]:vf,[xf.name]:xf,[Pf.name]:Pf,[If.name]:If,[Cf.name]:Cf,[kf.name]:kf,[Af.name]:Af,[Ff.name]:Ff,[Uf.name]:Uf,[$f.name]:$f,[Gf.name]:Gf,[zf.name]:zf,[Hf.name]:Hf,[jf.name]:jf,[Jf.name]:Jf,[Qf.name]:Qf,[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,[gg.name]:gg,[hg.name]:hg,[bg.name]:bg,[vg.name]:vg,[Sg.name]:Sg,[xg.name]:xg,[Tg.name]:Tg,[Mg.name]:Mg,[kg.name]:kg,[Ng.name]:Ng,[Ag.name]:Ag,[Dg.name]:Dg,[Lg.name]:Lg,[Fg.name]:Fg,[Ug.name]:Ug,[$g.name]:$g,[zg.name]:zg,[Hg.name]:Hg,[Wg.name]:Wg,[qg.name]:qg,[Kg.name]:Kg,[Zg.name]:Zg,[Jg.name]:Jg},js={[Ks.name]:{folderName:"_api/badges",userPlugin:!1},[Qu.name]:{folderName:"_api/chatButtons.ts",userPlugin:!1},[Xu.name]:{folderName:"_api/commands.ts",userPlugin:!1},[Vu.name]:{folderName:"_api/contextMenu.ts",userPlugin:!1},[ep.name]:{folderName:"_api/dynamicImageModalApi.ts",userPlugin:!1},[tp.name]:{folderName:"_api/memberListDecorators",userPlugin:!1},[op.name]:{folderName:"_api/menuItemDemangler.ts",userPlugin:!1},[np.name]:{folderName:"_api/messageAccessories.ts",userPlugin:!1},[rp.name]:{folderName:"_api/messageDecorations",userPlugin:!1},[ip.name]:{folderName:"_api/messageEvents.ts",userPlugin:!1},[sp.name]:{folderName:"_api/messagePopover.ts",userPlugin:!1},[ap.name]:{folderName:"_api/messageUpdater.ts",userPlugin:!1},[lp.name]:{folderName:"_api/notices.ts",userPlugin:!1},[cp.name]:{folderName:"_api/serverList.ts",userPlugin:!1},[up.name]:{folderName:"_api/userSettings.ts",userPlugin:!1},[pp.name]:{folderName:"_core/noTrack.ts",userPlugin:!1},[Ys.name]:{folderName:"_core/settings.tsx",userPlugin:!1},[hp.name]:{folderName:"_core/supportHelper.tsx",userPlugin:!1},[vp.name]:{folderName:"accountPanelServerProfile",userPlugin:!1},[bp.name]:{folderName:"alwaysAnimate",userPlugin:!1},[Sp.name]:{folderName:"alwaysExpandRoles",userPlugin:!1},[xp.name]:{folderName:"alwaysTrust",userPlugin:!1},[Tp.name]:{folderName:"anonymiseFileNames",userPlugin:!1},[wp.name]:{folderName:"appleMusic.desktop",userPlugin:!1},[Mp.name]:{folderName:"banger",userPlugin:!1},[Pp.name]:{folderName:"betterFolders",userPlugin:!1},[Ip.name]:{folderName:"betterGifAltText",userPlugin:!1},[Cp.name]:{folderName:"betterGifPicker",userPlugin:!1},[kp.name]:{folderName:"betterNotes",userPlugin:!1},[Np.name]:{folderName:"betterRoleContext",userPlugin:!1},[Ap.name]:{folderName:"betterRoleDot",userPlugin:!1},[Rp.name]:{folderName:"betterSessions",userPlugin:!1},[Lp.name]:{folderName:"betterSettings",userPlugin:!1},[Ep.name]:{folderName:"betterUploadButton",userPlugin:!1},[Op.name]:{folderName:"biggerStreamPreview",userPlugin:!1},[_p.name]:{folderName:"blurNsfw",userPlugin:!1},[Bp.name]:{folderName:"callTimer",userPlugin:!1},[Fp.name]:{folderName:"clearURLs",userPlugin:!1},[zp.name]:{folderName:"clientTheme",userPlugin:!1},[Hp.name]:{folderName:"colorSighted",userPlugin:!1},[jp.name]:{folderName:"consoleJanitor",userPlugin:!1},[qp.name]:{folderName:"consoleShortcuts",userPlugin:!1},[Kp.name]:{folderName:"copyEmojiMarkdown",userPlugin:!1},[Yp.name]:{folderName:"copyFileContents",userPlugin:!1},[Zp.name]:{folderName:"copyUserURLs",userPlugin:!1},[Jp.name]:{folderName:"crashHandler",userPlugin:!1},[Qp.name]:{folderName:"ctrlEnterSend",userPlugin:!1},[ed.name]:{folderName:"customRPC",userPlugin:!1},[td.name]:{folderName:"customidle",userPlugin:!1},[nd.name]:{folderName:"dearrow",userPlugin:!1},[dd.name]:{folderName:"decor",userPlugin:!1},[md.name]:{folderName:"disableCallIdle",userPlugin:!1},[fd.name]:{folderName:"dontRoundMyTimestamps",userPlugin:!1},[hd.name]:{folderName:"emoteCloner",userPlugin:!1},[vd.name]:{folderName:"experiments",userPlugin:!1},[bd.name]:{folderName:"f8break",userPlugin:!1},[kd.name]:{folderName:"fakeNitro",userPlugin:!1},[Nd.name]:{folderName:"fakeProfileThemes",userPlugin:!1},[Ad.name]:{folderName:"favEmojiFirst",userPlugin:!1},[Rd.name]:{folderName:"favGifSearch",userPlugin:!1},[Dd.name]:{folderName:"fixCodeblockGap",userPlugin:!1},[Ld.name]:{folderName:"fixImagesQuality",userPlugin:!1},[Ed.name]:{folderName:"fixSpotifyEmbeds.desktop",userPlugin:!1},[Od.name]:{folderName:"fixYoutubeEmbeds.desktop",userPlugin:!1},[_d.name]:{folderName:"forceOwnerCrown",userPlugin:!1},[Bd.name]:{folderName:"friendInvites",userPlugin:!1},[Fd.name]:{folderName:"friendsSince",userPlugin:!1},[Ud.name]:{folderName:"fullSearchContext",userPlugin:!1},[$d.name]:{folderName:"fullUserInChatbox",userPlugin:!1},[Gd.name]:{folderName:"gameActivityToggle",userPlugin:!1},[zd.name]:{folderName:"gifPaste",userPlugin:!1},[jd.name]:{folderName:"greetStickerPicker",userPlugin:!1},[Wd.name]:{folderName:"hideAttachments",userPlugin:!1},[qd.name]:{folderName:"iLoveSpam",userPlugin:!1},[Kd.name]:{folderName:"ignoreActivities",userPlugin:!1},[Yd.name]:{folderName:"imageLink",userPlugin:!1},[Zd.name]:{folderName:"imageZoom",userPlugin:!1},[Jd.name]:{folderName:"implicitRelationships",userPlugin:!1},[Xd.name]:{folderName:"invisibleChat.desktop",userPlugin:!1},[Vd.name]:{folderName:"ircColors",userPlugin:!1},[tm.name]:{folderName:"keepCurrentChannel",userPlugin:!1},[nm.name]:{folderName:"lastfm",userPlugin:!1},[rm.name]:{folderName:"loadingQuotes",userPlugin:!1},[am.name]:{folderName:"memberCount",userPlugin:!1},[lm.name]:{folderName:"mentionAvatars",userPlugin:!1},[cm.name]:{folderName:"messageClickActions",userPlugin:!1},[um.name]:{folderName:"messageLatency",userPlugin:!1},[dm.name]:{folderName:"messageLinkEmbeds",userPlugin:!1},[fm.name]:{folderName:"messageLogger",userPlugin:!1},[hm.name]:{folderName:"messageTags",userPlugin:!1},[ym.name]:{folderName:"moreCommands",userPlugin:!1},[vm.name]:{folderName:"moreKaomoji",userPlugin:!1},[bm.name]:{folderName:"moyai",userPlugin:!1},[xm.name]:{folderName:"mutualGroupDMs",userPlugin:!1},[Tm.name]:{folderName:"newGuildSettings",userPlugin:!1},[Mm.name]:{folderName:"noBlockedMessages",userPlugin:!1},[Pm.name]:{folderName:"noDevtoolsWarning",userPlugin:!1},[Im.name]:{folderName:"noF1",userPlugin:!1},[Cm.name]:{folderName:"noMaskedUrlPaste",userPlugin:!1},[km.name]:{folderName:"noMosaic",userPlugin:!1},[Nm.name]:{folderName:"noOnboardingDelay",userPlugin:!1},[Am.name]:{folderName:"noPendingCount",userPlugin:!1},[Rm.name]:{folderName:"noProfileThemes",userPlugin:!1},[Dm.name]:{folderName:"noRPC.discordDesktop",userPlugin:!1},[Em.name]:{folderName:"noReplyMention",userPlugin:!1},[Om.name]:{folderName:"noServerEmojis",userPlugin:!1},[_m.name]:{folderName:"noSystemBadge.discordDesktop",userPlugin:!1},[Bm.name]:{folderName:"noTypingAnimation",userPlugin:!1},[Fm.name]:{folderName:"noUnblockToJump",userPlugin:!1},[Um.name]:{folderName:"normalizeMessageLinks",userPlugin:!1},[$m.name]:{folderName:"notificationVolume",userPlugin:!1},[Gm.name]:{folderName:"nsfwGateBypass",userPlugin:!1},[zm.name]:{folderName:"onePingPerDM",userPlugin:!1},[Hm.name]:{folderName:"oneko",userPlugin:!1},[jm.name]:{folderName:"openInApp",userPlugin:!1},[Wm.name]:{folderName:"overrideForumDefaults",userPlugin:!1},[qm.name]:{folderName:"partyMode",userPlugin:!1},[Km.name]:{folderName:"pauseInvitesForever",userPlugin:!1},[Ym.name]:{folderName:"permissionFreeWill",userPlugin:!1},[ef.name]:{folderName:"permissionsViewer",userPlugin:!1},[of.name]:{folderName:"petpet",userPlugin:!1},[nf.name]:{folderName:"pictureInPicture",userPlugin:!1},[cf.name]:{folderName:"pinDms",userPlugin:!1},[uf.name]:{folderName:"plainFolderIcon",userPlugin:!1},[df.name]:{folderName:"platformIndicators",userPlugin:!1},[mf.name]:{folderName:"previewMessage",userPlugin:!1},[ff.name]:{folderName:"quickMention",userPlugin:!1},[yf.name]:{folderName:"quickReply",userPlugin:!1},[vf.name]:{folderName:"reactErrorDecoder",userPlugin:!1},[xf.name]:{folderName:"readAllNotificationsButton",userPlugin:!1},[Pf.name]:{folderName:"relationshipNotifier",userPlugin:!1},[If.name]:{folderName:"replaceGoogleSearch",userPlugin:!1},[Cf.name]:{folderName:"replyTimestamp",userPlugin:!1},[kf.name]:{folderName:"revealAllSpoilers",userPlugin:!1},[Af.name]:{folderName:"reverseImageSearch",userPlugin:!1},[Ff.name]:{folderName:"reviewDB",userPlugin:!1},[Uf.name]:{folderName:"roleColorEverywhere",userPlugin:!1},[$f.name]:{folderName:"secretRingTone",userPlugin:!1},[Gf.name]:{folderName:"seeSummaries",userPlugin:!1},[zf.name]:{folderName:"sendTimestamps",userPlugin:!1},[Hf.name]:{folderName:"serverInfo",userPlugin:!1},[jf.name]:{folderName:"serverListIndicators",userPlugin:!1},[Jf.name]:{folderName:"shikiCodeblocks.desktop",userPlugin:!1},[Qf.name]:{folderName:"showAllMessageButtons",userPlugin:!1},[Vf.name]:{folderName:"showConnections",userPlugin:!1},[eg.name]:{folderName:"showHiddenChannels",userPlugin:!1},[tg.name]:{folderName:"showHiddenThings",userPlugin:!1},[og.name]:{folderName:"showMeYourName",userPlugin:!1},[ng.name]:{folderName:"showTimeoutDuration",userPlugin:!1},[rg.name]:{folderName:"silentMessageToggle",userPlugin:!1},[ig.name]:{folderName:"silentTyping",userPlugin:!1},[sg.name]:{folderName:"sortFriendRequests",userPlugin:!1},[ag.name]:{folderName:"spotifyControls",userPlugin:!1},[lg.name]:{folderName:"spotifyCrack",userPlugin:!1},[cg.name]:{folderName:"spotifyShareCommands",userPlugin:!1},[ug.name]:{folderName:"startupTimings",userPlugin:!1},[pg.name]:{folderName:"stickerPaste",userPlugin:!1},[dg.name]:{folderName:"streamerModeOnStream",userPlugin:!1},[mg.name]:{folderName:"superReactionTweaks",userPlugin:!1},[fg.name]:{folderName:"textReplace",userPlugin:!1},[gg.name]:{folderName:"themeAttributes",userPlugin:!1},[hg.name]:{folderName:"translate",userPlugin:!1},[bg.name]:{folderName:"typingIndicator",userPlugin:!1},[vg.name]:{folderName:"typingTweaks",userPlugin:!1},[Sg.name]:{folderName:"unindent",userPlugin:!1},[xg.name]:{folderName:"unlockedAvatarZoom",userPlugin:!1},[Tg.name]:{folderName:"unsuppressEmbeds",userPlugin:!1},[Mg.name]:{folderName:"userMessagesPronouns",userPlugin:!1},[kg.name]:{folderName:"userVoiceShow",userPlugin:!1},[Ng.name]:{folderName:"usrbg",userPlugin:!1},[Ag.name]:{folderName:"validReply",userPlugin:!1},[Dg.name]:{folderName:"validUser",userPlugin:!1},[Lg.name]:{folderName:"vcDoubleClick",userPlugin:!1},[Fg.name]:{folderName:"vcNarrator",userPlugin:!1},[Ug.name]:{folderName:"vencordToolbox",userPlugin:!1},[$g.name]:{folderName:"viewIcons",userPlugin:!1},[zg.name]:{folderName:"viewRaw",userPlugin:!1},[Hg.name]:{folderName:"voiceDownload",userPlugin:!1},[Wg.name]:{folderName:"voiceMessages",userPlugin:!1},[qg.name]:{folderName:"volumeBooster",userPlugin:!1},[Kg.name]:{folderName:"whoReacted",userPlugin:!1},[Zg.name]:{folderName:"xsOverlay",userPlugin:!1},[Jg.name]:{folderName:"youtubeAdblock.desktop",userPlugin:!1}},C2={"WebRichPresence (arRPC)":"web",DevCompanion:"dev",DisableDeepLinks:"web",WebContextMenus:"web",WebKeybinds:"web",WebScreenShareFixes:"web"}});var mb={};lt(mb,{BadgePosition:()=>Ju,_getBadges:()=>fy,addProfileBadge:()=>jl,removeProfileBadge:()=>Wl});function jl(e){e.component&&=k.wrap(e.component,{noop:!0}),db.add(e)}function Wl(e){return db.delete(e)}function fy(e){let t=[];for(let r of db)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 Ju,db,ql=f(()=>{"use strict";a();ne();$n();Ju=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(Ju||{}),db=new Set});var fb={};lt(fb,{Badges:()=>A_,ChatButtons:()=>F_,Commands:()=>C_,ContextMenu:()=>B_,DataStore:()=>It,MemberListDecorators:()=>L_,MessageAccessories:()=>k_,MessageDecorations:()=>D_,MessageEvents:()=>I_,MessagePopover:()=>N_,MessageUpdater:()=>U_,Notices:()=>Ir,Notifications:()=>__,ServerList:()=>R_,Settings:()=>E_,Styles:()=>O_,UserSettings:()=>$_});var I_,Ir,C_,It,k_,N_,A_,R_,D_,L_,E_,O_,__,B_,F_,U_,$_,Mr=f(()=>{"use strict";a();ql();xr();sn();No();_n();El();zu();Bl();$l();oy();ia();h1();pr();Sf();_();He();wr();I_=X1,Ir=g1,C_=w1,It=ir,k_=j1,N_=ty,A_=mb,R_=J0,D_=W1,L_=H1,E_=p1,O_=Nh,__=Zh,B_=z1,F_=F1,U_=s0,$_=by});function G_(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 WN=f(()=>{"use strict";a()});var gb={};lt(gb,{CONTRIB_ROLE_ID:()=>mh,ChangeList:()=>Dl,DONOR_ROLE_ID:()=>Ja,Devs:()=>p,DevsById:()=>As,KNOWN_ISSUES_CHANNEL_ID:()=>gh,LazyComponent:()=>gt,Logger:()=>V,Margins:()=>F,ModalAPI:()=>ol,ModalCloseButton:()=>pt,ModalContent:()=>Me,ModalFooter:()=>ut,ModalHeader:()=>Ae,ModalRoot:()=>ve,ModalSize:()=>_o,Modals:()=>Ls,NoopComponent:()=>bh,Queue:()=>Mo,REACT_GLOBAL:()=>MA,REGULAR_ROLE_ID:()=>fh,SUPPORT_CATEGORY_ID:()=>Ns,SUPPORT_CHANNEL_ID:()=>pu,SYM_LAZY_CACHED:()=>Zn,SYM_LAZY_GET:()=>an,Theme:()=>Tu,VENBOT_USER_ID:()=>uu,VENCORD_GUILD_ID:()=>Za,ZWSP:()=>wl,canonicalizeDescriptor:()=>Kc,canonicalizeFind:()=>Vg,canonicalizeMatch:()=>Lt,canonicalizeReplace:()=>Aa,canonicalizeReplacement:()=>Si,checkIntersecting:()=>yh,classes:()=>z,closeAllModals:()=>Bn,closeModal:()=>sr,copyWithToast:()=>Xt,debounce:()=>Oo,fetchUserProfile:()=>Dh,formatDuration:()=>Ml,getCurrentChannel:()=>Yo,getCurrentGuild:()=>ar,getEmojiURL:()=>wu,getIntlMessage:()=>Pe,getIntlMessageFromHash:()=>aS,getTheme:()=>Es,getUniqueUsername:()=>cr,humanFriendlyJoin:()=>P3,identity:()=>Rs,insertTextIntoChatInputBox:()=>lr,interpolateIfDefined:()=>Qa,isMobile:()=>IA,isNonNullish:()=>Pr,isObject:()=>PA,isObjectEmpty:()=>nr,isPluginDev:()=>fn,isTruthy:()=>Xp,localStorage:()=>Bi,makeCodeblock:()=>Hi,makeLazy:()=>tn,mergeDefaults:()=>Ds,onceDefined:()=>G_,onlyOnce:()=>Yi,openImageModal:()=>Zo,openInviteModal:()=>Ui,openMediaModal:()=>Ah,openModal:()=>he,openModalLazy:()=>nl,openPrivateChannel:()=>UA,openUserProfile:()=>Jo,parseUrl:()=>hh,pluralise:()=>vh,proxyLazy:()=>Dt,runtimeHashMessageKey:()=>Ln,sendMessage:()=>Os,sleep:()=>mn,stripIndent:()=>I3,toInlineCode:()=>C3,tryOrElse:()=>du,useAwaiter:()=>bt,useForceUpdater:()=>rr,useIntersection:()=>Sh,useTimer:()=>Xa,wordsFromCamel:()=>Sn,wordsFromKebab:()=>v3,wordsFromPascal:()=>y1,wordsFromSnake:()=>y3,wordsFromTitle:()=>b3,wordsToCamel:()=>S3,wordsToKebab:()=>T3,wordsToPascal:()=>w3,wordsToSnake:()=>x3,wordsToTitle:()=>ko});var qN=f(()=>{"use strict";a();_i();WN();L1();M();Ie();Qs();bs();So();ka();hu();Ne();ze();yu();me();Ke();Rl();jo();Kr();wt();Xo();});var vb={};lt(vb,{toggle:()=>hb});function yb(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function z_(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");yb("vencord-os-theme-values").textContent=`:root{${t}}`}async function hb(e){Ca?Ca.disabled=!e:e&&(Ca=yb("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{Ca.textContent=t,Ca.disabled=!Z.useQuickCss}),Ca.textContent=await VencordNative.quickCss.get())}async function zc(){KN??=yb("vencord-themes");let{themeLinks:e,enabledThemes:t}=Z,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)}KN.textContent=r.map(i=>`@import url("${i.trim()}");`).join(`
|
|
`)}var Ca,KN,bb=f(()=>{"use strict";a();_();S();document.addEventListener("DOMContentLoaded",()=>{z_(),zc(),hb(Z.useQuickCss),Wt.addChangeListener("useQuickCss",hb),Wt.addChangeListener("themeLinks",zc),Wt.addChangeListener("enabledThemes",zc);let e=pn.theme;pn.addChangeListener(()=>{e!==pn.theme&&(e=pn.theme,zc())}),VencordNative.quickCss.addThemeChangeListener(zc)})});var YN=f(()=>{"use strict";a()});var Sb={};lt(Sb,{ChunkIdsRegex:()=>tu,Common:()=>ks,DefaultExtractAndLoadChunksRegex:()=>eu,LazyComponentWebpack:()=>Qc,_blacklistBadModules:()=>Jc,_initWebpack:()=>Ea,_resolveReady:()=>Ra,cache:()=>on,extract:()=>Fa,extractAndLoadChunks:()=>oh,extractAndLoadChunksLazy:()=>Xn,factoryListeners:()=>La,filters:()=>B,find:()=>nn,findAll:()=>Gr,findBulk:()=>zr,findByCode:()=>Ba,findByCodeLazy:()=>we,findByProps:()=>_a,findByPropsLazy:()=>R,findComponentByCode:()=>Xc,findComponentByCodeLazy:()=>se,findComponentLazy:()=>Vc,findExportedComponentLazy:()=>Ob,findLazy:()=>kt,findModuleFactory:()=>Oa,findModuleId:()=>Hr,findStore:()=>eh,findStoreLazy:()=>be,fluxStores:()=>Ti,handleModuleNotFound:()=>En,lazyWebpackSearchHistory:()=>Eb,mapMangledModule:()=>th,mapMangledModuleLazy:()=>Ze,moduleListeners:()=>Zc,onceReady:()=>wi,proxyLazyWebpack:()=>Eo,search:()=>Ss,stringMatches:()=>Da,waitFor:()=>Xe,waitForSubscriptions:()=>Mi,wreq:()=>Tt});var xb=f(()=>{"use strict";a();S();$();YN()});var W_={};lt(W_,{Api:()=>fb,Components:()=>qh,PlainSettings:()=>Un,Plugins:()=>Ku,QuickCss:()=>vb,Settings:()=>Z,Updater:()=>R1,Util:()=>gb,Webpack:()=>Sb,WebpackPatcher:()=>sy});async function H_(){if(Z.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:()=>lu.open("VencordCloud")});return}Z.cloud.settingsSync&&Z.cloud.authenticated&&(Bi.Vencord_settingsDirty?(await Us(),delete Bi.Vencord_settingsDirty):await Lu(!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 j_(){await wi,Hl("WebpackReady"),H_();try{if(!await br())return;if(Z.autoUpdate){await ei(),Z.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:mp}),1e4)}catch(e){qi.error("Failed to check for updates",e)}}var rP=f(()=>{a();Mr();_s();Yu();qN();bb();Ki();xb();qu();bb();qu();fp();x();_n();pr();_();Yu();hu();gr();xl();Ki();xb();S();Hl("Init");j_();document.addEventListener("DOMContentLoaded",()=>{Hl("DOMContentLoaded"),Z.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})});rP();return wb(W_);})();
|
|
//# sourceURL=VencordRenderer
|
|
//# sourceMappingURL=vencord://renderer.js.map
|
|
/*! For license information please see renderer.js.LEGAL.txt */
|