`;return(0,eval)(n)}var Ii,Ks,oc,mn,In,ce,Lr,Ys,st,rc,Hg,zg,j=g(()=>{"use strict";a();Zt();Je();qs();Ii=new ie("Webpack"),oc=new Promise(e=>Ks=e),ce={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e},Lr=new Map,Ys=new Set;st=Pn("find",function(t,{isIndirect:n=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in In){let s=In[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(typeof s.exports=="object"){if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,Number(i)]:l}for(let l in s.exports)if(l.length<=3){let c=s.exports[l];if(c&&t(c))return r?[c,Number(i)]:c}}}}return n||Xs("find",t),r?[null,null]:null});rc=Pn("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return st(t[0]);let r=t,i=0,s=Array(n);e:for(let l in In){let c=In[l];if(!!c?.exports)for(let u=0;u<n;u++){let d=r[u];if(d!==void 0){if(d(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===n)break e;break}if(typeof c.exports=="object"){if(c.exports.default&&d(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===n)break e;break}for(let m in c.exports)if(m.length<=3){let h=c.exports[m];if(h&&d(h)){if(s[u]=h,r[u]=void 0,++i===n)break e;continue e}}}}}}if(i!==n){let l=new Error(`Got${n}filters,butonlyfound${i}modules!`);Ii.warn(l)}return s}),Hg=Pn("findModuleId",function(t){for(let r in mn.m)if(mn.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn'tfindmodulewithcode:
`);if(r.shift()!=="id,tooltip,image"){new ie("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(xc[s]??=[]).push({image:c,description:l})}}var Vw,e2,xc,wc,mh=g(()=>{"use strict";a();la();Sc();le();Dt();vc();P();Je();ct();Be();dt();M();I();Vw="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",e2={description:"Vencord Contributor",image:Vw,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Di(e.id),link:"https://github.com/Vendicated/Vencord"},xc={};wc=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await dh(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(e2),await dh()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return xc[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=Ke(r=>o(_,{noop:!0,onError:()=>{oo(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(Rn.ModalRoot,{...r},o(Rn.ModalHeader,null,o(ye,{style:{width:"100%",justifyContent:"center"}},o(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(ia,null),"Vencord Donor"))),o(Rn.ModalContent,null,o(ye,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(S.FormText,null,"This Badge is a special perk for Vencord Donors"),o(S.FormText,{className:Y.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Rn.ModalFooter,null,o(ye,{style:{width:"100%",justifyContent:"center"}},o(_i,null))))))}}))}})});var Mc,fh=g(()=>{"use strict";a();P();M();Mc=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,n,r)=>`,Vencord.Api.Commands._handleCommand(${t},${n},${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Pc,gh=g(()=>{"use strict";a();P();M();Pc=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var Ic,hh=g(()=>{"use strict";a();P();M();Ic=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(venco
`,e)}F2=bn(async()=>{L.cloud.settingsSync&&L.cloud.authenticated&&(await Zr(),delete mr.Vencord_settingsDirty)},6e4),Ma=new Set,ty={};Zn=Oo,L=ru(Oo)});var oy=g(()=>{});var ry=g(()=>{});var au={};Ue(au,{UpdateLogger:()=>hr,changes:()=>_o,checkForUpdates:()=>Jr,getRepo:()=>su,isNewer:()=>Ki,isOutdated:()=>Bo,maybePromptToUpdate:()=>Yi,update:()=>Qr,updateError:()=>Xr});async function Pa(e){let t=await e;if(t.ok)return t.value;throw Xr=t.error,t.error}async function Jr(){return _o=await Pa(VencordNative.updater.getUpdates()),_o.some(e=>e.hash===ln)?(Ki=!0,Bo=!1):Bo=_o.length>0}async function Qr(){if(!Bo)return!0;let e=await Pa(VencordNative.updater.update());if(e&&(Bo=!1,!await Pa(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Yi(e,t=!1){try{if(await Jr()){let r=confirm(e);if(r&&Ki)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Qr(),un())}}catch(n){hr.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var hr,Bo,Ki,Xr,_o,su,yr=g(()=>{"use strict";a();Hr();Je();Do();hr=new ie("Updater","white"),Bo=!1,Ki=!1;su=()=>Pa(VencordNative.updater.getRepo())});function iy(){Yi("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 sy=g(()=>{"use strict";a();yr()});function lu(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var cu=g(()=>{"use strict";a()});function Tn({title:e,children:t}){return o(S.FormSection,null,o(oe,{variant:"heading-lg/semibold",tag:"h2",className:Y.bottom16},e),t)}function xn(e,t){return _.wrap(e,{message:`Failedtorenderthe${t}tab.Ifthisissuepersists,tryusingtheinstallertoreinstall!`,onError:$2})}var $2,Fo=g(()=>{"use strict";a();oy();ry();le();sy();ct();cu();I();$2=lu(iy)});var uy={};Ue(uy,{default:()=>j2});function G2(){let[e,,t]=ot(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=lt(),r=O.useMemo(()=>Math.random()>.5?ly:cy,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1,!1];return o(Tn,{title:"Vencord Settings"},o(z2,{image:r}),o(S.FormSection,{title:"Quick Actions"},o(xt,{className:ay("quick-actions-card")},o(O.Fragment,null,o(E,{onClick:un,size:E.Sizes.SMALL},"Restart Client"),o(E,{onClick:()=>VencordNative.quickCss.openEditor(),size:E.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),o(E,{onClick:()=>Sa(e),size:E.Sizes.SMALL,disabled:t},"Open Settings Folder"),o(E,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:E.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(S.FormDivider,null),o(S.FormSection,{className:Y.top16,title:"Settings",tag:"h5"},o(S.FormText,{className:Y.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(pt,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(H2,{settings:n.notifications}))}function H2({settings:e}){return o(f,null,o(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(Sn,{style:{padding:"1em"},className:Y.bottom8},o(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(S.FormText,{className:Y.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notificatio
`,s),!1}}if(r?.length){dn.info("Registering commands of plugin",n);for(let s of r)try{ei(s,n)}catch(l){return dn.error(`Failedtoregistercommand${s.name}
`,l),!1}}if(i)for(let s in i)B.subscribe(s,i[s]);return!0},e=>`startPlugin${e.name}`),Bu=Pn("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(dn.info("Stopping plugin",n),!t.started)return dn.warn(`${n}alreadystopped`),!1;try{t.stop(),t.started=!1}catch(s){return dn.error(`Failedtostop${n}
`,s),!1}}if(r?.length){dn.info("Unregistering commands of plugin",n);for(let s of r)try{ns(s.name)}catch(l){return dn.error(`Failedtounregistercommand${s.name}
`,l),!1}}if(i)for(let s in i)B.unsubscribe(s,i[s]);return!0},e=>`stopPlugin${e.name}`)});function wM(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function MM({required:e}){return o(xt,{className:Sr("info-card",{"restart-card":e})},e?o(f,null,o(S.FormTitle,{tag:"h5"},"Restart required!"),o(S.FormText,{className:Sr("dep-text")},"Restart now to apply new plugins and their settings"),o(E,{color:E.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(f,null,o(S.FormTitle,{tag:"h5"},"Plugin Management"),o(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ea({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=L.plugins[e.name],c=()=>l.enabled??!1;function u(){Bi(async()=>m=>o(Cu,{...m,plugin:e,onRestartNeeded:()=>n(e.name)}))}function d(){let m=c();if(!m){let{restartNeeded:v,failures:T}=_a(e);if(T.length){qy.error(`Failedtostartdependenciesfor${e.name}:${T.join(", ")}`),Xi("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!m,n(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?Bu(e):rs(e))){l.enabled=!1;let v=`Errorwhile${m?"stopping":"starting"}plugin${e.name}`;qy.error(v),wM(v);return}l.enabled=!m}return o(Oa,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:d,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:o("button",{role:"switch",onClick:()=>u(),className:re(xM.button,Sr("info-button"))},e.options&&!Ei(e.options)?o(Sy,null):o(Aa,null))})}function Uu(){let e=lt(),t=O.useMemo(()=>new os,[]);O.useEffect(()=>()=>void(t.hasChanges&&an.show({title:"Restart required",body:o(f,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((v,T)=>o(f,null,T>0&&", ",$e.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=O.useMemo(()=>{let v={};for(let T in He){let w=He[T].dependencies;if(w)for(let b of w)v[b]??=[],v[b].push(T)}return v},[]),r=O.useMemo(()=>Object.values(He).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=O.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!d?.includes(v.name))return!1;if(!i.value.length)return!0;let w=i.value.toLowerCase();return v.name.toLowerCase().includes(w)||v.description.toLowerCase().includes(w)||v.tags?.some(b=>b.toLowerCase().includes(w))},[d]=ot(()=>Pt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,w={},b=Object.values(r).map(N=>N.name),x=[];for(let{name:N}of r)(w[N]=v?.[N]??T)+60*60*24*2>T&&x.push(N);return Vt("Vencord_existingPlugins",w),cr.isEqual(x,b)?[]:x})),m,h;if(r?.length){m=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||n[v.name]?.some(w=>e.plugins[w].enabled)){let w=v.required?"This plugin is required for Vencord to function.":PM(n[v.name]?.filter(b=>e.plugins[b].enabled));h.push(o(V,{text:w,key:v.name},({onMouseLeave:b,onMouseEnter:x})=>o(Ea,{onMouseLeave:b,onMouseEnter:x,onRestartNeeded:N=>t.handleChange(N),disabled:!0,plugin:v})))}else m.push(o(Ea,{onRestartNeeded:w=>t.handleChange(w),disabled:!1,plugin:v,isNew:d?.includes(v.name),key:v.name}))}}else m=h=o(oe,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(Tn,{title:"Plugins"},o(MM,{required:t.hasChanges}),o(S.FormTitle,{tag:"h5",className:re(Y.top20,Y.bottom8)},"Filters"),o("div",{className:Sr("filter-controls")},o(et,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:Y.bottom20}),o("div",{className:Ky.inputWrapper},o(An,{className:Ky.inputDefault,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:c,isSelected:v=>v===i.status,closeOnSelect:!0
`)),[l,c]=J(null),[u,,d]=ot(VencordNative.themes.getThemesDir);_e(()=>{m()},[]);async function m(){let x=await VencordNative.themes.getThemesList();c(x)}function h(x,N){if(N){if(e.enabledThemes.includes(x))return;e.enabledThemes=[...e.enabledThemes,x]}else e.enabledThemes=e.enabledThemes.filter(k=>k!==x)}async function v(x){if(x.stopPropagation(),x.preventDefault(),!x.currentTarget?.files?.length)return;let{files:N}=x.currentTarget,k=Array.from(N,F=>{let{name:G}=F;if(!!G.endsWith(".css"))return new Promise((K,q)=>{let z=new FileReader;z.onload=()=>{VencordNative.themes.uploadTheme(G,z.result).then(K).catch(q)},z.readAsText(F)})});await Promise.all(k),m()}function T(){return o(f,null,o(xt,{className:"vc-settings-card"},o(S.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},o(it,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(it,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),o(S.FormSection,{title:"Local Themes"},o(xt,{className:"vc-settings-quick-actions-card"},o(f,null,o(E,{onClick:()=>Sa(u),size:E.Sizes.SMALL,disabled:d},"Open Themes Folder"),o(E,{onClick:m,size:E.Sizes.SMALL},"Load missing Themes"),o(E,{onClick:()=>VencordNative.quickCss.openEditor(),size:E.Sizes.SMALL},"Edit QuickCSS"))),o("div",{className:CM("grid")},l?.map(x=>o(LM,{key:x.fileName,enabled:e.enabledThemes.includes(x.fileName),onChange:N=>h(x.fileName,N),onDelete:async()=>{h(x.fileName,!1),await VencordNative.themes.deleteTheme(x.fileName),m()},theme:x})))))}function w(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(x=>x.trim()).filter(Boolean))]}function b(){return o(f,null,o(xt,{className:"vc-settings-card vc-text-selectable"},o(S.FormTitle,{tag:"h5"},"Paste links to css files here"),o(S.FormText,null,"One link per line"),o(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),o(S.FormSection,{title:"Online Themes",tag:"h5"},o(Vs,{value:i,onChange:s,className:re(NM.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:w,rows:10}),o(RM,{themeLinks:e.themeLinks})))}return o(Tn,{title:"Themes"},o(Nn,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:n,onItemSelect:r},o(Nn.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),o(Nn.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),n===0&&T(),n===1&&b())}var AM,LO,NM,CM,DM,Jy=g(()=>{"use strict";a();$();Ve();Dt();Ht();mo();ct();Be();Do();Oe();j();I();Lu();Fo();AM=A("resolveInvite"),LO=Lt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),NM=Lt(e=>typeof e.textarea=="string"),CM=Ge("vc-settings-theme-");DM=xn(EM,"Themes")});var tv={};Ue(tv,{default:()=>FM});function Qy(e,t){return async()=>{e(!0);try{await t()}catch(r){if(hr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var n=`Command\`${s}\` not found.
`;n+=c||`Code\`${i}\`. See the console for more info`}}elsevarn="An unknown error occurred. See the console for more info.";elsevarn=`An unknown error occurred (error is undefined).
`).map(i=>o("div",null,$e.parse(i))))})}finally{e(!1)}}}function Vy({repo:e,hash:t,disabled:n=!1}){return o(it,{href:`${e}/commit/${t}`,disabled:n},t)}function ev({updates:e,repo:t,repoPending:n}){return o(xt,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>o("div",null,o("code",null,o(Vy,{repo:t,hash:r,disabled:n})),o("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function OM(e){let[t,n]=O.useState(_o),[r,i]=O.useState(!1),[s,l]=O.useState(!1),c=(t?.length??0)>0;return o(f,null,!t&&Xr?o(f,null,o(S.FormText,null,"Failed to check updates. Check the console for more info"),o(Sn,{style:{padding:"1em"}},o("p",null,Xr.stderr||Xr.stdout||"An unknown error occurred"))):o(S.FormText,{className:Y.bottom8},c?`Thereare${t.length}Updates`:"Up to Date!"),c&&o(ev,{updates:t,...e}),o(ye,{className:re(Y.bottom8,Y.top8)},c&&o(E,{size:E.Sizes.SMALL,disabled:s||r,onClick:Qy(l,async()=>{await Qr()&&(n([]),await new Promise(u=>{an.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){un(),u()},onCancel:u})}))})},"Update Now"),o(E,{size:E.Sizes.SMALL,disabled:s||r,onClick:Qy(i,async()=>{await Jr()?n(_o):(n([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function _M(e){return o(f,null,o(S.FormText,{className:Y.bottom8},"Your local copy has more recent commits. Please stash or reset them."),o(ev,{...e,updates:_o}))}function BM(){let e=lt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,n,r]=ot(su,{fallbackValue:"Loading..."});O.useEffect(()=>{n&&hr.error("Failed to retrieve repo",n)},[n]);let i={repo:t,repoPending:r};return o(Tn,{title:"Vencord Updater"},o(S.FormTitle,{tag:"h5"},"Updater Settings"),o(pt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),o(pt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),o(pt,{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"),o(S.FormTitle,{tag:"h5"},"Repo"),o(S.FormText,{className:"vc-text-selectable"},r?t:n?"Failed to retrieve - check console":o(it,{href:t},t.split("/").slice(-2).join("/"))," ","(",o(Vy,{hash:ln,repo:t,disabled:r}),")"),o(S.FormDivider,{className:Y.top8+" "+Y.bottom8}),o(S.FormTitle,{tag:"h5"},"Updates"),Ki?o(_M,{...i}):o(OM,{...i}))}var FM,nv=g(()=>{"use strict";a();$();jr();Dt();mo();ct();Be();Do();Oe();yr();I();Hr();Fo();FM=xn(BM,"Updater")});function Fa({value:e,onChange:t,validate:n}){let[r,i]=O.useState(e),[s,l]=O.useState();function c(u){i(u);let d=n(u);d===!0?(l(void 0),t(u)):l(d)}return o(f,null,o(et,{type:"text",value:r,onChange:c,error:s}))}var $u=g(()=>{"use strict";a();I()});var ov={};Ue(ov,{default:()=>zM});function UM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function $M(){let e=await fetch(new URL("/v1/",Eo()),{method:"DELETE",headers:new Headers({Authorization:await Yr()})});if(!e.ok){va.error(`Failedtoerasedata,APIreturned${e.status}`),Ne({title:"Cloud Integrations",body:`Couldnoterasealldata(APIreturned${e.status}),pleasecontactsupport.`,color:"var(--red-360)"});return}L.cloud.authenticated=!1,await nu(),Ne({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function GM(){let{cloud:e}=lt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(S.FormSection,{title:"Settings Sync",className:Y.top16},o(S.FormText,{variant:"text-md/normal",className:Y.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(pt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync
`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===oa&&!Di(W.getCurrentUser().id)&&Bo&&ln!==await zt.get(av)){let t=()=>zt.set(av,ln);an.show({title:"Hold on!",body:o("div",null,o(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var zu,cv=g(()=>{"use strict";a();P();M();zu=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":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}}]})});var ju,uv=g(()=>{"use strict";a();P();M();ju=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var KM,Wu,pv=g(()=>{"use strict";a();$();P();M();KM=/\.tar\.\w+$/,Wu=y({name:"AnonymiseFileNames",authors:[p.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>L.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>L.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=KM.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(L.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:L.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=L.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function dv(e,t){return(await ur.fetchAssetIds(e,[t]))[0]}async function ZM(e){let t={};return await YM.fetchApplicationsRPC(t,e),t.application}var YM,mv,ii,qu,fv=g(()=>{"use strict";a();Ia();mo();P();M();j();I();YM=A("fetchApplicationsRPC","getRemoteIconURL");mv={};qu=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to use arRPC"),o(S.FormText,null,o(it,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:n}=t,r=n?.assets;if(r?.large_image&&(r.large_image=await dv(n.application_id,r.large_image)),r?.small_image&&(r.small_image=await dv(n.application_id,r.small_image)),n){let i=n.application_id;mv[i]||=await ZM(i);let s=mv[i];n.name||=s.name}B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(ii&&ii.close(),ii=new WebSocket("ws://127.0.0.1:1337"),ii.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(ii.readyState===WebSocket.OPEN),1e3))){Xi("Failed to connect to arRPC, is it running?","Retry",()=>{du(),this.start()});return}ee.show({message:"Connected to arRPC",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,positio
`}var as,op,Dv=g(()=>{"use strict";a();$();P();M();op=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper/g,replace:"$&+(this.props.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:Ev}},start(){as=document.createElement("style"),as.id="VcBlurNsfw",document.head.appendChild(as),Ev()},stop(){as?.remove()}})});function nP(e){let t=L.plugins.CallTimer.format==="human",n=m=>t?m:m.toString().padStart(2,"0"),r=m=>t?m:"",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+=`${n(l)}${r("h")}${i}`),(c||d||!t)&&(d+=`${n(c)}${r("m")}${i}`),d+=`${n(u)}${r("s")}`,d}var rp,Ov=g(()=>{"use strict";a();$();le();P();Oe();M();rp=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:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(_,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Oi({deps:[e]});return o("p",{style:{margin:0}},"Connected for ",o("span",{style:{fontFamily:"var(--font-code)"}},nP(t)))}})});var pp={};Ue(pp,{_handleClick:()=>iP,_handlePreEdit:()=>rP,_handlePreSend:()=>oP,addClickListener:()=>cp,addPreEditListener:()=>br,addPreSendListener:()=>jt,removeClickListener:()=>up,removePreEditListener:()=>Tr,removePreSendListener:()=>Wt});async function oP(e,t,n,r){n.replyOptions=r;for(let i of sp)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){ip.error(`MessageSendHandler:Listenerencounteredanunknownerror
`,s)}return!1}async function rP(e,t,n){for(let r of ap)try{await r(e,t,n)}catch(i){ip.error(`MessageEditHandler:Listenerencounteredanunknownerror
`,i)}}function jt(e){return sp.add(e),e}function br(e){return ap.add(e),e}function Wt(e){return sp.delete(e)}function Tr(e){return ap.delete(e)}function iP(e,t,n){e=Cn.getMessage(t.id,e.id)??e;for(let r of lp)try{r(e,t,n)}catch(i){ip.error(`MessageClickHandler:Listenerencounteredanunknownerror
`,i)}}function cp(e){return lp.add(e),e}function up(e){return lp.delete(e)}var ip,sp,ap,lp,Xn=g(()=>{"use strict";a();Je();I();ip=new ie("MessageEvents","#e5c890"),sp=new Set,ap=new Set;lp=new Set});var _v,Bv=g(()=>{"use strict";a();_v=["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","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","share_id@reddit.com"]});var Fv,sP,dp,Uv=g(()=>{"use strict";a();Xn();P();M();Bv();Fv=/[\\^$.*+?()[\]{}|]/g,sP=RegExp(Fv.source),dp=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&sP.test(e)?e.replace(Fv,"\\$&"):e||""},createRules(){let e=_v;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(n[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,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(n,i,s)})}),this.hostRules.forEach((n,r)=>{!n.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)))},start(){this.createRules(),this.preSend=jt((e,t)=>this.onSend(t)),this.preEdit=br((e,t,n)=>this.onSend(n))},stop(){Wt(this.preSend),Tr(this.preEdit)}})});var mp,$v=g(()=>{"use strict";a();P();M();mp=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:'status_$:$1="online"'}}]})});function xr(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}functi
`,u),l[0]}})();return c&&s&&r.set(s,c),c}}let t;return{wp:Vencord.Webpack,wpc:mn.c,wreq:mn,wpsearch:ic,wpex:sc,wpexs:n=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(n)),find:e(n=>n),findAll:Er,findByProps:e(ce.byProps),findAllByProps:(...n)=>Er(ce.byProps(...n)),findByCode:e(ce.byCode),findAllByCode:n=>Er(ce.byCode(n)),findStore:e(ce.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,React:O,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:un,canonicalizeMatch:xr,canonicalizeReplace:Ua,canonicalizeReplacement:ls,fakeRender:(n,r)=>{let i=t?.deref(),s=i?.closed===!1?i:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(s),s.focus(),sr.render(O.createElement(n,r),s.document.body)}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,n]of Object.entries(e))window[t]=n},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var Hv,hp,zv=g(()=>{"use strict";a();Mt();Ht();P();M();I();Hv=(e,{user:t})=>()=>{e.push(o(U.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Qt.copy(`<https://discord.com/users/${t.id}>`),icon:Vr}))},hp=y({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ue("user-context",Hv)},stop(){fe("user-context",Hv)}})});var Ho,aP,yp,vp,$a,Sp,bp,jv=g(()=>{"use strict";a();ko();$();P();Je();dt();M();yr();j();I();Ho=new ie("CrashHandler"),aP=A("pushLazy","popAll"),yp=D({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}}),vp=0,$a=0,Sp=!1,bp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:yp,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-$a<=1e3&&!Sp)return!0;if(Sp=!1,++vp>5){try{Ne({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return $a=Date.now(),!1}setTimeout(()=>vp--,6e4);try{return vp===1&&Yi("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),yp.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return Ho.error("Failed to handle crash",t),!1}finally{$a=Date.now()}},handlePreventCrash(e){if(Date.now()-$a>=1e3)try{Ne({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{B.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){Ho.debug("Failed to close open context menu.",t)}try{aP?.popAll()}catch(t){Ho.debug("Failed to close old modals.",t)}try{Tc()}catch(t){Ho.debug("Failed to close all open modals.",t)}try{B.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){Ho.debug("Failed to close user popout.",t)}try{B.dispatch({type:"LAYER_POP_ALL"})}catch(t){Ho.debug("Failed to pop all layers.",t)}if(yp.store.attemptToNavigateToHome)try{pr.transitionTo("/channels/@me")}catch(t){Ho.debug("Failed to navigate to home",t)}try{Sp=!0,e.forceUpdate()}catch(t){Ho.debug("Failed to update crash handler component.",t)}}})});function Ga(e){return Boolean(e)}function Tp(e){return e!=null}var Ha=g(()=>{"use strict";a()});async function Wv(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await ur.fetchAssetIds(wr.store.appID,[e]))[0]}function kt(){za(!0),L.plugins.CustomRPC.enabled&&za()}function Yv(){return wr.store.type!==1}function pP(e){return!Yv()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function qv(){return wr.store.timestampMode!==3}function Kv(e){return/https?:\/\/(?!i\
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await Ja.getAllFriendInvites()).map(i=>`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await Ja.revokeFriendInvites(),pe(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Wp,H1=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"]{
`,classNames:{},dom:null});rd="src/plugins/imageZoom/styles.css"});var Fe,sS,id,od=g(()=>{"use strict";a();Mt();$();Ve();Ra();P();Wr();M();I();rS();ed();iS();Fe=D({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:Go(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Go(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Go(.1,5,.2),default:.5,stickToMarkers:!1}}),sS=e=>()=>{e.push(o(U.MenuGroup,{id:"image-zoom"},o(U.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:Fe.store.square,action:()=>{Fe.store.square=!Fe.store.square,gn.close()}}),o(U.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:Fe.store.nearestNeighbour,action:()=>{Fe.store.nearestNeighbour=!Fe.store.nearestNeighbour,gn.close()}}),o(U.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(U.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:Fe.store.zoom,onChange:bn(r=>Fe.store.zoom=r,100)})}),o(U.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(U.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:Fe.store.size,onChange:bn(r=>Fe.store.size=r,100)})}),o(U.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(U.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:Fe.store.zoomSpeed,onChange:bn(r=>Fe.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},id=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"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id:'${hs}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:Fe,currentMagnifierElement:null,element:null,Magnifier:nd,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===hs&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(nd,{size:Fe.store.size,zoom:Fe.store.zoom,instance:e}),this.root=sr.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},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(n=>({...n,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){St(rd),ue("image-context",sS),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){$t(rd),this.root&&this.root.unmount(),this.element?.remove(),fe("image-context",sS)}})});function fI(e){let t=e?.message?.content,[n,r]=O.useState("password");return o(qe,{...e},o(at,null,o(S.FormTitle,{tag:"h4"},"Decrypt Message")),o(tt,null,o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),o(et,{defaultValue:t,disabled:!0}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(et,{style:{marginBottom:"20px"},onChange:r})),o(Ft,null,o(E,{color:E.Colors.GREEN,onClick:()=>{let i=sd(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())
`,classNames:{},dom:null});xd="src/plugins/messageLogger/deleteStyleText.css"});function LS(){L.plugins.MessageLogger.deleteStyle==="text"?(St(xd),$t(Td)):($t(xd),St(Td))}var $I,ES,DS,OS,wd,_S=g(()=>{"use strict";a();CS();Mt();$();Ve();le();P();Je();M();j();I();kS();RS();$I=A("edited","communicationDisabled","isSystemMessage");ES="ml-remove-history",DS="ml-toggle-style",OS=(e,t)=>()=>{let{message:n}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=n;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(o(U.MenuItem,{id:DS,key:DS,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(U.MenuItem,{id:ES,key:ES,label:"Remove Message History",color:"danger",action:()=>{r?B.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},wd=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven,p.AutumnVN],start(){LS(),ue("message",OS)},stop(){fe("message",OS)},renderEdit(e){return o(_,{noop:!0},o("div",{className:"messagelogger-edited"},$e.parse(e.content),o(Hn,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:$I.edited}," ","(",Ct.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:hn?.call(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:()=>LS()},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,n){try{if(e==null||!n&&!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))))};n?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:n,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=L.plugins.MessageLogger,l=W.getCurrentUser().id;return t&&e.author?.bot||n&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(Q.getChannel(e.channel_id)?.parent_id)||s.includes(Q.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{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 || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.delete
`)}):(pe(n.channel.id,{author:Jn,content:`${Wo}Thetag**${e.name}**doesnotexistanymore!PleasereloadurDiscordtofix:)`}),{content:`/${e.name}`}),[GI]:!0},"CustomTags")}var Wo,ll,GI,Jn,al,sl,HI,zI,Md,FS=g(()=>{"use strict";a();tn();Kn();$();P();M();Wo="<:luna:1035316192220553236>",ll="MessageTags_TAGS",GI=Symbol("MessageTags"),Jn={id:"821472922140803112",bot:!1},al=()=>Pt(ll).then(e=>e??[]),sl=e=>Pt(ll).then(t=>(t??[]).find(n=>n.name===e)??null),HI=async e=>{let t=await al();return t.push(e),Vt(ll,t),t},zI=async e=>{let t=await al();return t=await t.filter(n=>n.name!==e),Vt(ll,t),t};Md=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{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}},dependencies:["CommandsAPI"],async start(){for(let e of await al())BS(e)},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 n=rt(e[0].options,"tag-name",""),r=rt(e[0].options,"message","");if(await sl(n))return pe(t.channel.id,{author:Jn,content:`${Wo}ATagwiththename**${n}**alreadyexists!`});let i={name:n,enabled:!0,message:r};BS(i),await HI(i),pe(t.channel.id,{author:Jn,content:`${Wo}Successfullycreatedthetag**${n}**!`});break}case"delete":{let n=rt(e[0].options,"tag-name","");if(!await sl(n))return pe(t.channel.id,{author:Jn,content:`${Wo}ATagwiththename**${n}**doesnotexist!`});ns(n),await zI(n),pe(t.channel.id,{author:Jn,content:`${Wo}Successfullydeletedthetag**${n}**!`});break}case"list":{pe(t.channel.id,{author:Jn,embeds:[{title:"All Tags:",description:(await al()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`)||`${Wo}Woops!Therearenotagsyet,use\`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{letn=rt(e[0].options,"tag-name",""),r=awaitsl(n);if(!r)returnpe(t.channel.id,{author:Jn,content:`${Wo} A Tag with the name **${n}** does not exist!`});pe(t.channel.id,{author:Jn,content:r.message.replaceAll("\\n",`
`)});break}default:{pe(t.channel.id,{author:Jn,content:"Invalid sub-command"});break}}}}]})});function jI(e){let t="";for(let n=0;n<e.length;n++)t+=n%2?e[n].toUpperCase():e[n].toLowerCase();return t}var Pd,US=g(()=>{"use strict";a();tn();P();M();Pd=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[$o],inputType:3,execute:(e,t)=>{let n=rt(e,"message","");pe(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[$o],execute:e=>({content:rt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[ts],execute:e=>({content:jI(rt(e,"message",""))})}]})});var Id,$S=g(()=>{"use strict";a();tn();P();M();Id=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],dependencies:["CommandsAPI"],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:[$o],execute:t=>({content:rt(t,"message","")+e.description})}))})});function qI(e){qo.store.tagSettings??=Ad;let[t,n]=J(qo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(ye,{flexDirection:"column"},ci.map(i=>o(xt,{style:{padding:"1em1em0"}},o(S.FormTitle,{style:{width:"fit-content"}},o(V,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>o("div",{onMouseEnter:s,onMouseLeave:l},i.displayName,"Tag",o(ho,{type:ho.Types[i.name]})))),o(et,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:Y.bottom16}),o(pt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Showinmessages"),o(pt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Showinmemberlistandprofiles"))))}var WI,ho,GS,ci,Ad,qo,Nd,HS=g(()=>{"usestrict";a();$();Dt();P();ct();M();j();I();WI=A("computePermissions","canEveryoneRole"),ho=Lt(e=>e.Types?.[0]==="BOT"),GS=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),ci=[{name:"WEBHOOK",displayName:"Webhook",description:"Messagessentbywebhooks",condition:GS},{name:"OWNER",displayName:"Owner",description:"Ownstheserver",condition:(e,t,n)=>we.getGuild(n?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Hastheadministratorpermission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Canmanagetheserver,channelsorroles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Canmanagemessagesorkick/banpeople",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VCMod",description:"Canmanagevoicechats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],Ad=Object.fromEntries(ci.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));qo=D({dontShowForBots:{description:"Don'tshowextratagsforbots(excludingwebhooks)",type:3},dontShowBotTag:{description:"Onlyshowextratagsforbots/Hide[BOT]text",type:3},tagSettings:{type:6,component:qI,description:"fillme"}}),Nd=y({name:"MoreUserTags",description:"Addstagsforwebhooksandmoderativeroles(owner,admin,etc.)",authors:[p.Cyn,p.TheSun,p.RyanCaoDev,p.LordElias,p.AutumnVN],settings:qo,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,repl
`,classNames:{},dom:null});Bd="src/plugins/noMosaic/styles.css"});var Fd,Ud,XS=g(()=>{"use strict";a();$();Ve();P();M();ZS();Fd=D({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),Ud=y({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:Fd,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>Fd.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return Fd.store.mediaLayoutType},start(){St(Bd)},stop(){$t(Bd)}})});var iA,Ss,$d,JS=g(()=>{"use strict";a();$();P();M();j();iA=A("getMessageRequestsCount"),Ss=D({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}}),$d=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:Ss,patches:[{find:"getPendingCount(){",predicate:()=>Ss.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Ss.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>Ss.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Ss.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return iA.getMessageRequestChannelIds().size}})});var Gd,QS=g(()=>{"use strict";a();P();M();Gd=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[p.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var ul,Hd,VS=g(()=>{"use strict";a();$();P();M();ul=D({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}}),Hd=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:ul,shouldMention(e,t){let n=ul.store.userList.includes(e.author.id),r=ul.store.shouldPingListed?n:!n;return ul.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shou
`,s),"Failed to fetch user. Check the console for more info."}}return null}var pi,M0,SA,bA,fl,TA,xA,am,I0=g(()=>{"use strict";a();tn();P();Zt();M();j();I();pi=zs(Op()),M0=0,SA=20,bA=128,fl=10,TA=Ao(()=>Promise.all(Array.from({length:fl},(e,t)=>P0(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),xA=A("getUploads");am=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.Ven],dependencies:["CommandsAPI"],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 n=await TA(),r=rt(e,"no-server-pfp",!1);try{var i=await wA(e,t,r);if(!i)throw"No Image specified!"}catch(v){pe(t.channel.id,{content:String(v)});return}let s=await P0(i),l=rt(e,"delay",SA),c=rt(e,"resolution",bA),u=(0,pi.GIFEncoder)(),d=document.createElement("canvas");d.width=d.height=c;let m=d.getContext("2d");for(let v=0;v<fl;v++){m.clearRect(0,0,d.width,d.height);let T=v<fl/2?v:fl-v,w=.8+T*.02,b=.8-T*.05,x=(1-w)*.5+.1,N=1-b-.08;m.drawImage(s,x*c,N*c,w*c,b*c),m.drawImage(n[v],0,0,c,c);let{data:k}=m.getImageData(0,0,c,c),F=(0,pi.quantize)(k,256),G=(0,pi.applyPalette)(k,F);u.writeFrame(G,c,c,{transparent:!0,palette:F,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>Li.promptToUpload([h],t.channel,M0),10)}}]})});var A0=g(()=>{});var N0,lm,C0=g(()=>{"use strict";a();A0();$();le();P();M();I();N0=D({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),lm=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Lumap],settings:N0,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:_.wrap(()=>o(V,{text:"Toggle Picture in Picture"},e=>o("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let n=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(n.cloneNode(!0));r.loop=N0.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=n.currentTime,r.requestPictureInPicture(),n.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},o("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},o("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})})});function L0(){return lt(["plugins.PinDMs.pinnedDMs"]),gl()}function di(e){return gl().has(e)}function E0(e){let t=gl();t.delete(e)||t.add(e),R0([...t])}function um(){return gl(),Ms.store.pinOrder===0?MA.getPrivateChannelIds().filter(di):Qn}function D0(e){return um()[e]}function pm(e,t){let n=k0(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],R0(n)}var Ms,MA,Qn,cm,k0,R0,PA,gl,dm=g(()=>{"use strict";a();$();M();j();Ms=D({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}]}}),MA=Ie("PrivateChannelSortStore"),k0=()=>(L.plugins.PinDMs.pinnedDMs||void 0)?.split(","),R0=e=>{cm=void 0,L.plugins.PinDMs.pinnedDMs=e.join(",")},PA=()=>(Qn=k0()??[],cm=new Set(Qn)),gl=()=>cm??PA()});funct
`,e))},stop(){Dm=void 0},decodeError(e,...t){let n=0;return Dm?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var Bm={};Ue(Bm,{ServerListRenderPosition:()=>Il,addServerListElement:()=>Ps,removeServerListElement:()=>Is,renderAll:()=>eN});function _m(e){return e===0?QA:VA}function Ps(e,t){_m(e).add(t)}function Is(e,t){_m(e).delete(t)}var JA,Il,QA,VA,eN,Al=g(()=>{"use strict";a();Je();JA=new ie("ServerListAPI"),Il=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(Il||{}),QA=new Set,VA=new Set;eN=e=>{let t=[];for(let n of _m(e))try{t.unshift(n())}catch(r){JA.error("Failed to render server list element:",r)}return t}});function tN(){let e=[];Object.values(we.getGuilds()).forEach(t=>{$r.getChannels(t.id).SELECTABLE.forEach(n=>{!ar.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:ar.lastMessageId(n.channel.id),readStateType:0})})}),B.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var nN,Fm,bb=g(()=>{"use strict";a();Al();P();M();I();nN=()=>o(E,{onClick:tN,size:E.Sizes.MIN,color:E.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Fm=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(nN,null),start(){Ps(0,this.renderReadAllButton)},stop(){Is(0,this.renderReadAllButton)}})});var nn,Nl=g(()=>{"use strict";a();$();M();nn=D({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 Um=g(()=>{"use strict";a()});async function iN(){zt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function $m(){await iN();let[e,t,n]=await zt.getMany([Tb(),xb(),wb()]);if(await Promise.all([kl(),Rl(),As()]),nn.store.offlineRemovals){if(nn.store.groups&&t?.size)for(let[r,i]of t)gi.has(r)||vo(`Youarenolongerinthegroup${i.name}.`,i.iconURL);if(nn.store.servers&&e?.size)for(let[r,i]of e)fi.has(r)||vo(`Youarenolongerintheserver${i.name}.`,i.iconURL);if(nn.store.friends&&n?.friends.length)for(let r of n.friends){if(Nr.friends.includes(r))continue;let i=await Et.getUser(r).catch(()=>{});i&&vo(`Youarenolongerfriendswith${po(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Fn(i.id))}if(nn.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Nr.requests.includes(r)||[1,2,4].includes(nt.getRelationshipType(r)))continue;let i=await Et.getUser(r).catch(()=>{});i&&vo(`Friendrequestfrom${po(i)}hasbeenrevoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Fn(i.id))}}}function vo(e,t,n){nn.store.notices&&Cl.showNotice(e,"OK",()=>Cl.popNotice()),Ne({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function Mb(e){return fi.get(e)}function Gm(e){fi.delete(e),kl()}async function kl(){fi.clear();let e=W.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(we.getGuilds()))Le.isMember(t,e)&&fi.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await zt.set(Tb(),fi)}function Pb(e){return gi.get(e)}function Hm(e){gi.delete(e),Rl()}async function Rl(){gi.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Q.getSortedPrivateChannels())e===3&&gi.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await zt.set(xb(),gi)}async function As(){Nr.friends=[],Nr.requests=[];let e=nt.getRelationships();for(let t in e)switch(e[t]){case 1:Nr.friends.push(t);break;case 3:Nr.requests.push(t);break}await zt.set(wb(),Nr)}var fi,gi,Nr,Tb,xb,wb,
`,classNames:{},dom:null});Ls="src/plugins/shikiCodeblocks.desktop/devicon.css"});var Es=g(()=>{"use strict";a()});var RN,Xo,Tf=g(()=>{"use strict";a();$();Ve();Be();lo();M();Rs();vf();bf();Es();RN=Object.keys(bo),Xo=D({theme:{type:4,description:"Default themes",options:RN.map(e=>({label:ao(hu(e)),value:bo[e],default:bo[e]===bo.DarkPlus})),onChange:ve.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:bo.MaterialCandy,onChange:e=>{ve.setTheme(e||Xo.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"?$t(Ls):St(Ls)}},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=fc(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function TT(e,t){let n=Xo.use(e),[r,i]=O.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=ve.currentThemeUrl&&l&&l!==ve.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),ve.setTheme(l))}return{...s,isThemeLoading:l!==ve.currentThemeUrl}}var xT=g(()=>{"use strict";a();I();Rs();Tf()});function wT(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 MT=g(()=>{"use strict";a()});var Gn,PT,Ds=g(()=>{"use strict";a();Ve();I();Fl();Es();Gn=Ge("shiki-"),PT=({lang:e,tryHljs:t})=>{let n=e?lr?.getLanguage?.(e):null,i=(e?Cr(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!n||e==="";case"SECONDARY":return!i&&!!n;case"NEVER":return!1;default:return!1}}});function IT(e){let[t,n]=O.useState(!1);function r(i){Qt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var AT=g(()=>{"use strict";a();I()});function NT({content:e,...t}){let[n,r]=IT(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var CT=g(()=>{"use strict";a();AT()});function kT({content:e,theme:t}){let n=[];return Qt.SUPPORTS_COPY&&n.push(o(NT,{content:e,className:Gn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:Gn("btns")},n)}var RT=g(()=>{"use strict";a();I();Ds();CT()});var LT,ET=g(()=>{"use strict";a();I();Ds();LT=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=lr.highlight(n,r,!0);s=c.split(`
`);return o(S.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(ye,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function vC(){if(!Bs?.logs)return o("div",null,"Loading...");let e=Bs.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(O.Fragment,null,o(hC,{title:"Startup Timings",logs:Bs.logs,traceEnd:Bs.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(yC,{trace:e}))}var Bs,SC,vx=g(()=>{"use strict";a();le();Dt();j();I();Bs=A("markWithDelta","markAndLog","markAt");SC=_.wrap(vC)});var Hf,Sx=g(()=>{"use strict";a();P();Oe();M();Hf=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:me(()=>(vx(),Io(yx)).default)})});var zf,jf,bx=g(()=>{"use strict";a();$();P();M();zf=D({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",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),jf=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:"!$self.shouldPlayBurstReaction($1)"}},{find:".hasAvailableBurstCurrency)",replacement:{match:/(?<=\.useBurstReactionsExperiment.{0,20})useState\(!1\)(?=.+?(\i===\i\.EmojiIntention.REACTION))/,replace:"useState($self.settings.store.superReactByDefault && $1)"}}],settings:zf,shouldPlayBurstReaction(e){return!!(zf.store.unlimitedSuperReactionPlaying||e<=zf.store.superReactionPlayingLimit)}})});function Px(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((n,r,i)=>i.indexOf(n)===r).join("")??"g"):new RegExp(e)}function TC(e){try{return Px(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function Wf({initialValue:e,onChange:t,placeholder:n}){let[r,i]=J(e);return o(et,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function Tx({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await zt.set(n,t),r())}async function l(c,u,d){u===t.length-1&&t.push(Mx()),t[u][d]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await zt.set(n,t),r()}return o(f,null,o(S.FormTitle,{tag:"h4"},e),o(ye,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(O.Fragment,{key:`${c.find}-${u}`},o(ye,{flexDirection:"row",style:{gap:0}},o(ye,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(Wf,{placeholder:"Find",initialValue:c.find,onChange:d=>l(d,u,"find")}),o(Wf,{placeholder:"Replace",initialValue:c.replace,onChange:d=>l(d,u,"replace")}),o(Wf,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:d=>l(d,u,"onlyIfIncludes")})),o(E,{size:E.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o(by,null))),i&&TC(c.find)))))}function xC(){let[e,t]=J("");return o(f,null,o(S.FormTitle,{tag:"h4"},"Test Rules"),o(et,{placeholder:"Type a message",onChange:t}),o(et,{placeholder:"Message with rules applied",editable:!1,value:Ix(e)}))}function Ix(e){if(e.length===0)return e;if(Hl)for(let t of Hl)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=`${e}`.replaceAll(t.find,t.replace.replaceAll("\\n",`
`)).replace(/^\s|\s$/g,""));if(zl){for(let t of zl)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=Px(t.find);e=e.replace(n,t.replace.replaceAll("\\n",`
`))}catch{new ie("TextReplace").error(`Invalidregex:${t.find}`)}}return e=e.trim(),e}var xx,wx,Mx,Gl,Hl,zl,bC,wC,qf,Ax=g(()=>{"use strict";a();ss();Xn();$();Dt();Ht();P();Je();Oe();M();I();xx="TextReplace_rulesString",wx="TextReplace_rulesRegex",Mx=()=>({find:"",replace:"",onlyIfIncludes:""}),Gl=()=>[Mx()],Hl=Gl(),zl=Gl(),bC=D({replace:{type:6,description:"",component:()=>{let e=qn();return o(f,null,o(Tx,{title:"Using String",rulesArray:Hl,rulesKey:xx,update:e}),o(Tx,{title:"Using Regex",rulesArray:zl,rulesKey:wx,update:e}),o(xC,null))}}});wC="1102784112584040479",qf=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],dependencies:["MessageEventsAPI"],settings:bC,async start(){Hl=await zt.get(xx)??Gl(),zl=await zt.get(wx)??Gl(),this.preSend=jt((e,t)=>{e!==wC&&(t.content=Ix(t.content))})},stop(){Wt(this.preSend)}})});var Kf,Nx=g(()=>{"use strict";a();P();M();I();Kf=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[p.Ven],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])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===W.getCurrentUser()?.id}}})});var Yf,Cx=g(()=>{"use strict";a();P();M();Yf=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var kx=g(()=>{});var _t,Fs=g(()=>{"use strict";a();$();M();_t=D({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}})});var jl,Zf=g(()=>{"use strict";a();jl={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:
${r}`})},start(){this.preSend=jt((e,t)=>this.unindentMsg(t)),this.preEdit=br((e,t,n)=>this.unindentMsg(n))},stop(){Wt(this.preSend),Tr(this.preEdit)}})});var sg,Gx,ag,Hx=g(()=>{"use strict";a();Mt();Ht();P();M();I();sg=1<<2,Gx=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&sg)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(Re.getChannelPermissions({id:t.id})&Te.EMBED_LINKS);if(n.id===W.getCurrentUser().id&&!c)return;let u=mt("delete",e),d=u?.findIndex(m=>m?.props?.id==="delete");!d||!u||u.splice(d-1,0,o(U.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Na:Ca,action:()=>wt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~sg:i|sg}})}))},ag=y({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){ue("message",Gx)},stop(){fe("message",Gx)}})});var lg,zx=g(()=>{"use strict";a();tn();ka();P();M();lg=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let n=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void pe(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r
`).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(l,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)} "Define '${c}' on Urban Dictionary")`).trim();returnvoidpe(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${r.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(r.author)}`},title:r.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(r.word)}`,description:i(r.definition),fields:[{name:"Example",value:i(r.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${n} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${r.thumbs_up.toString()} | \u{1F44E} ${r.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:newDate(r.written_on).toISOString()}]})}catch(n){pe(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});varjx=g(()=>{});varLC,EC,DC,Wx,qx=g(()=>{"use strict";a();jx();j();I();LC=A("selectChannel","selectVoiceChannel"),EC=to(".lastSection","children:"),DC=1n<<20n,Wx=({channel:e,label:t,showHeader:n})=>o(EC,null,n&&o(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(E,{className:"vc-uvs-button",color:E.Colors.TRANSPARENT,size:E.Sizes.SMALL,onClick:()=>{Re.can(DC,e)?LC.selectVoiceChannel(e.id):ee.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:ee.Type.FAILURE,options:{position:ee.Position.BOTTOM}})}},t))});varOC,cg,Kx,ug,Yx=g(()=>{"use strict";a();$();le();P();M();j();I();qx();OC=Ie("VoiceStateStore"),cg=D({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),Kx=_.wrap(({user:e})=>{let{channelId:t}=OC.getVoiceStateForUser(e.id)??{};if(!t)returnnull;letn=Q.getChannel(t);if(!n)returnnull;letr=we.getGuild(n.guild_id);if(!r)returnnull;leti=`${r.name} | ${n.name}`;returno(Wx,{channel:n,label:i,showHeader:cg.store.showVoiceChannelSectionHeader})}),ug=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:cg,patchModal({user:e}){returncg.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(Kx,{user:e})):null},patchPopout:({user:e})=>{lett=e.id===W.getCurrentUser().id;returno("div",{className:t?"vc-uvs-popout-margin-self":""},o(Kx,{user:e}))},patches:[{find:".lastEditedByContainer",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});varZx,Xx=g(()=>{a();(window.VencordStyles??=newMap).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
`,classNames:{},dom:null});Zx="src/plugins/usrbg/index.css"});var _C,wo,Kl,pg,Jx=g(()=>{"use strict";a();$();Ve();mo();P();M();Xx();_C="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",wo={},Kl=D({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}}),pg=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:Kl,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Kl.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:wo,settingsAboutComponent:()=>o(it,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile_")&&wo[t])return{backgroundImage:`url(${wo[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Kl.store.nitroFirst)&&wo[t.id])return wo[t.id]},premiumHook({userId:e}){if(wo[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!wo[t.id]||Kl.store.nitroFirst)},async start(){St(Zx);let e=await fetch(_C);e.ok&&(wo=await e.json(),this.data=wo)}})});function BC({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=J(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let d=u.match(/<@!?(\d+)>/)?.[1];if(!d||Yl.has(d))return;if(W.getUser(d))return l(d);let m=()=>{Yl.add(d),Qx.unshift(()=>Et.getUser(d).then(()=>{l(d),Yl.delete(d)}).catch(h=>{h?.status===429&&(Qx.unshift(()=>No(1e3).then(m)),Yl.delete(d))}).finally(()=>No(300)))};m()}},c))}var Yl,Qx,dg,Vx=g(()=>{"use strict";a();le();P();Be();qr();M();I();Yl=new Set,Qx=new Ln(5);dg=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[p.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,n,r,i){return o(_,{noop:!0},o(BC,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var mg,fg,ew=g(()=>{"use strict";a();P();M();I();mg={},fg=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:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,n)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${n})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let n=Q.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Ae.getVoiceChannelId()===n){e();return}let r=mg[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete mg[n]):r.timeout=setTimeout(()=>{delete mg[n]},500)}})});fun
`)}var Mi,Cw,Bg=g(()=>{"use strict";a();$();document.addEventListener("DOMContentLoaded",()=>{Pk(),tc(),Dg(L.useQuickCss),qi("useQuickCss",Dg),qi("themeLinks",tc),qi("enabledThemes",tc),VencordNative.quickCss.addThemeChangeListener(tc)})});var Fg={};Ue(Fg,{Common:()=>dc,_initWebpack:()=>Zs,_resolveReady:()=>Ks,addListener:()=>Hw,cache:()=>In,extract:()=>sc,filters:()=>ce,find:()=>st,findAll:()=>Er,findBulk:()=>rc,findByCode:()=>Bt,findByCodeLazy:()=>to,findByProps:()=>yt,findByPropsLazy:()=>A,findLazy:()=>Lt,findModuleId:()=>Hg,findStore:()=>jg,findStoreLazy:()=>Ie,listeners:()=>Ys,mapMangledModule:()=>zg,mapMangledModuleLazy:()=>fn,onceReady:()=>oc,removeListener:()=>zw,search:()=>ic,subscriptions:()=>Lr,waitFor:()=>ut,wreq:()=>mn});var nc=g(()=>{"use strict";a();I();j()});function Rw(e){function t(n){try{Lw(n[1])}catch(r){Vn.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,n)}t.$$vencordOriginal=e.push,t.bind=(...n)=>t.$$vencordOriginal.bind(...n),Object.defineProperty(e,"push",{get:()=>t,set(n){t.$$vencordOriginal=n},configurable:!0})}function Lw(e){let{subscriptions:t,listeners:n}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],l=s.toString().replaceAll(`
`,"");l.startsWith("function(")&&(l="0,"+l);let c=s,u=new Set,d=e[i]=function(m,h,v){try{s(m,h,v)}catch(w){if(s===c)throw w;return Vn.error("Error in patched chunk",w),void c(m,h,v)}if(h=m.exports,!h)return;if(h===window){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}let T=Number(i);for(let w of n)try{w(h,T)}catch(b){Vn.error("Error in webpack listener",b)}for(let[w,b]of t)try{if(w(h))t.delete(w),b(h,T);else if(typeof h=="object"){h.default&&w(h.default)&&(t.delete(w),b(h.default,T));for(let x in h)x.length<=3&&h[x]&&w(h[x])&&(t.delete(w),b(h[x],T))}}catch(x){Vn.error("Error while firing callback for webpack chunk",x)}};try{d.toString=()=>s.toString(),d.original=c}catch{}for(let m=0;m<r.length;m++){let h=r[m],v=Pn(`patchby${h.plugin}`,(T,w)=>l.replace(T,w));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);for(let T of h.replacement){if(T.predicate&&!T.predicate())continue;let w=s,b=l;ls(T,h.plugin);try{let x=v(T.match,T.replace);x===l&&!h.noWarn?((window.explosivePlugins??=new Set).add(h.plugin),Vn.warn(`Patchby${h.plugin}hadnoeffect(Moduleidis${i}):${T.match}`)):(l=x,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")}
${x}
//# sourceURL=WebpackModule${i}`))}catch(x){Vn.error(`Patch by ${h.plugin} errored (Module id is ${i}): ${T.match}
`,x),l=b,s=w,u.delete(h.plugin)}}h.all||r.splice(m--,1)}}}}var kw,Vn,Ew=g(()=>{"use strict";a();P();Je();cs();qs();nc();Vn=new ie("WebpackInterceptor","#8caaee");window[Wn]?(Vn.info(`Patching${Wn}.push(wasalreadyexistent,likelyfromcache!)`),Zs(window[Wn]),Rw(window[Wn])):(Object.defineProperty(window,Wn,{get:()=>kw,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Vn.info(`Patching${Wn}.push`),Rw(e)),Zs(e)&&(Vn.info("Successfully initialised Vencord webpack"),delete window[Wn],window[Wn]=e)),kw=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Vn.info("Found webpack module factory"),Lw(e),delete Function.prototype.m),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}))});var Nk={};Ue(Nk,{Api:()=>Lg,PlainSettings:()=>Zn,Plugins:()=>Fu,QuickCss:()=>_g,Settings:()=>L,Updater:()=>au,Util:()=>Eg,Webpack:()=>Fg});async function Ik(){if(L.cloud.authenticated&&await Pt("Vencord_cloudSecret")===null){Ne({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:()=>no.open("VencordCloud")});return}L.cloud.settingsSync&&L.cloud.authenticated&&(mr.Vencord_settingsDirty?(await Zr(),delete mr.Vencord_settingsDirty):await wa(!1)&&Ne({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:un}))}async function Ak(){await oc,_u(),Ik();try{if(!await Jr())return;if(L.autoUpdate){await Qr(),L.autoUpdateNotification&&setTimeout(()=>Ne({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:un}),1e4);return}L.notifyAboutUpdates&&setTimeout(()=>Ne({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){no.open("VencordUpdater")}}),1e4)}catch(e){hr.error("Failed to check for updates",e)}}var ix=g(()=>{a();ss();Ba();Nw();Bg();yr();nc();Bg();Ew();Kn();ko();$();Ba();ua();Do();Wi();yr();nc();I();Ak()});ix();return Io(Nk);})();